Class Twig_Error_Syntax

InheritanceTwig_Error_Syntax » Twig_Error » Exception

Exception thrown when a syntax error occurs during lexing or parsing of a template.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__call() For PHP < 5.3.0, provides access to the getPrevious() method. Twig_Error
__construct() Constructor. Twig_Error
addSuggestions() Tweaks the error message to include suggestions. Twig_Error_Syntax
appendMessage() Twig_Error
computeAlternatives() Twig_Error_Syntax
getRawMessage() Gets the raw message. Twig_Error
getTemplateFile() Gets the filename where the error occurred. Twig_Error
getTemplateLine() Gets the template line where the error occurred. Twig_Error
guess() Twig_Error
setTemplateFile() Sets the filename where the error occurred. Twig_Error
setTemplateLine() Sets the template line where the error occurred. Twig_Error

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
guessTemplateInfo() Twig_Error
updateRepr() Twig_Error

Method Details

addSuggestions() public method

Tweaks the error message to include suggestions.

public void addSuggestions ( $name, array $items )
$name string

The original name of the item that does not exist

$items array

An array of possible items

computeAlternatives() public static method

public static void computeAlternatives ( $name, $items )
$name
$items