PHP Class Kohana_Twig_Trans_TokenParser, kohana-twig

Both block styles are allowed: {% trans "String to translate" %} {% trans %} String to translate {% endtrans %} The body of the tag will be trim()ed before being passed to __().
Inheritance: extends Twig_TokenParser
Afficher le fichier Open project: jonathangeiger/kohana-twig

Méthodes publiques

Méthode Description
decideForEnd ( $token ) : boolean Tests for the endtrans block
getTag ( ) Gets the tag name associated with this token parser.
parse ( Twig_Token $token ) : Twig_NodeInterface Parses a token and returns a node.

Méthodes protégées

Méthode Description
check_trans_string ( Twig_NodeInterface $body, string $lineno ) : void Ensures only "simple" vars are in the body to be translated.

Method Details

check_trans_string() protected méthode

Ensures only "simple" vars are in the body to be translated.
Author: Tiger Advertising
protected check_trans_string ( Twig_NodeInterface $body, string $lineno ) : void
$body Twig_NodeInterface
$lineno string
Résultat void

decideForEnd() public méthode

Tests for the endtrans block
public decideForEnd ( $token ) : boolean
Résultat boolean

getTag() public méthode

Gets the tag name associated with this token parser.
public getTag ( )

parse() public méthode

Parses a token and returns a node.
public parse ( Twig_Token $token ) : Twig_NodeInterface
$token Twig_Token A Twig_Token instance
Résultat Twig_NodeInterface A Twig_NodeInterface instance