TimedPhpEngine
class TimedPhpEngine extends PhpEngine
Times the time spent to render a template.
Methods
Constructor.
Returns true if this class is able to render the given template.
Escapes a string by using the current charset.
Adds an escaper for the given context.
Convert a string from one encoding to another.
Renders a view and returns a Response.
Details
at line line 37
__construct(TemplateNameParserInterface $parser, ContainerInterface $container, LoaderInterface $loader, Stopwatch $stopwatch, GlobalVariables $globals = null)
Constructor.
at line line 47
string
render(string|TemplateReferenceInterface $name, array $parameters = array())
Renders a template.
in PhpEngine at line line 101
bool
exists(string|TemplateReferenceInterface $name)
Returns true if the template exists.
in PhpEngine at line line 115
bool
supports(string|TemplateReferenceInterface $name)
Returns true if this class is able to render the given template.
in PhpEngine at line line 180
HelperInterface
offsetGet(string $name)
Gets a helper value.
in PhpEngine at line line 192
bool
offsetExists(string $name)
Returns true if the helper is defined.
in PhpEngine at line line 203
offsetSet(HelperInterface $name, string $value)
Sets a helper.
in PhpEngine at line line 215
offsetUnset(string $name)
Removes a helper.
in PhpEngine at line line 225
addHelpers(array $helpers)
Adds some helpers.
in PhpEngine at line line 68
setHelpers(array $helpers)
Sets the helpers.
in PhpEngine at line line 249
set(HelperInterface $helper, string $alias = null)
Sets a helper.
in PhpEngine at line line 266
bool
has(string $name)
Returns true if the helper if defined.
in PhpEngine at line line 51
HelperInterface
get(string $name)
Gets a helper value.
in PhpEngine at line line 294
extend(string $template)
Decorates the current template with another one.
in PhpEngine at line line 307
string
escape(mixed $value, string $context = 'html')
Escapes a string by using the current charset.
in PhpEngine at line line 331
setCharset(string $charset)
Sets the charset to use.
in PhpEngine at line line 348
string
getCharset()
Gets the current charset.
in PhpEngine at line line 359
setEscaper(string $context, callable $escaper)
Adds an escaper for the given context.
in PhpEngine at line line 374
callable
getEscaper(string $context)
Gets an escaper for a given context.
in PhpEngine at line line 387
addGlobal(string $name, mixed $value)
in PhpEngine at line line 397
array
getGlobals()
Returns the assigned globals.
in PhpEngine at line line 497
string
convertEncoding(string $string, string $to, string $from)
deprecated
deprecated
Convert a string from one encoding to another.
in PhpEngine at line line 509
LoaderInterface
getLoader()
Gets the loader associated with this engine.