From: Fabien Potencier Date: Sat, 12 Jun 2010 12:54:30 +0000 (+0200) Subject: added some phpdoc X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=c0bd29b82d33a83d4a1fdc230abb56888fbb7892;p=web%2Fkonrad%2Ftwig.git added some phpdoc --- diff --git a/lib/Twig/Node/AutoEscape.php b/lib/Twig/Node/AutoEscape.php index 6532a80..a238e9b 100644 --- a/lib/Twig/Node/AutoEscape.php +++ b/lib/Twig/Node/AutoEscape.php @@ -29,6 +29,11 @@ class Twig_Node_AutoEscape extends Twig_Node parent::__construct(array('body' => $body), array('value' => $value), $lineno, $tag); } + /** + * Compiles the node to PHP. + * + * @param Twig_Compiler A Twig_Compiler instance + */ public function compile($compiler) { $compiler->subcompile($this->body); diff --git a/lib/Twig/Node/Block.php b/lib/Twig/Node/Block.php index ac22ced..5547d95 100644 --- a/lib/Twig/Node/Block.php +++ b/lib/Twig/Node/Block.php @@ -24,6 +24,11 @@ class Twig_Node_Block extends Twig_Node parent::__construct(array('body' => $body), array('name' => $name), $lineno, $tag); } + /** + * Compiles the node to PHP. + * + * @param Twig_Compiler A Twig_Compiler instance + */ public function compile($compiler) { $compiler diff --git a/lib/Twig/Node/BlockReference.php b/lib/Twig/Node/BlockReference.php index 38d1e14..a09b4dc 100644 --- a/lib/Twig/Node/BlockReference.php +++ b/lib/Twig/Node/BlockReference.php @@ -24,6 +24,11 @@ class Twig_Node_BlockReference extends Twig_Node parent::__construct(array(), array('name' => $name), $lineno, $tag); } + /** + * Compiles the node to PHP. + * + * @param Twig_Compiler A Twig_Compiler instance + */ public function compile($compiler) { $compiler diff --git a/lib/Twig/Node/Debug.php b/lib/Twig/Node/Debug.php index 8c3cbc7..1832c7d 100644 --- a/lib/Twig/Node/Debug.php +++ b/lib/Twig/Node/Debug.php @@ -23,6 +23,11 @@ class Twig_Node_Debug extends Twig_Node parent::__construct(array('expr' => $expr), array(), $lineno, $tag); } + /** + * Compiles the node to PHP. + * + * @param Twig_Compiler A Twig_Compiler instance + */ public function compile($compiler) { $compiler->addDebugInfo($this); diff --git a/lib/Twig/Node/Expression/Array.php b/lib/Twig/Node/Expression/Array.php index d6e71f4..b6f01a0 100644 --- a/lib/Twig/Node/Expression/Array.php +++ b/lib/Twig/Node/Expression/Array.php @@ -15,6 +15,11 @@ class Twig_Node_Expression_Array extends Twig_Node_Expression parent::__construct($elements, array(), $lineno); } + /** + * Compiles the node to PHP. + * + * @param Twig_Compiler A Twig_Compiler instance + */ public function compile($compiler) { $compiler->raw('array('); diff --git a/lib/Twig/Node/Expression/AssignName.php b/lib/Twig/Node/Expression/AssignName.php index 4e33005..bf14fa4 100644 --- a/lib/Twig/Node/Expression/AssignName.php +++ b/lib/Twig/Node/Expression/AssignName.php @@ -12,6 +12,11 @@ class Twig_Node_Expression_AssignName extends Twig_Node_Expression_Name { + /** + * Compiles the node to PHP. + * + * @param Twig_Compiler A Twig_Compiler instance + */ public function compile($compiler) { $compiler->raw(sprintf('$context[\'%s\']', $this['name'])); diff --git a/lib/Twig/Node/Expression/Binary.php b/lib/Twig/Node/Expression/Binary.php index cd13f08..537f0d8 100644 --- a/lib/Twig/Node/Expression/Binary.php +++ b/lib/Twig/Node/Expression/Binary.php @@ -16,6 +16,11 @@ abstract class Twig_Node_Expression_Binary extends Twig_Node_Expression parent::__construct(array('left' => $left, 'right' => $right), array(), $lineno); } + /** + * Compiles the node to PHP. + * + * @param Twig_Compiler A Twig_Compiler instance + */ public function compile($compiler) { $compiler diff --git a/lib/Twig/Node/Expression/Binary/FloorDiv.php b/lib/Twig/Node/Expression/Binary/FloorDiv.php index f689414..1f69885 100644 --- a/lib/Twig/Node/Expression/Binary/FloorDiv.php +++ b/lib/Twig/Node/Expression/Binary/FloorDiv.php @@ -10,6 +10,11 @@ */ class Twig_Node_Expression_Binary_FloorDiv extends Twig_Node_Expression_Binary { + /** + * Compiles the node to PHP. + * + * @param Twig_Compiler A Twig_Compiler instance + */ public function compile($compiler) { $compiler->raw('floor('); diff --git a/lib/Twig/Node/For.php b/lib/Twig/Node/For.php index e557653..b1031ee 100644 --- a/lib/Twig/Node/For.php +++ b/lib/Twig/Node/For.php @@ -24,6 +24,11 @@ class Twig_Node_For extends Twig_Node parent::__construct(array('key_target' => $keyTarget, 'value_target' => $valueTarget, 'seq' => $seq, 'body' => $body, 'else' => $else), array('with_loop' => $withLoop), $lineno, $tag); } + /** + * Compiles the node to PHP. + * + * @param Twig_Compiler A Twig_Compiler instance + */ public function compile($compiler) { $compiler diff --git a/lib/Twig/Node/If.php b/lib/Twig/Node/If.php index 34dbfa0..985745f 100644 --- a/lib/Twig/Node/If.php +++ b/lib/Twig/Node/If.php @@ -24,6 +24,11 @@ class Twig_Node_If extends Twig_Node parent::__construct(array('tests' => $tests, 'else' => $else), array(), $lineno, $tag); } + /** + * Compiles the node to PHP. + * + * @param Twig_Compiler A Twig_Compiler instance + */ public function compile($compiler) { $compiler->addDebugInfo($this); diff --git a/lib/Twig/Node/Import.php b/lib/Twig/Node/Import.php index e86fc0e..5d917da 100644 --- a/lib/Twig/Node/Import.php +++ b/lib/Twig/Node/Import.php @@ -23,6 +23,11 @@ class Twig_Node_Import extends Twig_Node parent::__construct(array('expr' => $expr, 'var' => $var), array(), $lineno, $tag); } + /** + * Compiles the node to PHP. + * + * @param Twig_Compiler A Twig_Compiler instance + */ public function compile($compiler) { $compiler diff --git a/lib/Twig/Node/Include.php b/lib/Twig/Node/Include.php index d2ca928..d7c9fd4 100644 --- a/lib/Twig/Node/Include.php +++ b/lib/Twig/Node/Include.php @@ -24,6 +24,11 @@ class Twig_Node_Include extends Twig_Node parent::__construct(array('expr' => $expr, 'variables' => $variables), array(), $lineno, $tag); } + /** + * Compiles the node to PHP. + * + * @param Twig_Compiler A Twig_Compiler instance + */ public function compile($compiler) { $compiler->addDebugInfo($this); diff --git a/lib/Twig/Node/Macro.php b/lib/Twig/Node/Macro.php index 03286a8..7db4a98 100644 --- a/lib/Twig/Node/Macro.php +++ b/lib/Twig/Node/Macro.php @@ -23,6 +23,11 @@ class Twig_Node_Macro extends Twig_Node parent::__construct(array('body' => $body, 'arguments' => $arguments), array('name' => $name), $lineno, $tag); } + /** + * Compiles the node to PHP. + * + * @param Twig_Compiler A Twig_Compiler instance + */ public function compile($compiler) { $arguments = array(); diff --git a/lib/Twig/Node/Module.php b/lib/Twig/Node/Module.php index de71710..95b96e9 100644 --- a/lib/Twig/Node/Module.php +++ b/lib/Twig/Node/Module.php @@ -24,6 +24,11 @@ class Twig_Node_Module extends Twig_Node parent::__construct(array('parent' => $parent, 'body' => $body, 'blocks' => $blocks, 'macros' => $macros), array('filename' => $filename), 1); } + /** + * Compiles the node to PHP. + * + * @param Twig_Compiler A Twig_Compiler instance + */ public function compile($compiler) { $this->compileTemplate($compiler); diff --git a/lib/Twig/Node/Parent.php b/lib/Twig/Node/Parent.php index 93c5fa3..deed784 100644 --- a/lib/Twig/Node/Parent.php +++ b/lib/Twig/Node/Parent.php @@ -24,6 +24,11 @@ class Twig_Node_Parent extends Twig_Node parent::__construct(array(), array('name' => $name), $lineno, $tag); } + /** + * Compiles the node to PHP. + * + * @param Twig_Compiler A Twig_Compiler instance + */ public function compile($compiler) { $compiler diff --git a/lib/Twig/Node/Print.php b/lib/Twig/Node/Print.php index 6b57f21..b5bd0a7 100644 --- a/lib/Twig/Node/Print.php +++ b/lib/Twig/Node/Print.php @@ -24,6 +24,11 @@ class Twig_Node_Print extends Twig_Node parent::__construct(array('expr' => $expr), array(), $lineno, $tag); } + /** + * Compiles the node to PHP. + * + * @param Twig_Compiler A Twig_Compiler instance + */ public function compile($compiler) { $compiler diff --git a/lib/Twig/Node/Sandbox.php b/lib/Twig/Node/Sandbox.php index 38af795..98ed92a 100644 --- a/lib/Twig/Node/Sandbox.php +++ b/lib/Twig/Node/Sandbox.php @@ -23,6 +23,11 @@ class Twig_Node_Sandbox extends Twig_Node parent::__construct(array('body' => $body), array(), $lineno, $tag); } + /** + * Compiles the node to PHP. + * + * @param Twig_Compiler A Twig_Compiler instance + */ public function compile($compiler) { $compiler diff --git a/lib/Twig/Node/SandboxedPrint.php b/lib/Twig/Node/SandboxedPrint.php index bdc2a41..d5d032f 100644 --- a/lib/Twig/Node/SandboxedPrint.php +++ b/lib/Twig/Node/SandboxedPrint.php @@ -28,6 +28,11 @@ class Twig_Node_SandboxedPrint extends Twig_Node_Print parent::__construct($node->expr, $node->getLine(), $node->getNodeTag()); } + /** + * Compiles the node to PHP. + * + * @param Twig_Compiler A Twig_Compiler instance + */ public function compile($compiler) { $compiler diff --git a/lib/Twig/Node/Set.php b/lib/Twig/Node/Set.php index c621b70..66fb7ce 100644 --- a/lib/Twig/Node/Set.php +++ b/lib/Twig/Node/Set.php @@ -23,6 +23,11 @@ class Twig_Node_Set extends Twig_Node parent::__construct(array('names' => $names, 'values' => $values), array('capture' => $capture), $lineno, $tag); } + /** + * Compiles the node to PHP. + * + * @param Twig_Compiler A Twig_Compiler instance + */ public function compile($compiler) { $compiler->addDebugInfo($this); diff --git a/lib/Twig/Node/Text.php b/lib/Twig/Node/Text.php index 1162053..f6938c7 100644 --- a/lib/Twig/Node/Text.php +++ b/lib/Twig/Node/Text.php @@ -24,6 +24,11 @@ class Twig_Node_Text extends Twig_Node parent::__construct(array(), array('data' => $data), $lineno); } + /** + * Compiles the node to PHP. + * + * @param Twig_Compiler A Twig_Compiler instance + */ public function compile($compiler) { $compiler diff --git a/lib/Twig/Node/Trans.php b/lib/Twig/Node/Trans.php index 139c89e..856d309 100644 --- a/lib/Twig/Node/Trans.php +++ b/lib/Twig/Node/Trans.php @@ -23,6 +23,11 @@ class Twig_Node_Trans extends Twig_Node parent::__construct(array('count' => $count, 'body' => $body, 'plural' => $plural), array(), $lineno, $tag); } + /** + * Compiles the node to PHP. + * + * @param Twig_Compiler A Twig_Compiler instance + */ public function compile($compiler) { $compiler->addDebugInfo($this); diff --git a/lib/Twig/NodeInterface.php b/lib/Twig/NodeInterface.php index 9530913..d43780b 100644 --- a/lib/Twig/NodeInterface.php +++ b/lib/Twig/NodeInterface.php @@ -18,6 +18,11 @@ */ interface Twig_NodeInterface { + /** + * Compiles the node to PHP. + * + * @param Twig_Compiler A Twig_Compiler instance + */ public function compile($compiler); public function getLine();