PHP Класс Frontend\Core\Engine\TwigTemplate

Наследование: extends Common\Core\Twig\BaseTwigTemplate
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( ) The constructor will store the instance in the reference, preset some settings and map the custom modifiers.
addGlobal ( string $name, mixed $value ) Adds a global variable to the template
getContent ( string $template ) : string Fetch the parsed content from this template.
getPath ( string $template ) : string Convert a filename extension
render ( string $template, array $variables = [] ) : string

Приватные методы

Метод Описание
getFormTemplates ( string $fileName ) : array
getLoadingFolders ( ) : array

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

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

The constructor will store the instance in the reference, preset some settings and map the custom modifiers.
public __construct ( )

addGlobal() публичный метод

Adds a global variable to the template
public addGlobal ( string $name, mixed $value )
$name string
$value mixed

getContent() публичный метод

Fetch the parsed content from this template.
public getContent ( string $template ) : string
$template string The location of the template file, used to display this template.
Результат string The actual parsed content after executing this template.

getPath() публичный метод

Convert a filename extension
public getPath ( string $template ) : string
$template string
Результат string

render() публичный метод

public render ( string $template, array $variables = [] ) : string
$template string
$variables array
Результат string