phpBB API Documentation
Class

phpbb\template\twig\loader

class loader extends Twig_Loader_Filesystem

Twig Template loader

Methods

__construct(string|array $paths = array())

Constructor

Twig_Loader_Filesystem setSafeDirectories(array $directories = array())

Set safe directories

Twig_Loader_Filesystem addSafeDirectory(string $directory)

Add safe directory

array getSafeDirectories()

Get current safe directories

addPath($path, $namespace = self::MAIN_NAMESPACE)

Adds a realpath call to fix a BC break in Twig 1.26 (https://github.com/twigphp/Twig/issues/2145)

Details

at line 30
public __construct(string|array $paths = array())

Constructor

Parameters

string|array $paths

at line 41
public Twig_Loader_Filesystem setSafeDirectories(array $directories = array())

Set safe directories

Parameters

array $directories Array of directories that are safe (empty to clear)

Return Value

Twig_Loader_Filesystem

at line 62
public Twig_Loader_Filesystem addSafeDirectory(string $directory)

Add safe directory

Parameters

string $directory Directory that should be added

Return Value

Twig_Loader_Filesystem

at line 79
public array getSafeDirectories()

Get current safe directories

Return Value

array

at line 102
public addPath($path, $namespace = self::MAIN_NAMESPACE)

Adds a realpath call to fix a BC break in Twig 1.26 (https://github.com/twigphp/Twig/issues/2145)

{@inheritdoc}

Parameters

$path
$namespace