From 4b8b56482ce36fc88d0c259c9fad47264b22b1b9 Mon Sep 17 00:00:00 2001 From: bzick Date: Wed, 3 Jul 2013 12:22:35 +0400 Subject: [PATCH] Fix comments, remove old code --- src/Fenom/Template.php | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/Fenom/Template.php b/src/Fenom/Template.php index 2f376c8..ad15102 100644 --- a/src/Fenom/Template.php +++ b/src/Fenom/Template.php @@ -625,7 +625,13 @@ class Template extends Render { return $_exp; } - + /** + * Parse simple variable (without modifier etc) + * + * @param Tokenizer $tokens + * @param int $options + * @return string + */ public function parseVar(Tokenizer $tokens, $options = 0) { $var = $tokens->get(T_VARIABLE); $_var = '$tpl["'.substr($var, 1).'"]'; @@ -715,6 +721,15 @@ class Template extends Render { return $_var; } + /** + * Parse ternary operator + * + * @param Tokenizer $tokens + * @param $var + * @param $type + * @return string + * @throws UnexpectedTokenException + */ public function parseTernary(Tokenizer $tokens, $var, $type) { $empty = ($type === "?"); $tokens->next(); @@ -890,7 +905,6 @@ class Template extends Render { $value = $mods.$value.')'; } } -// var_dump($value); exit; return $value; } @@ -1096,5 +1110,4 @@ class Template extends Render { class CompileException extends \ErrorException {} class SecurityException extends CompileException {} -class InvalidUsageException extends \LogicException {} -class ReparseTagException extends \Exception {} \ No newline at end of file +class InvalidUsageException extends \LogicException {} \ No newline at end of file