class PhpEngine extends PhpEngine implements EngineInterface
This engine knows how to render Symfony templates.
Methods
__construct(TemplateNameParserInterface $parser, ContainerInterface $container, LoaderInterface $loader, GlobalVariables $globals = null) Constructor. | ||
string | render(string|TemplateReferenceInterface $name, array $parameters = array()) Renders a template. | from PhpEngine |
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. | ||
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. | |
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, mixed $escaper) Adds an escaper for the given context. | from PhpEngine | |
mixed | 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) 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. |
Details
__construct(TemplateNameParserInterface $parser, ContainerInterface $container, LoaderInterface $loader, 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, mixed $escaper)
Adds an escaper for the given context.
mixed 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)
Convert a string from one encoding to another.
LoaderInterface getLoader()
Gets the loader associated with this engine.
Please login to continue.