From ebe8f237f8515a1744b5fc32ce4d6e1db092d724 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 14 Aug 2010 09:05:04 +0200 Subject: [PATCH] updated doc (closes #100) --- doc/04-Extending-Twig.markdown | 10 ++-------- 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/doc/04-Extending-Twig.markdown b/doc/04-Extending-Twig.markdown index eca706d..3851a84 100644 --- a/doc/04-Extending-Twig.markdown +++ b/doc/04-Extending-Twig.markdown @@ -408,7 +408,7 @@ Let's create a simple `set` tag that allows the definition of simple variables from within a template. The tag can be used like follows: [twig] - {% set name as "value" %} + {% set name = "value" %} {{ name }} @@ -460,7 +460,7 @@ Now, let's see the actual code of this class: { $lineno = $token->getLine(); $name = $this->parser->getStream()->expect(Twig_Token::NAME_TYPE)->getValue(); - $this->parser->getStream()->expect(Twig_Token::NAME_TYPE, 'as'); + $this->parser->getStream()->expect(Twig_Token::NAME_TYPE, '='); $value = $this->parser->getExpressionParser()->parseExpression(); $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE); @@ -538,12 +538,6 @@ developer generate beautiful and readable PHP code: * `repr()`: Writes a PHP representation of a given value (see `Twig_Node_For` for a usage example). - * `pushContext()`: Pushes the current context on the stack (see - `Twig_Node_For` for a usage example). - - * `popContext()`: Pops a context from the stack (see `Twig_Node_For` for a - usage example). - * `addDebugInfo()`: Adds the line of the original template file related to the current node as a comment. -- 1.7.2.5