ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Exception thrown when an error occurs during template loading. More...
Public Member Functions | |
__construct ($message, $lineno=-1, $source=null, Exception $previous=null) | |
Constructor. More... | |
![]() | |
__construct ($message, $lineno=-1, $source=null, Exception $previous=null) | |
Constructor. More... | |
getRawMessage () | |
Gets the raw message. More... | |
getTemplateFile () | |
Gets the logical name where the error occurred. More... | |
setTemplateFile ($name) | |
Sets the logical name where the error occurred. More... | |
getTemplateName () | |
Gets the logical name where the error occurred. More... | |
setTemplateName ($name) | |
Sets the logical name where the error occurred. More... | |
getTemplateLine () | |
Gets the template line where the error occurred. More... | |
setTemplateLine ($lineno) | |
Sets the template line where the error occurred. More... | |
getSourceContext () | |
Gets the source context of the Twig template where the error occurred. More... | |
setSourceContext (Twig_Source $source=null) | |
Sets the source context of the Twig template where the error occurred. More... | |
guess () | |
__call ($method, $arguments) | |
For PHP < 5.3.0, provides access to the getPrevious() method. More... | |
appendMessage ($rawMessage) | |
Additional Inherited Members | |
![]() | |
updateRepr () | |
guessTemplateInfo () | |
![]() | |
$lineno | |
$filename | |
$rawMessage | |
$previous | |
Exception thrown when an error occurs during template loading.
Automatic template information guessing is always turned off as if a template cannot be loaded, there is nothing to guess. However, when a template is loaded from another one, then, we need to find the current context and this is automatically done by Twig_Template::displayWithErrorHandling().
This strategy makes Twig_Environment::resolveTemplate() much faster.
Definition at line 25 of file Loader.php.
Twig_Error_Loader::__construct | ( | $message, | |
$lineno = -1 , |
|||
$source = null , |
|||
Exception | $previous = null |
||
) |
Constructor.
Set both the line number and the name to false to disable automatic guessing of the original template name and line number.
Set the line number to -1 to enable its automatic guessing. Set the name to null to enable its automatic guessing.
By default, automatic guessing is enabled.
string | $message | The error message |
int | $lineno | The template line where the error occurred |
Twig_Source | string | null | $source | The source context where the error occurred |
Exception | $previous | The previous exception |
Reimplemented from Twig_Error.
Definition at line 27 of file Loader.php.
References $message, Twig_Error\$previous, Twig_Error\appendMessage(), and Twig_Error\setTemplateLine().