[ Index ]

PHP Cross Reference of phpBB-3.3.12-deutsch




/phpbb/template/twig/ -> loader.php (summary)

This file is part of the phpBB Forum Software package.

Copyright: (c) phpBB Limited
License: GNU General Public License, version 2 (GPL-2.0)
File Size: 176 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

loader:: (7 methods):

Class: loader  - X-Ref

Twig Template loader

__construct(\phpbb\filesystem\filesystem_interface $filesystem, $paths = array()   X-Ref

param: \phpbb\filesystem\filesystem_interface $filesystem
param: string|array    $paths

setSafeDirectories($directories = array()   X-Ref
Set safe directories

return: \Twig\Loader\FilesystemLoader
param: array $directories Array of directories that are safe (empty to clear)

addSafeDirectory($directory)   X-Ref
Add safe directory

return: \Twig\Loader\FilesystemLoader
param: string $directory Directory that should be added

getSafeDirectories()   X-Ref
Get current safe directories

return: array

validateName($name)   X-Ref
Override for parent::validateName()

This is done because we added support for safe directories, and when Twig
findTemplate() is called, validateName() is called first, which would
always throw an exception if the file is outside of the configured
template directories.

addPath($path, $namespace = self::MAIN_NAMESPACE)   X-Ref
Adds a realpath call to fix a BC break in Twig 1.26 (https://github.com/twigphp/Twig/issues/2145)


findTemplate($name, $throw = true)   X-Ref
Find the template

Override for \Twig\Loader\FilesystemLoader::findTemplate
to add support for loading from safe directories.

Generated: Sun Jun 23 12:25:44 2024 Cross-referenced by PHPXref 0.7.1