Class Renderer
Renders a target or an array of options.
Methods summary
public
resolve_template( string $name
)
: string
Resolve a template pathname from its name and type.
Resolve a template pathname from its name and type.
Parameters
Returns
string
Template pathname.
Throws
public
render( mixed $target_or_options
, array $additional_options
= [] )
: string
Renders a target or options.
Renders a target or options.
Parameters
$target_or_options
- The target or options to render.
$additional_options
- Additional render options.
Returns
string
protected
render_partial( string $template
, mixed $content
, array $variables
)
: string
Renders partial.
Parameters
$template
$content
$variables
Returns
string
protected
render_layout( string $template
, array $variables
)
: string
Renders layout.
Parameters
Returns
string
protected
render_template( string $name
, string $content
, array $variables
)
: string
Renders template.
Parameters
$name
$content
$variables
Returns
string
protected
resolve_options( mixed $target_or_options
, array $additional_options
= [] )
: array
Resolves rendering options.
Resolves rendering options.
Parameters
$target_or_options
$additional_options
Returns
array
Throws
Constants summary
OPTION_LAYOUT
: string
'layout'
OPTION_PARTIAL
: string
'partial'
OPTION_TEMPLATE
: string
'template'
OPTION_CONTENT
: string
'content'
OPTION_LOCALS
: string
'locals'
Properties summary