Fix comments, remove old code

This commit is contained in:
bzick 2013-07-03 12:22:35 +04:00
parent 0457d5c379
commit 4b8b56482c

View File

@ -625,7 +625,13 @@ class Template extends Render {
return $_exp; return $_exp;
} }
/**
* Parse simple variable (without modifier etc)
*
* @param Tokenizer $tokens
* @param int $options
* @return string
*/
public function parseVar(Tokenizer $tokens, $options = 0) { public function parseVar(Tokenizer $tokens, $options = 0) {
$var = $tokens->get(T_VARIABLE); $var = $tokens->get(T_VARIABLE);
$_var = '$tpl["'.substr($var, 1).'"]'; $_var = '$tpl["'.substr($var, 1).'"]';
@ -715,6 +721,15 @@ class Template extends Render {
return $_var; return $_var;
} }
/**
* Parse ternary operator
*
* @param Tokenizer $tokens
* @param $var
* @param $type
* @return string
* @throws UnexpectedTokenException
*/
public function parseTernary(Tokenizer $tokens, $var, $type) { public function parseTernary(Tokenizer $tokens, $var, $type) {
$empty = ($type === "?"); $empty = ($type === "?");
$tokens->next(); $tokens->next();
@ -890,7 +905,6 @@ class Template extends Render {
$value = $mods.$value.')'; $value = $mods.$value.')';
} }
} }
// var_dump($value); exit;
return $value; return $value;
} }
@ -1096,5 +1110,4 @@ class Template extends Render {
class CompileException extends \ErrorException {} class CompileException extends \ErrorException {}
class SecurityException extends CompileException {} class SecurityException extends CompileException {}
class InvalidUsageException extends \LogicException {} class InvalidUsageException extends \LogicException {}
class ReparseTagException extends \Exception {}