ICanBoogie
  • Documentation
  • API Reference
  • Render 0.6.x
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 EngineCollection

An engine collection.

ICanBoogie\Render\EngineCollection implements ArrayAccess, IteratorAggregate uses ICanBoogie\Accessor\AccessorTrait (not available)
Namespace: ICanBoogie\Render
Located at EngineCollection.php

Methods summary

protected get_extensions( void ) : array

Returns

array
public __construct( array $engines = [] )

Parameters

$engines
public offsetExists( $extension )

Inheritdoc

Implementation of

ArrayAccess::offsetExists()
public offsetGet( $extension )

Inheritdoc

Implementation of

ArrayAccess::offsetGet()
public offsetSet( $extension, $engine )

Inheritdoc

Implementation of

ArrayAccess::offsetSet()
public offsetUnset( $extension )

Inheritdoc

Implementation of

ArrayAccess::offsetUnset()
public getIterator( void )

Inheritdoc

Implementation of

IteratorAggregate::getIterator()
public resolve_engine( $pathname ) : ICanBoogie\Render\Engine|boolean

Resolves the engine to use from the specified pathname.

Resolves the engine to use from the specified pathname.

Parameters

$pathname

Returns

ICanBoogie\Render\Engine|boolean
An engine or false if none matches the extension.
public render( string $template_pathname, mixed $thisArg, array $variables, array $options = [] ) : string

Renders a template with the specified variables.

Renders a template with the specified variables.

Parameters

$template_pathname
The pathname of the template.
$thisArg
The subject of the rendering.
$variables
$options

Returns

string

Throws

ICanBoogie\Render\EngineNotAvailable
when there is no engine available to render the template.

Properties summary

Magic properties

public read-only $extensions : array

The extensions supported by the engines.

Render 0.6.x – Check on GitHub – API documentation generated by ApiGen