ICanBoogie/Render master
  • Namespace
  • Class

Namespaces

  • ICanBoogie
    • Render
      • EngineCollection
      • Renderer
      • TemplateResolver

Classes

  • BasicTemplateResolver
  • EngineCollection
  • EngineNotAvailable
  • EngineNotDefined
  • PHPEngine
  • Renderer
  • StringObject
  • TemplateName

Interfaces

  • Engine
  • Exception
  • TemplateResolver
  • TemplateResolverDecorator

Traits

  • TemplateResolverDecoratorTrait
  • TemplateResolverTrait

Exceptions

  • InvalidRenderTarget
  • TemplateNotFound

Functions

  • get_engines
  • get_renderer
  • get_template_resolver
  • render

Class Renderer

Renders a target or an array of options.

Namespace: ICanBoogie\Render
Located at Renderer.php

Methods summary

public
# __construct( ICanBoogie\Render\TemplateResolver $template_resolver, ICanBoogie\Render\EngineCollection $engines )

Parameters

$template_resolver
$engines
public string
# resolve_template( string $name )

Resolve a template pathname from its name and type.

Resolve a template pathname from its name and type.

Parameters

$name

Returns

string
Template pathname.

Throws

ICanBoogie\Render\TemplateNotFound
if the template pathname cannot be resolved.
public string
# render( mixed $target_or_options, array $additional_options = [] )

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 string
# render_partial( string $template, mixed $content, array $variables )

Renders partial.

Renders partial.

Parameters

$template
$content
$variables

Returns

string
protected string
# render_layout( string $template, array $variables )

Renders layout.

Renders layout.

Parameters

$template
$variables

Returns

string
protected string
# render_template( string $name, string $content, array $variables )

Renders template.

Renders template.

Parameters

$name
$content
$variables

Returns

string
protected ICanBoogie\Render\TemplateName
# resolve_template_name( mixed $content )

Resolves template name.

Resolves template name.

Parameters

$content

Returns

ICanBoogie\Render\TemplateName
protected array
# resolve_options( mixed $target_or_options, array $additional_options = [] )

Resolves rendering options.

Resolves rendering options.

Parameters

$target_or_options
$additional_options

Returns

array

Throws

ICanBoogie\Render\InvalidRenderTarget
if rendering target is invalid.

Constants summary

string OPTION_LAYOUT
# 'layout'
string OPTION_PARTIAL
# 'partial'
string OPTION_TEMPLATE
# 'template'
string OPTION_CONTENT
# 'content'
string OPTION_LOCALS
# 'locals'

Properties summary

protected ICanBoogie\Render\TemplateResolver $template_resolver
#
ICanBoogie/Render master API documentation generated by ApiGen