class TimedPhpEngine extends PhpEngine
Times the time spent to render a template.
Methods
__construct(TemplateNameParserInterface $parser, ContainerInterface $container, LoaderInterface $loader, Stopwatch $stopwatch, GlobalVariables $globals = null) Constructor. | ||
string | render(string|TemplateReferenceInterface $name, array $parameters = array()) Renders a template. | |
bool | exists(string|TemplateReferenceInterface $name) Returns true if the template exists. | from PhpEngine |
bool | supports(string|TemplateReferenceInterface $name) Returns true if this class is able to render the given template. | from PhpEngine |
HelperInterface | offsetGet(string $name) Gets a helper value. | from PhpEngine |
bool | offsetExists(string $name) Returns true if the helper is defined. | from PhpEngine |
offsetSet(HelperInterface $name, string $value) Sets a helper. | from PhpEngine | |
offsetUnset(string $name) Removes a helper. | from PhpEngine | |
addHelpers(array $helpers) Adds some helpers. | from PhpEngine | |
setHelpers(array $helpers) Sets the helpers. | from PhpEngine | |
set(HelperInterface $helper, string $alias = null) Sets a helper. | from PhpEngine | |
bool | has(string $name) Returns true if the helper if defined. | from PhpEngine |
HelperInterface | get(string $name) Gets a helper value. | from PhpEngine |
extend(string $template) Decorates the current template with another one. | from PhpEngine | |
string | escape(mixed $value, string $context = 'html') Escapes a string by using the current charset. | from PhpEngine |
setCharset(string $charset) Sets the charset to use. | from PhpEngine | |
string | getCharset() Gets the current charset. | from PhpEngine |
setEscaper(string $context, callable $escaper) Adds an escaper for the given context. | from PhpEngine | |
callable | getEscaper(string $context) Gets an escaper for a given context. | from PhpEngine |
addGlobal(string $name, mixed $value) | from PhpEngine | |
array | getGlobals() Returns the assigned globals. | from PhpEngine |
string | convertEncoding(string $string, string $to, string $from) deprecated Convert a string from one encoding to another. | from PhpEngine |
LoaderInterface | getLoader() Gets the loader associated with this engine. | from PhpEngine |
Response | renderResponse(string $view, array $parameters = array(), Response $response = null) Renders a view and returns a Response. | from PhpEngine |
Details
__construct(TemplateNameParserInterface $parser, ContainerInterface $container, LoaderInterface $loader, Stopwatch $stopwatch, GlobalVariables $globals = null)
Constructor.
string render(string|TemplateReferenceInterface $name, array $parameters = array())
Renders a template.
bool exists(string|TemplateReferenceInterface $name)
Returns true if the template exists.
bool supports(string|TemplateReferenceInterface $name)
Returns true if this class is able to render the given template.
HelperInterface offsetGet(string $name)
Gets a helper value.
bool offsetExists(string $name)
Returns true if the helper is defined.
offsetSet(HelperInterface $name, string $value)
Sets a helper.
offsetUnset(string $name)
Removes a helper.
addHelpers(array $helpers)
Adds some helpers.
setHelpers(array $helpers)
Sets the helpers.
set(HelperInterface $helper, string $alias = null)
Sets a helper.
bool has(string $name)
Returns true if the helper if defined.
HelperInterface get(string $name)
Gets a helper value.
extend(string $template)
Decorates the current template with another one.
string escape(mixed $value, string $context = 'html')
Escapes a string by using the current charset.
setCharset(string $charset)
Sets the charset to use.
string getCharset()
Gets the current charset.
setEscaper(string $context, callable $escaper)
Adds an escaper for the given context.
callable getEscaper(string $context)
Gets an escaper for a given context.
addGlobal(string $name, mixed $value)
array getGlobals()
Returns the assigned globals.
string convertEncoding(string $string, string $to, string $from) deprecated
deprecated
since 2.8, to be removed in 3.0. Use iconv() instead.Convert a string from one encoding to another.
LoaderInterface getLoader()
Gets the loader associated with this engine.
Please login to continue.