ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Twig_Error_Loader Class Reference

Exception thrown when an error occurs during template loading. More...

+ Inheritance diagram for Twig_Error_Loader:
+ Collaboration diagram for Twig_Error_Loader:

Public Member Functions

 __construct ($message, $lineno=-1, $source=null, Exception $previous=null)
 
- Public Member Functions inherited from Twig_Error
 __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

- Protected Member Functions inherited from Twig_Error
 updateRepr ()
 
 guessTemplateInfo ()
 
- Protected Attributes inherited from Twig_Error
 $lineno
 
 $filename
 
 $rawMessage
 
 $previous
 

Detailed Description

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.

Author
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com

Definition at line 25 of file Loader.php.

Constructor & Destructor Documentation

◆ __construct()

Twig_Error_Loader::__construct (   $message,
  $lineno = -1,
  $source = null,
Exception  $previous = null 
)

Definition at line 27 of file Loader.php.

References $message, Twig_Error\$previous, Twig_Error\appendMessage(), and Twig_Error\setTemplateLine().

28  {
29  if (PHP_VERSION_ID < 50300) {
30  $this->previous = $previous;
31  Exception::__construct('');
32  } else {
33  Exception::__construct('', 0, $previous);
34  }
35  $this->appendMessage($message);
36  $this->setTemplateLine(false);
37  }
catch(Exception $e) $message
appendMessage($rawMessage)
Definition: Error.php:237
setTemplateLine($lineno)
Sets the template line where the error occurred.
Definition: Error.php:179
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: