PHP Класс Symfony\Bundle\TwigBundle\Loader\FilesystemLoader

Автор: Fabien Potencier ([email protected])
Наследование: extends Twig_Loader_Filesystem
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$locator
$parser

Открытые методы

Метод Описание
__construct ( Symfony\Component\Config\FileLocatorInterface $locator, Symfony\Component\Templating\TemplateNameParserInterface $parser, string | null $rootPath = null ) Constructor.
exists ( $name )

Защищенные методы

Метод Описание
findTemplate ( string | Symfony\Component\Templating\TemplateReferenceInterface $template, boolean $throw = true ) : string Returns the path to the template file.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( Symfony\Component\Config\FileLocatorInterface $locator, Symfony\Component\Templating\TemplateNameParserInterface $parser, string | null $rootPath = null )
$locator Symfony\Component\Config\FileLocatorInterface A FileLocatorInterface instance
$parser Symfony\Component\Templating\TemplateNameParserInterface A TemplateNameParserInterface instance
$rootPath string | null The root path common to all relative paths (null for getcwd())

exists() публичный Метод

The name parameter might also be a TemplateReferenceInterface.
public exists ( $name )

findTemplate() защищенный Метод

The file locator is used to locate the template when the naming convention is the symfony one (i.e. the name can be parsed). Otherwise the template is located using the locator from the twig library.
protected findTemplate ( string | Symfony\Component\Templating\TemplateReferenceInterface $template, boolean $throw = true ) : string
$template string | Symfony\Component\Templating\TemplateReferenceInterface The template
$throw boolean When true, a \Twig_Error_Loader exception will be thrown if a template could not be found
Результат string The path to the template file

Описание свойств

$locator защищенное свойство

protected $locator

$parser защищенное свойство

protected $parser