PHP Класс ManaPHP\Renderer

Наследование: extends Component, implements manaphp\RendererInterface
Показать файл Открыть проект

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

Свойство Тип Описание
$_engines array
$_resolved ManaPHP\Renderer\EngineInterface[]
$_sectionStack array
$_sections array

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

Метод Описание
__construct ( array $engines = ['.sword' => 'ManaPHP\Renderer\Engine\Sword', '.phtml' => 'ManaPHP\Renderer\Engine\Php'] ) Renderer constructor.
appendSection ( ) : void
escape ( string $v ) : string
exists ( string $template ) : boolean
getSection ( string $section, string $default = '' ) : string Get the string contents of a section.
partial ( string $path, array $vars = [] ) : void
render ( string $template, array $vars = [], boolean $directOutput = false ) : string Checks whether $template exists on registered extensions and render it
startSection ( string $section ) : void Start injecting content into a section.
stopSection ( boolean $overwrite = false ) : void Stop injecting content into a section.

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

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

Renderer constructor.
public __construct ( array $engines = ['.sword' => 'ManaPHP\Renderer\Engine\Sword', '.phtml' => 'ManaPHP\Renderer\Engine\Php'] )
$engines array

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

public appendSection ( ) : void
Результат void

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

public escape ( string $v ) : string
$v string
Результат string

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

public exists ( string $template ) : boolean
$template string
Результат boolean

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

Get the string contents of a section.
public getSection ( string $section, string $default = '' ) : string
$section string
$default string
Результат string

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

public partial ( string $path, array $vars = [] ) : void
$path string
$vars array
Результат void

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

Checks whether $template exists on registered extensions and render it
public render ( string $template, array $vars = [], boolean $directOutput = false ) : string
$template string
$vars array
$directOutput boolean
Результат string

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

Start injecting content into a section.
public startSection ( string $section ) : void
$section string
Результат void

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

Stop injecting content into a section.
public stopSection ( boolean $overwrite = false ) : void
$overwrite boolean
Результат void

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

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

protected array $_engines
Результат array

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

protected EngineInterface[],ManaPHP\Renderer $_resolved
Результат ManaPHP\Renderer\EngineInterface[]

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

protected array $_sectionStack
Результат array

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

protected array $_sections
Результат array