PHP Class ManaPHP\Renderer

Inheritance: extends Component, implements manaphp\RendererInterface
Afficher le fichier Open project: manaphp/manaphp

Protected Properties

Свойство Type Description
$_engines array
$_resolved ManaPHP\Renderer\EngineInterface[]
$_sectionStack array
$_sections array

Méthodes publiques

Méthode Description
__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.

Method Details

__construct() public méthode

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

appendSection() public méthode

public appendSection ( ) : void
Résultat void

escape() public méthode

public escape ( string $v ) : string
$v string
Résultat string

exists() public méthode

public exists ( string $template ) : boolean
$template string
Résultat boolean

getSection() public méthode

Get the string contents of a section.
public getSection ( string $section, string $default = '' ) : string
$section string
$default string
Résultat string

partial() public méthode

public partial ( string $path, array $vars = [] ) : void
$path string
$vars array
Résultat void

render() public méthode

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
Résultat string

startSection() public méthode

Start injecting content into a section.
public startSection ( string $section ) : void
$section string
Résultat void

stopSection() public méthode

Stop injecting content into a section.
public stopSection ( boolean $overwrite = false ) : void
$overwrite boolean
Résultat void

Property Details

$_engines protected_oe property

protected array $_engines
Résultat array

$_resolved protected_oe property

protected EngineInterface[],ManaPHP\Renderer $_resolved
Résultat ManaPHP\Renderer\EngineInterface[]

$_sectionStack protected_oe property

protected array $_sectionStack
Résultat array

$_sections protected_oe property

protected array $_sections
Résultat array