From: Fabien Potencier Date: Sat, 14 Aug 2010 07:05:04 +0000 (+0200) Subject: updated doc (closes #100) X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=ebe8f237f8515a1744b5fc32ce4d6e1db092d724;p=konrad%2Ftwig.git updated doc (closes #100) --- 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.