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 PHPEngine

Renders PHP templates.

ICanBoogie\Render\PHPEngine implements ICanBoogie\Render\Engine
Namespace: ICanBoogie\Render
Located at PHPEngine.php

Methods summary

public render( string $template_pathname, mixed $thisArg, array $variables, array $options = [] ) : mixed

Parameters

$template_pathname
Pathname to the template to render.
$thisArg
thisArg, if supported by the engine.
$variables
Variable to render the template with.
$options
Miscellaneous options.

Returns

mixed

Inheritdoc

Implementation of

ICanBoogie\Render\Engine::render()
protected ensure_is_object( $value ) : ArrayObject|ICanBoogie\Render\StringObject

Ensures that a value is an object.

Ensures that a value is an object.

  • value is an object, value is returned.
  • value is an array, an ArrayObject instance is returned.
  • Otherwise value is cast into a string and a String instance is returned.

Parameters

$value

Returns

ArrayObject|ICanBoogie\Render\StringObject

Constants summary

Constants inherited from ICanBoogie\Render\Engine

VAR_TEMPLATE_PATHNAME

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