Skip to content

Instantly share code, notes, and snippets.

View Nicofuma's full-sized avatar

Tristan Darricau Nicofuma

View GitHub Profile
<?php
$configuration = new \ProxyManager\Configuration();
$configuration->setProxiesTargetDir($this->phpbb_root_path . '/cache');
spl_autoload_register($configuration->getProxyAutoloader());
$factory = new \ProxyManager\Factory\LazyLoadingValueHolderFactory($configuration);
$twig = $this->twig;
$lexer = $factory->createProxy(
'phpbb\template\twig\lexer',
<?php
/**
*
* @package phpBB3
* @copyright (c) 2011 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
namespace phpbb\di;
parameters:
- tables:
- %core.table_prefix%my_first_table
- %core.table_prefix%my_second_table
and maybe (but i'm not sure):
parameters:
- tables:
- [ table1, %core.table_prefix%my_first_table ]
- [ table2, %core.table_prefix%my_second_table ]
<?php
public function set_custom_style($names, $paths)
{
$paths = (is_string($paths)) ? array($paths) : $paths;
$names = (is_string($names)) ? array($names) : $names;
// Set as __main__ namespace
$this->twig->getLoader()->setPaths($paths);