\Quark\TwigTwig

Twig class.

Summary

Methods
Properties
Constants
__construct()
render()
renderString()
registerPaths()
registerExtensions()
registerFilters()
registerGlobals()
registerFunctions()
registerTests()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$loader
$twig
N/A

Properties

$loader

$loader : \Twig_Loader_Filesystem

Type

\Twig_Loader_Filesystem — Loader.

$twig

$twig : \Twig_Environment

Type

\Twig_Environment — Twig.

Methods

__construct()

__construct(array  $options = array()) 

Creates an instance of Twig.

Parameters

array $options

Options.

render()

render(string  $template, array  $context = array()) : string

Render a template.

Parameters

string $template

Template name.

array $context

Parameters to pass to the template.

Returns

string —

Rendered template.

renderString()

renderString(string  $template, array  $context = array()) : string

Render a string template.

Parameters

string $template

Template string.

array $context

Parameters to pass to the template.

Returns

string —

Rendered template.

registerPaths()

registerPaths(array  $paths) 

Register paths.

Parameters

array $paths

Paths.

registerExtensions()

registerExtensions(array  $extensions) 

Register extensions.

Parameters

array $extensions

Extensions.

registerFilters()

registerFilters(array  $filters) 

Register filters.

Parameters

array $filters

Filters.

registerGlobals()

registerGlobals(array  $globals) 

Register globals.

Parameters

array $globals

Globals.

registerFunctions()

registerFunctions(array  $functions) 

Register functions.

Parameters

array $functions

Functions.

registerTests()

registerTests(array  $tests) 

Register tests.

Parameters

array $tests

Tests.