smarty3-3.1.13/0000755000175000017500000000000012141655572011645 5ustar mikemikesmarty3-3.1.13/composer.json0000644000175000017500000000175712054122522014364 0ustar mikemike{ "name": "smarty/smarty", "type": "library", "description": "Smarty - the compiling PHP template engine", "keywords": ["templating"], "homepage": "http://www.smarty.net", "license": "LGPL-3.0", "authors": [ { "name": "Monte Ohrt", "email": "monte@ohrt.com" }, { "name": "Uwe Tews", "email": "uwe.tews@googlemail.com" }, { "name": "Rodney Rehm", "email": "rodney.rehm@medialize.de" } ], "support": { "irc": "irc://irc.freenode.org/smarty", "issues": "http://code.google.com/p/smarty-php/issues/list", "forum": "http://www.smarty.net/forums/", "source": "http://code.google.com/p/smarty-php/source/browse/" }, "require": { "php": ">=5.2" }, "autoload": { "classmap": [ "distribution/libs/Smarty.class.php", "distribution/libs/SmartyBC.class.php" ] } }smarty3-3.1.13/development/0000755000175000017500000000000012141655572014167 5ustar mikemikesmarty3-3.1.13/development/lexer/0000755000175000017500000000000012141655567015312 5ustar mikemikesmarty3-3.1.13/development/lexer/Exception.php0000644000175000017500000003361211275032024017746 0ustar mikemike * @author Hans Lellelid * @author Bertrand Mansion * @author Greg Beaver * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version CVS: $Id: Exception.php,v 1.29 2008/01/03 20:26:35 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.3.3 */ /** * Base PEAR_Exception Class * * 1) Features: * * - Nestable exceptions (throw new PEAR_Exception($msg, $prev_exception)) * - Definable triggers, shot when exceptions occur * - Pretty and informative error messages * - Added more context info available (like class, method or cause) * - cause can be a PEAR_Exception or an array of mixed * PEAR_Exceptions/PEAR_ErrorStack warnings * - callbacks for specific exception classes and their children * * 2) Ideas: * * - Maybe a way to define a 'template' for the output * * 3) Inherited properties from PHP Exception Class: * * protected $message * protected $code * protected $line * protected $file * private $trace * * 4) Inherited methods from PHP Exception Class: * * __clone * __construct * getMessage * getCode * getFile * getLine * getTraceSafe * getTraceSafeAsString * __toString * * 5) Usage example * * * require_once 'PEAR/Exception.php'; * * class Test { * function foo() { * throw new PEAR_Exception('Error Message', ERROR_CODE); * } * } * * function myLogger($pear_exception) { * echo $pear_exception->getMessage(); * } * // each time a exception is thrown the 'myLogger' will be called * // (its use is completely optional) * PEAR_Exception::addObserver('myLogger'); * $test = new Test; * try { * $test->foo(); * } catch (PEAR_Exception $e) { * print $e; * } * * * @category pear * @package PEAR * @author Tomas V.V.Cox * @author Hans Lellelid * @author Bertrand Mansion * @author Greg Beaver * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.3.3 * */ class PEAR_Exception extends Exception { const OBSERVER_PRINT = -2; const OBSERVER_TRIGGER = -4; const OBSERVER_DIE = -8; protected $cause; private static $_observers = array(); private static $_uniqueid = 0; private $_trace; /** * Supported signatures: * - PEAR_Exception(string $message); * - PEAR_Exception(string $message, int $code); * - PEAR_Exception(string $message, Exception $cause); * - PEAR_Exception(string $message, Exception $cause, int $code); * - PEAR_Exception(string $message, PEAR_Error $cause); * - PEAR_Exception(string $message, PEAR_Error $cause, int $code); * - PEAR_Exception(string $message, array $causes); * - PEAR_Exception(string $message, array $causes, int $code); * @param string exception message * @param int|Exception|PEAR_Error|array|null exception cause * @param int|null exception code or null */ public function __construct($message, $p2 = null, $p3 = null) { if (is_int($p2)) { $code = $p2; $this->cause = null; } elseif (is_object($p2) || is_array($p2)) { // using is_object allows both Exception and PEAR_Error if (is_object($p2) && !($p2 instanceof Exception)) { if (!class_exists('PEAR_Error',false) || !($p2 instanceof PEAR_Error)) { throw new PEAR_Exception('exception cause must be Exception, ' . 'array, or PEAR_Error'); } } $code = $p3; if (is_array($p2) && isset($p2['message'])) { // fix potential problem of passing in a single warning $p2 = array($p2); } $this->cause = $p2; } else { $code = null; $this->cause = null; } parent::__construct($message, $code); $this->signal(); } /** * @param mixed $callback - A valid php callback, see php func is_callable() * - A PEAR_Exception::OBSERVER_* constant * - An array(const PEAR_Exception::OBSERVER_*, * mixed $options) * @param string $label The name of the observer. Use this if you want * to remove it later with removeObserver() */ public static function addObserver($callback, $label = 'default') { self::$_observers[$label] = $callback; } public static function removeObserver($label = 'default') { unset(self::$_observers[$label]); } /** * @return int unique identifier for an observer */ public static function getUniqueId() { return self::$_uniqueid++; } private function signal() { foreach (self::$_observers as $func) { if (is_callable($func)) { call_user_func($func, $this); continue; } settype($func, 'array'); switch ($func[0]) { case self::OBSERVER_PRINT : $f = (isset($func[1])) ? $func[1] : '%s'; printf($f, $this->getMessage()); break; case self::OBSERVER_TRIGGER : $f = (isset($func[1])) ? $func[1] : E_USER_NOTICE; trigger_error($this->getMessage(), $f); break; case self::OBSERVER_DIE : $f = (isset($func[1])) ? $func[1] : '%s'; die(printf($f, $this->getMessage())); break; default: trigger_error('invalid observer type', E_USER_WARNING); } } } /** * Return specific error information that can be used for more detailed * error messages or translation. * * This method may be overridden in child exception classes in order * to add functionality not present in PEAR_Exception and is a placeholder * to define API * * The returned array must be an associative array of parameter => value like so: *
     * array('name' => $name, 'context' => array(...))
     * 
* @return array */ public function getErrorData() { return array(); } /** * Returns the exception that caused this exception to be thrown * @access public * @return Exception|array The context of the exception */ public function getCause() { return $this->cause; } /** * Function must be public to call on caused exceptions * @param array */ public function getCauseMessage(&$causes) { $trace = $this->getTraceSafe(); $cause = array('class' => get_class($this), 'message' => $this->message, 'file' => 'unknown', 'line' => 'unknown'); if (isset($trace[0])) { if (isset($trace[0]['file'])) { $cause['file'] = $trace[0]['file']; $cause['line'] = $trace[0]['line']; } } $causes[] = $cause; if ($this->cause instanceof PEAR_Exception) { $this->cause->getCauseMessage($causes); } elseif ($this->cause instanceof Exception) { $causes[] = array('class' => get_class($this->cause), 'message' => $this->cause->getMessage(), 'file' => $this->cause->getFile(), 'line' => $this->cause->getLine()); } elseif (class_exists('PEAR_Error',false) && $this->cause instanceof PEAR_Error) { $causes[] = array('class' => get_class($this->cause), 'message' => $this->cause->getMessage(), 'file' => 'unknown', 'line' => 'unknown'); } elseif (is_array($this->cause)) { foreach ($this->cause as $cause) { if ($cause instanceof PEAR_Exception) { $cause->getCauseMessage($causes); } elseif ($cause instanceof Exception) { $causes[] = array('class' => get_class($cause), 'message' => $cause->getMessage(), 'file' => $cause->getFile(), 'line' => $cause->getLine()); } elseif (class_exists('PEAR_Error',false) && $cause instanceof PEAR_Error) { $causes[] = array('class' => get_class($cause), 'message' => $cause->getMessage(), 'file' => 'unknown', 'line' => 'unknown'); } elseif (is_array($cause) && isset($cause['message'])) { // PEAR_ErrorStack warning $causes[] = array( 'class' => $cause['package'], 'message' => $cause['message'], 'file' => isset($cause['context']['file']) ? $cause['context']['file'] : 'unknown', 'line' => isset($cause['context']['line']) ? $cause['context']['line'] : 'unknown', ); } } } } public function getTraceSafe() { if (!isset($this->_trace)) { $this->_trace = $this->getTrace(); if (empty($this->_trace)) { $backtrace = debug_backtrace(); $this->_trace = array($backtrace[count($backtrace)-1]); } } return $this->_trace; } public function getErrorClass() { $trace = $this->getTraceSafe(); return $trace[0]['class']; } public function getErrorMethod() { $trace = $this->getTraceSafe(); return $trace[0]['function']; } public function __toString() { if (isset($_SERVER['REQUEST_URI'])) { return $this->toHtml(); } return $this->toText(); } public function toHtml() { $trace = $this->getTraceSafe(); $causes = array(); $this->getCauseMessage($causes); $html = '' . "\n"; foreach ($causes as $i => $cause) { $html .= '\n"; } $html .= '' . "\n" . '' . '' . '' . "\n"; foreach ($trace as $k => $v) { $html .= '' . '' . '' . "\n"; } $html .= '' . '' . '' . "\n" . '
' . str_repeat('-', $i) . ' ' . $cause['class'] . ': ' . htmlspecialchars($cause['message']) . ' in ' . $cause['file'] . ' ' . 'on line ' . $cause['line'] . '' . "
Exception trace
#FunctionLocation
' . $k . ''; if (!empty($v['class'])) { $html .= $v['class'] . $v['type']; } $html .= $v['function']; $args = array(); if (!empty($v['args'])) { foreach ($v['args'] as $arg) { if (is_null($arg)) $args[] = 'null'; elseif (is_array($arg)) $args[] = 'Array'; elseif (is_object($arg)) $args[] = 'Object('.get_class($arg).')'; elseif (is_bool($arg)) $args[] = $arg ? 'true' : 'false'; elseif (is_int($arg) || is_double($arg)) $args[] = $arg; else { $arg = (string)$arg; $str = htmlspecialchars(substr($arg, 0, 16)); if (strlen($arg) > 16) $str .= '…'; $args[] = "'" . $str . "'"; } } } $html .= '(' . implode(', ',$args) . ')' . '' . (isset($v['file']) ? $v['file'] : 'unknown') . ':' . (isset($v['line']) ? $v['line'] : 'unknown') . '
' . ($k+1) . '{main} 
'; return $html; } public function toText() { $causes = array(); $this->getCauseMessage($causes); $causeMsg = ''; foreach ($causes as $i => $cause) { $causeMsg .= str_repeat(' ', $i) . $cause['class'] . ': ' . $cause['message'] . ' in ' . $cause['file'] . ' on line ' . $cause['line'] . "\n"; } return $causeMsg . $this->getTraceAsString(); } } ?> smarty3-3.1.13/development/lexer/LexerGenerator.php0000644000175000017500000002360711634664106020754 0ustar mikemike * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the distribution. * * Neither the name of the PHP_LexerGenerator nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * @category php * @package PHP_LexerGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @version CVS: $Id: LexerGenerator.php 294970 2010-02-12 03:46:38Z clockwerx $ * @since File available since Release 0.1.0 */ /** * The Lexer generation parser */ require_once './LexerGenerator/Parser.php'; /** * Hand-written lexer for lex2php format files */ require_once './LexerGenerator/Lexer.php'; /** * The basic home class for the lexer generator. A lexer scans text and * organizes it into tokens for usage by a parser. * * Sample Usage: * * require_once 'PHP/LexerGenerator.php'; * $lex = new PHP_LexerGenerator('/path/to/lexerfile.plex'); * * * A file named "/path/to/lexerfile.php" will be created. * * File format consists of a PHP file containing specially * formatted comments like so: * * * /*!lex2php * {@*} * * * All lexer definition files must contain at least two lex2php comment blocks: * - 1 regex declaration block * - 1 or more rule declaration blocks * * The first lex2php comment is the regex declaration block and must contain * several processor instruction as well as defining a name for all * regular expressions. Processor instructions start with * a "%" symbol and must be: * * - %counter * - %input * - %token * - %value * - %line * * token and counter should define the class variables used to define lexer input * and the index into the input. token and value should be used to define the class * variables used to store the token number and its textual value. Finally, line * should be used to define the class variable used to define the current line number * of scanning. * * For example: * * /*!lex2php * %counter {$this->N} * %input {$this->data} * %token {$this->token} * %value {$this->value} * %line {%this->linenumber} * {@*} * * * Patterns consist of an identifier containing an letters or an underscore, and * a descriptive match pattern. * * Descriptive match patterns may either be regular expressions (regexes) or * quoted literal strings. Here are some examples: * *
 * pattern = "quoted literal"
 * ANOTHER = /[a-zA-Z_]+/
 * COMPLEX = @<([a-zA-Z_]+)( +(([a-zA-Z_]+)=((["\'])([^\6]*)\6))+){0,1}>[^<]*@
 * 
* * Quoted strings must escape the \ and " characters with \" and \\. * * Regex patterns must be in Perl-compatible regular expression format (preg). * special characters (like \t \n or \x3H) can only be used in regexes, all * \ will be escaped in literal strings. * * Sub-patterns may be defined and back-references (like \1) may be used. Any sub- * patterns detected will be passed to the token handler in the variable * $yysubmatches. * * In addition, lookahead expressions, and once-only expressions are allowed. * Lookbehind expressions are impossible (scanning always occurs from the * current position forward), and recursion (?R) can't work and is not allowed. * * * /*!lex2php * %counter {$this->N} * %input {$this->data} * %token {$this->token} * %value {$this->value} * %line {%this->linenumber} * alpha = /[a-zA-Z]/ * alphaplus = /[a-zA-Z]+/ * number = /[0-9]/ * numerals = /[0-9]+/ * whitespace = /[ \t\n]+/ * blah = "$\"" * blahblah = /a\$/ * GAMEEND = @(?:1\-0|0\-1|1/2\-1/2)@ * PAWNMOVE = /P?[a-h]([2-7]|[18]\=(Q|R|B|N))|P?[a-h]x[a-h]([2-7]|[18]\=(Q|R|B|N))/ * {@*} * * * All regexes must be delimited. Any legal preg delimiter can be used (as in @ or / in * the example above) * * Rule lex2php blocks each define a lexer state. You can optionally name the state * with the %statename processor instruction. State names can be used to transfer to * a new lexer state with the yybegin() method * * * /*!lexphp * %statename INITIAL * blah { * $this->yybegin(self::INBLAH); * // note - $this->yybegin(2) would also work * } * {@*} * /*!lex2php * %statename INBLAH * ANYTHING { * $this->yybegin(self::INITIAL); * // note - $this->yybegin(1) would also work * } * {@*} * * * You can maintain a parser state stack simply by using yypushstate() and * yypopstate() instead of yybegin(): * * * /*!lexphp * %statename INITIAL * blah { * $this->yypushstate(self::INBLAH); * } * {@*} * /*!lex2php * %statename INBLAH * ANYTHING { * $this->yypopstate(); * // now INBLAH doesn't care where it was called from * } * {@*} * * * Code blocks can choose to skip the current token and cycle to the next token by * returning "false" * * * /*!lex2php * WHITESPACE { * return false; * } * {@*} * * * If you wish to re-process the current token in a new state, simply return true. * If you forget to change lexer state, this will cause an unterminated loop, * so be careful! * * * /*!lex2php * "(" { * $this->yypushstate(self::INPARAMS); * return true; * } * {@*} * * * Lastly, if you wish to cycle to the next matching rule, return any value other than * true, false or null: * * * /*!lex2php * "{@" ALPHA { * if ($this->value == '{@internal') { * return 'more'; * } * ... * } * "{@internal" { * ... * } * {@*} * * * Note that this procedure is exceptionally inefficient, and it would be far better * to take advantage of PHP_LexerGenerator's top-down precedence and instead code: * * * /*!lex2php * "{@internal" { * ... * } * "{@" ALPHA { * ... * } * {@*} * * @package PHP_LexerGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.php.net/license/3_01.txt PHP License 3.01 * @version @package_version@ * @since Class available since Release 0.1.0 * @example TestLexer.plex Example lexer source * @example TestLexer.php Example lexer generated php code * @example usage.php Example usage of PHP_LexerGenerator * @example Lexer.plex File_ChessPGN lexer source (complex) * @example Lexer.php File_ChessPGN lexer generated php code */ class PHP_LexerGenerator { /** * Plex file lexer. * @var PHP_LexerGenerator_Lexer */ private $_lex; /** * Plex file parser. * @var PHP_LexerGenerator_Parser */ private $_parser; /** * Path to the output PHP file. * @var string */ private $_outfile; /** * Debug flag. When set, Parser trace information is generated. * @var boolean */ public $debug = false; /** * Create a lexer generator and optionally generate a lexer file. * * @param string Optional plex file {@see PHP_LexerGenerator::create}. * @param string Optional output file {@see PHP_LexerGenerator::create}. */ function __construct($lexerfile = '', $outfile = '') { if ($lexerfile) { $this -> create($lexerfile, $outfile); } } /** * Create a lexer file from its skeleton plex file. * * @param string Path to the plex file. * @param string Optional path to output file. Default is lexerfile with * extension of ".php". */ function create($lexerfile, $outfile = '') { $this->_lex = new PHP_LexerGenerator_Lexer(file_get_contents($lexerfile)); $info = pathinfo($lexerfile); if ($outfile) { $this->outfile = $outfile; } else { $this->outfile = $info['dirname'] . DIRECTORY_SEPARATOR . substr($info['basename'], 0, strlen($info['basename']) - strlen($info['extension'])) . 'php'; } $this->_parser = new PHP_LexerGenerator_Parser($this->outfile, $this->_lex); if ($this -> debug) { $this->_parser->PrintTrace(); } while ($this->_lex->advance($this->_parser)) { $this->_parser->doParse($this->_lex->token, $this->_lex->value); } $this->_parser->doParse(0, 0); } } //$a = new PHP_LexerGenerator('/development/File_ChessPGN/ChessPGN/Lexer.plex'); ?>smarty3-3.1.13/development/lexer/smarty_internal_templateparser.php0000644000175000017500000046741712015001626024346 0ustar mikemikestring = $s->string; $this->metadata = $s->metadata; } else { $this->string = (string) $s; if ($m instanceof TP_yyToken) { $this->metadata = $m->metadata; } elseif (is_array($m)) { $this->metadata = $m; } } } function __toString() { return $this->_string; } function offsetExists($offset) { return isset($this->metadata[$offset]); } function offsetGet($offset) { return $this->metadata[$offset]; } function offsetSet($offset, $value) { if ($offset === null) { if (isset($value[0])) { $x = ($value instanceof TP_yyToken) ? $value->metadata : $value; $this->metadata = array_merge($this->metadata, $x); return; } $offset = count($this->metadata); } if ($value === null) { return; } if ($value instanceof TP_yyToken) { if ($value->metadata) { $this->metadata[$offset] = $value->metadata; } } elseif ($value) { $this->metadata[$offset] = $value; } } function offsetUnset($offset) { unset($this->metadata[$offset]); } } class TP_yyStackEntry { public $stateno; /* The state-number */ public $major; /* The major token value. This is the code ** number for the token at this stack level */ public $minor; /* The user-supplied minor token value. This ** is the value of the token */ }; #line 12 "smarty_internal_templateparser.y" class Smarty_Internal_Templateparser#line 79 "smarty_internal_templateparser.php" { #line 14 "smarty_internal_templateparser.y" const Err1 = "Security error: Call to private object member not allowed"; const Err2 = "Security error: Call to dynamic object member not allowed"; const Err3 = "PHP in template not allowed. Use SmartyBC to enable it"; // states whether the parse was successful or not public $successful = true; public $retvalue = 0; private $lex; private $internalError = false; private $strip = false; function __construct($lex, $compiler) { $this->lex = $lex; $this->compiler = $compiler; $this->smarty = $this->compiler->smarty; $this->template = $this->compiler->template; $this->compiler->has_variable_string = false; $this->compiler->prefix_code = array(); $this->prefix_number = 0; $this->block_nesting_level = 0; if ($this->security = isset($this->smarty->security_policy)) { $this->php_handling = $this->smarty->security_policy->php_handling; } else { $this->php_handling = $this->smarty->php_handling; } $this->is_xml = false; $this->asp_tags = (ini_get('asp_tags') != '0'); $this->current_buffer = $this->root_buffer = new _smarty_template_buffer($this); } public static function escape_start_tag($tag_text) { $tag = preg_replace('/\A<\?(.*)\z/', '<?\1', $tag_text, -1 , $count); //Escape tag return $tag; } public static function escape_end_tag($tag_text) { return '?>'; } public function compileVariable($variable) { if (strpos($variable,'(') == 0) { // not a variable variable $var = trim($variable,'\''); $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable($var, null, true, false)->nocache; $this->template->properties['variables'][$var] = $this->compiler->tag_nocache|$this->compiler->nocache; } // return '(isset($_smarty_tpl->tpl_vars['. $variable .'])?$_smarty_tpl->tpl_vars['. $variable .']->value:$_smarty_tpl->getVariable('. $variable .')->value)'; return '$_smarty_tpl->tpl_vars['. $variable .']->value'; } #line 132 "smarty_internal_templateparser.php" const TP_VERT = 1; const TP_COLON = 2; const TP_COMMENT = 3; const TP_PHPSTARTTAG = 4; const TP_PHPENDTAG = 5; const TP_ASPSTARTTAG = 6; const TP_ASPENDTAG = 7; const TP_FAKEPHPSTARTTAG = 8; const TP_XMLTAG = 9; const TP_TEXT = 10; const TP_STRIPON = 11; const TP_STRIPOFF = 12; const TP_LITERALSTART = 13; const TP_LITERALEND = 14; const TP_LITERAL = 15; const TP_LDEL = 16; const TP_RDEL = 17; const TP_DOLLAR = 18; const TP_ID = 19; const TP_EQUAL = 20; const TP_PTR = 21; const TP_LDELIF = 22; const TP_LDELFOR = 23; const TP_SEMICOLON = 24; const TP_INCDEC = 25; const TP_TO = 26; const TP_STEP = 27; const TP_LDELFOREACH = 28; const TP_SPACE = 29; const TP_AS = 30; const TP_APTR = 31; const TP_LDELSETFILTER = 32; const TP_SMARTYBLOCKCHILD = 33; const TP_LDELSLASH = 34; const TP_ATTR = 35; const TP_INTEGER = 36; const TP_COMMA = 37; const TP_OPENP = 38; const TP_CLOSEP = 39; const TP_MATH = 40; const TP_UNIMATH = 41; const TP_ANDSYM = 42; const TP_ISIN = 43; const TP_ISDIVBY = 44; const TP_ISNOTDIVBY = 45; const TP_ISEVEN = 46; const TP_ISNOTEVEN = 47; const TP_ISEVENBY = 48; const TP_ISNOTEVENBY = 49; const TP_ISODD = 50; const TP_ISNOTODD = 51; const TP_ISODDBY = 52; const TP_ISNOTODDBY = 53; const TP_INSTANCEOF = 54; const TP_QMARK = 55; const TP_NOT = 56; const TP_TYPECAST = 57; const TP_HEX = 58; const TP_DOT = 59; const TP_SINGLEQUOTESTRING = 60; const TP_DOUBLECOLON = 61; const TP_AT = 62; const TP_HATCH = 63; const TP_OPENB = 64; const TP_CLOSEB = 65; const TP_EQUALS = 66; const TP_NOTEQUALS = 67; const TP_GREATERTHAN = 68; const TP_LESSTHAN = 69; const TP_GREATEREQUAL = 70; const TP_LESSEQUAL = 71; const TP_IDENTITY = 72; const TP_NONEIDENTITY = 73; const TP_MOD = 74; const TP_LAND = 75; const TP_LOR = 76; const TP_LXOR = 77; const TP_QUOTE = 78; const TP_BACKTICK = 79; const TP_DOLLARID = 80; const YY_NO_ACTION = 597; const YY_ACCEPT_ACTION = 596; const YY_ERROR_ACTION = 595; const YY_SZ_ACTTAB = 2383; static public $yy_action = array( /* 0 */ 225, 275, 263, 276, 259, 257, 260, 390, 356, 359, /* 10 */ 353, 193, 18, 127, 42, 317, 381, 351, 196, 350, /* 20 */ 6, 108, 24, 98, 128, 190, 134, 318, 41, 41, /* 30 */ 249, 329, 231, 18, 43, 43, 317, 26, 298, 50, /* 40 */ 47, 48, 44, 10, 13, 305, 306, 12, 11, 340, /* 50 */ 341, 40, 20, 387, 308, 307, 309, 374, 254, 248, /* 60 */ 252, 217, 193, 385, 291, 375, 376, 377, 373, 372, /* 70 */ 368, 367, 369, 370, 371, 378, 379, 225, 312, 255, /* 80 */ 225, 225, 118, 2, 207, 76, 135, 596, 95, 281, /* 90 */ 271, 264, 2, 366, 315, 386, 461, 383, 232, 294, /* 100 */ 303, 388, 313, 389, 227, 41, 144, 225, 461, 245, /* 110 */ 282, 43, 218, 358, 461, 144, 50, 47, 48, 44, /* 120 */ 10, 13, 305, 306, 12, 11, 340, 341, 40, 20, /* 130 */ 105, 177, 522, 46, 46, 41, 19, 522, 143, 297, /* 140 */ 325, 43, 375, 376, 377, 373, 372, 368, 367, 369, /* 150 */ 370, 371, 378, 379, 225, 312, 293, 206, 225, 141, /* 160 */ 124, 225, 54, 119, 123, 225, 459, 38, 173, 246, /* 170 */ 319, 315, 386, 347, 455, 232, 294, 303, 459, 313, /* 180 */ 139, 321, 41, 31, 459, 41, 41, 2, 43, 188, /* 190 */ 2, 43, 43, 50, 47, 48, 44, 10, 13, 305, /* 200 */ 306, 12, 11, 340, 341, 40, 20, 225, 136, 301, /* 210 */ 144, 194, 350, 144, 46, 202, 206, 328, 198, 375, /* 220 */ 376, 377, 373, 372, 368, 367, 369, 370, 371, 378, /* 230 */ 379, 21, 9, 28, 185, 41, 318, 225, 265, 271, /* 240 */ 264, 43, 206, 27, 173, 206, 50, 47, 48, 44, /* 250 */ 10, 13, 305, 306, 12, 11, 340, 341, 40, 20, /* 260 */ 225, 178, 18, 212, 330, 317, 17, 32, 8, 14, /* 270 */ 325, 267, 375, 376, 377, 373, 372, 368, 367, 369, /* 280 */ 370, 371, 378, 379, 136, 363, 363, 207, 41, 4, /* 290 */ 46, 5, 131, 233, 43, 25, 186, 289, 318, 50, /* 300 */ 47, 48, 44, 10, 13, 305, 306, 12, 11, 340, /* 310 */ 341, 40, 20, 225, 100, 161, 18, 355, 361, 317, /* 320 */ 26, 109, 360, 346, 325, 375, 376, 377, 373, 372, /* 330 */ 368, 367, 369, 370, 371, 378, 379, 106, 201, 172, /* 340 */ 25, 206, 288, 25, 18, 261, 181, 317, 325, 45, /* 350 */ 339, 129, 50, 47, 48, 44, 10, 13, 305, 306, /* 360 */ 12, 11, 340, 341, 40, 20, 225, 104, 162, 18, /* 370 */ 16, 205, 317, 206, 248, 238, 43, 325, 375, 376, /* 380 */ 377, 373, 372, 368, 367, 369, 370, 371, 378, 379, /* 390 */ 255, 354, 243, 229, 206, 342, 18, 239, 242, 241, /* 400 */ 248, 266, 300, 330, 240, 50, 47, 48, 44, 10, /* 410 */ 13, 305, 306, 12, 11, 340, 341, 40, 20, 225, /* 420 */ 165, 176, 184, 18, 18, 18, 253, 215, 251, 325, /* 430 */ 325, 375, 376, 377, 373, 372, 368, 367, 369, 370, /* 440 */ 371, 378, 379, 304, 268, 159, 207, 207, 247, 206, /* 450 */ 148, 41, 195, 350, 325, 27, 33, 43, 50, 47, /* 460 */ 48, 44, 10, 13, 305, 306, 12, 11, 340, 341, /* 470 */ 40, 20, 163, 225, 328, 199, 133, 29, 187, 23, /* 480 */ 250, 325, 101, 225, 375, 376, 377, 373, 372, 368, /* 490 */ 367, 369, 370, 371, 378, 379, 225, 298, 207, 334, /* 500 */ 225, 45, 312, 103, 299, 192, 154, 364, 18, 302, /* 510 */ 135, 317, 285, 35, 173, 203, 320, 3, 236, 6, /* 520 */ 108, 41, 232, 294, 303, 134, 313, 43, 130, 249, /* 530 */ 329, 231, 250, 225, 280, 50, 47, 48, 44, 10, /* 540 */ 13, 305, 306, 12, 11, 340, 341, 40, 20, 336, /* 550 */ 36, 166, 212, 230, 332, 228, 338, 8, 132, 330, /* 560 */ 325, 375, 376, 377, 373, 372, 368, 367, 369, 370, /* 570 */ 371, 378, 379, 225, 312, 345, 37, 362, 141, 312, /* 580 */ 94, 77, 135, 156, 236, 182, 173, 135, 122, 204, /* 590 */ 315, 386, 365, 225, 232, 294, 303, 137, 313, 232, /* 600 */ 294, 303, 125, 313, 41, 222, 333, 180, 277, 337, /* 610 */ 43, 225, 50, 47, 48, 44, 10, 13, 305, 306, /* 620 */ 12, 11, 340, 341, 40, 20, 136, 335, 316, 5, /* 630 */ 22, 197, 269, 34, 173, 148, 126, 116, 375, 376, /* 640 */ 377, 373, 372, 368, 367, 369, 370, 371, 378, 379, /* 650 */ 225, 312, 298, 225, 292, 141, 312, 258, 77, 135, /* 660 */ 153, 183, 318, 301, 135, 175, 284, 315, 386, 461, /* 670 */ 117, 232, 294, 303, 325, 313, 232, 294, 303, 382, /* 680 */ 313, 461, 220, 110, 329, 298, 318, 461, 329, 50, /* 690 */ 47, 48, 44, 10, 13, 305, 306, 12, 11, 340, /* 700 */ 341, 40, 20, 225, 30, 191, 46, 189, 314, 107, /* 710 */ 329, 329, 146, 97, 102, 375, 376, 377, 373, 372, /* 720 */ 368, 367, 369, 370, 371, 378, 379, 298, 298, 298, /* 730 */ 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, /* 740 */ 329, 329, 50, 47, 48, 44, 10, 13, 305, 306, /* 750 */ 12, 11, 340, 341, 40, 20, 225, 329, 329, 329, /* 760 */ 329, 329, 329, 329, 329, 114, 160, 115, 375, 376, /* 770 */ 377, 373, 372, 368, 367, 369, 370, 371, 378, 379, /* 780 */ 298, 298, 298, 329, 329, 329, 329, 329, 329, 329, /* 790 */ 329, 329, 329, 329, 283, 50, 47, 48, 44, 10, /* 800 */ 13, 305, 306, 12, 11, 340, 341, 40, 20, 329, /* 810 */ 225, 329, 329, 329, 329, 329, 329, 329, 329, 329, /* 820 */ 329, 375, 376, 377, 373, 372, 368, 367, 369, 370, /* 830 */ 371, 378, 379, 200, 329, 329, 329, 329, 329, 329, /* 840 */ 329, 329, 329, 329, 329, 329, 329, 329, 329, 50, /* 850 */ 47, 48, 44, 10, 13, 305, 306, 12, 11, 340, /* 860 */ 341, 40, 20, 225, 329, 329, 329, 329, 329, 329, /* 870 */ 329, 329, 329, 329, 329, 375, 376, 377, 373, 372, /* 880 */ 368, 367, 369, 370, 371, 378, 379, 329, 329, 329, /* 890 */ 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, /* 900 */ 329, 329, 50, 47, 48, 44, 10, 13, 305, 306, /* 910 */ 12, 11, 340, 341, 40, 20, 329, 329, 329, 329, /* 920 */ 329, 329, 329, 329, 329, 329, 329, 290, 375, 376, /* 930 */ 377, 373, 372, 368, 367, 369, 370, 371, 378, 379, /* 940 */ 225, 312, 329, 225, 329, 141, 312, 329, 77, 135, /* 950 */ 152, 329, 329, 329, 135, 158, 208, 315, 386, 458, /* 960 */ 329, 232, 294, 303, 325, 313, 232, 294, 303, 329, /* 970 */ 313, 458, 223, 329, 329, 329, 318, 458, 329, 50, /* 980 */ 47, 48, 44, 10, 13, 305, 306, 12, 11, 340, /* 990 */ 341, 40, 20, 225, 329, 329, 46, 329, 329, 329, /* 1000 */ 329, 329, 329, 329, 329, 375, 376, 377, 373, 372, /* 1010 */ 368, 367, 369, 370, 371, 378, 379, 329, 329, 329, /* 1020 */ 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, /* 1030 */ 329, 329, 50, 47, 48, 44, 10, 13, 305, 306, /* 1040 */ 12, 11, 340, 341, 40, 20, 329, 329, 329, 329, /* 1050 */ 329, 329, 329, 329, 329, 329, 329, 329, 375, 376, /* 1060 */ 377, 373, 372, 368, 367, 369, 370, 371, 378, 379, /* 1070 */ 329, 329, 329, 50, 47, 48, 44, 10, 13, 305, /* 1080 */ 306, 12, 11, 340, 341, 40, 20, 329, 329, 329, /* 1090 */ 329, 329, 329, 329, 329, 329, 329, 329, 329, 375, /* 1100 */ 376, 377, 373, 372, 368, 367, 369, 370, 371, 378, /* 1110 */ 379, 329, 329, 329, 329, 329, 42, 329, 145, 211, /* 1120 */ 329, 329, 6, 108, 329, 279, 329, 312, 134, 329, /* 1130 */ 329, 150, 249, 329, 231, 135, 235, 41, 39, 329, /* 1140 */ 329, 52, 329, 43, 311, 329, 312, 232, 294, 303, /* 1150 */ 147, 313, 329, 170, 135, 329, 51, 49, 331, 237, /* 1160 */ 296, 329, 325, 106, 1, 278, 232, 294, 303, 329, /* 1170 */ 313, 155, 329, 42, 318, 145, 216, 329, 96, 6, /* 1180 */ 108, 18, 329, 226, 317, 134, 329, 313, 329, 249, /* 1190 */ 329, 231, 329, 235, 41, 39, 256, 329, 52, 329, /* 1200 */ 43, 329, 312, 329, 329, 329, 141, 329, 329, 66, /* 1210 */ 119, 238, 329, 51, 49, 331, 237, 296, 315, 386, /* 1220 */ 106, 1, 232, 294, 303, 329, 313, 270, 329, 329, /* 1230 */ 42, 329, 140, 92, 329, 96, 6, 108, 18, 41, /* 1240 */ 169, 317, 134, 329, 273, 43, 249, 329, 231, 325, /* 1250 */ 235, 41, 39, 244, 329, 52, 41, 43, 329, 312, /* 1260 */ 329, 318, 43, 141, 329, 329, 67, 135, 225, 329, /* 1270 */ 51, 49, 331, 237, 296, 315, 386, 106, 1, 224, /* 1280 */ 294, 303, 329, 313, 310, 329, 329, 42, 329, 145, /* 1290 */ 213, 329, 96, 6, 108, 329, 41, 329, 329, 134, /* 1300 */ 329, 323, 43, 249, 329, 231, 329, 235, 329, 39, /* 1310 */ 329, 329, 52, 41, 329, 329, 312, 329, 329, 43, /* 1320 */ 141, 46, 329, 86, 135, 329, 329, 51, 49, 331, /* 1330 */ 237, 296, 315, 386, 106, 1, 232, 294, 303, 329, /* 1340 */ 313, 274, 329, 329, 42, 329, 142, 216, 329, 96, /* 1350 */ 6, 108, 329, 41, 329, 329, 134, 329, 348, 43, /* 1360 */ 249, 329, 231, 329, 235, 329, 7, 329, 329, 52, /* 1370 */ 41, 329, 329, 312, 329, 329, 43, 141, 329, 329, /* 1380 */ 90, 135, 329, 329, 51, 49, 331, 237, 296, 315, /* 1390 */ 386, 106, 1, 232, 294, 303, 329, 313, 295, 329, /* 1400 */ 329, 42, 329, 138, 216, 329, 96, 6, 108, 329, /* 1410 */ 41, 329, 329, 134, 329, 322, 43, 249, 329, 231, /* 1420 */ 329, 235, 329, 39, 329, 329, 52, 41, 329, 329, /* 1430 */ 312, 329, 329, 43, 141, 329, 329, 87, 135, 329, /* 1440 */ 329, 51, 49, 331, 237, 296, 315, 386, 106, 1, /* 1450 */ 232, 294, 303, 329, 313, 384, 329, 329, 42, 329, /* 1460 */ 131, 216, 329, 96, 6, 108, 329, 41, 329, 329, /* 1470 */ 134, 329, 380, 43, 249, 329, 231, 329, 235, 329, /* 1480 */ 15, 329, 329, 52, 41, 329, 329, 312, 329, 329, /* 1490 */ 43, 141, 329, 329, 79, 135, 329, 329, 51, 49, /* 1500 */ 331, 237, 296, 315, 386, 106, 1, 232, 294, 303, /* 1510 */ 329, 313, 272, 329, 329, 42, 329, 145, 210, 329, /* 1520 */ 96, 6, 108, 329, 41, 329, 329, 134, 329, 349, /* 1530 */ 43, 249, 329, 231, 329, 221, 329, 39, 329, 329, /* 1540 */ 52, 41, 329, 329, 312, 329, 329, 43, 141, 329, /* 1550 */ 329, 70, 135, 329, 329, 51, 49, 331, 237, 296, /* 1560 */ 315, 386, 106, 1, 232, 294, 303, 329, 313, 324, /* 1570 */ 329, 329, 42, 329, 145, 209, 329, 96, 6, 108, /* 1580 */ 329, 41, 329, 329, 134, 329, 326, 43, 249, 329, /* 1590 */ 231, 329, 235, 329, 39, 329, 329, 52, 41, 329, /* 1600 */ 329, 312, 329, 329, 43, 141, 329, 329, 74, 135, /* 1610 */ 329, 329, 51, 49, 331, 237, 296, 315, 386, 106, /* 1620 */ 1, 232, 294, 303, 329, 313, 262, 329, 329, 42, /* 1630 */ 329, 131, 214, 329, 96, 6, 108, 329, 41, 329, /* 1640 */ 329, 134, 329, 327, 43, 249, 329, 231, 329, 235, /* 1650 */ 329, 15, 329, 329, 52, 41, 329, 329, 312, 329, /* 1660 */ 329, 43, 141, 329, 329, 53, 135, 329, 329, 51, /* 1670 */ 49, 331, 237, 296, 315, 386, 106, 329, 232, 294, /* 1680 */ 303, 329, 313, 286, 329, 329, 42, 329, 131, 216, /* 1690 */ 329, 96, 6, 108, 329, 41, 329, 329, 134, 329, /* 1700 */ 343, 43, 249, 329, 231, 329, 235, 329, 15, 329, /* 1710 */ 329, 52, 41, 329, 329, 312, 329, 329, 43, 118, /* 1720 */ 329, 329, 76, 135, 329, 329, 51, 49, 331, 237, /* 1730 */ 296, 315, 386, 106, 329, 232, 294, 303, 329, 313, /* 1740 */ 329, 329, 329, 329, 504, 329, 329, 329, 96, 329, /* 1750 */ 357, 504, 329, 504, 504, 364, 504, 504, 329, 329, /* 1760 */ 329, 35, 504, 329, 504, 2, 504, 6, 108, 329, /* 1770 */ 198, 174, 329, 134, 329, 329, 329, 249, 329, 231, /* 1780 */ 325, 504, 329, 21, 9, 329, 329, 329, 144, 329, /* 1790 */ 329, 329, 504, 329, 312, 99, 179, 206, 141, 329, /* 1800 */ 329, 58, 135, 329, 329, 325, 504, 329, 21, 9, /* 1810 */ 315, 386, 329, 312, 232, 294, 303, 141, 313, 329, /* 1820 */ 71, 135, 206, 344, 37, 362, 329, 329, 329, 315, /* 1830 */ 386, 329, 329, 232, 294, 303, 312, 313, 329, 329, /* 1840 */ 141, 329, 329, 72, 135, 329, 329, 312, 329, 329, /* 1850 */ 329, 141, 315, 386, 65, 135, 232, 294, 303, 329, /* 1860 */ 313, 329, 329, 315, 386, 329, 329, 232, 294, 303, /* 1870 */ 329, 313, 329, 329, 312, 198, 167, 329, 141, 329, /* 1880 */ 329, 69, 135, 329, 329, 325, 329, 329, 21, 9, /* 1890 */ 315, 386, 329, 329, 232, 294, 303, 312, 313, 329, /* 1900 */ 329, 141, 206, 329, 85, 135, 329, 312, 329, 329, /* 1910 */ 329, 149, 329, 315, 386, 135, 312, 232, 294, 303, /* 1920 */ 141, 313, 329, 81, 135, 329, 329, 232, 294, 303, /* 1930 */ 329, 313, 315, 386, 329, 329, 232, 294, 303, 312, /* 1940 */ 313, 329, 329, 141, 329, 329, 82, 135, 329, 329, /* 1950 */ 312, 329, 329, 329, 141, 315, 386, 63, 135, 232, /* 1960 */ 294, 303, 329, 313, 329, 329, 315, 386, 329, 329, /* 1970 */ 232, 294, 303, 329, 313, 329, 312, 329, 329, 329, /* 1980 */ 141, 329, 329, 73, 135, 329, 329, 312, 329, 329, /* 1990 */ 329, 141, 315, 386, 83, 135, 232, 294, 303, 329, /* 2000 */ 313, 329, 329, 315, 386, 329, 312, 232, 294, 303, /* 2010 */ 141, 313, 329, 89, 135, 329, 329, 329, 329, 329, /* 2020 */ 329, 329, 315, 386, 329, 312, 232, 294, 303, 111, /* 2030 */ 313, 329, 68, 135, 329, 329, 312, 329, 329, 329, /* 2040 */ 141, 315, 386, 62, 135, 232, 294, 303, 329, 313, /* 2050 */ 329, 329, 315, 386, 329, 329, 232, 294, 303, 329, /* 2060 */ 313, 329, 312, 329, 329, 329, 141, 329, 329, 61, /* 2070 */ 135, 329, 329, 312, 329, 329, 329, 141, 315, 386, /* 2080 */ 91, 135, 232, 294, 303, 329, 313, 329, 329, 315, /* 2090 */ 386, 329, 312, 232, 294, 303, 141, 313, 329, 78, /* 2100 */ 135, 329, 329, 329, 329, 329, 329, 329, 315, 386, /* 2110 */ 329, 312, 232, 294, 303, 141, 313, 329, 66, 135, /* 2120 */ 329, 329, 312, 329, 329, 329, 141, 315, 386, 80, /* 2130 */ 135, 232, 294, 303, 329, 313, 329, 329, 315, 386, /* 2140 */ 329, 329, 232, 294, 303, 329, 313, 329, 312, 329, /* 2150 */ 329, 329, 113, 329, 329, 88, 135, 329, 329, 312, /* 2160 */ 329, 329, 329, 112, 315, 386, 84, 135, 232, 294, /* 2170 */ 303, 329, 313, 329, 329, 315, 386, 329, 312, 232, /* 2180 */ 294, 303, 141, 313, 329, 57, 135, 329, 329, 329, /* 2190 */ 329, 329, 329, 329, 315, 386, 329, 312, 232, 294, /* 2200 */ 303, 93, 313, 329, 59, 121, 329, 329, 312, 329, /* 2210 */ 329, 329, 141, 315, 386, 75, 135, 232, 294, 303, /* 2220 */ 329, 313, 329, 329, 315, 386, 329, 329, 232, 294, /* 2230 */ 303, 329, 313, 329, 312, 329, 329, 329, 141, 329, /* 2240 */ 329, 60, 135, 329, 329, 312, 329, 329, 329, 141, /* 2250 */ 315, 386, 64, 135, 232, 294, 303, 329, 313, 329, /* 2260 */ 329, 315, 386, 329, 312, 232, 294, 303, 120, 313, /* 2270 */ 329, 55, 135, 329, 329, 329, 329, 329, 329, 329, /* 2280 */ 315, 386, 329, 312, 232, 294, 303, 93, 313, 329, /* 2290 */ 56, 121, 225, 329, 312, 329, 198, 164, 157, 315, /* 2300 */ 386, 329, 135, 219, 294, 303, 325, 313, 352, 21, /* 2310 */ 9, 287, 234, 329, 232, 294, 303, 329, 313, 329, /* 2320 */ 41, 329, 329, 206, 312, 329, 43, 329, 151, 2, /* 2330 */ 329, 329, 135, 329, 329, 329, 329, 329, 329, 329, /* 2340 */ 198, 168, 329, 329, 232, 294, 303, 329, 313, 329, /* 2350 */ 325, 329, 144, 21, 9, 198, 171, 329, 329, 329, /* 2360 */ 329, 329, 329, 329, 329, 325, 329, 206, 21, 9, /* 2370 */ 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, /* 2380 */ 329, 329, 206, ); static public $yy_lookahead = array( /* 0 */ 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, /* 10 */ 12, 13, 16, 98, 16, 19, 17, 17, 113, 114, /* 20 */ 22, 23, 16, 97, 18, 19, 28, 112, 29, 29, /* 30 */ 32, 33, 34, 16, 35, 35, 19, 20, 112, 40, /* 40 */ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, /* 50 */ 51, 52, 53, 4, 5, 6, 7, 8, 62, 93, /* 60 */ 94, 95, 13, 14, 15, 66, 67, 68, 69, 70, /* 70 */ 71, 72, 73, 74, 75, 76, 77, 1, 85, 62, /* 80 */ 1, 1, 89, 38, 117, 92, 93, 82, 83, 84, /* 90 */ 85, 86, 38, 17, 101, 102, 17, 17, 105, 106, /* 100 */ 107, 86, 109, 88, 59, 29, 61, 1, 29, 30, /* 110 */ 65, 35, 119, 120, 35, 61, 40, 41, 42, 43, /* 120 */ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, /* 130 */ 90, 91, 59, 54, 54, 29, 16, 64, 18, 19, /* 140 */ 100, 35, 66, 67, 68, 69, 70, 71, 72, 73, /* 150 */ 74, 75, 76, 77, 1, 85, 36, 117, 1, 89, /* 160 */ 18, 1, 92, 93, 94, 1, 17, 20, 21, 20, /* 170 */ 17, 101, 102, 17, 17, 105, 106, 107, 29, 109, /* 180 */ 38, 17, 29, 31, 35, 29, 29, 38, 35, 90, /* 190 */ 38, 35, 35, 40, 41, 42, 43, 44, 45, 46, /* 200 */ 47, 48, 49, 50, 51, 52, 53, 1, 61, 111, /* 210 */ 61, 113, 114, 61, 54, 90, 117, 118, 90, 66, /* 220 */ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, /* 230 */ 77, 103, 104, 27, 110, 29, 112, 1, 84, 85, /* 240 */ 86, 35, 117, 20, 21, 117, 40, 41, 42, 43, /* 250 */ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, /* 260 */ 1, 91, 16, 59, 25, 19, 20, 31, 64, 16, /* 270 */ 100, 25, 66, 67, 68, 69, 70, 71, 72, 73, /* 280 */ 74, 75, 76, 77, 61, 85, 85, 117, 29, 37, /* 290 */ 54, 38, 18, 19, 35, 37, 110, 39, 112, 40, /* 300 */ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, /* 310 */ 51, 52, 53, 1, 90, 91, 16, 65, 79, 19, /* 320 */ 20, 121, 122, 122, 100, 66, 67, 68, 69, 70, /* 330 */ 71, 72, 73, 74, 75, 76, 77, 63, 24, 91, /* 340 */ 37, 117, 39, 37, 16, 39, 90, 19, 100, 2, /* 350 */ 19, 37, 40, 41, 42, 43, 44, 45, 46, 47, /* 360 */ 48, 49, 50, 51, 52, 53, 1, 90, 91, 16, /* 370 */ 29, 19, 19, 117, 93, 94, 35, 100, 66, 67, /* 380 */ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, /* 390 */ 62, 79, 96, 62, 117, 17, 16, 18, 19, 19, /* 400 */ 93, 94, 19, 25, 39, 40, 41, 42, 43, 44, /* 410 */ 45, 46, 47, 48, 49, 50, 51, 52, 53, 1, /* 420 */ 91, 91, 90, 16, 16, 16, 19, 19, 19, 100, /* 430 */ 100, 66, 67, 68, 69, 70, 71, 72, 73, 74, /* 440 */ 75, 76, 77, 108, 29, 91, 117, 117, 30, 117, /* 450 */ 115, 29, 113, 114, 100, 20, 96, 35, 40, 41, /* 460 */ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, /* 470 */ 52, 53, 91, 1, 118, 99, 18, 26, 110, 20, /* 480 */ 2, 100, 97, 1, 66, 67, 68, 69, 70, 71, /* 490 */ 72, 73, 74, 75, 76, 77, 1, 112, 117, 17, /* 500 */ 1, 2, 85, 99, 19, 110, 89, 10, 16, 19, /* 510 */ 93, 19, 17, 16, 21, 99, 17, 38, 59, 22, /* 520 */ 23, 29, 105, 106, 107, 28, 109, 35, 18, 32, /* 530 */ 33, 34, 2, 1, 65, 40, 41, 42, 43, 44, /* 540 */ 45, 46, 47, 48, 49, 50, 51, 52, 53, 17, /* 550 */ 20, 91, 59, 21, 36, 19, 19, 64, 19, 25, /* 560 */ 100, 66, 67, 68, 69, 70, 71, 72, 73, 74, /* 570 */ 75, 76, 77, 1, 85, 78, 79, 80, 89, 85, /* 580 */ 19, 92, 93, 89, 59, 63, 21, 93, 19, 17, /* 590 */ 101, 102, 17, 1, 105, 106, 107, 18, 109, 105, /* 600 */ 106, 107, 18, 109, 29, 116, 36, 63, 19, 17, /* 610 */ 35, 1, 40, 41, 42, 43, 44, 45, 46, 47, /* 620 */ 48, 49, 50, 51, 52, 53, 61, 17, 108, 38, /* 630 */ 2, 19, 39, 55, 21, 115, 18, 97, 66, 67, /* 640 */ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, /* 650 */ 1, 85, 112, 1, 100, 89, 85, 115, 92, 93, /* 660 */ 89, 110, 112, 111, 93, 91, 17, 101, 102, 17, /* 670 */ 97, 105, 106, 107, 100, 109, 105, 106, 107, 14, /* 680 */ 109, 29, 116, 87, 123, 112, 112, 35, 123, 40, /* 690 */ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, /* 700 */ 51, 52, 53, 1, 2, 110, 54, 110, 114, 110, /* 710 */ 123, 123, 97, 97, 97, 66, 67, 68, 69, 70, /* 720 */ 71, 72, 73, 74, 75, 76, 77, 112, 112, 112, /* 730 */ 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, /* 740 */ 123, 123, 40, 41, 42, 43, 44, 45, 46, 47, /* 750 */ 48, 49, 50, 51, 52, 53, 1, 123, 123, 123, /* 760 */ 123, 123, 123, 123, 123, 97, 97, 97, 66, 67, /* 770 */ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, /* 780 */ 112, 112, 112, 123, 123, 123, 123, 123, 123, 123, /* 790 */ 123, 123, 123, 123, 39, 40, 41, 42, 43, 44, /* 800 */ 45, 46, 47, 48, 49, 50, 51, 52, 53, 123, /* 810 */ 1, 123, 123, 123, 123, 123, 123, 123, 123, 123, /* 820 */ 123, 66, 67, 68, 69, 70, 71, 72, 73, 74, /* 830 */ 75, 76, 77, 24, 123, 123, 123, 123, 123, 123, /* 840 */ 123, 123, 123, 123, 123, 123, 123, 123, 123, 40, /* 850 */ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, /* 860 */ 51, 52, 53, 1, 123, 123, 123, 123, 123, 123, /* 870 */ 123, 123, 123, 123, 123, 66, 67, 68, 69, 70, /* 880 */ 71, 72, 73, 74, 75, 76, 77, 123, 123, 123, /* 890 */ 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, /* 900 */ 123, 123, 40, 41, 42, 43, 44, 45, 46, 47, /* 910 */ 48, 49, 50, 51, 52, 53, 123, 123, 123, 123, /* 920 */ 123, 123, 123, 123, 123, 123, 123, 65, 66, 67, /* 930 */ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, /* 940 */ 1, 85, 123, 1, 123, 89, 85, 123, 92, 93, /* 950 */ 89, 123, 123, 123, 93, 91, 17, 101, 102, 17, /* 960 */ 123, 105, 106, 107, 100, 109, 105, 106, 107, 123, /* 970 */ 109, 29, 116, 123, 123, 123, 112, 35, 123, 40, /* 980 */ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, /* 990 */ 51, 52, 53, 1, 123, 123, 54, 123, 123, 123, /* 1000 */ 123, 123, 123, 123, 123, 66, 67, 68, 69, 70, /* 1010 */ 71, 72, 73, 74, 75, 76, 77, 123, 123, 123, /* 1020 */ 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, /* 1030 */ 123, 123, 40, 41, 42, 43, 44, 45, 46, 47, /* 1040 */ 48, 49, 50, 51, 52, 53, 123, 123, 123, 123, /* 1050 */ 123, 123, 123, 123, 123, 123, 123, 123, 66, 67, /* 1060 */ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, /* 1070 */ 123, 123, 123, 40, 41, 42, 43, 44, 45, 46, /* 1080 */ 47, 48, 49, 50, 51, 52, 53, 123, 123, 123, /* 1090 */ 123, 123, 123, 123, 123, 123, 123, 123, 123, 66, /* 1100 */ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, /* 1110 */ 77, 123, 123, 123, 123, 123, 16, 123, 18, 19, /* 1120 */ 123, 123, 22, 23, 123, 17, 123, 85, 28, 123, /* 1130 */ 123, 89, 32, 33, 34, 93, 36, 29, 38, 123, /* 1140 */ 123, 41, 123, 35, 102, 123, 85, 105, 106, 107, /* 1150 */ 89, 109, 123, 91, 93, 123, 56, 57, 58, 59, /* 1160 */ 60, 123, 100, 63, 64, 65, 105, 106, 107, 123, /* 1170 */ 109, 93, 123, 16, 112, 18, 19, 123, 78, 22, /* 1180 */ 23, 16, 123, 105, 19, 28, 123, 109, 123, 32, /* 1190 */ 33, 34, 123, 36, 29, 38, 31, 123, 41, 123, /* 1200 */ 35, 123, 85, 123, 123, 123, 89, 123, 123, 92, /* 1210 */ 93, 94, 123, 56, 57, 58, 59, 60, 101, 102, /* 1220 */ 63, 64, 105, 106, 107, 123, 109, 17, 123, 123, /* 1230 */ 16, 123, 18, 19, 123, 78, 22, 23, 16, 29, /* 1240 */ 91, 19, 28, 123, 17, 35, 32, 33, 34, 100, /* 1250 */ 36, 29, 38, 31, 123, 41, 29, 35, 123, 85, /* 1260 */ 123, 112, 35, 89, 123, 123, 92, 93, 1, 123, /* 1270 */ 56, 57, 58, 59, 60, 101, 102, 63, 64, 105, /* 1280 */ 106, 107, 123, 109, 17, 123, 123, 16, 123, 18, /* 1290 */ 19, 123, 78, 22, 23, 123, 29, 123, 123, 28, /* 1300 */ 123, 17, 35, 32, 33, 34, 123, 36, 123, 38, /* 1310 */ 123, 123, 41, 29, 123, 123, 85, 123, 123, 35, /* 1320 */ 89, 54, 123, 92, 93, 123, 123, 56, 57, 58, /* 1330 */ 59, 60, 101, 102, 63, 64, 105, 106, 107, 123, /* 1340 */ 109, 17, 123, 123, 16, 123, 18, 19, 123, 78, /* 1350 */ 22, 23, 123, 29, 123, 123, 28, 123, 17, 35, /* 1360 */ 32, 33, 34, 123, 36, 123, 38, 123, 123, 41, /* 1370 */ 29, 123, 123, 85, 123, 123, 35, 89, 123, 123, /* 1380 */ 92, 93, 123, 123, 56, 57, 58, 59, 60, 101, /* 1390 */ 102, 63, 64, 105, 106, 107, 123, 109, 17, 123, /* 1400 */ 123, 16, 123, 18, 19, 123, 78, 22, 23, 123, /* 1410 */ 29, 123, 123, 28, 123, 17, 35, 32, 33, 34, /* 1420 */ 123, 36, 123, 38, 123, 123, 41, 29, 123, 123, /* 1430 */ 85, 123, 123, 35, 89, 123, 123, 92, 93, 123, /* 1440 */ 123, 56, 57, 58, 59, 60, 101, 102, 63, 64, /* 1450 */ 105, 106, 107, 123, 109, 17, 123, 123, 16, 123, /* 1460 */ 18, 19, 123, 78, 22, 23, 123, 29, 123, 123, /* 1470 */ 28, 123, 17, 35, 32, 33, 34, 123, 36, 123, /* 1480 */ 38, 123, 123, 41, 29, 123, 123, 85, 123, 123, /* 1490 */ 35, 89, 123, 123, 92, 93, 123, 123, 56, 57, /* 1500 */ 58, 59, 60, 101, 102, 63, 64, 105, 106, 107, /* 1510 */ 123, 109, 17, 123, 123, 16, 123, 18, 19, 123, /* 1520 */ 78, 22, 23, 123, 29, 123, 123, 28, 123, 17, /* 1530 */ 35, 32, 33, 34, 123, 36, 123, 38, 123, 123, /* 1540 */ 41, 29, 123, 123, 85, 123, 123, 35, 89, 123, /* 1550 */ 123, 92, 93, 123, 123, 56, 57, 58, 59, 60, /* 1560 */ 101, 102, 63, 64, 105, 106, 107, 123, 109, 17, /* 1570 */ 123, 123, 16, 123, 18, 19, 123, 78, 22, 23, /* 1580 */ 123, 29, 123, 123, 28, 123, 17, 35, 32, 33, /* 1590 */ 34, 123, 36, 123, 38, 123, 123, 41, 29, 123, /* 1600 */ 123, 85, 123, 123, 35, 89, 123, 123, 92, 93, /* 1610 */ 123, 123, 56, 57, 58, 59, 60, 101, 102, 63, /* 1620 */ 64, 105, 106, 107, 123, 109, 17, 123, 123, 16, /* 1630 */ 123, 18, 19, 123, 78, 22, 23, 123, 29, 123, /* 1640 */ 123, 28, 123, 17, 35, 32, 33, 34, 123, 36, /* 1650 */ 123, 38, 123, 123, 41, 29, 123, 123, 85, 123, /* 1660 */ 123, 35, 89, 123, 123, 92, 93, 123, 123, 56, /* 1670 */ 57, 58, 59, 60, 101, 102, 63, 123, 105, 106, /* 1680 */ 107, 123, 109, 17, 123, 123, 16, 123, 18, 19, /* 1690 */ 123, 78, 22, 23, 123, 29, 123, 123, 28, 123, /* 1700 */ 17, 35, 32, 33, 34, 123, 36, 123, 38, 123, /* 1710 */ 123, 41, 29, 123, 123, 85, 123, 123, 35, 89, /* 1720 */ 123, 123, 92, 93, 123, 123, 56, 57, 58, 59, /* 1730 */ 60, 101, 102, 63, 123, 105, 106, 107, 123, 109, /* 1740 */ 123, 123, 123, 123, 17, 123, 123, 123, 78, 123, /* 1750 */ 120, 24, 123, 26, 27, 10, 29, 30, 123, 123, /* 1760 */ 123, 16, 35, 123, 37, 38, 39, 22, 23, 123, /* 1770 */ 90, 91, 123, 28, 123, 123, 123, 32, 33, 34, /* 1780 */ 100, 54, 123, 103, 104, 123, 123, 123, 61, 123, /* 1790 */ 123, 123, 65, 123, 85, 90, 91, 117, 89, 123, /* 1800 */ 123, 92, 93, 123, 123, 100, 79, 123, 103, 104, /* 1810 */ 101, 102, 123, 85, 105, 106, 107, 89, 109, 123, /* 1820 */ 92, 93, 117, 78, 79, 80, 123, 123, 123, 101, /* 1830 */ 102, 123, 123, 105, 106, 107, 85, 109, 123, 123, /* 1840 */ 89, 123, 123, 92, 93, 123, 123, 85, 123, 123, /* 1850 */ 123, 89, 101, 102, 92, 93, 105, 106, 107, 123, /* 1860 */ 109, 123, 123, 101, 102, 123, 123, 105, 106, 107, /* 1870 */ 123, 109, 123, 123, 85, 90, 91, 123, 89, 123, /* 1880 */ 123, 92, 93, 123, 123, 100, 123, 123, 103, 104, /* 1890 */ 101, 102, 123, 123, 105, 106, 107, 85, 109, 123, /* 1900 */ 123, 89, 117, 123, 92, 93, 123, 85, 123, 123, /* 1910 */ 123, 89, 123, 101, 102, 93, 85, 105, 106, 107, /* 1920 */ 89, 109, 123, 92, 93, 123, 123, 105, 106, 107, /* 1930 */ 123, 109, 101, 102, 123, 123, 105, 106, 107, 85, /* 1940 */ 109, 123, 123, 89, 123, 123, 92, 93, 123, 123, /* 1950 */ 85, 123, 123, 123, 89, 101, 102, 92, 93, 105, /* 1960 */ 106, 107, 123, 109, 123, 123, 101, 102, 123, 123, /* 1970 */ 105, 106, 107, 123, 109, 123, 85, 123, 123, 123, /* 1980 */ 89, 123, 123, 92, 93, 123, 123, 85, 123, 123, /* 1990 */ 123, 89, 101, 102, 92, 93, 105, 106, 107, 123, /* 2000 */ 109, 123, 123, 101, 102, 123, 85, 105, 106, 107, /* 2010 */ 89, 109, 123, 92, 93, 123, 123, 123, 123, 123, /* 2020 */ 123, 123, 101, 102, 123, 85, 105, 106, 107, 89, /* 2030 */ 109, 123, 92, 93, 123, 123, 85, 123, 123, 123, /* 2040 */ 89, 101, 102, 92, 93, 105, 106, 107, 123, 109, /* 2050 */ 123, 123, 101, 102, 123, 123, 105, 106, 107, 123, /* 2060 */ 109, 123, 85, 123, 123, 123, 89, 123, 123, 92, /* 2070 */ 93, 123, 123, 85, 123, 123, 123, 89, 101, 102, /* 2080 */ 92, 93, 105, 106, 107, 123, 109, 123, 123, 101, /* 2090 */ 102, 123, 85, 105, 106, 107, 89, 109, 123, 92, /* 2100 */ 93, 123, 123, 123, 123, 123, 123, 123, 101, 102, /* 2110 */ 123, 85, 105, 106, 107, 89, 109, 123, 92, 93, /* 2120 */ 123, 123, 85, 123, 123, 123, 89, 101, 102, 92, /* 2130 */ 93, 105, 106, 107, 123, 109, 123, 123, 101, 102, /* 2140 */ 123, 123, 105, 106, 107, 123, 109, 123, 85, 123, /* 2150 */ 123, 123, 89, 123, 123, 92, 93, 123, 123, 85, /* 2160 */ 123, 123, 123, 89, 101, 102, 92, 93, 105, 106, /* 2170 */ 107, 123, 109, 123, 123, 101, 102, 123, 85, 105, /* 2180 */ 106, 107, 89, 109, 123, 92, 93, 123, 123, 123, /* 2190 */ 123, 123, 123, 123, 101, 102, 123, 85, 105, 106, /* 2200 */ 107, 89, 109, 123, 92, 93, 123, 123, 85, 123, /* 2210 */ 123, 123, 89, 101, 102, 92, 93, 105, 106, 107, /* 2220 */ 123, 109, 123, 123, 101, 102, 123, 123, 105, 106, /* 2230 */ 107, 123, 109, 123, 85, 123, 123, 123, 89, 123, /* 2240 */ 123, 92, 93, 123, 123, 85, 123, 123, 123, 89, /* 2250 */ 101, 102, 92, 93, 105, 106, 107, 123, 109, 123, /* 2260 */ 123, 101, 102, 123, 85, 105, 106, 107, 89, 109, /* 2270 */ 123, 92, 93, 123, 123, 123, 123, 123, 123, 123, /* 2280 */ 101, 102, 123, 85, 105, 106, 107, 89, 109, 123, /* 2290 */ 92, 93, 1, 123, 85, 123, 90, 91, 89, 101, /* 2300 */ 102, 123, 93, 105, 106, 107, 100, 109, 17, 103, /* 2310 */ 104, 102, 21, 123, 105, 106, 107, 123, 109, 123, /* 2320 */ 29, 123, 123, 117, 85, 123, 35, 123, 89, 38, /* 2330 */ 123, 123, 93, 123, 123, 123, 123, 123, 123, 123, /* 2340 */ 90, 91, 123, 123, 105, 106, 107, 123, 109, 123, /* 2350 */ 100, 123, 61, 103, 104, 90, 91, 123, 123, 123, /* 2360 */ 123, 123, 123, 123, 123, 100, 123, 117, 103, 104, /* 2370 */ 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, /* 2380 */ 123, 123, 117, ); const YY_SHIFT_USE_DFLT = -5; const YY_SHIFT_MAX = 256; static public $yy_shift_ofst = array( /* 0 */ -2, 1271, 1157, 1157, 1271, 1157, 1328, 1328, 1100, 1157, /* 10 */ 1157, 1157, 1157, 1157, 1157, 1157, 1499, 1157, 1157, 1157, /* 20 */ 1157, 1157, 1556, 1157, 1157, 1157, 1157, 1157, 1157, 1157, /* 30 */ 1157, 1157, 1157, 1157, 1385, 1214, 1157, 1157, 1157, 1157, /* 40 */ 1157, 1499, 1214, 1157, 1442, 1442, 1613, 1670, 1670, 1670, /* 50 */ 1670, 1670, 1670, 206, 153, 76, -1, 259, 259, 259, /* 60 */ 809, 939, 755, 862, 702, 649, 365, 312, 418, 495, /* 70 */ 572, 992, 992, 992, 992, 992, 992, 992, 992, 992, /* 80 */ 992, 992, 992, 992, 992, 992, 992, 992, 992, 992, /* 90 */ 1033, 1033, 2291, 1267, 106, -2, 1745, 1222, 1165, 157, /* 100 */ 157, 492, 492, 499, 106, 106, 274, 493, 142, 497, /* 110 */ 49, 79, 942, 652, 246, 17, 328, 300, 236, 223, /* 120 */ 80, 147, 532, 1227, 353, 353, 353, 422, 407, 142, /* 130 */ 353, 353, 610, 353, 341, 565, 379, 353, 380, 142, /* 140 */ 408, 160, 409, 353, 379, 409, 353, 472, 613, 472, /* 150 */ 472, 472, 472, 472, 472, 613, 472, -5, 1284, 1210, /* 160 */ -4, 1108, 0, 156, 575, 1683, 1552, 1512, 1569, 1609, /* 170 */ 1666, 1324, 1626, 6, 1495, 1398, 1381, 1341, 1438, 1455, /* 180 */ 73, 482, 73, 204, 592, 204, 204, 204, 164, 204, /* 190 */ 253, 204, 204, 665, 613, 613, 613, 479, 472, 347, /* 200 */ 415, 415, 472, 347, -5, -5, -5, -5, -5, 1727, /* 210 */ 149, 45, 120, 152, 54, 530, 54, 314, 252, 378, /* 220 */ 306, 459, 258, 303, 239, 331, 522, 536, 469, 537, /* 230 */ 539, 569, 534, 544, 561, 525, 518, 570, 593, 612, /* 240 */ 578, 628, 591, 579, 510, 584, 589, 458, 435, 352, /* 250 */ 485, 478, 451, 479, 490, 383, 618, ); const YY_REDUCE_USE_DFLT = -96; const YY_REDUCE_MAX = 208; static public $yy_reduce_ofst = array( /* 0 */ 5, -7, 489, 566, 1630, 856, 70, 1117, 1865, 1854, /* 10 */ 1831, 1812, 1891, 1902, 1977, 1951, 1940, 1921, 1789, 1762, /* 20 */ 1402, 1345, 1288, 1231, 1459, 1516, 1751, 1728, 1709, 1573, /* 30 */ 1988, 2007, 2123, 2149, 2160, 2198, 2179, 1174, 2093, 2026, /* 40 */ 2037, 2063, 2112, 2074, 1042, 2209, 1822, 2239, 1061, 861, /* 50 */ 494, 417, 571, 2265, 2250, 2206, 1705, 1785, 1680, 1705, /* 60 */ 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, /* 70 */ 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, /* 80 */ 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, /* 90 */ 128, 128, 277, 224, 40, 154, 200, 864, 1062, 170, /* 100 */ 330, 574, 1149, 99, 329, 381, 1078, 98, -34, 201, /* 110 */ 15, 125, 125, 125, -85, 124, 124, 124, 125, -95, /* 120 */ 125, -95, 332, 354, 573, 616, 617, 460, 615, 307, /* 130 */ 385, 540, 256, -74, 248, -95, 335, 668, 540, 281, /* 140 */ 540, 125, 670, 669, 520, 540, 186, 125, 339, 125, /* 150 */ 125, 125, 125, 125, 125, -95, 125, 125, 554, 554, /* 160 */ 550, 554, 554, 554, 554, 554, 554, 554, 554, 554, /* 170 */ 554, 554, 554, 542, 554, 554, 554, 554, 554, 554, /* 180 */ 595, -33, 551, 552, -33, 552, 552, 552, -33, 552, /* 190 */ 597, 552, 552, 596, 594, 594, 594, 599, -33, 356, /* 200 */ 296, 360, -33, 356, 395, 404, 376, 416, 368, ); static public $yyExpectedTokens = array( /* 0 */ array(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 22, 23, 28, 32, 33, 34, ), /* 1 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 2 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 3 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 4 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 5 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 6 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 7 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 8 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 65, 78, ), /* 9 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 10 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 11 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 12 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 13 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 14 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 15 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 16 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 17 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 18 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 19 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 20 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 21 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 22 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 23 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 24 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 25 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 26 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 27 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 28 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 29 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 30 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 31 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 32 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 33 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 34 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 35 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 36 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 37 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 38 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 39 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 40 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 41 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 42 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 43 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 44 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 45 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 46 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 78, ), /* 47 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 78, ), /* 48 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 78, ), /* 49 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 78, ), /* 50 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 78, ), /* 51 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 78, ), /* 52 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 78, ), /* 53 */ array(1, 27, 29, 35, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 54 */ array(1, 17, 29, 35, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 55 */ array(1, 17, 29, 35, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 56 */ array(1, 17, 29, 35, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 57 */ array(1, 29, 35, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 58 */ array(1, 29, 35, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 59 */ array(1, 29, 35, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 60 */ array(1, 24, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 61 */ array(1, 17, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 62 */ array(1, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 63 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 64 */ array(1, 2, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 65 */ array(1, 17, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 66 */ array(1, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 67 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 79, ), /* 68 */ array(1, 30, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 69 */ array(1, 17, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 70 */ array(1, 17, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 71 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 72 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 73 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 74 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 75 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 76 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 77 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 78 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 79 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 80 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 81 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 82 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 83 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 84 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 85 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 86 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 87 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 88 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 89 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 90 */ array(40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 91 */ array(40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ), /* 92 */ array(1, 17, 21, 29, 35, 38, 61, ), /* 93 */ array(1, 17, 29, 35, 54, ), /* 94 */ array(1, 29, 35, ), /* 95 */ array(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 22, 23, 28, 32, 33, 34, ), /* 96 */ array(10, 16, 22, 23, 28, 32, 33, 34, 78, 79, 80, ), /* 97 */ array(16, 19, 29, 31, 35, ), /* 98 */ array(16, 19, 29, 31, 35, ), /* 99 */ array(1, 17, 29, 35, ), /* 100 */ array(1, 17, 29, 35, ), /* 101 */ array(16, 19, 29, 35, ), /* 102 */ array(16, 19, 29, 35, ), /* 103 */ array(1, 2, 17, ), /* 104 */ array(1, 29, 35, ), /* 105 */ array(1, 29, 35, ), /* 106 */ array(18, 19, 63, ), /* 107 */ array(21, 59, 64, ), /* 108 */ array(18, 38, ), /* 109 */ array(10, 16, 22, 23, 28, 32, 33, 34, 78, 79, 80, ), /* 110 */ array(4, 5, 6, 7, 8, 13, 14, 15, ), /* 111 */ array(1, 17, 29, 30, 35, 54, ), /* 112 */ array(1, 17, 29, 35, 54, ), /* 113 */ array(1, 17, 29, 35, 54, ), /* 114 */ array(16, 19, 20, 25, ), /* 115 */ array(16, 19, 20, 62, ), /* 116 */ array(16, 19, 62, ), /* 117 */ array(16, 19, 20, ), /* 118 */ array(1, 31, 54, ), /* 119 */ array(20, 21, 61, ), /* 120 */ array(1, 17, 54, ), /* 121 */ array(20, 21, 61, ), /* 122 */ array(1, 17, 21, ), /* 123 */ array(17, 29, 35, ), /* 124 */ array(16, 19, ), /* 125 */ array(16, 19, ), /* 126 */ array(16, 19, ), /* 127 */ array(29, 35, ), /* 128 */ array(16, 19, ), /* 129 */ array(18, 38, ), /* 130 */ array(16, 19, ), /* 131 */ array(16, 19, ), /* 132 */ array(1, 17, ), /* 133 */ array(16, 19, ), /* 134 */ array(29, 35, ), /* 135 */ array(21, 61, ), /* 136 */ array(18, 19, ), /* 137 */ array(16, 19, ), /* 138 */ array(16, 19, ), /* 139 */ array(18, 38, ), /* 140 */ array(16, 19, ), /* 141 */ array(1, 54, ), /* 142 */ array(16, 19, ), /* 143 */ array(16, 19, ), /* 144 */ array(18, 19, ), /* 145 */ array(16, 19, ), /* 146 */ array(16, 19, ), /* 147 */ array(1, ), /* 148 */ array(21, ), /* 149 */ array(1, ), /* 150 */ array(1, ), /* 151 */ array(1, ), /* 152 */ array(1, ), /* 153 */ array(1, ), /* 154 */ array(1, ), /* 155 */ array(21, ), /* 156 */ array(1, ), /* 157 */ array(), /* 158 */ array(17, 29, 35, ), /* 159 */ array(17, 29, 35, ), /* 160 */ array(16, 19, 62, ), /* 161 */ array(17, 29, 35, ), /* 162 */ array(17, 29, 35, ), /* 163 */ array(17, 29, 35, ), /* 164 */ array(17, 29, 35, ), /* 165 */ array(17, 29, 35, ), /* 166 */ array(17, 29, 35, ), /* 167 */ array(17, 29, 35, ), /* 168 */ array(17, 29, 35, ), /* 169 */ array(17, 29, 35, ), /* 170 */ array(17, 29, 35, ), /* 171 */ array(17, 29, 35, ), /* 172 */ array(17, 29, 35, ), /* 173 */ array(16, 18, 19, ), /* 174 */ array(17, 29, 35, ), /* 175 */ array(17, 29, 35, ), /* 176 */ array(17, 29, 35, ), /* 177 */ array(17, 29, 35, ), /* 178 */ array(17, 29, 35, ), /* 179 */ array(17, 29, 35, ), /* 180 */ array(59, 64, ), /* 181 */ array(1, 17, ), /* 182 */ array(59, 64, ), /* 183 */ array(59, 64, ), /* 184 */ array(1, 17, ), /* 185 */ array(59, 64, ), /* 186 */ array(59, 64, ), /* 187 */ array(59, 64, ), /* 188 */ array(1, 17, ), /* 189 */ array(59, 64, ), /* 190 */ array(16, 38, ), /* 191 */ array(59, 64, ), /* 192 */ array(59, 64, ), /* 193 */ array(14, ), /* 194 */ array(21, ), /* 195 */ array(21, ), /* 196 */ array(21, ), /* 197 */ array(38, ), /* 198 */ array(1, ), /* 199 */ array(2, ), /* 200 */ array(29, ), /* 201 */ array(29, ), /* 202 */ array(1, ), /* 203 */ array(2, ), /* 204 */ array(), /* 205 */ array(), /* 206 */ array(), /* 207 */ array(), /* 208 */ array(), /* 209 */ array(17, 24, 26, 27, 29, 30, 35, 37, 38, 39, 54, 61, 65, 79, ), /* 210 */ array(17, 20, 29, 35, 38, 61, ), /* 211 */ array(38, 59, 61, 65, ), /* 212 */ array(16, 18, 19, 36, ), /* 213 */ array(31, 38, 61, ), /* 214 */ array(38, 61, ), /* 215 */ array(2, 20, ), /* 216 */ array(38, 61, ), /* 217 */ array(24, 37, ), /* 218 */ array(37, 65, ), /* 219 */ array(17, 25, ), /* 220 */ array(37, 39, ), /* 221 */ array(20, 59, ), /* 222 */ array(37, 39, ), /* 223 */ array(37, 39, ), /* 224 */ array(25, 79, ), /* 225 */ array(19, 62, ), /* 226 */ array(63, ), /* 227 */ array(19, ), /* 228 */ array(65, ), /* 229 */ array(19, ), /* 230 */ array(19, ), /* 231 */ array(19, ), /* 232 */ array(25, ), /* 233 */ array(63, ), /* 234 */ array(19, ), /* 235 */ array(59, ), /* 236 */ array(36, ), /* 237 */ array(36, ), /* 238 */ array(39, ), /* 239 */ array(19, ), /* 240 */ array(55, ), /* 241 */ array(2, ), /* 242 */ array(38, ), /* 243 */ array(18, ), /* 244 */ array(18, ), /* 245 */ array(18, ), /* 246 */ array(19, ), /* 247 */ array(18, ), /* 248 */ array(20, ), /* 249 */ array(19, ), /* 250 */ array(19, ), /* 251 */ array(2, ), /* 252 */ array(26, ), /* 253 */ array(38, ), /* 254 */ array(19, ), /* 255 */ array(19, ), /* 256 */ array(18, ), /* 257 */ array(), /* 258 */ array(), /* 259 */ array(), /* 260 */ array(), /* 261 */ array(), /* 262 */ array(), /* 263 */ array(), /* 264 */ array(), /* 265 */ array(), /* 266 */ array(), /* 267 */ array(), /* 268 */ array(), /* 269 */ array(), /* 270 */ array(), /* 271 */ array(), /* 272 */ array(), /* 273 */ array(), /* 274 */ array(), /* 275 */ array(), /* 276 */ array(), /* 277 */ array(), /* 278 */ array(), /* 279 */ array(), /* 280 */ array(), /* 281 */ array(), /* 282 */ array(), /* 283 */ array(), /* 284 */ array(), /* 285 */ array(), /* 286 */ array(), /* 287 */ array(), /* 288 */ array(), /* 289 */ array(), /* 290 */ array(), /* 291 */ array(), /* 292 */ array(), /* 293 */ array(), /* 294 */ array(), /* 295 */ array(), /* 296 */ array(), /* 297 */ array(), /* 298 */ array(), /* 299 */ array(), /* 300 */ array(), /* 301 */ array(), /* 302 */ array(), /* 303 */ array(), /* 304 */ array(), /* 305 */ array(), /* 306 */ array(), /* 307 */ array(), /* 308 */ array(), /* 309 */ array(), /* 310 */ array(), /* 311 */ array(), /* 312 */ array(), /* 313 */ array(), /* 314 */ array(), /* 315 */ array(), /* 316 */ array(), /* 317 */ array(), /* 318 */ array(), /* 319 */ array(), /* 320 */ array(), /* 321 */ array(), /* 322 */ array(), /* 323 */ array(), /* 324 */ array(), /* 325 */ array(), /* 326 */ array(), /* 327 */ array(), /* 328 */ array(), /* 329 */ array(), /* 330 */ array(), /* 331 */ array(), /* 332 */ array(), /* 333 */ array(), /* 334 */ array(), /* 335 */ array(), /* 336 */ array(), /* 337 */ array(), /* 338 */ array(), /* 339 */ array(), /* 340 */ array(), /* 341 */ array(), /* 342 */ array(), /* 343 */ array(), /* 344 */ array(), /* 345 */ array(), /* 346 */ array(), /* 347 */ array(), /* 348 */ array(), /* 349 */ array(), /* 350 */ array(), /* 351 */ array(), /* 352 */ array(), /* 353 */ array(), /* 354 */ array(), /* 355 */ array(), /* 356 */ array(), /* 357 */ array(), /* 358 */ array(), /* 359 */ array(), /* 360 */ array(), /* 361 */ array(), /* 362 */ array(), /* 363 */ array(), /* 364 */ array(), /* 365 */ array(), /* 366 */ array(), /* 367 */ array(), /* 368 */ array(), /* 369 */ array(), /* 370 */ array(), /* 371 */ array(), /* 372 */ array(), /* 373 */ array(), /* 374 */ array(), /* 375 */ array(), /* 376 */ array(), /* 377 */ array(), /* 378 */ array(), /* 379 */ array(), /* 380 */ array(), /* 381 */ array(), /* 382 */ array(), /* 383 */ array(), /* 384 */ array(), /* 385 */ array(), /* 386 */ array(), /* 387 */ array(), /* 388 */ array(), /* 389 */ array(), /* 390 */ array(), ); static public $yy_default = array( /* 0 */ 394, 578, 549, 549, 595, 549, 595, 595, 595, 595, /* 10 */ 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, /* 20 */ 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, /* 30 */ 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, /* 40 */ 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, /* 50 */ 595, 595, 595, 455, 595, 595, 595, 455, 455, 455, /* 60 */ 595, 595, 595, 595, 595, 595, 595, 595, 460, 595, /* 70 */ 595, 466, 465, 484, 547, 579, 581, 548, 580, 489, /* 80 */ 488, 480, 479, 481, 457, 485, 462, 476, 460, 437, /* 90 */ 492, 493, 504, 468, 455, 391, 595, 455, 455, 475, /* 100 */ 512, 455, 455, 595, 455, 455, 595, 561, 595, 595, /* 110 */ 595, 468, 468, 468, 595, 522, 522, 522, 468, 513, /* 120 */ 468, 513, 595, 595, 595, 595, 595, 455, 595, 595, /* 130 */ 595, 595, 595, 595, 455, 513, 595, 595, 595, 595, /* 140 */ 595, 468, 595, 595, 595, 595, 522, 473, 558, 491, /* 150 */ 478, 472, 497, 495, 496, 513, 471, 556, 595, 595, /* 160 */ 523, 595, 595, 595, 595, 595, 595, 595, 595, 595, /* 170 */ 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, /* 180 */ 516, 595, 518, 519, 595, 520, 540, 542, 595, 539, /* 190 */ 522, 517, 541, 410, 562, 559, 536, 522, 475, 551, /* 200 */ 594, 594, 512, 550, 522, 555, 555, 555, 522, 470, /* 210 */ 504, 504, 595, 504, 490, 534, 504, 595, 595, 494, /* 220 */ 595, 500, 595, 595, 494, 595, 595, 595, 595, 595, /* 230 */ 595, 595, 494, 595, 595, 500, 502, 595, 595, 595, /* 240 */ 506, 534, 560, 595, 595, 595, 595, 595, 595, 595, /* 250 */ 595, 534, 463, 534, 595, 595, 595, 401, 543, 400, /* 260 */ 402, 546, 445, 398, 397, 393, 464, 438, 593, 467, /* 270 */ 435, 395, 440, 434, 439, 396, 399, 456, 531, 420, /* 280 */ 529, 392, 528, 506, 527, 535, 444, 557, 545, 544, /* 290 */ 530, 412, 453, 526, 505, 419, 507, 525, 532, 470, /* 300 */ 514, 521, 524, 508, 510, 482, 483, 416, 415, 417, /* 310 */ 418, 477, 511, 515, 538, 469, 509, 534, 533, 432, /* 320 */ 446, 447, 443, 442, 436, 454, 433, 441, 554, 448, /* 330 */ 498, 499, 501, 503, 452, 451, 449, 450, 552, 553, /* 340 */ 486, 487, 589, 430, 582, 583, 584, 431, 429, 426, /* 350 */ 537, 427, 428, 406, 587, 575, 404, 577, 576, 405, /* 360 */ 585, 586, 588, 591, 592, 425, 424, 569, 568, 570, /* 370 */ 571, 572, 567, 566, 414, 563, 564, 565, 573, 574, /* 380 */ 422, 590, 407, 423, 421, 408, 474, 413, 411, 409, /* 390 */ 403, ); const YYNOCODE = 124; const YYSTACKDEPTH = 100; const YYNSTATE = 391; const YYNRULE = 204; const YYERRORSYMBOL = 81; const YYERRSYMDT = 'yy0'; const YYFALLBACK = 0; static public $yyFallback = array( ); static function Trace($TraceFILE, $zTracePrompt) { if (!$TraceFILE) { $zTracePrompt = 0; } elseif (!$zTracePrompt) { $TraceFILE = 0; } self::$yyTraceFILE = $TraceFILE; self::$yyTracePrompt = $zTracePrompt; } static function PrintTrace() { self::$yyTraceFILE = fopen('php://output', 'w'); self::$yyTracePrompt = '
'; } static public $yyTraceFILE; static public $yyTracePrompt; public $yyidx; /* Index of top element in stack */ public $yyerrcnt; /* Shifts left before out of the error */ public $yystack = array(); /* The parser's stack */ public $yyTokenName = array( '$', 'VERT', 'COLON', 'COMMENT', 'PHPSTARTTAG', 'PHPENDTAG', 'ASPSTARTTAG', 'ASPENDTAG', 'FAKEPHPSTARTTAG', 'XMLTAG', 'TEXT', 'STRIPON', 'STRIPOFF', 'LITERALSTART', 'LITERALEND', 'LITERAL', 'LDEL', 'RDEL', 'DOLLAR', 'ID', 'EQUAL', 'PTR', 'LDELIF', 'LDELFOR', 'SEMICOLON', 'INCDEC', 'TO', 'STEP', 'LDELFOREACH', 'SPACE', 'AS', 'APTR', 'LDELSETFILTER', 'SMARTYBLOCKCHILD', 'LDELSLASH', 'ATTR', 'INTEGER', 'COMMA', 'OPENP', 'CLOSEP', 'MATH', 'UNIMATH', 'ANDSYM', 'ISIN', 'ISDIVBY', 'ISNOTDIVBY', 'ISEVEN', 'ISNOTEVEN', 'ISEVENBY', 'ISNOTEVENBY', 'ISODD', 'ISNOTODD', 'ISODDBY', 'ISNOTODDBY', 'INSTANCEOF', 'QMARK', 'NOT', 'TYPECAST', 'HEX', 'DOT', 'SINGLEQUOTESTRING', 'DOUBLECOLON', 'AT', 'HATCH', 'OPENB', 'CLOSEB', 'EQUALS', 'NOTEQUALS', 'GREATERTHAN', 'LESSTHAN', 'GREATEREQUAL', 'LESSEQUAL', 'IDENTITY', 'NONEIDENTITY', 'MOD', 'LAND', 'LOR', 'LXOR', 'QUOTE', 'BACKTICK', 'DOLLARID', 'error', 'start', 'template', 'template_element', 'smartytag', 'literal', 'literal_elements', 'literal_element', 'value', 'modifierlist', 'attributes', 'expr', 'varindexed', 'statement', 'statements', 'optspace', 'varvar', 'foraction', 'modparameters', 'attribute', 'ternary', 'array', 'ifcond', 'lop', 'variable', 'function', 'doublequoted_with_quotes', 'static_class_access', 'object', 'arrayindex', 'indexdef', 'varvarele', 'objectchain', 'objectelement', 'method', 'params', 'modifier', 'modparameter', 'arrayelements', 'arrayelement', 'doublequoted', 'doublequotedcontent', ); static public $yyRuleName = array( /* 0 */ "start ::= template", /* 1 */ "template ::= template_element", /* 2 */ "template ::= template template_element", /* 3 */ "template ::=", /* 4 */ "template_element ::= smartytag", /* 5 */ "template_element ::= COMMENT", /* 6 */ "template_element ::= literal", /* 7 */ "template_element ::= PHPSTARTTAG", /* 8 */ "template_element ::= PHPENDTAG", /* 9 */ "template_element ::= ASPSTARTTAG", /* 10 */ "template_element ::= ASPENDTAG", /* 11 */ "template_element ::= FAKEPHPSTARTTAG", /* 12 */ "template_element ::= XMLTAG", /* 13 */ "template_element ::= TEXT", /* 14 */ "template_element ::= STRIPON", /* 15 */ "template_element ::= STRIPOFF", /* 16 */ "literal ::= LITERALSTART LITERALEND", /* 17 */ "literal ::= LITERALSTART literal_elements LITERALEND", /* 18 */ "literal_elements ::= literal_elements literal_element", /* 19 */ "literal_elements ::=", /* 20 */ "literal_element ::= literal", /* 21 */ "literal_element ::= LITERAL", /* 22 */ "literal_element ::= PHPSTARTTAG", /* 23 */ "literal_element ::= FAKEPHPSTARTTAG", /* 24 */ "literal_element ::= PHPENDTAG", /* 25 */ "literal_element ::= ASPSTARTTAG", /* 26 */ "literal_element ::= ASPENDTAG", /* 27 */ "smartytag ::= LDEL value RDEL", /* 28 */ "smartytag ::= LDEL value modifierlist attributes RDEL", /* 29 */ "smartytag ::= LDEL value attributes RDEL", /* 30 */ "smartytag ::= LDEL expr modifierlist attributes RDEL", /* 31 */ "smartytag ::= LDEL expr attributes RDEL", /* 32 */ "smartytag ::= LDEL DOLLAR ID EQUAL value RDEL", /* 33 */ "smartytag ::= LDEL DOLLAR ID EQUAL expr RDEL", /* 34 */ "smartytag ::= LDEL DOLLAR ID EQUAL expr attributes RDEL", /* 35 */ "smartytag ::= LDEL varindexed EQUAL expr attributes RDEL", /* 36 */ "smartytag ::= LDEL ID attributes RDEL", /* 37 */ "smartytag ::= LDEL ID RDEL", /* 38 */ "smartytag ::= LDEL ID PTR ID attributes RDEL", /* 39 */ "smartytag ::= LDEL ID modifierlist attributes RDEL", /* 40 */ "smartytag ::= LDEL ID PTR ID modifierlist attributes RDEL", /* 41 */ "smartytag ::= LDELIF expr RDEL", /* 42 */ "smartytag ::= LDELIF expr attributes RDEL", /* 43 */ "smartytag ::= LDELIF statement RDEL", /* 44 */ "smartytag ::= LDELIF statement attributes RDEL", /* 45 */ "smartytag ::= LDELFOR statements SEMICOLON optspace expr SEMICOLON optspace DOLLAR varvar foraction attributes RDEL", /* 46 */ "foraction ::= EQUAL expr", /* 47 */ "foraction ::= INCDEC", /* 48 */ "smartytag ::= LDELFOR statement TO expr attributes RDEL", /* 49 */ "smartytag ::= LDELFOR statement TO expr STEP expr attributes RDEL", /* 50 */ "smartytag ::= LDELFOREACH attributes RDEL", /* 51 */ "smartytag ::= LDELFOREACH SPACE value AS DOLLAR varvar attributes RDEL", /* 52 */ "smartytag ::= LDELFOREACH SPACE value AS DOLLAR varvar APTR DOLLAR varvar attributes RDEL", /* 53 */ "smartytag ::= LDELFOREACH SPACE expr AS DOLLAR varvar attributes RDEL", /* 54 */ "smartytag ::= LDELFOREACH SPACE expr AS DOLLAR varvar APTR DOLLAR varvar attributes RDEL", /* 55 */ "smartytag ::= LDELSETFILTER ID modparameters RDEL", /* 56 */ "smartytag ::= LDELSETFILTER ID modparameters modifierlist RDEL", /* 57 */ "smartytag ::= SMARTYBLOCKCHILD", /* 58 */ "smartytag ::= LDELSLASH ID RDEL", /* 59 */ "smartytag ::= LDELSLASH ID modifierlist RDEL", /* 60 */ "smartytag ::= LDELSLASH ID PTR ID RDEL", /* 61 */ "smartytag ::= LDELSLASH ID PTR ID modifierlist RDEL", /* 62 */ "attributes ::= attributes attribute", /* 63 */ "attributes ::= attribute", /* 64 */ "attributes ::=", /* 65 */ "attribute ::= SPACE ID EQUAL ID", /* 66 */ "attribute ::= ATTR expr", /* 67 */ "attribute ::= ATTR value", /* 68 */ "attribute ::= SPACE ID", /* 69 */ "attribute ::= SPACE expr", /* 70 */ "attribute ::= SPACE value", /* 71 */ "attribute ::= SPACE INTEGER EQUAL expr", /* 72 */ "statements ::= statement", /* 73 */ "statements ::= statements COMMA statement", /* 74 */ "statement ::= DOLLAR varvar EQUAL expr", /* 75 */ "statement ::= varindexed EQUAL expr", /* 76 */ "statement ::= OPENP statement CLOSEP", /* 77 */ "expr ::= value", /* 78 */ "expr ::= ternary", /* 79 */ "expr ::= DOLLAR ID COLON ID", /* 80 */ "expr ::= expr MATH value", /* 81 */ "expr ::= expr UNIMATH value", /* 82 */ "expr ::= expr ANDSYM value", /* 83 */ "expr ::= array", /* 84 */ "expr ::= expr modifierlist", /* 85 */ "expr ::= expr ifcond expr", /* 86 */ "expr ::= expr ISIN array", /* 87 */ "expr ::= expr ISIN value", /* 88 */ "expr ::= expr lop expr", /* 89 */ "expr ::= expr ISDIVBY expr", /* 90 */ "expr ::= expr ISNOTDIVBY expr", /* 91 */ "expr ::= expr ISEVEN", /* 92 */ "expr ::= expr ISNOTEVEN", /* 93 */ "expr ::= expr ISEVENBY expr", /* 94 */ "expr ::= expr ISNOTEVENBY expr", /* 95 */ "expr ::= expr ISODD", /* 96 */ "expr ::= expr ISNOTODD", /* 97 */ "expr ::= expr ISODDBY expr", /* 98 */ "expr ::= expr ISNOTODDBY expr", /* 99 */ "expr ::= value INSTANCEOF ID", /* 100 */ "expr ::= value INSTANCEOF value", /* 101 */ "ternary ::= OPENP expr CLOSEP QMARK DOLLAR ID COLON expr", /* 102 */ "ternary ::= OPENP expr CLOSEP QMARK expr COLON expr", /* 103 */ "value ::= variable", /* 104 */ "value ::= UNIMATH value", /* 105 */ "value ::= NOT value", /* 106 */ "value ::= TYPECAST value", /* 107 */ "value ::= variable INCDEC", /* 108 */ "value ::= HEX", /* 109 */ "value ::= INTEGER", /* 110 */ "value ::= INTEGER DOT INTEGER", /* 111 */ "value ::= INTEGER DOT", /* 112 */ "value ::= DOT INTEGER", /* 113 */ "value ::= ID", /* 114 */ "value ::= function", /* 115 */ "value ::= OPENP expr CLOSEP", /* 116 */ "value ::= SINGLEQUOTESTRING", /* 117 */ "value ::= doublequoted_with_quotes", /* 118 */ "value ::= ID DOUBLECOLON static_class_access", /* 119 */ "value ::= varindexed DOUBLECOLON static_class_access", /* 120 */ "value ::= smartytag", /* 121 */ "value ::= value modifierlist", /* 122 */ "variable ::= varindexed", /* 123 */ "variable ::= DOLLAR varvar AT ID", /* 124 */ "variable ::= object", /* 125 */ "variable ::= HATCH ID HATCH", /* 126 */ "variable ::= HATCH ID HATCH arrayindex", /* 127 */ "variable ::= HATCH variable HATCH", /* 128 */ "variable ::= HATCH variable HATCH arrayindex", /* 129 */ "varindexed ::= DOLLAR varvar arrayindex", /* 130 */ "arrayindex ::= arrayindex indexdef", /* 131 */ "arrayindex ::=", /* 132 */ "indexdef ::= DOT DOLLAR varvar", /* 133 */ "indexdef ::= DOT DOLLAR varvar AT ID", /* 134 */ "indexdef ::= DOT ID", /* 135 */ "indexdef ::= DOT INTEGER", /* 136 */ "indexdef ::= DOT LDEL expr RDEL", /* 137 */ "indexdef ::= OPENB ID CLOSEB", /* 138 */ "indexdef ::= OPENB ID DOT ID CLOSEB", /* 139 */ "indexdef ::= OPENB expr CLOSEB", /* 140 */ "indexdef ::= OPENB CLOSEB", /* 141 */ "varvar ::= varvarele", /* 142 */ "varvar ::= varvar varvarele", /* 143 */ "varvarele ::= ID", /* 144 */ "varvarele ::= LDEL expr RDEL", /* 145 */ "object ::= varindexed objectchain", /* 146 */ "objectchain ::= objectelement", /* 147 */ "objectchain ::= objectchain objectelement", /* 148 */ "objectelement ::= PTR ID arrayindex", /* 149 */ "objectelement ::= PTR DOLLAR varvar arrayindex", /* 150 */ "objectelement ::= PTR LDEL expr RDEL arrayindex", /* 151 */ "objectelement ::= PTR ID LDEL expr RDEL arrayindex", /* 152 */ "objectelement ::= PTR method", /* 153 */ "function ::= ID OPENP params CLOSEP", /* 154 */ "method ::= ID OPENP params CLOSEP", /* 155 */ "method ::= DOLLAR ID OPENP params CLOSEP", /* 156 */ "params ::= params COMMA expr", /* 157 */ "params ::= expr", /* 158 */ "params ::=", /* 159 */ "modifierlist ::= modifierlist modifier modparameters", /* 160 */ "modifierlist ::= modifier modparameters", /* 161 */ "modifier ::= VERT AT ID", /* 162 */ "modifier ::= VERT ID", /* 163 */ "modparameters ::= modparameters modparameter", /* 164 */ "modparameters ::=", /* 165 */ "modparameter ::= COLON value", /* 166 */ "modparameter ::= COLON array", /* 167 */ "static_class_access ::= method", /* 168 */ "static_class_access ::= method objectchain", /* 169 */ "static_class_access ::= ID", /* 170 */ "static_class_access ::= DOLLAR ID arrayindex", /* 171 */ "static_class_access ::= DOLLAR ID arrayindex objectchain", /* 172 */ "ifcond ::= EQUALS", /* 173 */ "ifcond ::= NOTEQUALS", /* 174 */ "ifcond ::= GREATERTHAN", /* 175 */ "ifcond ::= LESSTHAN", /* 176 */ "ifcond ::= GREATEREQUAL", /* 177 */ "ifcond ::= LESSEQUAL", /* 178 */ "ifcond ::= IDENTITY", /* 179 */ "ifcond ::= NONEIDENTITY", /* 180 */ "ifcond ::= MOD", /* 181 */ "lop ::= LAND", /* 182 */ "lop ::= LOR", /* 183 */ "lop ::= LXOR", /* 184 */ "array ::= OPENB arrayelements CLOSEB", /* 185 */ "arrayelements ::= arrayelement", /* 186 */ "arrayelements ::= arrayelements COMMA arrayelement", /* 187 */ "arrayelements ::=", /* 188 */ "arrayelement ::= value APTR expr", /* 189 */ "arrayelement ::= ID APTR expr", /* 190 */ "arrayelement ::= expr", /* 191 */ "doublequoted_with_quotes ::= QUOTE QUOTE", /* 192 */ "doublequoted_with_quotes ::= QUOTE doublequoted QUOTE", /* 193 */ "doublequoted ::= doublequoted doublequotedcontent", /* 194 */ "doublequoted ::= doublequotedcontent", /* 195 */ "doublequotedcontent ::= BACKTICK variable BACKTICK", /* 196 */ "doublequotedcontent ::= BACKTICK expr BACKTICK", /* 197 */ "doublequotedcontent ::= DOLLARID", /* 198 */ "doublequotedcontent ::= LDEL variable RDEL", /* 199 */ "doublequotedcontent ::= LDEL expr RDEL", /* 200 */ "doublequotedcontent ::= smartytag", /* 201 */ "doublequotedcontent ::= TEXT", /* 202 */ "optspace ::= SPACE", /* 203 */ "optspace ::=", ); function tokenName($tokenType) { if ($tokenType === 0) { return 'End of Input'; } if ($tokenType > 0 && $tokenType < count($this->yyTokenName)) { return $this->yyTokenName[$tokenType]; } else { return "Unknown"; } } static function yy_destructor($yymajor, $yypminor) { switch ($yymajor) { default: break; /* If no destructor action specified: do nothing */ } } function yy_pop_parser_stack() { if (!count($this->yystack)) { return; } $yytos = array_pop($this->yystack); if (self::$yyTraceFILE && $this->yyidx >= 0) { fwrite(self::$yyTraceFILE, self::$yyTracePrompt . 'Popping ' . $this->yyTokenName[$yytos->major] . "\n"); } $yymajor = $yytos->major; self::yy_destructor($yymajor, $yytos->minor); $this->yyidx--; return $yymajor; } function __destruct() { while ($this->yystack !== Array()) { $this->yy_pop_parser_stack(); } if (is_resource(self::$yyTraceFILE)) { fclose(self::$yyTraceFILE); } } function yy_get_expected_tokens($token) { $state = $this->yystack[$this->yyidx]->stateno; $expected = self::$yyExpectedTokens[$state]; if (in_array($token, self::$yyExpectedTokens[$state], true)) { return $expected; } $stack = $this->yystack; $yyidx = $this->yyidx; do { $yyact = $this->yy_find_shift_action($token); if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) { // reduce action $done = 0; do { if ($done++ == 100) { $this->yyidx = $yyidx; $this->yystack = $stack; // too much recursion prevents proper detection // so give up return array_unique($expected); } $yyruleno = $yyact - self::YYNSTATE; $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs']; $nextstate = $this->yy_find_reduce_action( $this->yystack[$this->yyidx]->stateno, self::$yyRuleInfo[$yyruleno]['lhs']); if (isset(self::$yyExpectedTokens[$nextstate])) { $expected = array_merge($expected, self::$yyExpectedTokens[$nextstate]); if (in_array($token, self::$yyExpectedTokens[$nextstate], true)) { $this->yyidx = $yyidx; $this->yystack = $stack; return array_unique($expected); } } if ($nextstate < self::YYNSTATE) { // we need to shift a non-terminal $this->yyidx++; $x = new TP_yyStackEntry; $x->stateno = $nextstate; $x->major = self::$yyRuleInfo[$yyruleno]['lhs']; $this->yystack[$this->yyidx] = $x; continue 2; } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { $this->yyidx = $yyidx; $this->yystack = $stack; // the last token was just ignored, we can't accept // by ignoring input, this is in essence ignoring a // syntax error! return array_unique($expected); } elseif ($nextstate === self::YY_NO_ACTION) { $this->yyidx = $yyidx; $this->yystack = $stack; // input accepted, but not shifted (I guess) return $expected; } else { $yyact = $nextstate; } } while (true); } break; } while (true); $this->yyidx = $yyidx; $this->yystack = $stack; return array_unique($expected); } function yy_is_expected_token($token) { if ($token === 0) { return true; // 0 is not part of this } $state = $this->yystack[$this->yyidx]->stateno; if (in_array($token, self::$yyExpectedTokens[$state], true)) { return true; } $stack = $this->yystack; $yyidx = $this->yyidx; do { $yyact = $this->yy_find_shift_action($token); if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) { // reduce action $done = 0; do { if ($done++ == 100) { $this->yyidx = $yyidx; $this->yystack = $stack; // too much recursion prevents proper detection // so give up return true; } $yyruleno = $yyact - self::YYNSTATE; $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs']; $nextstate = $this->yy_find_reduce_action( $this->yystack[$this->yyidx]->stateno, self::$yyRuleInfo[$yyruleno]['lhs']); if (isset(self::$yyExpectedTokens[$nextstate]) && in_array($token, self::$yyExpectedTokens[$nextstate], true)) { $this->yyidx = $yyidx; $this->yystack = $stack; return true; } if ($nextstate < self::YYNSTATE) { // we need to shift a non-terminal $this->yyidx++; $x = new TP_yyStackEntry; $x->stateno = $nextstate; $x->major = self::$yyRuleInfo[$yyruleno]['lhs']; $this->yystack[$this->yyidx] = $x; continue 2; } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { $this->yyidx = $yyidx; $this->yystack = $stack; if (!$token) { // end of input: this is valid return true; } // the last token was just ignored, we can't accept // by ignoring input, this is in essence ignoring a // syntax error! return false; } elseif ($nextstate === self::YY_NO_ACTION) { $this->yyidx = $yyidx; $this->yystack = $stack; // input accepted, but not shifted (I guess) return true; } else { $yyact = $nextstate; } } while (true); } break; } while (true); $this->yyidx = $yyidx; $this->yystack = $stack; return true; } function yy_find_shift_action($iLookAhead) { $stateno = $this->yystack[$this->yyidx]->stateno; /* if ($this->yyidx < 0) return self::YY_NO_ACTION; */ if (!isset(self::$yy_shift_ofst[$stateno])) { // no shift actions return self::$yy_default[$stateno]; } $i = self::$yy_shift_ofst[$stateno]; if ($i === self::YY_SHIFT_USE_DFLT) { return self::$yy_default[$stateno]; } if ($iLookAhead == self::YYNOCODE) { return self::YY_NO_ACTION; } $i += $iLookAhead; if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[$i] != $iLookAhead) { if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback) && ($iFallback = self::$yyFallback[$iLookAhead]) != 0) { if (self::$yyTraceFILE) { fwrite(self::$yyTraceFILE, self::$yyTracePrompt . "FALLBACK " . $this->yyTokenName[$iLookAhead] . " => " . $this->yyTokenName[$iFallback] . "\n"); } return $this->yy_find_shift_action($iFallback); } return self::$yy_default[$stateno]; } else { return self::$yy_action[$i]; } } function yy_find_reduce_action($stateno, $iLookAhead) { /* $stateno = $this->yystack[$this->yyidx]->stateno; */ if (!isset(self::$yy_reduce_ofst[$stateno])) { return self::$yy_default[$stateno]; } $i = self::$yy_reduce_ofst[$stateno]; if ($i == self::YY_REDUCE_USE_DFLT) { return self::$yy_default[$stateno]; } if ($iLookAhead == self::YYNOCODE) { return self::YY_NO_ACTION; } $i += $iLookAhead; if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[$i] != $iLookAhead) { return self::$yy_default[$stateno]; } else { return self::$yy_action[$i]; } } function yy_shift($yyNewState, $yyMajor, $yypMinor) { $this->yyidx++; if ($this->yyidx >= self::YYSTACKDEPTH) { $this->yyidx--; if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sStack Overflow!\n", self::$yyTracePrompt); } while ($this->yyidx >= 0) { $this->yy_pop_parser_stack(); } #line 84 "smarty_internal_templateparser.y" $this->internalError = true; $this->compiler->trigger_template_error("Stack overflow in template parser"); #line 1724 "smarty_internal_templateparser.php" return; } $yytos = new TP_yyStackEntry; $yytos->stateno = $yyNewState; $yytos->major = $yyMajor; $yytos->minor = $yypMinor; array_push($this->yystack, $yytos); if (self::$yyTraceFILE && $this->yyidx > 0) { fprintf(self::$yyTraceFILE, "%sShift %d\n", self::$yyTracePrompt, $yyNewState); fprintf(self::$yyTraceFILE, "%sStack:", self::$yyTracePrompt); for($i = 1; $i <= $this->yyidx; $i++) { fprintf(self::$yyTraceFILE, " %s", $this->yyTokenName[$this->yystack[$i]->major]); } fwrite(self::$yyTraceFILE,"\n"); } } static public $yyRuleInfo = array( array( 'lhs' => 82, 'rhs' => 1 ), array( 'lhs' => 83, 'rhs' => 1 ), array( 'lhs' => 83, 'rhs' => 2 ), array( 'lhs' => 83, 'rhs' => 0 ), array( 'lhs' => 84, 'rhs' => 1 ), array( 'lhs' => 84, 'rhs' => 1 ), array( 'lhs' => 84, 'rhs' => 1 ), array( 'lhs' => 84, 'rhs' => 1 ), array( 'lhs' => 84, 'rhs' => 1 ), array( 'lhs' => 84, 'rhs' => 1 ), array( 'lhs' => 84, 'rhs' => 1 ), array( 'lhs' => 84, 'rhs' => 1 ), array( 'lhs' => 84, 'rhs' => 1 ), array( 'lhs' => 84, 'rhs' => 1 ), array( 'lhs' => 84, 'rhs' => 1 ), array( 'lhs' => 84, 'rhs' => 1 ), array( 'lhs' => 86, 'rhs' => 2 ), array( 'lhs' => 86, 'rhs' => 3 ), array( 'lhs' => 87, 'rhs' => 2 ), array( 'lhs' => 87, 'rhs' => 0 ), array( 'lhs' => 88, 'rhs' => 1 ), array( 'lhs' => 88, 'rhs' => 1 ), array( 'lhs' => 88, 'rhs' => 1 ), array( 'lhs' => 88, 'rhs' => 1 ), array( 'lhs' => 88, 'rhs' => 1 ), array( 'lhs' => 88, 'rhs' => 1 ), array( 'lhs' => 88, 'rhs' => 1 ), array( 'lhs' => 85, 'rhs' => 3 ), array( 'lhs' => 85, 'rhs' => 5 ), array( 'lhs' => 85, 'rhs' => 4 ), array( 'lhs' => 85, 'rhs' => 5 ), array( 'lhs' => 85, 'rhs' => 4 ), array( 'lhs' => 85, 'rhs' => 6 ), array( 'lhs' => 85, 'rhs' => 6 ), array( 'lhs' => 85, 'rhs' => 7 ), array( 'lhs' => 85, 'rhs' => 6 ), array( 'lhs' => 85, 'rhs' => 4 ), array( 'lhs' => 85, 'rhs' => 3 ), array( 'lhs' => 85, 'rhs' => 6 ), array( 'lhs' => 85, 'rhs' => 5 ), array( 'lhs' => 85, 'rhs' => 7 ), array( 'lhs' => 85, 'rhs' => 3 ), array( 'lhs' => 85, 'rhs' => 4 ), array( 'lhs' => 85, 'rhs' => 3 ), array( 'lhs' => 85, 'rhs' => 4 ), array( 'lhs' => 85, 'rhs' => 12 ), array( 'lhs' => 98, 'rhs' => 2 ), array( 'lhs' => 98, 'rhs' => 1 ), array( 'lhs' => 85, 'rhs' => 6 ), array( 'lhs' => 85, 'rhs' => 8 ), array( 'lhs' => 85, 'rhs' => 3 ), array( 'lhs' => 85, 'rhs' => 8 ), array( 'lhs' => 85, 'rhs' => 11 ), array( 'lhs' => 85, 'rhs' => 8 ), array( 'lhs' => 85, 'rhs' => 11 ), array( 'lhs' => 85, 'rhs' => 4 ), array( 'lhs' => 85, 'rhs' => 5 ), array( 'lhs' => 85, 'rhs' => 1 ), array( 'lhs' => 85, 'rhs' => 3 ), array( 'lhs' => 85, 'rhs' => 4 ), array( 'lhs' => 85, 'rhs' => 5 ), array( 'lhs' => 85, 'rhs' => 6 ), array( 'lhs' => 91, 'rhs' => 2 ), array( 'lhs' => 91, 'rhs' => 1 ), array( 'lhs' => 91, 'rhs' => 0 ), array( 'lhs' => 100, 'rhs' => 4 ), array( 'lhs' => 100, 'rhs' => 2 ), array( 'lhs' => 100, 'rhs' => 2 ), array( 'lhs' => 100, 'rhs' => 2 ), array( 'lhs' => 100, 'rhs' => 2 ), array( 'lhs' => 100, 'rhs' => 2 ), array( 'lhs' => 100, 'rhs' => 4 ), array( 'lhs' => 95, 'rhs' => 1 ), array( 'lhs' => 95, 'rhs' => 3 ), array( 'lhs' => 94, 'rhs' => 4 ), array( 'lhs' => 94, 'rhs' => 3 ), array( 'lhs' => 94, 'rhs' => 3 ), array( 'lhs' => 92, 'rhs' => 1 ), array( 'lhs' => 92, 'rhs' => 1 ), array( 'lhs' => 92, 'rhs' => 4 ), array( 'lhs' => 92, 'rhs' => 3 ), array( 'lhs' => 92, 'rhs' => 3 ), array( 'lhs' => 92, 'rhs' => 3 ), array( 'lhs' => 92, 'rhs' => 1 ), array( 'lhs' => 92, 'rhs' => 2 ), array( 'lhs' => 92, 'rhs' => 3 ), array( 'lhs' => 92, 'rhs' => 3 ), array( 'lhs' => 92, 'rhs' => 3 ), array( 'lhs' => 92, 'rhs' => 3 ), array( 'lhs' => 92, 'rhs' => 3 ), array( 'lhs' => 92, 'rhs' => 3 ), array( 'lhs' => 92, 'rhs' => 2 ), array( 'lhs' => 92, 'rhs' => 2 ), array( 'lhs' => 92, 'rhs' => 3 ), array( 'lhs' => 92, 'rhs' => 3 ), array( 'lhs' => 92, 'rhs' => 2 ), array( 'lhs' => 92, 'rhs' => 2 ), array( 'lhs' => 92, 'rhs' => 3 ), array( 'lhs' => 92, 'rhs' => 3 ), array( 'lhs' => 92, 'rhs' => 3 ), array( 'lhs' => 92, 'rhs' => 3 ), array( 'lhs' => 101, 'rhs' => 8 ), array( 'lhs' => 101, 'rhs' => 7 ), array( 'lhs' => 89, 'rhs' => 1 ), array( 'lhs' => 89, 'rhs' => 2 ), array( 'lhs' => 89, 'rhs' => 2 ), array( 'lhs' => 89, 'rhs' => 2 ), array( 'lhs' => 89, 'rhs' => 2 ), array( 'lhs' => 89, 'rhs' => 1 ), array( 'lhs' => 89, 'rhs' => 1 ), array( 'lhs' => 89, 'rhs' => 3 ), array( 'lhs' => 89, 'rhs' => 2 ), array( 'lhs' => 89, 'rhs' => 2 ), array( 'lhs' => 89, 'rhs' => 1 ), array( 'lhs' => 89, 'rhs' => 1 ), array( 'lhs' => 89, 'rhs' => 3 ), array( 'lhs' => 89, 'rhs' => 1 ), array( 'lhs' => 89, 'rhs' => 1 ), array( 'lhs' => 89, 'rhs' => 3 ), array( 'lhs' => 89, 'rhs' => 3 ), array( 'lhs' => 89, 'rhs' => 1 ), array( 'lhs' => 89, 'rhs' => 2 ), array( 'lhs' => 105, 'rhs' => 1 ), array( 'lhs' => 105, 'rhs' => 4 ), array( 'lhs' => 105, 'rhs' => 1 ), array( 'lhs' => 105, 'rhs' => 3 ), array( 'lhs' => 105, 'rhs' => 4 ), array( 'lhs' => 105, 'rhs' => 3 ), array( 'lhs' => 105, 'rhs' => 4 ), array( 'lhs' => 93, 'rhs' => 3 ), array( 'lhs' => 110, 'rhs' => 2 ), array( 'lhs' => 110, 'rhs' => 0 ), array( 'lhs' => 111, 'rhs' => 3 ), array( 'lhs' => 111, 'rhs' => 5 ), array( 'lhs' => 111, 'rhs' => 2 ), array( 'lhs' => 111, 'rhs' => 2 ), array( 'lhs' => 111, 'rhs' => 4 ), array( 'lhs' => 111, 'rhs' => 3 ), array( 'lhs' => 111, 'rhs' => 5 ), array( 'lhs' => 111, 'rhs' => 3 ), array( 'lhs' => 111, 'rhs' => 2 ), array( 'lhs' => 97, 'rhs' => 1 ), array( 'lhs' => 97, 'rhs' => 2 ), array( 'lhs' => 112, 'rhs' => 1 ), array( 'lhs' => 112, 'rhs' => 3 ), array( 'lhs' => 109, 'rhs' => 2 ), array( 'lhs' => 113, 'rhs' => 1 ), array( 'lhs' => 113, 'rhs' => 2 ), array( 'lhs' => 114, 'rhs' => 3 ), array( 'lhs' => 114, 'rhs' => 4 ), array( 'lhs' => 114, 'rhs' => 5 ), array( 'lhs' => 114, 'rhs' => 6 ), array( 'lhs' => 114, 'rhs' => 2 ), array( 'lhs' => 106, 'rhs' => 4 ), array( 'lhs' => 115, 'rhs' => 4 ), array( 'lhs' => 115, 'rhs' => 5 ), array( 'lhs' => 116, 'rhs' => 3 ), array( 'lhs' => 116, 'rhs' => 1 ), array( 'lhs' => 116, 'rhs' => 0 ), array( 'lhs' => 90, 'rhs' => 3 ), array( 'lhs' => 90, 'rhs' => 2 ), array( 'lhs' => 117, 'rhs' => 3 ), array( 'lhs' => 117, 'rhs' => 2 ), array( 'lhs' => 99, 'rhs' => 2 ), array( 'lhs' => 99, 'rhs' => 0 ), array( 'lhs' => 118, 'rhs' => 2 ), array( 'lhs' => 118, 'rhs' => 2 ), array( 'lhs' => 108, 'rhs' => 1 ), array( 'lhs' => 108, 'rhs' => 2 ), array( 'lhs' => 108, 'rhs' => 1 ), array( 'lhs' => 108, 'rhs' => 3 ), array( 'lhs' => 108, 'rhs' => 4 ), array( 'lhs' => 103, 'rhs' => 1 ), array( 'lhs' => 103, 'rhs' => 1 ), array( 'lhs' => 103, 'rhs' => 1 ), array( 'lhs' => 103, 'rhs' => 1 ), array( 'lhs' => 103, 'rhs' => 1 ), array( 'lhs' => 103, 'rhs' => 1 ), array( 'lhs' => 103, 'rhs' => 1 ), array( 'lhs' => 103, 'rhs' => 1 ), array( 'lhs' => 103, 'rhs' => 1 ), array( 'lhs' => 104, 'rhs' => 1 ), array( 'lhs' => 104, 'rhs' => 1 ), array( 'lhs' => 104, 'rhs' => 1 ), array( 'lhs' => 102, 'rhs' => 3 ), array( 'lhs' => 119, 'rhs' => 1 ), array( 'lhs' => 119, 'rhs' => 3 ), array( 'lhs' => 119, 'rhs' => 0 ), array( 'lhs' => 120, 'rhs' => 3 ), array( 'lhs' => 120, 'rhs' => 3 ), array( 'lhs' => 120, 'rhs' => 1 ), array( 'lhs' => 107, 'rhs' => 2 ), array( 'lhs' => 107, 'rhs' => 3 ), array( 'lhs' => 121, 'rhs' => 2 ), array( 'lhs' => 121, 'rhs' => 1 ), array( 'lhs' => 122, 'rhs' => 3 ), array( 'lhs' => 122, 'rhs' => 3 ), array( 'lhs' => 122, 'rhs' => 1 ), array( 'lhs' => 122, 'rhs' => 3 ), array( 'lhs' => 122, 'rhs' => 3 ), array( 'lhs' => 122, 'rhs' => 1 ), array( 'lhs' => 122, 'rhs' => 1 ), array( 'lhs' => 96, 'rhs' => 1 ), array( 'lhs' => 96, 'rhs' => 0 ), ); static public $yyReduceMap = array( 0 => 0, 1 => 1, 2 => 1, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 14 => 14, 15 => 15, 16 => 16, 19 => 16, 203 => 16, 17 => 17, 76 => 17, 18 => 18, 104 => 18, 106 => 18, 107 => 18, 130 => 18, 168 => 18, 20 => 20, 21 => 20, 47 => 20, 69 => 20, 70 => 20, 77 => 20, 78 => 20, 83 => 20, 103 => 20, 108 => 20, 109 => 20, 114 => 20, 116 => 20, 117 => 20, 124 => 20, 141 => 20, 167 => 20, 169 => 20, 185 => 20, 190 => 20, 202 => 20, 22 => 22, 23 => 22, 24 => 24, 25 => 25, 26 => 26, 27 => 27, 28 => 28, 29 => 29, 31 => 29, 30 => 30, 32 => 32, 33 => 32, 34 => 34, 35 => 35, 36 => 36, 37 => 37, 38 => 38, 39 => 39, 40 => 40, 41 => 41, 42 => 42, 44 => 42, 43 => 43, 45 => 45, 46 => 46, 48 => 48, 49 => 49, 50 => 50, 51 => 51, 52 => 52, 53 => 53, 54 => 54, 55 => 55, 56 => 56, 57 => 57, 58 => 58, 59 => 59, 60 => 60, 61 => 61, 62 => 62, 63 => 63, 72 => 63, 157 => 63, 161 => 63, 165 => 63, 166 => 63, 64 => 64, 158 => 64, 164 => 64, 65 => 65, 66 => 66, 67 => 66, 68 => 68, 71 => 71, 73 => 73, 74 => 74, 75 => 74, 79 => 79, 80 => 80, 81 => 80, 82 => 80, 84 => 84, 121 => 84, 85 => 85, 88 => 85, 99 => 85, 86 => 86, 87 => 87, 89 => 89, 90 => 90, 91 => 91, 96 => 91, 92 => 92, 95 => 92, 93 => 93, 98 => 93, 94 => 94, 97 => 94, 100 => 100, 101 => 101, 102 => 102, 105 => 105, 110 => 110, 111 => 111, 112 => 112, 113 => 113, 115 => 115, 118 => 118, 119 => 119, 120 => 120, 122 => 122, 123 => 123, 125 => 125, 126 => 126, 127 => 127, 128 => 128, 129 => 129, 131 => 131, 187 => 131, 132 => 132, 133 => 133, 134 => 134, 135 => 135, 136 => 136, 139 => 136, 137 => 137, 138 => 138, 140 => 140, 142 => 142, 143 => 143, 144 => 144, 145 => 145, 146 => 146, 147 => 147, 148 => 148, 149 => 149, 150 => 150, 151 => 151, 152 => 152, 153 => 153, 154 => 154, 155 => 155, 156 => 156, 159 => 159, 160 => 160, 162 => 162, 163 => 163, 170 => 170, 171 => 171, 172 => 172, 173 => 173, 174 => 174, 175 => 175, 176 => 176, 177 => 177, 178 => 178, 179 => 179, 180 => 180, 181 => 181, 182 => 182, 183 => 183, 184 => 184, 186 => 186, 188 => 188, 189 => 189, 191 => 191, 192 => 192, 193 => 193, 194 => 194, 195 => 195, 196 => 195, 198 => 195, 197 => 197, 199 => 199, 200 => 200, 201 => 201, ); #line 95 "smarty_internal_templateparser.y" function yy_r0(){ $this->_retvalue = $this->root_buffer->to_smarty_php(); } #line 2160 "smarty_internal_templateparser.php" #line 103 "smarty_internal_templateparser.y" function yy_r1(){ $this->current_buffer->append_subtree($this->yystack[$this->yyidx + 0]->minor); } #line 2165 "smarty_internal_templateparser.php" #line 119 "smarty_internal_templateparser.y" function yy_r4(){ if ($this->compiler->has_code) { $tmp =''; foreach ($this->compiler->prefix_code as $code) {$tmp.=$code;} $this->compiler->prefix_code=array(); $this->_retvalue = new _smarty_tag($this, $this->compiler->processNocacheCode($tmp.$this->yystack[$this->yyidx + 0]->minor,true)); } else { $this->_retvalue = new _smarty_tag($this, $this->yystack[$this->yyidx + 0]->minor); } $this->compiler->has_variable_string = false; $this->block_nesting_level = count($this->compiler->_tag_stack); } #line 2177 "smarty_internal_templateparser.php" #line 131 "smarty_internal_templateparser.y" function yy_r5(){ $this->_retvalue = new _smarty_tag($this, ''); } #line 2182 "smarty_internal_templateparser.php" #line 136 "smarty_internal_templateparser.y" function yy_r6(){ $this->_retvalue = new _smarty_text($this, $this->yystack[$this->yyidx + 0]->minor); } #line 2187 "smarty_internal_templateparser.php" #line 141 "smarty_internal_templateparser.y" function yy_r7(){ if ($this->php_handling == Smarty::PHP_PASSTHRU) { $this->_retvalue = new _smarty_text($this, self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor)); } elseif ($this->php_handling == Smarty::PHP_QUOTE) { $this->_retvalue = new _smarty_text($this, htmlspecialchars($this->yystack[$this->yyidx + 0]->minor, ENT_QUOTES)); } elseif ($this->php_handling == Smarty::PHP_ALLOW) { if (!($this->smarty instanceof SmartyBC)) { $this->compiler->trigger_template_error (self::Err3); } $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode('php_handling == Smarty::PHP_REMOVE) { $this->_retvalue = new _smarty_text($this, ''); } } #line 2203 "smarty_internal_templateparser.php" #line 157 "smarty_internal_templateparser.y" function yy_r8(){ if ($this->is_xml) { $this->compiler->tag_nocache = true; $this->is_xml = false; $save = $this->template->has_nocache_code; $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode("';?>\n", $this->compiler, true)); $this->template->has_nocache_code = $save; } elseif ($this->php_handling == Smarty::PHP_PASSTHRU) { $this->_retvalue = new _smarty_text($this, '?>'); } elseif ($this->php_handling == Smarty::PHP_QUOTE) { $this->_retvalue = new _smarty_text($this, htmlspecialchars('?>', ENT_QUOTES)); } elseif ($this->php_handling == Smarty::PHP_ALLOW) { $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode('?>', true)); } elseif ($this->php_handling == Smarty::PHP_REMOVE) { $this->_retvalue = new _smarty_text($this, ''); } } #line 2222 "smarty_internal_templateparser.php" #line 176 "smarty_internal_templateparser.y" function yy_r9(){ if ($this->php_handling == Smarty::PHP_PASSTHRU) { $this->_retvalue = new _smarty_text($this, '<%'); } elseif ($this->php_handling == Smarty::PHP_QUOTE) { $this->_retvalue = new _smarty_text($this, htmlspecialchars($this->yystack[$this->yyidx + 0]->minor, ENT_QUOTES)); } elseif ($this->php_handling == Smarty::PHP_ALLOW) { if ($this->asp_tags) { if (!($this->smarty instanceof SmartyBC)) { $this->compiler->trigger_template_error (self::Err3); } $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode('<%', true)); } else { $this->_retvalue = new _smarty_text($this, '<%'); } } elseif ($this->php_handling == Smarty::PHP_REMOVE) { if ($this->asp_tags) { $this->_retvalue = new _smarty_text($this, ''); } else { $this->_retvalue = new _smarty_text($this, '<%'); } } } #line 2246 "smarty_internal_templateparser.php" #line 200 "smarty_internal_templateparser.y" function yy_r10(){ if ($this->php_handling == Smarty::PHP_PASSTHRU) { $this->_retvalue = new _smarty_text($this, '%>'); } elseif ($this->php_handling == Smarty::PHP_QUOTE) { $this->_retvalue = new _smarty_text($this, htmlspecialchars('%>', ENT_QUOTES)); } elseif ($this->php_handling == Smarty::PHP_ALLOW) { if ($this->asp_tags) { $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode('%>', true)); } else { $this->_retvalue = new _smarty_text($this, '%>'); } } elseif ($this->php_handling == Smarty::PHP_REMOVE) { if ($this->asp_tags) { $this->_retvalue = new _smarty_text($this, ''); } else { $this->_retvalue = new _smarty_text($this, '%>'); } } } #line 2267 "smarty_internal_templateparser.php" #line 220 "smarty_internal_templateparser.y" function yy_r11(){ if ($this->strip) { $this->_retvalue = new _smarty_text($this, preg_replace('![\t ]*[\r\n]+[\t ]*!', '', self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor))); } else { $this->_retvalue = new _smarty_text($this, self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor)); } } #line 2276 "smarty_internal_templateparser.php" #line 229 "smarty_internal_templateparser.y" function yy_r12(){ $this->compiler->tag_nocache = true; $this->is_xml = true; $save = $this->template->has_nocache_code; $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode("", $this->compiler, true)); $this->template->has_nocache_code = $save; } #line 2285 "smarty_internal_templateparser.php" #line 238 "smarty_internal_templateparser.y" function yy_r13(){ if ($this->strip) { $this->_retvalue = new _smarty_text($this, preg_replace('![\t ]*[\r\n]+[\t ]*!', '', $this->yystack[$this->yyidx + 0]->minor)); } else { $this->_retvalue = new _smarty_text($this, $this->yystack[$this->yyidx + 0]->minor); } } #line 2294 "smarty_internal_templateparser.php" #line 247 "smarty_internal_templateparser.y" function yy_r14(){ $this->strip = true; $this->_retvalue = new _smarty_text($this, ''); } #line 2300 "smarty_internal_templateparser.php" #line 252 "smarty_internal_templateparser.y" function yy_r15(){ $this->strip = false; $this->_retvalue = new _smarty_text($this, ''); } #line 2306 "smarty_internal_templateparser.php" #line 258 "smarty_internal_templateparser.y" function yy_r16(){ $this->_retvalue = ''; } #line 2311 "smarty_internal_templateparser.php" #line 262 "smarty_internal_templateparser.y" function yy_r17(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; } #line 2316 "smarty_internal_templateparser.php" #line 266 "smarty_internal_templateparser.y" function yy_r18(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } #line 2321 "smarty_internal_templateparser.php" #line 274 "smarty_internal_templateparser.y" function yy_r20(){ $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; } #line 2326 "smarty_internal_templateparser.php" #line 282 "smarty_internal_templateparser.y" function yy_r22(){ $this->_retvalue = self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor); } #line 2331 "smarty_internal_templateparser.php" #line 290 "smarty_internal_templateparser.y" function yy_r24(){ $this->_retvalue = self::escape_end_tag($this->yystack[$this->yyidx + 0]->minor); } #line 2336 "smarty_internal_templateparser.php" #line 294 "smarty_internal_templateparser.y" function yy_r25(){ $this->_retvalue = '<%'; } #line 2341 "smarty_internal_templateparser.php" #line 298 "smarty_internal_templateparser.y" function yy_r26(){ $this->_retvalue = '%>'; } #line 2346 "smarty_internal_templateparser.php" #line 307 "smarty_internal_templateparser.y" function yy_r27(){ $this->_retvalue = $this->compiler->compileTag('private_print_expression',array(),array('value'=>$this->yystack[$this->yyidx + -1]->minor)); } #line 2351 "smarty_internal_templateparser.php" #line 311 "smarty_internal_templateparser.y" function yy_r28(){ $this->_retvalue = $this->compiler->compileTag('private_print_expression',$this->yystack[$this->yyidx + -1]->minor,array('value'=>$this->yystack[$this->yyidx + -3]->minor, 'modifierlist'=>$this->yystack[$this->yyidx + -2]->minor)); } #line 2356 "smarty_internal_templateparser.php" #line 315 "smarty_internal_templateparser.y" function yy_r29(){ $this->_retvalue = $this->compiler->compileTag('private_print_expression',$this->yystack[$this->yyidx + -1]->minor,array('value'=>$this->yystack[$this->yyidx + -2]->minor)); } #line 2361 "smarty_internal_templateparser.php" #line 319 "smarty_internal_templateparser.y" function yy_r30(){ $this->_retvalue = $this->compiler->compileTag('private_print_expression',$this->yystack[$this->yyidx + -1]->minor,array('value'=>$this->yystack[$this->yyidx + -3]->minor,'modifierlist'=>$this->yystack[$this->yyidx + -2]->minor)); } #line 2366 "smarty_internal_templateparser.php" #line 332 "smarty_internal_templateparser.y" function yy_r32(){ $this->_retvalue = $this->compiler->compileTag('assign',array(array('value'=>$this->yystack[$this->yyidx + -1]->minor),array('var'=>"'".$this->yystack[$this->yyidx + -3]->minor."'"))); } #line 2371 "smarty_internal_templateparser.php" #line 340 "smarty_internal_templateparser.y" function yy_r34(){ $this->_retvalue = $this->compiler->compileTag('assign',array_merge(array(array('value'=>$this->yystack[$this->yyidx + -2]->minor),array('var'=>"'".$this->yystack[$this->yyidx + -4]->minor."'")),$this->yystack[$this->yyidx + -1]->minor)); } #line 2376 "smarty_internal_templateparser.php" #line 344 "smarty_internal_templateparser.y" function yy_r35(){ $this->_retvalue = $this->compiler->compileTag('assign',array_merge(array(array('value'=>$this->yystack[$this->yyidx + -2]->minor),array('var'=>$this->yystack[$this->yyidx + -4]->minor['var'])),$this->yystack[$this->yyidx + -1]->minor),array('smarty_internal_index'=>$this->yystack[$this->yyidx + -4]->minor['smarty_internal_index'])); } #line 2381 "smarty_internal_templateparser.php" #line 349 "smarty_internal_templateparser.y" function yy_r36(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -2]->minor,$this->yystack[$this->yyidx + -1]->minor); } #line 2386 "smarty_internal_templateparser.php" #line 353 "smarty_internal_templateparser.y" function yy_r37(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -1]->minor,array()); } #line 2391 "smarty_internal_templateparser.php" #line 358 "smarty_internal_templateparser.y" function yy_r38(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -4]->minor,$this->yystack[$this->yyidx + -1]->minor,array('object_methode'=>$this->yystack[$this->yyidx + -2]->minor)); } #line 2396 "smarty_internal_templateparser.php" #line 363 "smarty_internal_templateparser.y" function yy_r39(){ $this->_retvalue = ''.$this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor,$this->yystack[$this->yyidx + -1]->minor).'_retvalue .= $this->compiler->compileTag('private_modifier',array(),array('modifierlist'=>$this->yystack[$this->yyidx + -2]->minor,'value'=>'ob_get_clean()')).'?>'; } #line 2402 "smarty_internal_templateparser.php" #line 369 "smarty_internal_templateparser.y" function yy_r40(){ $this->_retvalue = ''.$this->compiler->compileTag($this->yystack[$this->yyidx + -5]->minor,$this->yystack[$this->yyidx + -1]->minor,array('object_methode'=>$this->yystack[$this->yyidx + -3]->minor)).'_retvalue .= $this->compiler->compileTag('private_modifier',array(),array('modifierlist'=>$this->yystack[$this->yyidx + -2]->minor,'value'=>'ob_get_clean()')).'?>'; } #line 2408 "smarty_internal_templateparser.php" #line 375 "smarty_internal_templateparser.y" function yy_r41(){ $tag = trim(substr($this->yystack[$this->yyidx + -2]->minor,$this->lex->ldel_length)); $this->_retvalue = $this->compiler->compileTag(($tag == 'else if')? 'elseif' : $tag,array(),array('if condition'=>$this->yystack[$this->yyidx + -1]->minor)); } #line 2414 "smarty_internal_templateparser.php" #line 380 "smarty_internal_templateparser.y" function yy_r42(){ $tag = trim(substr($this->yystack[$this->yyidx + -3]->minor,$this->lex->ldel_length)); $this->_retvalue = $this->compiler->compileTag(($tag == 'else if')? 'elseif' : $tag,$this->yystack[$this->yyidx + -1]->minor,array('if condition'=>$this->yystack[$this->yyidx + -2]->minor)); } #line 2420 "smarty_internal_templateparser.php" #line 385 "smarty_internal_templateparser.y" function yy_r43(){ $tag = trim(substr($this->yystack[$this->yyidx + -2]->minor,$this->lex->ldel_length)); $this->_retvalue = $this->compiler->compileTag(($tag == 'else if')? 'elseif' : $tag,array(),array('if condition'=>$this->yystack[$this->yyidx + -1]->minor)); } #line 2426 "smarty_internal_templateparser.php" #line 396 "smarty_internal_templateparser.y" function yy_r45(){ $this->_retvalue = $this->compiler->compileTag('for',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('start'=>$this->yystack[$this->yyidx + -10]->minor),array('ifexp'=>$this->yystack[$this->yyidx + -7]->minor),array('var'=>$this->yystack[$this->yyidx + -3]->minor),array('step'=>$this->yystack[$this->yyidx + -2]->minor))),1); } #line 2431 "smarty_internal_templateparser.php" #line 400 "smarty_internal_templateparser.y" function yy_r46(){ $this->_retvalue = '='.$this->yystack[$this->yyidx + 0]->minor; } #line 2436 "smarty_internal_templateparser.php" #line 408 "smarty_internal_templateparser.y" function yy_r48(){ $this->_retvalue = $this->compiler->compileTag('for',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('start'=>$this->yystack[$this->yyidx + -4]->minor),array('to'=>$this->yystack[$this->yyidx + -2]->minor))),0); } #line 2441 "smarty_internal_templateparser.php" #line 412 "smarty_internal_templateparser.y" function yy_r49(){ $this->_retvalue = $this->compiler->compileTag('for',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('start'=>$this->yystack[$this->yyidx + -6]->minor),array('to'=>$this->yystack[$this->yyidx + -4]->minor),array('step'=>$this->yystack[$this->yyidx + -2]->minor))),0); } #line 2446 "smarty_internal_templateparser.php" #line 417 "smarty_internal_templateparser.y" function yy_r50(){ $this->_retvalue = $this->compiler->compileTag('foreach',$this->yystack[$this->yyidx + -1]->minor); } #line 2451 "smarty_internal_templateparser.php" #line 422 "smarty_internal_templateparser.y" function yy_r51(){ $this->_retvalue = $this->compiler->compileTag('foreach',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('from'=>$this->yystack[$this->yyidx + -5]->minor),array('item'=>$this->yystack[$this->yyidx + -2]->minor)))); } #line 2456 "smarty_internal_templateparser.php" #line 426 "smarty_internal_templateparser.y" function yy_r52(){ $this->_retvalue = $this->compiler->compileTag('foreach',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('from'=>$this->yystack[$this->yyidx + -8]->minor),array('item'=>$this->yystack[$this->yyidx + -2]->minor),array('key'=>$this->yystack[$this->yyidx + -5]->minor)))); } #line 2461 "smarty_internal_templateparser.php" #line 430 "smarty_internal_templateparser.y" function yy_r53(){ $this->_retvalue = $this->compiler->compileTag('foreach',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('from'=>$this->yystack[$this->yyidx + -5]->minor),array('item'=>$this->yystack[$this->yyidx + -2]->minor)))); } #line 2466 "smarty_internal_templateparser.php" #line 434 "smarty_internal_templateparser.y" function yy_r54(){ $this->_retvalue = $this->compiler->compileTag('foreach',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('from'=>$this->yystack[$this->yyidx + -8]->minor),array('item'=>$this->yystack[$this->yyidx + -2]->minor),array('key'=>$this->yystack[$this->yyidx + -5]->minor)))); } #line 2471 "smarty_internal_templateparser.php" #line 439 "smarty_internal_templateparser.y" function yy_r55(){ $this->_retvalue = $this->compiler->compileTag('setfilter',array(),array('modifier_list'=>array(array_merge(array($this->yystack[$this->yyidx + -2]->minor),$this->yystack[$this->yyidx + -1]->minor)))); } #line 2476 "smarty_internal_templateparser.php" #line 443 "smarty_internal_templateparser.y" function yy_r56(){ $this->_retvalue = $this->compiler->compileTag('setfilter',array(),array('modifier_list'=>array_merge(array(array_merge(array($this->yystack[$this->yyidx + -3]->minor),$this->yystack[$this->yyidx + -2]->minor)),$this->yystack[$this->yyidx + -1]->minor))); } #line 2481 "smarty_internal_templateparser.php" #line 448 "smarty_internal_templateparser.y" function yy_r57(){ $this->_retvalue = SMARTY_INTERNAL_COMPILE_BLOCK::compileChildBlock($this->compiler); } #line 2486 "smarty_internal_templateparser.php" #line 454 "smarty_internal_templateparser.y" function yy_r58(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -1]->minor.'close',array()); } #line 2491 "smarty_internal_templateparser.php" #line 458 "smarty_internal_templateparser.y" function yy_r59(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -2]->minor.'close',array(),array('modifier_list'=>$this->yystack[$this->yyidx + -1]->minor)); } #line 2496 "smarty_internal_templateparser.php" #line 463 "smarty_internal_templateparser.y" function yy_r60(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor.'close',array(),array('object_methode'=>$this->yystack[$this->yyidx + -1]->minor)); } #line 2501 "smarty_internal_templateparser.php" #line 467 "smarty_internal_templateparser.y" function yy_r61(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -4]->minor.'close',array(),array('object_methode'=>$this->yystack[$this->yyidx + -2]->minor, 'modifier_list'=>$this->yystack[$this->yyidx + -1]->minor)); } #line 2506 "smarty_internal_templateparser.php" #line 475 "smarty_internal_templateparser.y" function yy_r62(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; $this->_retvalue[] = $this->yystack[$this->yyidx + 0]->minor; } #line 2512 "smarty_internal_templateparser.php" #line 481 "smarty_internal_templateparser.y" function yy_r63(){ $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor); } #line 2517 "smarty_internal_templateparser.php" #line 486 "smarty_internal_templateparser.y" function yy_r64(){ $this->_retvalue = array(); } #line 2522 "smarty_internal_templateparser.php" #line 491 "smarty_internal_templateparser.y" function yy_r65(){ if (preg_match('~^true$~i', $this->yystack[$this->yyidx + 0]->minor)) { $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>'true'); } elseif (preg_match('~^false$~i', $this->yystack[$this->yyidx + 0]->minor)) { $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>'false'); } elseif (preg_match('~^null$~i', $this->yystack[$this->yyidx + 0]->minor)) { $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>'null'); } else { $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>"'".$this->yystack[$this->yyidx + 0]->minor."'"); } } #line 2535 "smarty_internal_templateparser.php" #line 503 "smarty_internal_templateparser.y" function yy_r66(){ $this->_retvalue = array(trim($this->yystack[$this->yyidx + -1]->minor," =\n\r\t")=>$this->yystack[$this->yyidx + 0]->minor); } #line 2540 "smarty_internal_templateparser.php" #line 511 "smarty_internal_templateparser.y" function yy_r68(){ $this->_retvalue = "'".$this->yystack[$this->yyidx + 0]->minor."'"; } #line 2545 "smarty_internal_templateparser.php" #line 523 "smarty_internal_templateparser.y" function yy_r71(){ $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>$this->yystack[$this->yyidx + 0]->minor); } #line 2550 "smarty_internal_templateparser.php" #line 536 "smarty_internal_templateparser.y" function yy_r73(){ $this->yystack[$this->yyidx + -2]->minor[]=$this->yystack[$this->yyidx + 0]->minor; $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor; } #line 2556 "smarty_internal_templateparser.php" #line 541 "smarty_internal_templateparser.y" function yy_r74(){ $this->_retvalue = array('var' => $this->yystack[$this->yyidx + -2]->minor, 'value'=>$this->yystack[$this->yyidx + 0]->minor); } #line 2561 "smarty_internal_templateparser.php" #line 569 "smarty_internal_templateparser.y" function yy_r79(){ $this->_retvalue = '$_smarty_tpl->getStreamVariable(\''. $this->yystack[$this->yyidx + -2]->minor .'://'. $this->yystack[$this->yyidx + 0]->minor . '\')'; } #line 2566 "smarty_internal_templateparser.php" #line 574 "smarty_internal_templateparser.y" function yy_r80(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor . trim($this->yystack[$this->yyidx + -1]->minor) . $this->yystack[$this->yyidx + 0]->minor; } #line 2571 "smarty_internal_templateparser.php" #line 593 "smarty_internal_templateparser.y" function yy_r84(){ $this->_retvalue = $this->compiler->compileTag('private_modifier',array(),array('value'=>$this->yystack[$this->yyidx + -1]->minor,'modifierlist'=>$this->yystack[$this->yyidx + 0]->minor)); } #line 2576 "smarty_internal_templateparser.php" #line 599 "smarty_internal_templateparser.y" function yy_r85(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } #line 2581 "smarty_internal_templateparser.php" #line 603 "smarty_internal_templateparser.y" function yy_r86(){ $this->_retvalue = 'in_array('.$this->yystack[$this->yyidx + -2]->minor.','.$this->yystack[$this->yyidx + 0]->minor.')'; } #line 2586 "smarty_internal_templateparser.php" #line 607 "smarty_internal_templateparser.y" function yy_r87(){ $this->_retvalue = 'in_array('.$this->yystack[$this->yyidx + -2]->minor.',(array)'.$this->yystack[$this->yyidx + 0]->minor.')'; } #line 2591 "smarty_internal_templateparser.php" #line 615 "smarty_internal_templateparser.y" function yy_r89(){ $this->_retvalue = '!('.$this->yystack[$this->yyidx + -2]->minor.' % '.$this->yystack[$this->yyidx + 0]->minor.')'; } #line 2596 "smarty_internal_templateparser.php" #line 619 "smarty_internal_templateparser.y" function yy_r90(){ $this->_retvalue = '('.$this->yystack[$this->yyidx + -2]->minor.' % '.$this->yystack[$this->yyidx + 0]->minor.')'; } #line 2601 "smarty_internal_templateparser.php" #line 623 "smarty_internal_templateparser.y" function yy_r91(){ $this->_retvalue = '!(1 & '.$this->yystack[$this->yyidx + -1]->minor.')'; } #line 2606 "smarty_internal_templateparser.php" #line 627 "smarty_internal_templateparser.y" function yy_r92(){ $this->_retvalue = '(1 & '.$this->yystack[$this->yyidx + -1]->minor.')'; } #line 2611 "smarty_internal_templateparser.php" #line 631 "smarty_internal_templateparser.y" function yy_r93(){ $this->_retvalue = '!(1 & '.$this->yystack[$this->yyidx + -2]->minor.' / '.$this->yystack[$this->yyidx + 0]->minor.')'; } #line 2616 "smarty_internal_templateparser.php" #line 635 "smarty_internal_templateparser.y" function yy_r94(){ $this->_retvalue = '(1 & '.$this->yystack[$this->yyidx + -2]->minor.' / '.$this->yystack[$this->yyidx + 0]->minor.')'; } #line 2621 "smarty_internal_templateparser.php" #line 659 "smarty_internal_templateparser.y" function yy_r100(){ $this->prefix_number++; $this->compiler->prefix_code[] = 'prefix_number.'='.$this->yystack[$this->yyidx + 0]->minor.';?>'; $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.'$_tmp'.$this->prefix_number; } #line 2628 "smarty_internal_templateparser.php" #line 668 "smarty_internal_templateparser.y" function yy_r101(){ $this->_retvalue = $this->yystack[$this->yyidx + -6]->minor.' ? '. $this->compileVariable("'".$this->yystack[$this->yyidx + -2]->minor."'") . ' : '.$this->yystack[$this->yyidx + 0]->minor; } #line 2633 "smarty_internal_templateparser.php" #line 672 "smarty_internal_templateparser.y" function yy_r102(){ $this->_retvalue = $this->yystack[$this->yyidx + -5]->minor.' ? '.$this->yystack[$this->yyidx + -2]->minor.' : '.$this->yystack[$this->yyidx + 0]->minor; } #line 2638 "smarty_internal_templateparser.php" #line 687 "smarty_internal_templateparser.y" function yy_r105(){ $this->_retvalue = '!'.$this->yystack[$this->yyidx + 0]->minor; } #line 2643 "smarty_internal_templateparser.php" #line 708 "smarty_internal_templateparser.y" function yy_r110(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'.'.$this->yystack[$this->yyidx + 0]->minor; } #line 2648 "smarty_internal_templateparser.php" #line 712 "smarty_internal_templateparser.y" function yy_r111(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.'.'; } #line 2653 "smarty_internal_templateparser.php" #line 716 "smarty_internal_templateparser.y" function yy_r112(){ $this->_retvalue = '.'.$this->yystack[$this->yyidx + 0]->minor; } #line 2658 "smarty_internal_templateparser.php" #line 721 "smarty_internal_templateparser.y" function yy_r113(){ if (preg_match('~^true$~i', $this->yystack[$this->yyidx + 0]->minor)) { $this->_retvalue = 'true'; } elseif (preg_match('~^false$~i', $this->yystack[$this->yyidx + 0]->minor)) { $this->_retvalue = 'false'; } elseif (preg_match('~^null$~i', $this->yystack[$this->yyidx + 0]->minor)) { $this->_retvalue = 'null'; } else { $this->_retvalue = "'".$this->yystack[$this->yyidx + 0]->minor."'"; } } #line 2671 "smarty_internal_templateparser.php" #line 739 "smarty_internal_templateparser.y" function yy_r115(){ $this->_retvalue = "(". $this->yystack[$this->yyidx + -1]->minor .")"; } #line 2676 "smarty_internal_templateparser.php" #line 754 "smarty_internal_templateparser.y" function yy_r118(){ if (!$this->security || isset($this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor]) || $this->smarty->security_policy->isTrustedStaticClass($this->yystack[$this->yyidx + -2]->minor, $this->compiler)) { if (isset($this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor])) { $this->_retvalue = $this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor].'::'.$this->yystack[$this->yyidx + 0]->minor; } else { $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'::'.$this->yystack[$this->yyidx + 0]->minor; } } else { $this->compiler->trigger_template_error ("static class '".$this->yystack[$this->yyidx + -2]->minor."' is undefined or not allowed by security setting"); } } #line 2689 "smarty_internal_templateparser.php" #line 766 "smarty_internal_templateparser.y" function yy_r119(){ if ($this->yystack[$this->yyidx + -2]->minor['var'] == '\'smarty\'') { $this->_retvalue = $this->compiler->compileTag('private_special_variable',array(),$this->yystack[$this->yyidx + -2]->minor['smarty_internal_index']).'::'.$this->yystack[$this->yyidx + 0]->minor; } else { $this->_retvalue = $this->compileVariable($this->yystack[$this->yyidx + -2]->minor['var']).$this->yystack[$this->yyidx + -2]->minor['smarty_internal_index'].'::'.$this->yystack[$this->yyidx + 0]->minor; } } #line 2698 "smarty_internal_templateparser.php" #line 775 "smarty_internal_templateparser.y" function yy_r120(){ $this->prefix_number++; $this->compiler->prefix_code[] = ''.$this->yystack[$this->yyidx + 0]->minor.'prefix_number.'=ob_get_clean();?>'; $this->_retvalue = '$_tmp'.$this->prefix_number; } #line 2705 "smarty_internal_templateparser.php" #line 790 "smarty_internal_templateparser.y" function yy_r122(){ if ($this->yystack[$this->yyidx + 0]->minor['var'] == '\'smarty\'') { $smarty_var = $this->compiler->compileTag('private_special_variable',array(),$this->yystack[$this->yyidx + 0]->minor['smarty_internal_index']); $this->_retvalue = $smarty_var; } else { // used for array reset,next,prev,end,current $this->last_variable = $this->yystack[$this->yyidx + 0]->minor['var']; $this->last_index = $this->yystack[$this->yyidx + 0]->minor['smarty_internal_index']; $this->_retvalue = $this->compileVariable($this->yystack[$this->yyidx + 0]->minor['var']).$this->yystack[$this->yyidx + 0]->minor['smarty_internal_index']; } } #line 2718 "smarty_internal_templateparser.php" #line 803 "smarty_internal_templateparser.y" function yy_r123(){ $this->_retvalue = '$_smarty_tpl->tpl_vars['. $this->yystack[$this->yyidx + -2]->minor .']->'.$this->yystack[$this->yyidx + 0]->minor; } #line 2723 "smarty_internal_templateparser.php" #line 813 "smarty_internal_templateparser.y" function yy_r125(){ $this->_retvalue = '$_smarty_tpl->getConfigVariable(\''. $this->yystack[$this->yyidx + -1]->minor .'\')'; } #line 2728 "smarty_internal_templateparser.php" #line 817 "smarty_internal_templateparser.y" function yy_r126(){ $this->_retvalue = '(is_array($tmp = $_smarty_tpl->getConfigVariable(\''. $this->yystack[$this->yyidx + -2]->minor .'\')) ? $tmp'.$this->yystack[$this->yyidx + 0]->minor.' :null)'; } #line 2733 "smarty_internal_templateparser.php" #line 821 "smarty_internal_templateparser.y" function yy_r127(){ $this->_retvalue = '$_smarty_tpl->getConfigVariable('. $this->yystack[$this->yyidx + -1]->minor .')'; } #line 2738 "smarty_internal_templateparser.php" #line 825 "smarty_internal_templateparser.y" function yy_r128(){ $this->_retvalue = '(is_array($tmp = $_smarty_tpl->getConfigVariable('. $this->yystack[$this->yyidx + -2]->minor .')) ? $tmp'.$this->yystack[$this->yyidx + 0]->minor.' : null)'; } #line 2743 "smarty_internal_templateparser.php" #line 829 "smarty_internal_templateparser.y" function yy_r129(){ $this->_retvalue = array('var'=>$this->yystack[$this->yyidx + -1]->minor, 'smarty_internal_index'=>$this->yystack[$this->yyidx + 0]->minor); } #line 2748 "smarty_internal_templateparser.php" #line 842 "smarty_internal_templateparser.y" function yy_r131(){ return; } #line 2753 "smarty_internal_templateparser.php" #line 848 "smarty_internal_templateparser.y" function yy_r132(){ $this->_retvalue = '['.$this->compileVariable($this->yystack[$this->yyidx + 0]->minor).']'; } #line 2758 "smarty_internal_templateparser.php" #line 852 "smarty_internal_templateparser.y" function yy_r133(){ $this->_retvalue = '['.$this->compileVariable($this->yystack[$this->yyidx + -2]->minor).'->'.$this->yystack[$this->yyidx + 0]->minor.']'; } #line 2763 "smarty_internal_templateparser.php" #line 856 "smarty_internal_templateparser.y" function yy_r134(){ $this->_retvalue = "['". $this->yystack[$this->yyidx + 0]->minor ."']"; } #line 2768 "smarty_internal_templateparser.php" #line 860 "smarty_internal_templateparser.y" function yy_r135(){ $this->_retvalue = "[". $this->yystack[$this->yyidx + 0]->minor ."]"; } #line 2773 "smarty_internal_templateparser.php" #line 864 "smarty_internal_templateparser.y" function yy_r136(){ $this->_retvalue = "[". $this->yystack[$this->yyidx + -1]->minor ."]"; } #line 2778 "smarty_internal_templateparser.php" #line 869 "smarty_internal_templateparser.y" function yy_r137(){ $this->_retvalue = '['.$this->compiler->compileTag('private_special_variable',array(),'[\'section\'][\''.$this->yystack[$this->yyidx + -1]->minor.'\'][\'index\']').']'; } #line 2783 "smarty_internal_templateparser.php" #line 873 "smarty_internal_templateparser.y" function yy_r138(){ $this->_retvalue = '['.$this->compiler->compileTag('private_special_variable',array(),'[\'section\'][\''.$this->yystack[$this->yyidx + -3]->minor.'\'][\''.$this->yystack[$this->yyidx + -1]->minor.'\']').']'; } #line 2788 "smarty_internal_templateparser.php" #line 883 "smarty_internal_templateparser.y" function yy_r140(){ $this->_retvalue = '[]'; } #line 2793 "smarty_internal_templateparser.php" #line 896 "smarty_internal_templateparser.y" function yy_r142(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.'.'.$this->yystack[$this->yyidx + 0]->minor; } #line 2798 "smarty_internal_templateparser.php" #line 901 "smarty_internal_templateparser.y" function yy_r143(){ $this->_retvalue = '\''.$this->yystack[$this->yyidx + 0]->minor.'\''; } #line 2803 "smarty_internal_templateparser.php" #line 906 "smarty_internal_templateparser.y" function yy_r144(){ $this->_retvalue = '('.$this->yystack[$this->yyidx + -1]->minor.')'; } #line 2808 "smarty_internal_templateparser.php" #line 913 "smarty_internal_templateparser.y" function yy_r145(){ if ($this->yystack[$this->yyidx + -1]->minor['var'] == '\'smarty\'') { $this->_retvalue = $this->compiler->compileTag('private_special_variable',array(),$this->yystack[$this->yyidx + -1]->minor['smarty_internal_index']).$this->yystack[$this->yyidx + 0]->minor; } else { $this->_retvalue = $this->compileVariable($this->yystack[$this->yyidx + -1]->minor['var']).$this->yystack[$this->yyidx + -1]->minor['smarty_internal_index'].$this->yystack[$this->yyidx + 0]->minor; } } #line 2817 "smarty_internal_templateparser.php" #line 922 "smarty_internal_templateparser.y" function yy_r146(){ $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; } #line 2822 "smarty_internal_templateparser.php" #line 927 "smarty_internal_templateparser.y" function yy_r147(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } #line 2827 "smarty_internal_templateparser.php" #line 932 "smarty_internal_templateparser.y" function yy_r148(){ if ($this->security && substr($this->yystack[$this->yyidx + -1]->minor,0,1) == '_') { $this->compiler->trigger_template_error (self::Err1); } $this->_retvalue = '->'.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } #line 2835 "smarty_internal_templateparser.php" #line 939 "smarty_internal_templateparser.y" function yy_r149(){ if ($this->security) { $this->compiler->trigger_template_error (self::Err2); } $this->_retvalue = '->{'.$this->compileVariable($this->yystack[$this->yyidx + -1]->minor).$this->yystack[$this->yyidx + 0]->minor.'}'; } #line 2843 "smarty_internal_templateparser.php" #line 946 "smarty_internal_templateparser.y" function yy_r150(){ if ($this->security) { $this->compiler->trigger_template_error (self::Err2); } $this->_retvalue = '->{'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + 0]->minor.'}'; } #line 2851 "smarty_internal_templateparser.php" #line 953 "smarty_internal_templateparser.y" function yy_r151(){ if ($this->security) { $this->compiler->trigger_template_error (self::Err2); } $this->_retvalue = '->{\''.$this->yystack[$this->yyidx + -4]->minor.'\'.'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + 0]->minor.'}'; } #line 2859 "smarty_internal_templateparser.php" #line 961 "smarty_internal_templateparser.y" function yy_r152(){ $this->_retvalue = '->'.$this->yystack[$this->yyidx + 0]->minor; } #line 2864 "smarty_internal_templateparser.php" #line 969 "smarty_internal_templateparser.y" function yy_r153(){ if (!$this->security || $this->smarty->security_policy->isTrustedPhpFunction($this->yystack[$this->yyidx + -3]->minor, $this->compiler)) { if (strcasecmp($this->yystack[$this->yyidx + -3]->minor,'isset') === 0 || strcasecmp($this->yystack[$this->yyidx + -3]->minor,'empty') === 0 || strcasecmp($this->yystack[$this->yyidx + -3]->minor,'array') === 0 || is_callable($this->yystack[$this->yyidx + -3]->minor)) { $func_name = strtolower($this->yystack[$this->yyidx + -3]->minor); if ($func_name == 'isset') { if (count($this->yystack[$this->yyidx + -1]->minor) == 0) { $this->compiler->trigger_template_error ('Illegal number of paramer in "isset()"'); } $par = implode(',',$this->yystack[$this->yyidx + -1]->minor); if (strncasecmp($par,'$_smarty_tpl->getConfigVariable',strlen('$_smarty_tpl->getConfigVariable')) === 0) { $this->prefix_number++; $this->compiler->prefix_code[] = 'prefix_number.'='.str_replace(')',', false)',$par).';?>'; $isset_par = '$_tmp'.$this->prefix_number; } else { $isset_par=str_replace("')->value","',null,true,false)->value",$par); } $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor . "(". $isset_par .")"; } elseif (in_array($func_name,array('empty','reset','current','end','prev','next'))){ if (count($this->yystack[$this->yyidx + -1]->minor) != 1) { $this->compiler->trigger_template_error ('Illegal number of paramer in "empty()"'); } if ($func_name == 'empty') { $this->_retvalue = $func_name.'('.str_replace("')->value","',null,true,false)->value",$this->yystack[$this->yyidx + -1]->minor[0]).')'; } else { $this->_retvalue = $func_name.'('.$this->yystack[$this->yyidx + -1]->minor[0].')'; } } else { $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor . "(". implode(',',$this->yystack[$this->yyidx + -1]->minor) .")"; } } else { $this->compiler->trigger_template_error ("unknown function \"" . $this->yystack[$this->yyidx + -3]->minor . "\""); } } } #line 2900 "smarty_internal_templateparser.php" #line 1007 "smarty_internal_templateparser.y" function yy_r154(){ if ($this->security && substr($this->yystack[$this->yyidx + -3]->minor,0,1) == '_') { $this->compiler->trigger_template_error (self::Err1); } $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor . "(". implode(',',$this->yystack[$this->yyidx + -1]->minor) .")"; } #line 2908 "smarty_internal_templateparser.php" #line 1014 "smarty_internal_templateparser.y" function yy_r155(){ if ($this->security) { $this->compiler->trigger_template_error (self::Err2); } $this->prefix_number++; $this->compiler->prefix_code[] = 'prefix_number.'='.$this->compileVariable("'".$this->yystack[$this->yyidx + -3]->minor."'").';?>'; $this->_retvalue = '$_tmp'.$this->prefix_number.'('. implode(',',$this->yystack[$this->yyidx + -1]->minor) .')'; } #line 2918 "smarty_internal_templateparser.php" #line 1025 "smarty_internal_templateparser.y" function yy_r156(){ $this->_retvalue = array_merge($this->yystack[$this->yyidx + -2]->minor,array($this->yystack[$this->yyidx + 0]->minor)); } #line 2923 "smarty_internal_templateparser.php" #line 1042 "smarty_internal_templateparser.y" function yy_r159(){ $this->_retvalue = array_merge($this->yystack[$this->yyidx + -2]->minor,array(array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor))); } #line 2928 "smarty_internal_templateparser.php" #line 1046 "smarty_internal_templateparser.y" function yy_r160(){ $this->_retvalue = array(array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor)); } #line 2933 "smarty_internal_templateparser.php" #line 1054 "smarty_internal_templateparser.y" function yy_r162(){ $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor); } #line 2938 "smarty_internal_templateparser.php" #line 1062 "smarty_internal_templateparser.y" function yy_r163(){ $this->_retvalue = array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor); } #line 2943 "smarty_internal_templateparser.php" #line 1096 "smarty_internal_templateparser.y" function yy_r170(){ $this->_retvalue = '$'.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } #line 2948 "smarty_internal_templateparser.php" #line 1101 "smarty_internal_templateparser.y" function yy_r171(){ $this->_retvalue = '$'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } #line 2953 "smarty_internal_templateparser.php" #line 1107 "smarty_internal_templateparser.y" function yy_r172(){ $this->_retvalue = '=='; } #line 2958 "smarty_internal_templateparser.php" #line 1111 "smarty_internal_templateparser.y" function yy_r173(){ $this->_retvalue = '!='; } #line 2963 "smarty_internal_templateparser.php" #line 1115 "smarty_internal_templateparser.y" function yy_r174(){ $this->_retvalue = '>'; } #line 2968 "smarty_internal_templateparser.php" #line 1119 "smarty_internal_templateparser.y" function yy_r175(){ $this->_retvalue = '<'; } #line 2973 "smarty_internal_templateparser.php" #line 1123 "smarty_internal_templateparser.y" function yy_r176(){ $this->_retvalue = '>='; } #line 2978 "smarty_internal_templateparser.php" #line 1127 "smarty_internal_templateparser.y" function yy_r177(){ $this->_retvalue = '<='; } #line 2983 "smarty_internal_templateparser.php" #line 1131 "smarty_internal_templateparser.y" function yy_r178(){ $this->_retvalue = '==='; } #line 2988 "smarty_internal_templateparser.php" #line 1135 "smarty_internal_templateparser.y" function yy_r179(){ $this->_retvalue = '!=='; } #line 2993 "smarty_internal_templateparser.php" #line 1139 "smarty_internal_templateparser.y" function yy_r180(){ $this->_retvalue = '%'; } #line 2998 "smarty_internal_templateparser.php" #line 1143 "smarty_internal_templateparser.y" function yy_r181(){ $this->_retvalue = '&&'; } #line 3003 "smarty_internal_templateparser.php" #line 1147 "smarty_internal_templateparser.y" function yy_r182(){ $this->_retvalue = '||'; } #line 3008 "smarty_internal_templateparser.php" #line 1151 "smarty_internal_templateparser.y" function yy_r183(){ $this->_retvalue = ' XOR '; } #line 3013 "smarty_internal_templateparser.php" #line 1158 "smarty_internal_templateparser.y" function yy_r184(){ $this->_retvalue = 'array('.$this->yystack[$this->yyidx + -1]->minor.')'; } #line 3018 "smarty_internal_templateparser.php" #line 1166 "smarty_internal_templateparser.y" function yy_r186(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.','.$this->yystack[$this->yyidx + 0]->minor; } #line 3023 "smarty_internal_templateparser.php" #line 1174 "smarty_internal_templateparser.y" function yy_r188(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'=>'.$this->yystack[$this->yyidx + 0]->minor; } #line 3028 "smarty_internal_templateparser.php" #line 1178 "smarty_internal_templateparser.y" function yy_r189(){ $this->_retvalue = '\''.$this->yystack[$this->yyidx + -2]->minor.'\'=>'.$this->yystack[$this->yyidx + 0]->minor; } #line 3033 "smarty_internal_templateparser.php" #line 1190 "smarty_internal_templateparser.y" function yy_r191(){ $this->_retvalue = "''"; } #line 3038 "smarty_internal_templateparser.php" #line 1194 "smarty_internal_templateparser.y" function yy_r192(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor->to_smarty_php(); } #line 3043 "smarty_internal_templateparser.php" #line 1199 "smarty_internal_templateparser.y" function yy_r193(){ $this->yystack[$this->yyidx + -1]->minor->append_subtree($this->yystack[$this->yyidx + 0]->minor); $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; } #line 3049 "smarty_internal_templateparser.php" #line 1204 "smarty_internal_templateparser.y" function yy_r194(){ $this->_retvalue = new _smarty_doublequoted($this, $this->yystack[$this->yyidx + 0]->minor); } #line 3054 "smarty_internal_templateparser.php" #line 1208 "smarty_internal_templateparser.y" function yy_r195(){ $this->_retvalue = new _smarty_code($this, '(string)'.$this->yystack[$this->yyidx + -1]->minor); } #line 3059 "smarty_internal_templateparser.php" #line 1216 "smarty_internal_templateparser.y" function yy_r197(){ $this->_retvalue = new _smarty_code($this, '(string)$_smarty_tpl->tpl_vars[\''. substr($this->yystack[$this->yyidx + 0]->minor,1) .'\']->value'); } #line 3064 "smarty_internal_templateparser.php" #line 1224 "smarty_internal_templateparser.y" function yy_r199(){ $this->_retvalue = new _smarty_code($this, '(string)('.$this->yystack[$this->yyidx + -1]->minor.')'); } #line 3069 "smarty_internal_templateparser.php" #line 1228 "smarty_internal_templateparser.y" function yy_r200(){ $this->_retvalue = new _smarty_tag($this, $this->yystack[$this->yyidx + 0]->minor); } #line 3074 "smarty_internal_templateparser.php" #line 1232 "smarty_internal_templateparser.y" function yy_r201(){ $this->_retvalue = new _smarty_dq_content($this, $this->yystack[$this->yyidx + 0]->minor); } #line 3079 "smarty_internal_templateparser.php" private $_retvalue; function yy_reduce($yyruleno) { $yymsp = $this->yystack[$this->yyidx]; if (self::$yyTraceFILE && $yyruleno >= 0 && $yyruleno < count(self::$yyRuleName)) { fprintf(self::$yyTraceFILE, "%sReduce (%d) [%s].\n", self::$yyTracePrompt, $yyruleno, self::$yyRuleName[$yyruleno]); } $this->_retvalue = $yy_lefthand_side = null; if (array_key_exists($yyruleno, self::$yyReduceMap)) { // call the action $this->_retvalue = null; $this->{'yy_r' . self::$yyReduceMap[$yyruleno]}(); $yy_lefthand_side = $this->_retvalue; } $yygoto = self::$yyRuleInfo[$yyruleno]['lhs']; $yysize = self::$yyRuleInfo[$yyruleno]['rhs']; $this->yyidx -= $yysize; for($i = $yysize; $i; $i--) { // pop all of the right-hand side parameters array_pop($this->yystack); } $yyact = $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno, $yygoto); if ($yyact < self::YYNSTATE) { if (!self::$yyTraceFILE && $yysize) { $this->yyidx++; $x = new TP_yyStackEntry; $x->stateno = $yyact; $x->major = $yygoto; $x->minor = $yy_lefthand_side; $this->yystack[$this->yyidx] = $x; } else { $this->yy_shift($yyact, $yygoto, $yy_lefthand_side); } } elseif ($yyact == self::YYNSTATE + self::YYNRULE + 1) { $this->yy_accept(); } } function yy_parse_failed() { if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sFail!\n", self::$yyTracePrompt); } while ($this->yyidx >= 0) { $this->yy_pop_parser_stack(); } } function yy_syntax_error($yymajor, $TOKEN) { #line 77 "smarty_internal_templateparser.y" $this->internalError = true; $this->yymajor = $yymajor; $this->compiler->trigger_template_error(); #line 3142 "smarty_internal_templateparser.php" } function yy_accept() { if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sAccept!\n", self::$yyTracePrompt); } while ($this->yyidx >= 0) { $stack = $this->yy_pop_parser_stack(); } #line 69 "smarty_internal_templateparser.y" $this->successful = !$this->internalError; $this->internalError = false; $this->retvalue = $this->_retvalue; //echo $this->retvalue."\n\n"; #line 3160 "smarty_internal_templateparser.php" } function doParse($yymajor, $yytokenvalue) { $yyerrorhit = 0; /* True if yymajor has invoked an error */ if ($this->yyidx === null || $this->yyidx < 0) { $this->yyidx = 0; $this->yyerrcnt = -1; $x = new TP_yyStackEntry; $x->stateno = 0; $x->major = 0; $this->yystack = array(); array_push($this->yystack, $x); } $yyendofinput = ($yymajor==0); if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sInput %s\n", self::$yyTracePrompt, $this->yyTokenName[$yymajor]); } do { $yyact = $this->yy_find_shift_action($yymajor); if ($yymajor < self::YYERRORSYMBOL && !$this->yy_is_expected_token($yymajor)) { // force a syntax error $yyact = self::YY_ERROR_ACTION; } if ($yyact < self::YYNSTATE) { $this->yy_shift($yyact, $yymajor, $yytokenvalue); $this->yyerrcnt--; if ($yyendofinput && $this->yyidx >= 0) { $yymajor = 0; } else { $yymajor = self::YYNOCODE; } } elseif ($yyact < self::YYNSTATE + self::YYNRULE) { $this->yy_reduce($yyact - self::YYNSTATE); } elseif ($yyact == self::YY_ERROR_ACTION) { if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sSyntax Error!\n", self::$yyTracePrompt); } if (self::YYERRORSYMBOL) { if ($this->yyerrcnt < 0) { $this->yy_syntax_error($yymajor, $yytokenvalue); } $yymx = $this->yystack[$this->yyidx]->major; if ($yymx == self::YYERRORSYMBOL || $yyerrorhit ){ if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sDiscard input token %s\n", self::$yyTracePrompt, $this->yyTokenName[$yymajor]); } $this->yy_destructor($yymajor, $yytokenvalue); $yymajor = self::YYNOCODE; } else { while ($this->yyidx >= 0 && $yymx != self::YYERRORSYMBOL && ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE ){ $this->yy_pop_parser_stack(); } if ($this->yyidx < 0 || $yymajor==0) { $this->yy_destructor($yymajor, $yytokenvalue); $this->yy_parse_failed(); $yymajor = self::YYNOCODE; } elseif ($yymx != self::YYERRORSYMBOL) { $u2 = 0; $this->yy_shift($yyact, self::YYERRORSYMBOL, $u2); } } $this->yyerrcnt = 3; $yyerrorhit = 1; } else { if ($this->yyerrcnt <= 0) { $this->yy_syntax_error($yymajor, $yytokenvalue); } $this->yyerrcnt = 3; $this->yy_destructor($yymajor, $yytokenvalue); if ($yyendofinput) { $this->yy_parse_failed(); } $yymajor = self::YYNOCODE; } } else { $this->yy_accept(); $yymajor = self::YYNOCODE; } } while ($yymajor != self::YYNOCODE && $this->yyidx >= 0); } } smarty3-3.1.13/development/lexer/Lempar.php0000644000175000017500000004625111371563105017241 0ustar mikemikestring = $s->string; $this->metadata = $s->metadata; } else { $this->string = (string) $s; if ($m instanceof ParseyyToken) { $this->metadata = $m->metadata; } elseif (is_array($m)) { $this->metadata = $m; } } } function __toString() { return $this->_string; } function offsetExists($offset) { return isset($this->metadata[$offset]); } function offsetGet($offset) { return $this->metadata[$offset]; } function offsetSet($offset, $value) { if ($offset === null) { if (isset($value[0])) { $x = ($value instanceof ParseyyToken) ? $value->metadata : $value; $this->metadata = array_merge($this->metadata, $x); return; } $offset = count($this->metadata); } if ($value === null) { return; } if ($value instanceof ParseyyToken) { if ($value->metadata) { $this->metadata[$offset] = $value->metadata; } } elseif ($value) { $this->metadata[$offset] = $value; } } function offsetUnset($offset) { unset($this->metadata[$offset]); } } class ParseyyStackEntry { public $stateno; /* The state-number */ public $major; /* The major token value. This is the code ** number for the token at this stack level */ public $minor; /* The user-supplied minor token value. This ** is the value of the token */ }; %% %% { %% %% %% %% static public $yyFallback = array( %% ); static function Trace($TraceFILE, $zTracePrompt) { if (!$TraceFILE) { $zTracePrompt = 0; } elseif (!$zTracePrompt) { $TraceFILE = 0; } self::$yyTraceFILE = $TraceFILE; self::$yyTracePrompt = $zTracePrompt; } static function PrintTrace() { self::$yyTraceFILE = fopen('php://output', 'w'); self::$yyTracePrompt = '
'; } static public $yyTraceFILE; static public $yyTracePrompt; public $yyidx; /* Index of top element in stack */ public $yyerrcnt; /* Shifts left before out of the error */ public $yystack = array(); /* The parser's stack */ public $yyTokenName = array( %% ); static public $yyRuleName = array( %% ); function tokenName($tokenType) { if ($tokenType === 0) { return 'End of Input'; } if ($tokenType > 0 && $tokenType < count($this->yyTokenName)) { return $this->yyTokenName[$tokenType]; } else { return "Unknown"; } } static function yy_destructor($yymajor, $yypminor) { switch ($yymajor) { %% default: break; /* If no destructor action specified: do nothing */ } } function yy_pop_parser_stack() { if (!count($this->yystack)) { return; } $yytos = array_pop($this->yystack); if (self::$yyTraceFILE && $this->yyidx >= 0) { fwrite(self::$yyTraceFILE, self::$yyTracePrompt . 'Popping ' . $this->yyTokenName[$yytos->major] . "\n"); } $yymajor = $yytos->major; self::yy_destructor($yymajor, $yytos->minor); $this->yyidx--; return $yymajor; } function __destruct() { while ($this->yystack !== Array()) { $this->yy_pop_parser_stack(); } if (is_resource(self::$yyTraceFILE)) { fclose(self::$yyTraceFILE); } } function yy_get_expected_tokens($token) { $state = $this->yystack[$this->yyidx]->stateno; $expected = self::$yyExpectedTokens[$state]; if (in_array($token, self::$yyExpectedTokens[$state], true)) { return $expected; } $stack = $this->yystack; $yyidx = $this->yyidx; do { $yyact = $this->yy_find_shift_action($token); if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) { // reduce action $done = 0; do { if ($done++ == 100) { $this->yyidx = $yyidx; $this->yystack = $stack; // too much recursion prevents proper detection // so give up return array_unique($expected); } $yyruleno = $yyact - self::YYNSTATE; $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs']; $nextstate = $this->yy_find_reduce_action( $this->yystack[$this->yyidx]->stateno, self::$yyRuleInfo[$yyruleno]['lhs']); if (isset(self::$yyExpectedTokens[$nextstate])) { $expected = array_merge($expected, self::$yyExpectedTokens[$nextstate]); if (in_array($token, self::$yyExpectedTokens[$nextstate], true)) { $this->yyidx = $yyidx; $this->yystack = $stack; return array_unique($expected); } } if ($nextstate < self::YYNSTATE) { // we need to shift a non-terminal $this->yyidx++; $x = new ParseyyStackEntry; $x->stateno = $nextstate; $x->major = self::$yyRuleInfo[$yyruleno]['lhs']; $this->yystack[$this->yyidx] = $x; continue 2; } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { $this->yyidx = $yyidx; $this->yystack = $stack; // the last token was just ignored, we can't accept // by ignoring input, this is in essence ignoring a // syntax error! return array_unique($expected); } elseif ($nextstate === self::YY_NO_ACTION) { $this->yyidx = $yyidx; $this->yystack = $stack; // input accepted, but not shifted (I guess) return $expected; } else { $yyact = $nextstate; } } while (true); } break; } while (true); $this->yyidx = $yyidx; $this->yystack = $stack; return array_unique($expected); } function yy_is_expected_token($token) { if ($token === 0) { return true; // 0 is not part of this } $state = $this->yystack[$this->yyidx]->stateno; if (in_array($token, self::$yyExpectedTokens[$state], true)) { return true; } $stack = $this->yystack; $yyidx = $this->yyidx; do { $yyact = $this->yy_find_shift_action($token); if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) { // reduce action $done = 0; do { if ($done++ == 100) { $this->yyidx = $yyidx; $this->yystack = $stack; // too much recursion prevents proper detection // so give up return true; } $yyruleno = $yyact - self::YYNSTATE; $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs']; $nextstate = $this->yy_find_reduce_action( $this->yystack[$this->yyidx]->stateno, self::$yyRuleInfo[$yyruleno]['lhs']); if (isset(self::$yyExpectedTokens[$nextstate]) && in_array($token, self::$yyExpectedTokens[$nextstate], true)) { $this->yyidx = $yyidx; $this->yystack = $stack; return true; } if ($nextstate < self::YYNSTATE) { // we need to shift a non-terminal $this->yyidx++; $x = new ParseyyStackEntry; $x->stateno = $nextstate; $x->major = self::$yyRuleInfo[$yyruleno]['lhs']; $this->yystack[$this->yyidx] = $x; continue 2; } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { $this->yyidx = $yyidx; $this->yystack = $stack; if (!$token) { // end of input: this is valid return true; } // the last token was just ignored, we can't accept // by ignoring input, this is in essence ignoring a // syntax error! return false; } elseif ($nextstate === self::YY_NO_ACTION) { $this->yyidx = $yyidx; $this->yystack = $stack; // input accepted, but not shifted (I guess) return true; } else { $yyact = $nextstate; } } while (true); } break; } while (true); $this->yyidx = $yyidx; $this->yystack = $stack; return true; } function yy_find_shift_action($iLookAhead) { $stateno = $this->yystack[$this->yyidx]->stateno; /* if ($this->yyidx < 0) return self::YY_NO_ACTION; */ if (!isset(self::$yy_shift_ofst[$stateno])) { // no shift actions return self::$yy_default[$stateno]; } $i = self::$yy_shift_ofst[$stateno]; if ($i === self::YY_SHIFT_USE_DFLT) { return self::$yy_default[$stateno]; } if ($iLookAhead == self::YYNOCODE) { return self::YY_NO_ACTION; } $i += $iLookAhead; if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[$i] != $iLookAhead) { if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback) && ($iFallback = self::$yyFallback[$iLookAhead]) != 0) { if (self::$yyTraceFILE) { fwrite(self::$yyTraceFILE, self::$yyTracePrompt . "FALLBACK " . $this->yyTokenName[$iLookAhead] . " => " . $this->yyTokenName[$iFallback] . "\n"); } return $this->yy_find_shift_action($iFallback); } return self::$yy_default[$stateno]; } else { return self::$yy_action[$i]; } } function yy_find_reduce_action($stateno, $iLookAhead) { /* $stateno = $this->yystack[$this->yyidx]->stateno; */ if (!isset(self::$yy_reduce_ofst[$stateno])) { return self::$yy_default[$stateno]; } $i = self::$yy_reduce_ofst[$stateno]; if ($i == self::YY_REDUCE_USE_DFLT) { return self::$yy_default[$stateno]; } if ($iLookAhead == self::YYNOCODE) { return self::YY_NO_ACTION; } $i += $iLookAhead; if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[$i] != $iLookAhead) { return self::$yy_default[$stateno]; } else { return self::$yy_action[$i]; } } function yy_shift($yyNewState, $yyMajor, $yypMinor) { $this->yyidx++; if ($this->yyidx >= self::YYSTACKDEPTH) { $this->yyidx--; if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sStack Overflow!\n", self::$yyTracePrompt); } while ($this->yyidx >= 0) { $this->yy_pop_parser_stack(); } %% return; } $yytos = new ParseyyStackEntry; $yytos->stateno = $yyNewState; $yytos->major = $yyMajor; $yytos->minor = $yypMinor; array_push($this->yystack, $yytos); if (self::$yyTraceFILE && $this->yyidx > 0) { fprintf(self::$yyTraceFILE, "%sShift %d\n", self::$yyTracePrompt, $yyNewState); fprintf(self::$yyTraceFILE, "%sStack:", self::$yyTracePrompt); for($i = 1; $i <= $this->yyidx; $i++) { fprintf(self::$yyTraceFILE, " %s", $this->yyTokenName[$this->yystack[$i]->major]); } fwrite(self::$yyTraceFILE,"\n"); } } static public $yyRuleInfo = array( %% ); static public $yyReduceMap = array( %% ); %% private $_retvalue; function yy_reduce($yyruleno) { $yymsp = $this->yystack[$this->yyidx]; if (self::$yyTraceFILE && $yyruleno >= 0 && $yyruleno < count(self::$yyRuleName)) { fprintf(self::$yyTraceFILE, "%sReduce (%d) [%s].\n", self::$yyTracePrompt, $yyruleno, self::$yyRuleName[$yyruleno]); } $this->_retvalue = $yy_lefthand_side = null; if (array_key_exists($yyruleno, self::$yyReduceMap)) { // call the action $this->_retvalue = null; $this->{'yy_r' . self::$yyReduceMap[$yyruleno]}(); $yy_lefthand_side = $this->_retvalue; } $yygoto = self::$yyRuleInfo[$yyruleno]['lhs']; $yysize = self::$yyRuleInfo[$yyruleno]['rhs']; $this->yyidx -= $yysize; for($i = $yysize; $i; $i--) { // pop all of the right-hand side parameters array_pop($this->yystack); } $yyact = $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno, $yygoto); if ($yyact < self::YYNSTATE) { if (!self::$yyTraceFILE && $yysize) { $this->yyidx++; $x = new ParseyyStackEntry; $x->stateno = $yyact; $x->major = $yygoto; $x->minor = $yy_lefthand_side; $this->yystack[$this->yyidx] = $x; } else { $this->yy_shift($yyact, $yygoto, $yy_lefthand_side); } } elseif ($yyact == self::YYNSTATE + self::YYNRULE + 1) { $this->yy_accept(); } } function yy_parse_failed() { if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sFail!\n", self::$yyTracePrompt); } while ($this->yyidx >= 0) { $this->yy_pop_parser_stack(); } %% } function yy_syntax_error($yymajor, $TOKEN) { %% } function yy_accept() { if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sAccept!\n", self::$yyTracePrompt); } while ($this->yyidx >= 0) { $stack = $this->yy_pop_parser_stack(); } %% } function doParse($yymajor, $yytokenvalue) { $yyerrorhit = 0; /* True if yymajor has invoked an error */ if ($this->yyidx === null || $this->yyidx < 0) { $this->yyidx = 0; $this->yyerrcnt = -1; $x = new ParseyyStackEntry; $x->stateno = 0; $x->major = 0; $this->yystack = array(); array_push($this->yystack, $x); } $yyendofinput = ($yymajor==0); if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sInput %s\n", self::$yyTracePrompt, $this->yyTokenName[$yymajor]); } do { $yyact = $this->yy_find_shift_action($yymajor); if ($yymajor < self::YYERRORSYMBOL && !$this->yy_is_expected_token($yymajor)) { // force a syntax error $yyact = self::YY_ERROR_ACTION; } if ($yyact < self::YYNSTATE) { $this->yy_shift($yyact, $yymajor, $yytokenvalue); $this->yyerrcnt--; if ($yyendofinput && $this->yyidx >= 0) { $yymajor = 0; } else { $yymajor = self::YYNOCODE; } } elseif ($yyact < self::YYNSTATE + self::YYNRULE) { $this->yy_reduce($yyact - self::YYNSTATE); } elseif ($yyact == self::YY_ERROR_ACTION) { if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sSyntax Error!\n", self::$yyTracePrompt); } if (self::YYERRORSYMBOL) { if ($this->yyerrcnt < 0) { $this->yy_syntax_error($yymajor, $yytokenvalue); } $yymx = $this->yystack[$this->yyidx]->major; if ($yymx == self::YYERRORSYMBOL || $yyerrorhit ){ if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sDiscard input token %s\n", self::$yyTracePrompt, $this->yyTokenName[$yymajor]); } $this->yy_destructor($yymajor, $yytokenvalue); $yymajor = self::YYNOCODE; } else { while ($this->yyidx >= 0 && $yymx != self::YYERRORSYMBOL && ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE ){ $this->yy_pop_parser_stack(); } if ($this->yyidx < 0 || $yymajor==0) { $this->yy_destructor($yymajor, $yytokenvalue); $this->yy_parse_failed(); $yymajor = self::YYNOCODE; } elseif ($yymx != self::YYERRORSYMBOL) { $u2 = 0; $this->yy_shift($yyact, self::YYERRORSYMBOL, $u2); } } $this->yyerrcnt = 3; $yyerrorhit = 1; } else { if ($this->yyerrcnt <= 0) { $this->yy_syntax_error($yymajor, $yytokenvalue); } $this->yyerrcnt = 3; $this->yy_destructor($yymajor, $yytokenvalue); if ($yyendofinput) { $this->yy_parse_failed(); } $yymajor = self::YYNOCODE; } } else { $this->yy_accept(); $yymajor = self::YYNOCODE; } } while ($yymajor != self::YYNOCODE && $this->yyidx >= 0); } } smarty3-3.1.13/development/lexer/smarty_internal_templateparser.y0000644000175000017500000010460312004717134024016 0ustar mikemike/** * Smarty Internal Plugin Templateparser * * This is the template parser * * * @package Smarty * @subpackage Compiler * @author Uwe Tews */ %name TP_ %declare_class {class Smarty_Internal_Templateparser} %include_class { const Err1 = "Security error: Call to private object member not allowed"; const Err2 = "Security error: Call to dynamic object member not allowed"; const Err3 = "PHP in template not allowed. Use SmartyBC to enable it"; // states whether the parse was successful or not public $successful = true; public $retvalue = 0; private $lex; private $internalError = false; private $strip = false; function __construct($lex, $compiler) { $this->lex = $lex; $this->compiler = $compiler; $this->smarty = $this->compiler->smarty; $this->template = $this->compiler->template; $this->compiler->has_variable_string = false; $this->compiler->prefix_code = array(); $this->prefix_number = 0; $this->block_nesting_level = 0; if ($this->security = isset($this->smarty->security_policy)) { $this->php_handling = $this->smarty->security_policy->php_handling; } else { $this->php_handling = $this->smarty->php_handling; } $this->is_xml = false; $this->asp_tags = (ini_get('asp_tags') != '0'); $this->current_buffer = $this->root_buffer = new _smarty_template_buffer($this); } public static function escape_start_tag($tag_text) { $tag = preg_replace('/\A<\?(.*)\z/', '<?\1', $tag_text, -1 , $count); //Escape tag return $tag; } public static function escape_end_tag($tag_text) { return '?>'; } public function compileVariable($variable) { if (strpos($variable,'(') == 0) { // not a variable variable $var = trim($variable,'\''); $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable($var, null, true, false)->nocache; $this->template->properties['variables'][$var] = $this->compiler->tag_nocache|$this->compiler->nocache; } // return '(isset($_smarty_tpl->tpl_vars['. $variable .'])?$_smarty_tpl->tpl_vars['. $variable .']->value:$_smarty_tpl->getVariable('. $variable .')->value)'; return '$_smarty_tpl->tpl_vars['. $variable .']->value'; } } %token_prefix TP_ %parse_accept { $this->successful = !$this->internalError; $this->internalError = false; $this->retvalue = $this->_retvalue; //echo $this->retvalue."\n\n"; } %syntax_error { $this->internalError = true; $this->yymajor = $yymajor; $this->compiler->trigger_template_error(); } %stack_overflow { $this->internalError = true; $this->compiler->trigger_template_error("Stack overflow in template parser"); } %left VERT. %left COLON. // // complete template // start(res) ::= template. { res = $this->root_buffer->to_smarty_php(); } // // loop over template elements // // single template element template ::= template_element(e). { $this->current_buffer->append_subtree(e); } // loop of elements template ::= template template_element(e). { $this->current_buffer->append_subtree(e); } // empty template template ::= . // // template elements // // Smarty tag template_element(res)::= smartytag(st). { if ($this->compiler->has_code) { $tmp =''; foreach ($this->compiler->prefix_code as $code) {$tmp.=$code;} $this->compiler->prefix_code=array(); res = new _smarty_tag($this, $this->compiler->processNocacheCode($tmp.st,true)); } else { res = new _smarty_tag($this, st); } $this->compiler->has_variable_string = false; $this->block_nesting_level = count($this->compiler->_tag_stack); } // comments template_element(res)::= COMMENT. { res = new _smarty_tag($this, ''); } // Literal template_element(res) ::= literal(l). { res = new _smarty_text($this, l); } // 'php_handling == Smarty::PHP_PASSTHRU) { res = new _smarty_text($this, self::escape_start_tag(st)); } elseif ($this->php_handling == Smarty::PHP_QUOTE) { res = new _smarty_text($this, htmlspecialchars(st, ENT_QUOTES)); } elseif ($this->php_handling == Smarty::PHP_ALLOW) { if (!($this->smarty instanceof SmartyBC)) { $this->compiler->trigger_template_error (self::Err3); } res = new _smarty_text($this, $this->compiler->processNocacheCode('php_handling == Smarty::PHP_REMOVE) { res = new _smarty_text($this, ''); } } // '?>' tag template_element(res)::= PHPENDTAG. { if ($this->is_xml) { $this->compiler->tag_nocache = true; $this->is_xml = false; $save = $this->template->has_nocache_code; res = new _smarty_text($this, $this->compiler->processNocacheCode("';?>\n", $this->compiler, true)); $this->template->has_nocache_code = $save; } elseif ($this->php_handling == Smarty::PHP_PASSTHRU) { res = new _smarty_text($this, '?>'); } elseif ($this->php_handling == Smarty::PHP_QUOTE) { res = new _smarty_text($this, htmlspecialchars('?>', ENT_QUOTES)); } elseif ($this->php_handling == Smarty::PHP_ALLOW) { res = new _smarty_text($this, $this->compiler->processNocacheCode('?>', true)); } elseif ($this->php_handling == Smarty::PHP_REMOVE) { res = new _smarty_text($this, ''); } } // '<%' tag template_element(res)::= ASPSTARTTAG(st). { if ($this->php_handling == Smarty::PHP_PASSTHRU) { res = new _smarty_text($this, '<%'); } elseif ($this->php_handling == Smarty::PHP_QUOTE) { res = new _smarty_text($this, htmlspecialchars(st, ENT_QUOTES)); } elseif ($this->php_handling == Smarty::PHP_ALLOW) { if ($this->asp_tags) { if (!($this->smarty instanceof SmartyBC)) { $this->compiler->trigger_template_error (self::Err3); } res = new _smarty_text($this, $this->compiler->processNocacheCode('<%', true)); } else { res = new _smarty_text($this, '<%'); } } elseif ($this->php_handling == Smarty::PHP_REMOVE) { if ($this->asp_tags) { res = new _smarty_text($this, ''); } else { res = new _smarty_text($this, '<%'); } } } // '%>' tag template_element(res)::= ASPENDTAG(et). { if ($this->php_handling == Smarty::PHP_PASSTHRU) { res = new _smarty_text($this, '%>'); } elseif ($this->php_handling == Smarty::PHP_QUOTE) { res = new _smarty_text($this, htmlspecialchars('%>', ENT_QUOTES)); } elseif ($this->php_handling == Smarty::PHP_ALLOW) { if ($this->asp_tags) { res = new _smarty_text($this, $this->compiler->processNocacheCode('%>', true)); } else { res = new _smarty_text($this, '%>'); } } elseif ($this->php_handling == Smarty::PHP_REMOVE) { if ($this->asp_tags) { res = new _smarty_text($this, ''); } else { res = new _smarty_text($this, '%>'); } } } template_element(res)::= FAKEPHPSTARTTAG(o). { if ($this->strip) { res = new _smarty_text($this, preg_replace('![\t ]*[\r\n]+[\t ]*!', '', self::escape_start_tag(o))); } else { res = new _smarty_text($this, self::escape_start_tag(o)); } } // XML tag template_element(res)::= XMLTAG. { $this->compiler->tag_nocache = true; $this->is_xml = true; $save = $this->template->has_nocache_code; res = new _smarty_text($this, $this->compiler->processNocacheCode("", $this->compiler, true)); $this->template->has_nocache_code = $save; } // template text template_element(res)::= TEXT(o). { if ($this->strip) { res = new _smarty_text($this, preg_replace('![\t ]*[\r\n]+[\t ]*!', '', o)); } else { res = new _smarty_text($this, o); } } // strip on template_element(res)::= STRIPON(d). { $this->strip = true; res = new _smarty_text($this, ''); } // strip off template_element(res)::= STRIPOFF(d). { $this->strip = false; res = new _smarty_text($this, ''); } // Litteral literal(res) ::= LITERALSTART LITERALEND. { res = ''; } literal(res) ::= LITERALSTART literal_elements(l) LITERALEND. { res = l; } literal_elements(res) ::= literal_elements(l1) literal_element(l2). { res = l1.l2; } literal_elements(res) ::= . { res = ''; } literal_element(res) ::= literal(l). { res = l; } literal_element(res) ::= LITERAL(l). { res = l; } literal_element(res) ::= PHPSTARTTAG(st). { res = self::escape_start_tag(st); } literal_element(res) ::= FAKEPHPSTARTTAG(st). { res = self::escape_start_tag(st); } literal_element(res) ::= PHPENDTAG(et). { res = self::escape_end_tag(et); } literal_element(res) ::= ASPSTARTTAG(st). { res = '<%'; } literal_element(res) ::= ASPENDTAG(et). { res = '%>'; } // // output tags start here // // output with optional attributes smartytag(res) ::= LDEL value(e) RDEL. { res = $this->compiler->compileTag('private_print_expression',array(),array('value'=>e)); } smartytag(res) ::= LDEL value(e) modifierlist(l) attributes(a) RDEL. { res = $this->compiler->compileTag('private_print_expression',a,array('value'=>e, 'modifierlist'=>l)); } smartytag(res) ::= LDEL value(e) attributes(a) RDEL. { res = $this->compiler->compileTag('private_print_expression',a,array('value'=>e)); } smartytag(res) ::= LDEL expr(e) modifierlist(l) attributes(a) RDEL. { res = $this->compiler->compileTag('private_print_expression',a,array('value'=>e,'modifierlist'=>l)); } smartytag(res) ::= LDEL expr(e) attributes(a) RDEL. { res = $this->compiler->compileTag('private_print_expression',a,array('value'=>e)); } // // Smarty tags start here // // assign new style smartytag(res) ::= LDEL DOLLAR ID(i) EQUAL value(e) RDEL. { res = $this->compiler->compileTag('assign',array(array('value'=>e),array('var'=>"'".i."'"))); } smartytag(res) ::= LDEL DOLLAR ID(i) EQUAL expr(e) RDEL. { res = $this->compiler->compileTag('assign',array(array('value'=>e),array('var'=>"'".i."'"))); } smartytag(res) ::= LDEL DOLLAR ID(i) EQUAL expr(e) attributes(a) RDEL. { res = $this->compiler->compileTag('assign',array_merge(array(array('value'=>e),array('var'=>"'".i."'")),a)); } smartytag(res) ::= LDEL varindexed(vi) EQUAL expr(e) attributes(a) RDEL. { res = $this->compiler->compileTag('assign',array_merge(array(array('value'=>e),array('var'=>vi['var'])),a),array('smarty_internal_index'=>vi['smarty_internal_index'])); } // tag with optional Smarty2 style attributes smartytag(res) ::= LDEL ID(i) attributes(a) RDEL. { res = $this->compiler->compileTag(i,a); } smartytag(res) ::= LDEL ID(i) RDEL. { res = $this->compiler->compileTag(i,array()); } // registered object tag smartytag(res) ::= LDEL ID(i) PTR ID(m) attributes(a) RDEL. { res = $this->compiler->compileTag(i,a,array('object_methode'=>m)); } // tag with modifier and optional Smarty2 style attributes smartytag(res) ::= LDEL ID(i) modifierlist(l)attributes(a) RDEL. { res = ''.$this->compiler->compileTag(i,a).'compiler->compileTag('private_modifier',array(),array('modifierlist'=>l,'value'=>'ob_get_clean()')).'?>'; } // registered object tag with modifiers smartytag(res) ::= LDEL ID(i) PTR ID(me) modifierlist(l) attributes(a) RDEL. { res = ''.$this->compiler->compileTag(i,a,array('object_methode'=>me)).'compiler->compileTag('private_modifier',array(),array('modifierlist'=>l,'value'=>'ob_get_clean()')).'?>'; } // {if}, {elseif} and {while} tag smartytag(res) ::= LDELIF(i) expr(ie) RDEL. { $tag = trim(substr(i,$this->lex->ldel_length)); res = $this->compiler->compileTag(($tag == 'else if')? 'elseif' : $tag,array(),array('if condition'=>ie)); } smartytag(res) ::= LDELIF(i) expr(ie) attributes(a) RDEL. { $tag = trim(substr(i,$this->lex->ldel_length)); res = $this->compiler->compileTag(($tag == 'else if')? 'elseif' : $tag,a,array('if condition'=>ie)); } smartytag(res) ::= LDELIF(i) statement(ie) RDEL. { $tag = trim(substr(i,$this->lex->ldel_length)); res = $this->compiler->compileTag(($tag == 'else if')? 'elseif' : $tag,array(),array('if condition'=>ie)); } smartytag(res) ::= LDELIF(i) statement(ie) attributes(a) RDEL. { $tag = trim(substr(i,$this->lex->ldel_length)); res = $this->compiler->compileTag(($tag == 'else if')? 'elseif' : $tag,a,array('if condition'=>ie)); } // {for} tag smartytag(res) ::= LDELFOR statements(st) SEMICOLON optspace expr(ie) SEMICOLON optspace DOLLAR varvar(v2) foraction(e2) attributes(a) RDEL. { res = $this->compiler->compileTag('for',array_merge(a,array(array('start'=>st),array('ifexp'=>ie),array('var'=>v2),array('step'=>e2))),1); } foraction(res) ::= EQUAL expr(e). { res = '='.e; } foraction(res) ::= INCDEC(e). { res = e; } smartytag(res) ::= LDELFOR statement(st) TO expr(v) attributes(a) RDEL. { res = $this->compiler->compileTag('for',array_merge(a,array(array('start'=>st),array('to'=>v))),0); } smartytag(res) ::= LDELFOR statement(st) TO expr(v) STEP expr(v2) attributes(a) RDEL. { res = $this->compiler->compileTag('for',array_merge(a,array(array('start'=>st),array('to'=>v),array('step'=>v2))),0); } // {foreach} tag smartytag(res) ::= LDELFOREACH attributes(a) RDEL. { res = $this->compiler->compileTag('foreach',a); } // {foreach $array as $var} tag smartytag(res) ::= LDELFOREACH SPACE value(v1) AS DOLLAR varvar(v0) attributes(a) RDEL. { res = $this->compiler->compileTag('foreach',array_merge(a,array(array('from'=>v1),array('item'=>v0)))); } smartytag(res) ::= LDELFOREACH SPACE value(v1) AS DOLLAR varvar(v2) APTR DOLLAR varvar(v0) attributes(a) RDEL. { res = $this->compiler->compileTag('foreach',array_merge(a,array(array('from'=>v1),array('item'=>v0),array('key'=>v2)))); } smartytag(res) ::= LDELFOREACH SPACE expr(e) AS DOLLAR varvar(v0) attributes(a) RDEL. { res = $this->compiler->compileTag('foreach',array_merge(a,array(array('from'=>e),array('item'=>v0)))); } smartytag(res) ::= LDELFOREACH SPACE expr(e) AS DOLLAR varvar(v1) APTR DOLLAR varvar(v0) attributes(a) RDEL. { res = $this->compiler->compileTag('foreach',array_merge(a,array(array('from'=>e),array('item'=>v0),array('key'=>v1)))); } // {setfilter} smartytag(res) ::= LDELSETFILTER ID(m) modparameters(p) RDEL. { res = $this->compiler->compileTag('setfilter',array(),array('modifier_list'=>array(array_merge(array(m),p)))); } smartytag(res) ::= LDELSETFILTER ID(m) modparameters(p) modifierlist(l) RDEL. { res = $this->compiler->compileTag('setfilter',array(),array('modifier_list'=>array_merge(array(array_merge(array(m),p)),l))); } // {$smarty.block.child} smartytag(res) ::= SMARTYBLOCKCHILD. { res = SMARTY_INTERNAL_COMPILE_BLOCK::compileChildBlock($this->compiler); } // end of block tag {/....} smartytag(res) ::= LDELSLASH ID(i) RDEL. { res = $this->compiler->compileTag(i.'close',array()); } smartytag(res) ::= LDELSLASH ID(i) modifierlist(l) RDEL. { res = $this->compiler->compileTag(i.'close',array(),array('modifier_list'=>l)); } // end of block object tag {/....} smartytag(res) ::= LDELSLASH ID(i) PTR ID(m) RDEL. { res = $this->compiler->compileTag(i.'close',array(),array('object_methode'=>m)); } smartytag(res) ::= LDELSLASH ID(i) PTR ID(m) modifierlist(l) RDEL. { res = $this->compiler->compileTag(i.'close',array(),array('object_methode'=>m, 'modifier_list'=>l)); } // //Attributes of Smarty tags // // list of attributes attributes(res) ::= attributes(a1) attribute(a2). { res = a1; res[] = a2; } // single attribute attributes(res) ::= attribute(a). { res = array(a); } // no attributes attributes(res) ::= . { res = array(); } // attribute attribute(res) ::= SPACE ID(v) EQUAL ID(id). { if (preg_match('~^true$~i', id)) { res = array(v=>'true'); } elseif (preg_match('~^false$~i', id)) { res = array(v=>'false'); } elseif (preg_match('~^null$~i', id)) { res = array(v=>'null'); } else { res = array(v=>"'".id."'"); } } attribute(res) ::= ATTR(v) expr(e). { res = array(trim(v," =\n\r\t")=>e); } attribute(res) ::= ATTR(v) value(e). { res = array(trim(v," =\n\r\t")=>e); } attribute(res) ::= SPACE ID(v). { res = "'".v."'"; } attribute(res) ::= SPACE expr(e). { res = e; } attribute(res) ::= SPACE value(v). { res = v; } attribute(res) ::= SPACE INTEGER(i) EQUAL expr(e). { res = array(i=>e); } // // statement // statements(res) ::= statement(s). { res = array(s); } statements(res) ::= statements(s1) COMMA statement(s). { s1[]=s; res = s1; } statement(res) ::= DOLLAR varvar(v) EQUAL expr(e). { res = array('var' => v, 'value'=>e); } statement(res) ::= varindexed(vi) EQUAL expr(e). { res = array('var' => vi, 'value'=>e); } statement(res) ::= OPENP statement(st) CLOSEP. { res = st; } // // expressions // // single value expr(res) ::= value(v). { res = v; } // ternary expr(res) ::= ternary(v). { res = v; } // resources/streams expr(res) ::= DOLLAR ID(i) COLON ID(i2). { res = '$_smarty_tpl->getStreamVariable(\''. i .'://'. i2 . '\')'; } // arithmetic expression expr(res) ::= expr(e) MATH(m) value(v). { res = e . trim(m) . v; } expr(res) ::= expr(e) UNIMATH(m) value(v). { res = e . trim(m) . v; } // bit operation expr(res) ::= expr(e) ANDSYM(m) value(v). { res = e . trim(m) . v; } // array expr(res) ::= array(a). { res = a; } // modifier expr(res) ::= expr(e) modifierlist(l). { res = $this->compiler->compileTag('private_modifier',array(),array('value'=>e,'modifierlist'=>l)); } // if expression // simple expression expr(res) ::= expr(e1) ifcond(c) expr(e2). { res = e1.c.e2; } expr(res) ::= expr(e1) ISIN array(a). { res = 'in_array('.e1.','.a.')'; } expr(res) ::= expr(e1) ISIN value(v). { res = 'in_array('.e1.',(array)'.v.')'; } expr(res) ::= expr(e1) lop(o) expr(e2). { res = e1.o.e2; } expr(res) ::= expr(e1) ISDIVBY expr(e2). { res = '!('.e1.' % '.e2.')'; } expr(res) ::= expr(e1) ISNOTDIVBY expr(e2). { res = '('.e1.' % '.e2.')'; } expr(res) ::= expr(e1) ISEVEN. { res = '!(1 & '.e1.')'; } expr(res) ::= expr(e1) ISNOTEVEN. { res = '(1 & '.e1.')'; } expr(res) ::= expr(e1) ISEVENBY expr(e2). { res = '!(1 & '.e1.' / '.e2.')'; } expr(res) ::= expr(e1) ISNOTEVENBY expr(e2). { res = '(1 & '.e1.' / '.e2.')'; } expr(res) ::= expr(e1) ISODD. { res = '(1 & '.e1.')'; } expr(res) ::= expr(e1) ISNOTODD. { res = '!(1 & '.e1.')'; } expr(res) ::= expr(e1) ISODDBY expr(e2). { res = '(1 & '.e1.' / '.e2.')'; } expr(res) ::= expr(e1) ISNOTODDBY expr(e2). { res = '!(1 & '.e1.' / '.e2.')'; } expr(res) ::= value(v1) INSTANCEOF(i) ID(id). { res = v1.i.id; } expr(res) ::= value(v1) INSTANCEOF(i) value(v2). { $this->prefix_number++; $this->compiler->prefix_code[] = 'prefix_number.'='.v2.';?>'; res = v1.i.'$_tmp'.$this->prefix_number; } // // ternary // ternary(res) ::= OPENP expr(v) CLOSEP QMARK DOLLAR ID(e1) COLON expr(e2). { res = v.' ? '. $this->compileVariable("'".e1."'") . ' : '.e2; } ternary(res) ::= OPENP expr(v) CLOSEP QMARK expr(e1) COLON expr(e2). { res = v.' ? '.e1.' : '.e2; } // value value(res) ::= variable(v). { res = v; } // +/- value value(res) ::= UNIMATH(m) value(v). { res = m.v; } // logical negation value(res) ::= NOT value(v). { res = '!'.v; } value(res) ::= TYPECAST(t) value(v). { res = t.v; } value(res) ::= variable(v) INCDEC(o). { res = v.o; } // numeric value(res) ::= HEX(n). { res = n; } value(res) ::= INTEGER(n). { res = n; } value(res) ::= INTEGER(n1) DOT INTEGER(n2). { res = n1.'.'.n2; } value(res) ::= INTEGER(n1) DOT. { res = n1.'.'; } value(res) ::= DOT INTEGER(n1). { res = '.'.n1; } // ID, true, false, null value(res) ::= ID(id). { if (preg_match('~^true$~i', id)) { res = 'true'; } elseif (preg_match('~^false$~i', id)) { res = 'false'; } elseif (preg_match('~^null$~i', id)) { res = 'null'; } else { res = "'".id."'"; } } // function call value(res) ::= function(f). { res = f; } // expression value(res) ::= OPENP expr(e) CLOSEP. { res = "(". e .")"; } // singele quoted string value(res) ::= SINGLEQUOTESTRING(t). { res = t; } // double quoted string value(res) ::= doublequoted_with_quotes(s). { res = s; } // static class access value(res) ::= ID(c) DOUBLECOLON static_class_access(r). { if (!$this->security || isset($this->smarty->registered_classes[c]) || $this->smarty->security_policy->isTrustedStaticClass(c, $this->compiler)) { if (isset($this->smarty->registered_classes[c])) { res = $this->smarty->registered_classes[c].'::'.r; } else { res = c.'::'.r; } } else { $this->compiler->trigger_template_error ("static class '".c."' is undefined or not allowed by security setting"); } } value(res) ::= varindexed(vi) DOUBLECOLON static_class_access(r). { if (vi['var'] == '\'smarty\'') { res = $this->compiler->compileTag('private_special_variable',array(),vi['smarty_internal_index']).'::'.r; } else { res = $this->compileVariable(vi['var']).vi['smarty_internal_index'].'::'.r; } } // Smarty tag value(res) ::= smartytag(st). { $this->prefix_number++; $this->compiler->prefix_code[] = ''.st.'prefix_number.'=ob_get_clean();?>'; res = '$_tmp'.$this->prefix_number; } value(res) ::= value(v) modifierlist(l). { res = $this->compiler->compileTag('private_modifier',array(),array('value'=>v,'modifierlist'=>l)); } // // variables // // Smarty variable (optional array) variable(res) ::= varindexed(vi). { if (vi['var'] == '\'smarty\'') { $smarty_var = $this->compiler->compileTag('private_special_variable',array(),vi['smarty_internal_index']); res = $smarty_var; } else { // used for array reset,next,prev,end,current $this->last_variable = vi['var']; $this->last_index = vi['smarty_internal_index']; res = $this->compileVariable(vi['var']).vi['smarty_internal_index']; } } // variable with property variable(res) ::= DOLLAR varvar(v) AT ID(p). { res = '$_smarty_tpl->tpl_vars['. v .']->'.p; } // object variable(res) ::= object(o). { res = o; } // config variable variable(res) ::= HATCH ID(i) HATCH. { res = '$_smarty_tpl->getConfigVariable(\''. i .'\')'; } variable(res) ::= HATCH ID(i) HATCH arrayindex(a). { res = '(is_array($tmp = $_smarty_tpl->getConfigVariable(\''. i .'\')) ? $tmp'.a.' :null)'; } variable(res) ::= HATCH variable(v) HATCH. { res = '$_smarty_tpl->getConfigVariable('. v .')'; } variable(res) ::= HATCH variable(v) HATCH arrayindex(a). { res = '(is_array($tmp = $_smarty_tpl->getConfigVariable('. v .')) ? $tmp'.a.' : null)'; } varindexed(res) ::= DOLLAR varvar(v) arrayindex(a). { res = array('var'=>v, 'smarty_internal_index'=>a); } // // array index // // multiple array index arrayindex(res) ::= arrayindex(a1) indexdef(a2). { res = a1.a2; } // no array index arrayindex ::= . { return; } // single index definition // Smarty2 style index indexdef(res) ::= DOT DOLLAR varvar(v). { res = '['.$this->compileVariable(v).']'; } indexdef(res) ::= DOT DOLLAR varvar(v) AT ID(p). { res = '['.$this->compileVariable(v).'->'.p.']'; } indexdef(res) ::= DOT ID(i). { res = "['". i ."']"; } indexdef(res) ::= DOT INTEGER(n). { res = "[". n ."]"; } indexdef(res) ::= DOT LDEL expr(e) RDEL. { res = "[". e ."]"; } // section tag index indexdef(res) ::= OPENB ID(i)CLOSEB. { res = '['.$this->compiler->compileTag('private_special_variable',array(),'[\'section\'][\''.i.'\'][\'index\']').']'; } indexdef(res) ::= OPENB ID(i) DOT ID(i2) CLOSEB. { res = '['.$this->compiler->compileTag('private_special_variable',array(),'[\'section\'][\''.i.'\'][\''.i2.'\']').']'; } // PHP style index indexdef(res) ::= OPENB expr(e) CLOSEB. { res = "[". e ."]"; } // fr assign append array indexdef(res) ::= OPENB CLOSEB. { res = '[]'; } // // variable variable names // // singel identifier element varvar(res) ::= varvarele(v). { res = v; } // sequence of identifier elements varvar(res) ::= varvar(v1) varvarele(v2). { res = v1.'.'.v2; } // fix sections of element varvarele(res) ::= ID(s). { res = '\''.s.'\''; } // variable sections of element varvarele(res) ::= LDEL expr(e) RDEL. { res = '('.e.')'; } // // objects // object(res) ::= varindexed(vi) objectchain(oc). { if (vi['var'] == '\'smarty\'') { res = $this->compiler->compileTag('private_special_variable',array(),vi['smarty_internal_index']).oc; } else { res = $this->compileVariable(vi['var']).vi['smarty_internal_index'].oc; } } // single element objectchain(res) ::= objectelement(oe). { res = oe; } // chain of elements objectchain(res) ::= objectchain(oc) objectelement(oe). { res = oc.oe; } // variable objectelement(res)::= PTR ID(i) arrayindex(a). { if ($this->security && substr(i,0,1) == '_') { $this->compiler->trigger_template_error (self::Err1); } res = '->'.i.a; } objectelement(res)::= PTR DOLLAR varvar(v) arrayindex(a). { if ($this->security) { $this->compiler->trigger_template_error (self::Err2); } res = '->{'.$this->compileVariable(v).a.'}'; } objectelement(res)::= PTR LDEL expr(e) RDEL arrayindex(a). { if ($this->security) { $this->compiler->trigger_template_error (self::Err2); } res = '->{'.e.a.'}'; } objectelement(res)::= PTR ID(ii) LDEL expr(e) RDEL arrayindex(a). { if ($this->security) { $this->compiler->trigger_template_error (self::Err2); } res = '->{\''.ii.'\'.'.e.a.'}'; } // method objectelement(res)::= PTR method(f). { res = '->'.f; } // // function // function(res) ::= ID(f) OPENP params(p) CLOSEP. { if (!$this->security || $this->smarty->security_policy->isTrustedPhpFunction(f, $this->compiler)) { if (strcasecmp(f,'isset') === 0 || strcasecmp(f,'empty') === 0 || strcasecmp(f,'array') === 0 || is_callable(f)) { $func_name = strtolower(f); if ($func_name == 'isset') { if (count(p) == 0) { $this->compiler->trigger_template_error ('Illegal number of paramer in "isset()"'); } $par = implode(',',p); if (strncasecmp($par,'$_smarty_tpl->getConfigVariable',strlen('$_smarty_tpl->getConfigVariable')) === 0) { $this->prefix_number++; $this->compiler->prefix_code[] = 'prefix_number.'='.str_replace(')',', false)',$par).';?>'; $isset_par = '$_tmp'.$this->prefix_number; } else { $isset_par=str_replace("')->value","',null,true,false)->value",$par); } res = f . "(". $isset_par .")"; } elseif (in_array($func_name,array('empty','reset','current','end','prev','next'))){ if (count(p) != 1) { $this->compiler->trigger_template_error ('Illegal number of paramer in "empty()"'); } if ($func_name == 'empty') { res = $func_name.'('.str_replace("')->value","',null,true,false)->value",p[0]).')'; } else { res = $func_name.'('.p[0].')'; } } else { res = f . "(". implode(',',p) .")"; } } else { $this->compiler->trigger_template_error ("unknown function \"" . f . "\""); } } } // // method // method(res) ::= ID(f) OPENP params(p) CLOSEP. { if ($this->security && substr(f,0,1) == '_') { $this->compiler->trigger_template_error (self::Err1); } res = f . "(". implode(',',p) .")"; } method(res) ::= DOLLAR ID(f) OPENP params(p) CLOSEP. { if ($this->security) { $this->compiler->trigger_template_error (self::Err2); } $this->prefix_number++; $this->compiler->prefix_code[] = 'prefix_number.'='.$this->compileVariable("'".f."'").';?>'; res = '$_tmp'.$this->prefix_number.'('. implode(',',p) .')'; } // function/method parameter // multiple parameters params(res) ::= params(p) COMMA expr(e). { res = array_merge(p,array(e)); } // single parameter params(res) ::= expr(e). { res = array(e); } // kein parameter params(res) ::= . { res = array(); } // // modifier // modifierlist(res) ::= modifierlist(l) modifier(m) modparameters(p). { res = array_merge(l,array(array_merge(m,p))); } modifierlist(res) ::= modifier(m) modparameters(p). { res = array(array_merge(m,p)); } modifier(res) ::= VERT AT ID(m). { res = array(m); } modifier(res) ::= VERT ID(m). { res = array(m); } // // modifier parameter // // multiple parameter modparameters(res) ::= modparameters(mps) modparameter(mp). { res = array_merge(mps,mp); } // no parameter modparameters(res) ::= . { res = array(); } // parameter expression modparameter(res) ::= COLON value(mp). { res = array(mp); } modparameter(res) ::= COLON array(mp). { res = array(mp); } // static class methode call static_class_access(res) ::= method(m). { res = m; } // static class methode call with object chainig static_class_access(res) ::= method(m) objectchain(oc). { res = m.oc; } // static class constant static_class_access(res) ::= ID(v). { res = v; } // static class variables static_class_access(res) ::= DOLLAR ID(v) arrayindex(a). { res = '$'.v.a; } // static class variables with object chain static_class_access(res) ::= DOLLAR ID(v) arrayindex(a) objectchain(oc). { res = '$'.v.a.oc; } // if conditions and operators ifcond(res) ::= EQUALS. { res = '=='; } ifcond(res) ::= NOTEQUALS. { res = '!='; } ifcond(res) ::= GREATERTHAN. { res = '>'; } ifcond(res) ::= LESSTHAN. { res = '<'; } ifcond(res) ::= GREATEREQUAL. { res = '>='; } ifcond(res) ::= LESSEQUAL. { res = '<='; } ifcond(res) ::= IDENTITY. { res = '==='; } ifcond(res) ::= NONEIDENTITY. { res = '!=='; } ifcond(res) ::= MOD. { res = '%'; } lop(res) ::= LAND. { res = '&&'; } lop(res) ::= LOR. { res = '||'; } lop(res) ::= LXOR. { res = ' XOR '; } // // ARRAY element assignment // array(res) ::= OPENB arrayelements(a) CLOSEB. { res = 'array('.a.')'; } arrayelements(res) ::= arrayelement(a). { res = a; } arrayelements(res) ::= arrayelements(a1) COMMA arrayelement(a). { res = a1.','.a; } arrayelements ::= . { return; } arrayelement(res) ::= value(e1) APTR expr(e2). { res = e1.'=>'.e2; } arrayelement(res) ::= ID(i) APTR expr(e2). { res = '\''.i.'\'=>'.e2; } arrayelement(res) ::= expr(e). { res = e; } // // double qouted strings // doublequoted_with_quotes(res) ::= QUOTE QUOTE. { res = "''"; } doublequoted_with_quotes(res) ::= QUOTE doublequoted(s) QUOTE. { res = s->to_smarty_php(); } doublequoted(res) ::= doublequoted(o1) doublequotedcontent(o2). { o1->append_subtree(o2); res = o1; } doublequoted(res) ::= doublequotedcontent(o). { res = new _smarty_doublequoted($this, o); } doublequotedcontent(res) ::= BACKTICK variable(v) BACKTICK. { res = new _smarty_code($this, '(string)'.v); } doublequotedcontent(res) ::= BACKTICK expr(e) BACKTICK. { res = new _smarty_code($this, '(string)'.e); } doublequotedcontent(res) ::= DOLLARID(i). { res = new _smarty_code($this, '(string)$_smarty_tpl->tpl_vars[\''. substr(i,1) .'\']->value'); } doublequotedcontent(res) ::= LDEL variable(v) RDEL. { res = new _smarty_code($this, '(string)'.v); } doublequotedcontent(res) ::= LDEL expr(e) RDEL. { res = new _smarty_code($this, '(string)('.e.')'); } doublequotedcontent(res) ::= smartytag(st). { res = new _smarty_tag($this, st); } doublequotedcontent(res) ::= TEXT(o). { res = new _smarty_dq_content($this, o); } // // optional space // optspace(res) ::= SPACE(s). { res = s; } optspace(res) ::= . { res = ''; } smarty3-3.1.13/development/lexer/ParserGenerator/0000755000175000017500000000000012141655567020415 5ustar mikemikesmarty3-3.1.13/development/lexer/ParserGenerator/PropagationLink.php0000644000175000017500000001013011275032024024202 0ustar mikemike * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the distribution. * * Neither the name of the PHP_ParserGenerator nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * @category php * @package PHP_ParserGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @version CVS: $Id: PropagationLink.php,v 1.1 2006/07/18 00:53:10 cellog Exp $ * @since File available since Release 0.1.0 */ /** * A followset propagation link indicates that the contents of one * configuration followset should be propagated to another whenever * the first changes. * * @package PHP_ParserGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @version 0.1.5 * @since Class available since Release 0.1.0 */ class PHP_ParserGenerator_PropagationLink { /** * The configuration that defines this propagation link * @var PHP_ParserGenerator_Config */ public $cfp; /** * The next propagation link * @var PHP_ParserGenerator_PropagationLink|0 */ public $next = 0; /** * Add a propagation link to the current list * * This prepends the configuration passed in to the first parameter * which is either 0 or a PHP_ParserGenerator_PropagationLink defining * an existing list. * @param PHP_ParserGenerator_PropagationLink|null * @param PHP_ParserGenerator_Config */ static function Plink_add(&$plpp, PHP_ParserGenerator_Config $cfp) { $new = new PHP_ParserGenerator_PropagationLink; $new->next = $plpp; $plpp = $new; $new->cfp = $cfp; } /** * Transfer every propagation link on the list "from" to the list "to" */ static function Plink_copy(PHP_ParserGenerator_PropagationLink &$to, PHP_ParserGenerator_PropagationLink $from) { while ($from) { $nextpl = $from->next; $from->next = $to; $to = $from; $from = $nextpl; } } /** * Delete every propagation link on the list * @param PHP_ParserGenerator_PropagationLink|0 */ static function Plink_delete($plp) { while ($plp) { $nextpl = $plp->next; $plp->next = 0; $plp = $nextpl; } } } smarty3-3.1.13/development/lexer/ParserGenerator/Config.php0000644000175000017500000004257511434504200022325 0ustar mikemike * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the distribution. * * Neither the name of the PHP_ParserGenerator nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * @category php * @package PHP_ParserGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @version CVS: $Id: Config.php,v 1.1 2006/07/18 00:53:10 cellog Exp $ * @since File available since Release 0.1.0 */ /** /** A configuration is a production rule of the grammar together with * a mark (dot) showing how much of that rule has been processed so far. * * Configurations also contain a follow-set which is a list of terminal * symbols which are allowed to immediately follow the end of the rule. * Every configuration is recorded as an instance of the following class. * * @package PHP_ParserGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @version 0.1.5 * @since Class available since Release 0.1.0 */ class PHP_ParserGenerator_Config { const COMPLETE = 1; const INCOMPLETE = 2; /** * The parser rule upon with the configuration is based. * * A parser rule is something like: *
     * blah ::= FOO bar.
     * 
* @var PHP_ParserGenerator_Rule */ public $rp; /** * The parse point. * * This is the index into the right-hand side of a rule that is * represented by this configuration. In other words, possible * dots for this rule: * *
     * blah ::= FOO bar.
     * 
* * are (represented by "[here]"): * *
     * blah ::= [here] FOO bar.
     * blah ::= FOO [here] bar.
     * blah ::= FOO bar [here].
     * 
* @var int */ public $dot; /** * Follow-set for this configuration only * * This is the list of terminals and non-terminals that * can follow this configuration. * @var array */ public $fws; /** * Follow-set forward propagation links. * @var PHP_ParserGenerator_PropagationLink */ public $fplp; /** * Follow-set backwards propagation links * @var PHP_ParserGenerator_PropagationLink */ public $bplp; /** * State that contains this configuration * @var PHP_ParserGenerator_State */ public $stp; /* enum { COMPLETE, /* The status is used during followset and INCOMPLETE /* shift computations } */ /** * Status during followset and shift computations. * * One of PHP_ParserGenerator_Config::COMPLETE or * PHP_ParserGenerator_Config::INCOMPLETE. * @var int */ public $status; /** * Next configuration in the state. * * Index of next PHP_ParserGenerator_Config object. * @var int */ public $next; /** * Index of the next basis configuration PHP_ParserGenerator_Config object * @var int */ public $bp; /** * Top of the list of configurations for the current state. * @var PHP_ParserGenerator_Config */ static public $current; /** * Last on the list of configurations for the current state. * @var PHP_ParserGenerator_Config */ static public $currentend; /** * Top of the list of basis configurations for the current state. * @var PHP_ParserGenerator_Config */ static public $basis; /** * Last on the list of basis configurations for the current state. * @var PHP_ParserGenerator_Config */ static public $basisend; /** * Associative array representation of the linked list of configurations * found in {@link $current} * * @var array */ static public $x4a = array(); /** * Return a pointer to a new configuration * @return PHP_ParserGenerator_Config */ private static function newconfig() { return new PHP_ParserGenerator_Config; } /** * Display the current configuration for the .out file * * @param PHP_ParserGenerator_Config $cfp * @see PHP_ParserGenerator_Data::ReportOutput() */ static function Configshow(PHP_ParserGenerator_Config $cfp) { $fp = fopen('php://output', 'w'); while ($cfp) { if ($cfp->dot == $cfp->rp->nrhs) { $buf = sprintf('(%d)', $cfp->rp->index); fprintf($fp, ' %5s ', $buf); } else { fwrite($fp,' '); } $cfp->ConfigPrint($fp); fwrite($fp, "\n"); if (0) { //SetPrint(fp,cfp->fws,$this); //PlinkPrint(fp,cfp->fplp,"To "); //PlinkPrint(fp,cfp->bplp,"From"); } $cfp = $cfp->next; } fwrite($fp, "\n"); fclose($fp); } /** * Initialize the configuration list builder for a new state. */ static function Configlist_init() { self::$current = 0; self::$currentend = &self::$current; self::$basis = 0; self::$basisend = &self::$basis; self::$x4a = array(); } /** * Remove all data from the table. * * Pass each data to the function $f as it is removed if * $f is a valid callback. * @param callback|null * @see Configtable_clear() */ static function Configtable_reset($f) { self::$current = 0; self::$currentend = &self::$current; self::$basis = 0; self::$basisend = &self::$basis; self::Configtable_clear(0); } /** * Remove all data from the associative array representation * of configurations. * * Pass each data to the function $f as it is removed if * $f is a valid callback. * @param callback|null */ static function Configtable_clear($f) { if (!count(self::$x4a)) { return; } if ($f) { for ($i = 0; $i < count(self::$x4a); $i++) { call_user_func($f, self::$x4a[$i]->data); } } self::$x4a = array(); } /** * Reset the configuration list builder for a new state. * @see Configtable_clear() */ static function Configlist_reset() { self::Configtable_clear(0); } /** * Add another configuration to the configuration list for this parser state. * @param PHP_ParserGenerator_Rule the rule * @param int Index into the right-hand side of the rule where the dot goes * @return PHP_ParserGenerator_Config */ static function Configlist_add($rp, $dot) { $model = new PHP_ParserGenerator_Config; $model->rp = $rp; $model->dot = $dot; $cfp = self::Configtable_find($model); if ($cfp === 0) { $cfp = self::newconfig(); $cfp->rp = $rp; $cfp->dot = $dot; $cfp->fws = array(); $cfp->stp = 0; $cfp->fplp = $cfp->bplp = 0; $cfp->next = 0; $cfp->bp = 0; self::$currentend = $cfp; self::$currentend = &$cfp->next; self::Configtable_insert($cfp); } return $cfp; } /** * Add a basis configuration to the configuration list for this parser state. * * Basis configurations are the root for a configuration. This method also * inserts the configuration into the regular list of configurations for this * reason. * @param PHP_ParserGenerator_Rule the rule * @param int Index into the right-hand side of the rule where the dot goes * @return PHP_ParserGenerator_Config */ static function Configlist_addbasis($rp, $dot) { $model = new PHP_ParserGenerator_Config; $model->rp = $rp; $model->dot = $dot; $cfp = self::Configtable_find($model); if ($cfp === 0) { $cfp = self::newconfig(); $cfp->rp = $rp; $cfp->dot = $dot; $cfp->fws = array(); $cfp->stp = 0; $cfp->fplp = $cfp->bplp = 0; $cfp->next = 0; $cfp->bp = 0; self::$currentend = $cfp; self::$currentend = &$cfp->next; self::$basisend = $cfp; self::$basisend = &$cfp->bp; self::Configtable_insert($cfp); } return $cfp; } /** * Compute the closure of the configuration list. * * This calculates all of the possible continuations of * each configuration, ensuring that each state accounts * for every configuration that could arrive at that state. */ static function Configlist_closure(PHP_ParserGenerator_Data $lemp) { for ($cfp = self::$current; $cfp; $cfp = $cfp->next) { $rp = $cfp->rp; $dot = $cfp->dot; if ($dot >= $rp->nrhs) { continue; } $sp = $rp->rhs[$dot]; if ($sp->type == PHP_ParserGenerator_Symbol::NONTERMINAL) { if ($sp->rule === 0 && $sp !== $lemp->errsym) { PHP_ParserGenerator::ErrorMsg($lemp->filename, $rp->line, "Nonterminal \"%s\" has no rules.", $sp->name); $lemp->errorcnt++; } for ($newrp = $sp->rule; $newrp; $newrp = $newrp->nextlhs) { $newcfp = self::Configlist_add($newrp, 0); for ($i = $dot + 1; $i < $rp->nrhs; $i++) { $xsp = $rp->rhs[$i]; if ($xsp->type == PHP_ParserGenerator_Symbol::TERMINAL) { $newcfp->fws[$xsp->index] = 1; break; } elseif ($xsp->type == PHP_ParserGenerator_Symbol::MULTITERMINAL) { for ($k = 0; $k < $xsp->nsubsym; $k++) { $newcfp->fws[$xsp->subsym[$k]->index] = 1; } break; } else { $a = array_diff_key($xsp->firstset, $newcfp->fws); $newcfp->fws += $a; if ($xsp->lambda === false) { break; } } } if ($i == $rp->nrhs) { PHP_ParserGenerator_PropagationLink::Plink_add($cfp->fplp, $newcfp); } } } } } /** * Sort the configuration list * @uses Configcmp() */ static function Configlist_sort() { $a = 0; //self::Configshow(self::$current); self::$current = PHP_ParserGenerator::msort(self::$current,'next', array('PHP_ParserGenerator_Config', 'Configcmp')); //self::Configshow(self::$current); self::$currentend = &$a; self::$currentend = 0; } /** * Sort the configuration list * @uses Configcmp */ static function Configlist_sortbasis() { $a = 0; self::$basis = PHP_ParserGenerator::msort(self::$current,'bp', array('PHP_ParserGenerator_Config', 'Configcmp')); self::$basisend = &$a; self::$basisend = 0; } /** * Return a pointer to the head of the configuration list and * reset the list * @see $current * @return PHP_ParserGenerator_Config */ static function Configlist_return() { $old = self::$current; self::$current = 0; self::$currentend = &self::$current; return $old; } /** * Return a pointer to the head of the basis list and * reset the list * @see $basis * @return PHP_ParserGenerator_Config */ static function Configlist_basis() { $old = self::$basis; self::$basis = 0; self::$basisend = &self::$basis; return $old; } /** * Free all elements of the given configuration list * @param PHP_ParserGenerator_Config */ static function Configlist_eat($cfp) { $nextcfp = null; for(; $cfp; $cfp = $nextcfp){ $nextcfp = $cfp->next; if ($cfp->fplp !=0) { throw new Exception('fplp of configuration non-zero?'); } if ($cfp->bplp !=0) { throw new Exception('bplp of configuration non-zero?'); } if ($cfp->fws) { $cfp->fws = array(); } } } /** * Compare two configurations for sorting purposes. * * Configurations based on higher precedence rules * (those earlier in the file) are chosen first. Two * configurations that are the same rule are sorted by * dot (see {@link $dot}), and those configurations * with a dot closer to the left-hand side are chosen first. * @param unknown_type $a * @param unknown_type $b * @return unknown */ static function Configcmp($a, $b) { $x = $a->rp->index - $b->rp->index; if (!$x) { $x = $a->dot - $b->dot; } return $x; } /** * Print out information on this configuration. * * @param resource $fp * @see PHP_ParserGenerator_Data::ReportOutput() */ function ConfigPrint($fp) { $rp = $this->rp; fprintf($fp, "%s ::=", $rp->lhs->name); for ($i = 0; $i <= $rp->nrhs; $i++) { if ($i === $this->dot) { fwrite($fp,' *'); } if ($i === $rp->nrhs) { break; } $sp = $rp->rhs[$i]; fprintf($fp,' %s', $sp->name); if ($sp->type == PHP_ParserGenerator_Symbol::MULTITERMINAL) { for ($j = 1; $j < $sp->nsubsym; $j++) { fprintf($fp, '|%s', $sp->subsym[$j]->name); } } } } /** * Hash a configuration for the associative array {@link $x4a} */ private static function confighash(PHP_ParserGenerator_Config $a) { $h = 0; $h = $h * 571 + $a->rp->index * 37 + $a->dot; return $h; } /** * Insert a new record into the array. Return TRUE if successful. * Prior data with the same key is NOT overwritten */ static function Configtable_insert(PHP_ParserGenerator_Config $data) { $h = self::confighash($data); if (isset(self::$x4a[$h])) { $np = self::$x4a[$h]; } else { $np = 0; } while ($np) { if (self::Configcmp($np->data, $data) == 0) { /* An existing entry with the same key is found. */ /* Fail because overwrite is not allows. */ return 0; } $np = $np->next; } /* Insert the new data */ $np = array('data' => $data, 'next' => 0, 'from' => 0); $np = new PHP_ParserGenerator_StateNode; $np->data = $data; if (isset(self::$x4a[$h])) { self::$x4a[$h]->from = $np->next; $np->next = self::$x4a[$h]; } $np->from = $np; self::$x4a[$h] = $np; return 1; } /** * Return a pointer to data assigned to the given key. Return NULL * if no such key. * @return PHP_ParserGenerator_Config|0 */ static function Configtable_find(PHP_ParserGenerator_Config $key) { $h = self::confighash($key); if (!isset(self::$x4a[$h])) { return 0; } $np = self::$x4a[$h]; while ($np) { if (self::Configcmp($np->data, $key) == 0) { break; } $np = $np->next; } return $np ? $np->data : 0; } } ?>smarty3-3.1.13/development/lexer/ParserGenerator/Data.php0000644000175000017500000020554611275032024021773 0ustar mikemike * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the distribution. * * Neither the name of the PHP_ParserGenerator nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * @category php * @package PHP_ParserGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @version CVS: $Id: Data.php,v 1.2 2007/03/04 17:52:05 cellog Exp $ * @since File available since Release 0.1.0 */ /** /** * The state vector for the entire parser generator is recorded in * this class. * * @package PHP_ParserGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @version 0.1.5 * @since Class available since Release 0.1.0 */ class PHP_ParserGenerator_Data { /** * Used for terminal and non-terminal offsets into the action table * when their default should be used instead */ const NO_OFFSET = -2147483647; /** * Table of states sorted by state number * @var array array of {@link PHP_ParserGenerator_State} objects */ public $sorted; /** * List of all rules * @var PHP_ParserGenerator_Rule */ public $rule; /** * Number of states * @var int */ public $nstate; /** * Number of rules * @var int */ public $nrule; /** * Number of terminal and nonterminal symbols * @var int */ public $nsymbol; /** * Number of terminal symbols (tokens) * @var int */ public $nterminal; /** * Sorted array of pointers to symbols * @var array array of {@link PHP_ParserGenerator_Symbol} objects */ public $symbols = array(); /** * Number of errors * @var int */ public $errorcnt; /** * The error symbol * @var PHP_ParserGenerator_Symbol */ public $errsym; /** * Name of the generated parser * @var string */ public $name; /** * Unused relic from the C version * * Type of terminal symbols in the parser stack * @var string */ public $tokentype; /** * Unused relic from the C version * * The default type of non-terminal symbols * @var string */ public $vartype; /** * Name of the start symbol for the grammar * @var string */ public $start; /** * Size of the parser stack * * This is 100 by default, but is set with the %stack_size directive * @var int */ public $stacksize; /** * Code to put at the start of the parser file * * This is set by the %include directive * @var string */ public $include_code; /** * Line number for start of include code * @var int */ public $includeln; /** * Code to put in the parser class * * This is set by the %include_class directive * @var string */ public $include_classcode; /** * Line number for start of include code * @var int */ public $include_classln; /** * any extends/implements code * * This is set by the %declare_class directive * @var string */ /** * Line number for class declaration code * @var int */ public $declare_classcode; /** * Line number for start of class declaration code * @var int */ public $declare_classln; /** * Code to execute when a syntax error is seen * * This is set by the %syntax_error directive * @var string */ public $error; /** * Line number for start of error code * @var int */ public $errorln; /** * Code to execute on a stack overflow * * This is set by the %stack_overflow directive */ public $overflow; /** * Line number for start of overflow code * @var int */ public $overflowln; /** * Code to execute on parser failure * * This is set by the %parse_failure directive * @var string */ public $failure; /** * Line number for start of failure code * @var int */ public $failureln; /** * Code to execute when the parser acccepts (completes parsing) * * This is set by the %parse_accept directive * @var string */ public $accept; /** * Line number for the start of accept code * @var int */ public $acceptln; /** * Code appended to the generated file * * This is set by the %code directive * @var string */ public $extracode; /** * Line number for the start of the extra code * @var int */ public $extracodeln; /** * Code to execute to destroy token data * * This is set by the %token_destructor directive * @var string */ public $tokendest; /** * Line number for token destroyer code * @var int */ public $tokendestln; /** * Code for the default non-terminal destructor * * This is set by the %default_destructor directive * @var string */ public $vardest; /** * Line number for default non-terminal destructor code * @var int */ public $vardestln; /** * Name of the input file * @var string */ public $filename; /** * Name of the input file without its extension * @var string */ public $filenosuffix; /** * Name of the current output file * @var string */ public $outname; /** * A prefix added to token names * @var string */ public $tokenprefix; /** * Number of parsing conflicts * @var int */ public $nconflict; /** * Size of the parse tables * @var int */ public $tablesize; /** * Public only basis configurations */ public $basisflag; /** * True if any %fallback is seen in the grammer * @var boolean */ public $has_fallback; /** * Name of the program * @var string */ public $argv0; /* Find a precedence symbol of every rule in the grammar. * * Those rules which have a precedence symbol coded in the input * grammar using the "[symbol]" construct will already have the * $rp->precsym field filled. Other rules take as their precedence * symbol the first RHS symbol with a defined precedence. If there * are not RHS symbols with a defined precedence, the precedence * symbol field is left blank. */ function FindRulePrecedences() { for ($rp = $this->rule; $rp; $rp = $rp->next) { if ($rp->precsym === 0) { for ($i = 0; $i < $rp->nrhs && $rp->precsym === 0; $i++) { $sp = $rp->rhs[$i]; if ($sp->type == PHP_ParserGenerator_Symbol::MULTITERMINAL) { for ($j = 0; $j < $sp->nsubsym; $j++) { if ($sp->subsym[$j]->prec >= 0) { $rp->precsym = $sp->subsym[$j]; break; } } } elseif ($sp->prec >= 0) { $rp->precsym = $rp->rhs[$i]; } } } } } /** * Find all nonterminals which will generate the empty string. * Then go back and compute the first sets of every nonterminal. * The first set is the set of all terminal symbols which can begin * a string generated by that nonterminal. */ function FindFirstSets() { for ($i = 0; $i < $this->nsymbol; $i++) { $this->symbols[$i]->lambda = false; } for($i = $this->nterminal; $i < $this->nsymbol; $i++) { $this->symbols[$i]->firstset = array(); } /* First compute all lambdas */ do{ $progress = 0; for ($rp = $this->rule; $rp; $rp = $rp->next) { if ($rp->lhs->lambda) { continue; } for ($i = 0; $i < $rp->nrhs; $i++) { $sp = $rp->rhs[$i]; if ($sp->type != PHP_ParserGenerator_Symbol::TERMINAL || $sp->lambda === false) { break; } } if ($i === $rp->nrhs) { $rp->lhs->lambda = true; $progress = 1; } } } while ($progress); /* Now compute all first sets */ do { $progress = 0; for ($rp = $this->rule; $rp; $rp = $rp->next) { $s1 = $rp->lhs; for ($i = 0; $i < $rp->nrhs; $i++) { $s2 = $rp->rhs[$i]; if ($s2->type == PHP_ParserGenerator_Symbol::TERMINAL) { //progress += SetAdd(s1->firstset,s2->index); $progress += isset($s1->firstset[$s2->index]) ? 0 : 1; $s1->firstset[$s2->index] = 1; break; } elseif ($s2->type == PHP_ParserGenerator_Symbol::MULTITERMINAL) { for ($j = 0; $j < $s2->nsubsym; $j++) { //progress += SetAdd(s1->firstset,s2->subsym[j]->index); $progress += isset($s1->firstset[$s2->subsym[$j]->index]) ? 0 : 1; $s1->firstset[$s2->subsym[$j]->index] = 1; } break; } elseif ($s1 === $s2) { if ($s1->lambda === false) { break; } } else { //progress += SetUnion(s1->firstset,s2->firstset); $test = array_diff_key($s2->firstset, $s1->firstset); if (count($test)) { $progress++; $s1->firstset += $test; } if ($s2->lambda === false) { break; } } } } } while ($progress); } /** * Compute all LR(0) states for the grammar. Links * are added to between some states so that the LR(1) follow sets * can be computed later. */ function FindStates() { PHP_ParserGenerator_Config::Configlist_init(); /* Find the start symbol */ if ($this->start) { $sp = PHP_ParserGenerator_Symbol::Symbol_find($this->start); if ($sp == 0) { PHP_ParserGenerator::ErrorMsg($this->filename, 0, "The specified start symbol \"%s\" is not " . "in a nonterminal of the grammar. \"%s\" will be used as the start " . "symbol instead.", $this->start, $this->rule->lhs->name); $this->errorcnt++; $sp = $this->rule->lhs; } } else { $sp = $this->rule->lhs; } /* Make sure the start symbol doesn't occur on the right-hand side of ** any rule. Report an error if it does. (YACC would generate a new ** start symbol in this case.) */ for ($rp = $this->rule; $rp; $rp = $rp->next) { for ($i = 0; $i < $rp->nrhs; $i++) { if ($rp->rhs[$i]->type == PHP_ParserGenerator_Symbol::MULTITERMINAL) { foreach ($rp->rhs[$i]->subsym as $subsp) { if ($subsp === $sp) { PHP_ParserGenerator::ErrorMsg($this->filename, 0, "The start symbol \"%s\" occurs on the " . "right-hand side of a rule. This will result in a parser which " . "does not work properly.", $sp->name); $this->errorcnt++; } } } elseif ($rp->rhs[$i] === $sp) { PHP_ParserGenerator::ErrorMsg($this->filename, 0, "The start symbol \"%s\" occurs on the " . "right-hand side of a rule. This will result in a parser which " . "does not work properly.", $sp->name); $this->errorcnt++; } } } /* The basis configuration set for the first state ** is all rules which have the start symbol as their ** left-hand side */ for ($rp = $sp->rule; $rp; $rp = $rp->nextlhs) { $newcfp = PHP_ParserGenerator_Config::Configlist_addbasis($rp, 0); $newcfp->fws[0] = 1; } /* Compute the first state. All other states will be ** computed automatically during the computation of the first one. ** The returned pointer to the first state is not used. */ $newstp = array(); $newstp = $this->getstate(); if (is_array($newstp)) { $this->buildshifts($newstp[0]); /* Recursively compute successor states */ } } /** * @return PHP_ParserGenerator_State */ private function getstate() { /* Extract the sorted basis of the new state. The basis was constructed ** by prior calls to "Configlist_addbasis()". */ PHP_ParserGenerator_Config::Configlist_sortbasis(); $bp = PHP_ParserGenerator_Config::Configlist_basis(); /* Get a state with the same basis */ $stp = PHP_ParserGenerator_State::State_find($bp); if ($stp) { /* A state with the same basis already exists! Copy all the follow-set ** propagation links from the state under construction into the ** preexisting state, then return a pointer to the preexisting state */ for($x = $bp, $y = $stp->bp; $x && $y; $x = $x->bp, $y = $y->bp) { PHP_ParserGenerator_PropagationLink::Plink_copy($y->bplp, $x->bplp); PHP_ParserGenerator_PropagationLink::Plink_delete($x->fplp); $x->fplp = $x->bplp = 0; } $cfp = PHP_ParserGenerator_Config::Configlist_return(); PHP_ParserGenerator_Config::Configlist_eat($cfp); } else { /* This really is a new state. Construct all the details */ PHP_ParserGenerator_Config::Configlist_closure($this); /* Compute the configuration closure */ PHP_ParserGenerator_Config::Configlist_sort(); /* Sort the configuration closure */ $cfp = PHP_ParserGenerator_Config::Configlist_return(); /* Get a pointer to the config list */ $stp = new PHP_ParserGenerator_State; /* A new state structure */ $stp->bp = $bp; /* Remember the configuration basis */ $stp->cfp = $cfp; /* Remember the configuration closure */ $stp->statenum = $this->nstate++; /* Every state gets a sequence number */ $stp->ap = 0; /* No actions, yet. */ PHP_ParserGenerator_State::State_insert($stp, $stp->bp); /* Add to the state table */ // this can't work, recursion is too deep, move it into FindStates() //$this->buildshifts($stp); /* Recursively compute successor states */ return array($stp); } return $stp; } /** * Construct all successor states to the given state. A "successor" * state is any state which can be reached by a shift action. * @param PHP_ParserGenerator_Data * @param PHP_ParserGenerator_State The state from which successors are computed */ private function buildshifts(PHP_ParserGenerator_State $stp) { // struct config *cfp; /* For looping thru the config closure of "stp" */ // struct config *bcfp; /* For the inner loop on config closure of "stp" */ // struct config *new; /* */ // struct symbol *sp; /* Symbol following the dot in configuration "cfp" */ // struct symbol *bsp; /* Symbol following the dot in configuration "bcfp" */ // struct state *newstp; /* A pointer to a successor state */ /* Each configuration becomes complete after it contibutes to a successor ** state. Initially, all configurations are incomplete */ $cfp = $stp->cfp; for ($cfp = $stp->cfp; $cfp; $cfp = $cfp->next) { $cfp->status = PHP_ParserGenerator_Config::INCOMPLETE; } /* Loop through all configurations of the state "stp" */ for ($cfp = $stp->cfp; $cfp; $cfp = $cfp->next) { if ($cfp->status == PHP_ParserGenerator_Config::COMPLETE) { continue; /* Already used by inner loop */ } if ($cfp->dot >= $cfp->rp->nrhs) { continue; /* Can't shift this config */ } PHP_ParserGenerator_Config::Configlist_reset(); /* Reset the new config set */ $sp = $cfp->rp->rhs[$cfp->dot]; /* Symbol after the dot */ /* For every configuration in the state "stp" which has the symbol "sp" ** following its dot, add the same configuration to the basis set under ** construction but with the dot shifted one symbol to the right. */ $bcfp = $cfp; for ($bcfp = $cfp; $bcfp; $bcfp = $bcfp->next) { if ($bcfp->status == PHP_ParserGenerator_Config::COMPLETE) { continue; /* Already used */ } if ($bcfp->dot >= $bcfp->rp->nrhs) { continue; /* Can't shift this one */ } $bsp = $bcfp->rp->rhs[$bcfp->dot]; /* Get symbol after dot */ if (!PHP_ParserGenerator_Symbol::same_symbol($bsp, $sp)) { continue; /* Must be same as for "cfp" */ } $bcfp->status = PHP_ParserGenerator_Config::COMPLETE; /* Mark this config as used */ $new = PHP_ParserGenerator_Config::Configlist_addbasis($bcfp->rp, $bcfp->dot + 1); PHP_ParserGenerator_PropagationLink::Plink_add($new->bplp, $bcfp); } /* Get a pointer to the state described by the basis configuration set ** constructed in the preceding loop */ $newstp = $this->getstate(); if (is_array($newstp)) { $this->buildshifts($newstp[0]); /* Recursively compute successor states */ $newstp = $newstp[0]; } /* The state "newstp" is reached from the state "stp" by a shift action ** on the symbol "sp" */ if ($sp->type == PHP_ParserGenerator_Symbol::MULTITERMINAL) { for($i = 0; $i < $sp->nsubsym; $i++) { PHP_ParserGenerator_Action::Action_add($stp->ap, PHP_ParserGenerator_Action::SHIFT, $sp->subsym[$i], $newstp); } } else { PHP_ParserGenerator_Action::Action_add($stp->ap, PHP_ParserGenerator_Action::SHIFT, $sp, $newstp); } } } /** * Construct the propagation links */ function FindLinks() { /* Housekeeping detail: ** Add to every propagate link a pointer back to the state to ** which the link is attached. */ foreach ($this->sorted as $info) { $info->key->stp = $info->data; } /* Convert all backlinks into forward links. Only the forward ** links are used in the follow-set computation. */ for ($i = 0; $i < $this->nstate; $i++) { $stp = $this->sorted[$i]; for ($cfp = $stp->data->cfp; $cfp; $cfp = $cfp->next) { for ($plp = $cfp->bplp; $plp; $plp = $plp->next) { $other = $plp->cfp; PHP_ParserGenerator_PropagationLink::Plink_add($other->fplp, $cfp); } } } } /** * Compute the reduce actions, and resolve conflicts. */ function FindActions() { /* Add all of the reduce actions ** A reduce action is added for each element of the followset of ** a configuration which has its dot at the extreme right. */ for ($i = 0; $i < $this->nstate; $i++) { /* Loop over all states */ $stp = $this->sorted[$i]->data; for ($cfp = $stp->cfp; $cfp; $cfp = $cfp->next) { /* Loop over all configurations */ if ($cfp->rp->nrhs == $cfp->dot) { /* Is dot at extreme right? */ for ($j = 0; $j < $this->nterminal; $j++) { if (isset($cfp->fws[$j])) { /* Add a reduce action to the state "stp" which will reduce by the ** rule "cfp->rp" if the lookahead symbol is "$this->symbols[j]" */ PHP_ParserGenerator_Action::Action_add($stp->ap, PHP_ParserGenerator_Action::REDUCE, $this->symbols[$j], $cfp->rp); } } } } } /* Add the accepting token */ if ($this->start instanceof PHP_ParserGenerator_Symbol) { $sp = PHP_ParserGenerator_Symbol::Symbol_find($this->start); if ($sp === 0) { $sp = $this->rule->lhs; } } else { $sp = $this->rule->lhs; } /* Add to the first state (which is always the starting state of the ** finite state machine) an action to ACCEPT if the lookahead is the ** start nonterminal. */ PHP_ParserGenerator_Action::Action_add($this->sorted[0]->data->ap, PHP_ParserGenerator_Action::ACCEPT, $sp, 0); /* Resolve conflicts */ for ($i = 0; $i < $this->nstate; $i++) { // struct action *ap, *nap; // struct state *stp; $stp = $this->sorted[$i]->data; if (!$stp->ap) { throw new Exception('state has no actions associated'); } echo 'processing state ' . $stp->statenum . " actions:\n"; for ($ap = $stp->ap; $ap !== 0 && $ap->next !== 0; $ap = $ap->next) { echo ' Action '; $ap->display(true); } $stp->ap = PHP_ParserGenerator_Action::Action_sort($stp->ap); for ($ap = $stp->ap; $ap !== 0 && $ap->next !== 0; $ap = $ap->next) { for ($nap = $ap->next; $nap !== 0 && $nap->sp === $ap->sp ; $nap = $nap->next) { /* The two actions "ap" and "nap" have the same lookahead. ** Figure out which one should be used */ $this->nconflict += $this->resolve_conflict($ap, $nap, $this->errsym); } } } /* Report an error for each rule that can never be reduced. */ for ($rp = $this->rule; $rp; $rp = $rp->next) { $rp->canReduce = false; } for ($i = 0; $i < $this->nstate; $i++) { for ($ap = $this->sorted[$i]->data->ap; $ap !== 0; $ap = $ap->next) { if ($ap->type == PHP_ParserGenerator_Action::REDUCE) { $ap->x->canReduce = true; } } } for ($rp = $this->rule; $rp !== 0; $rp = $rp->next) { if ($rp->canReduce) { continue; } PHP_ParserGenerator::ErrorMsg($this->filename, $rp->ruleline, "This rule can not be reduced (is not connected to the start symbol).\n"); $this->errorcnt++; } } /** Resolve a conflict between the two given actions. If the * conflict can't be resolve, return non-zero. * * NO LONGER TRUE: * To resolve a conflict, first look to see if either action * is on an error rule. In that case, take the action which * is not associated with the error rule. If neither or both * actions are associated with an error rule, then try to * use precedence to resolve the conflict. * * If either action is a SHIFT, then it must be apx. This * function won't work if apx->type==REDUCE and apy->type==SHIFT. * @param PHP_ParserGenerator_Action * @param PHP_ParserGenerator_Action * @param PHP_ParserGenerator_Symbol|null The error symbol (if defined. NULL otherwise) */ function resolve_conflict($apx, $apy, $errsym) { $errcnt = 0; if ($apx->sp !== $apy->sp) { throw new Exception('no conflict but resolve_conflict called'); } if ($apx->type == PHP_ParserGenerator_Action::SHIFT && $apy->type == PHP_ParserGenerator_Action::REDUCE) { $spx = $apx->sp; $spy = $apy->x->precsym; if ($spy === 0 || $spx->prec < 0 || $spy->prec < 0) { /* Not enough precedence information. */ $apy->type = PHP_ParserGenerator_Action::CONFLICT; $errcnt++; } elseif ($spx->prec > $spy->prec) { /* Lower precedence wins */ $apy->type = PHP_ParserGenerator_Action::RD_RESOLVED; } elseif ($spx->prec < $spy->prec) { $apx->type = PHP_ParserGenerator_Action::SH_RESOLVED; } elseif ($spx->prec === $spy->prec && $spx->assoc == PHP_ParserGenerator_Symbol::RIGHT) { /* Use operator */ $apy->type = PHP_ParserGenerator_Action::RD_RESOLVED; /* associativity */ } elseif ($spx->prec === $spy->prec && $spx->assoc == PHP_ParserGenerator_Symbol::LEFT) { /* to break tie */ $apx->type = PHP_ParserGenerator_Action::SH_RESOLVED; } else { if ($spx->prec !== $spy->prec || $spx->assoc !== PHP_ParserGenerator_Symbol::NONE) { throw new Exception('$spx->prec !== $spy->prec || $spx->assoc !== PHP_ParserGenerator_Symbol::NONE'); } $apy->type = PHP_ParserGenerator_Action::CONFLICT; $errcnt++; } } elseif ($apx->type == PHP_ParserGenerator_Action::REDUCE && $apy->type == PHP_ParserGenerator_Action::REDUCE) { $spx = $apx->x->precsym; $spy = $apy->x->precsym; if ($spx === 0 || $spy === 0 || $spx->prec < 0 || $spy->prec < 0 || $spx->prec === $spy->prec) { $apy->type = PHP_ParserGenerator_Action::CONFLICT; $errcnt++; } elseif ($spx->prec > $spy->prec) { $apy->type = PHP_ParserGenerator_Action::RD_RESOLVED; } elseif ($spx->prec < $spy->prec) { $apx->type = PHP_ParserGenerator_Action::RD_RESOLVED; } } else { if ($apx->type!== PHP_ParserGenerator_Action::SH_RESOLVED && $apx->type!== PHP_ParserGenerator_Action::RD_RESOLVED && $apx->type!== PHP_ParserGenerator_Action::CONFLICT && $apy->type!== PHP_ParserGenerator_Action::SH_RESOLVED && $apy->type!== PHP_ParserGenerator_Action::RD_RESOLVED && $apy->type!== PHP_ParserGenerator_Action::CONFLICT) { throw new Exception('$apx->type!== PHP_ParserGenerator_Action::SH_RESOLVED && $apx->type!== PHP_ParserGenerator_Action::RD_RESOLVED && $apx->type!== PHP_ParserGenerator_Action::CONFLICT && $apy->type!== PHP_ParserGenerator_Action::SH_RESOLVED && $apy->type!== PHP_ParserGenerator_Action::RD_RESOLVED && $apy->type!== PHP_ParserGenerator_Action::CONFLICT'); } /* The REDUCE/SHIFT case cannot happen because SHIFTs come before ** REDUCEs on the list. If we reach this point it must be because ** the parser conflict had already been resolved. */ } return $errcnt; } /** * Reduce the size of the action tables, if possible, by making use * of defaults. * * In this version, we take the most frequent REDUCE action and make * it the default. */ function CompressTables() { for ($i = 0; $i < $this->nstate; $i++) { $stp = $this->sorted[$i]->data; $nbest = 0; $rbest = 0; for ($ap = $stp->ap; $ap; $ap = $ap->next) { if ($ap->type != PHP_ParserGenerator_Action::REDUCE) { continue; } $rp = $ap->x; if ($rp === $rbest) { continue; } $n = 1; for ($ap2 = $ap->next; $ap2; $ap2 = $ap2->next) { if ($ap2->type != PHP_ParserGenerator_Action::REDUCE) { continue; } $rp2 = $ap2->x; if ($rp2 === $rbest) { continue; } if ($rp2 === $rp) { $n++; } } if ($n > $nbest) { $nbest = $n; $rbest = $rp; } } /* Do not make a default if the number of rules to default ** is not at least 1 */ if ($nbest < 1) { continue; } /* Combine matching REDUCE actions into a single default */ for ($ap = $stp->ap; $ap; $ap = $ap->next) { if ($ap->type == PHP_ParserGenerator_Action::REDUCE && $ap->x === $rbest) { break; } } if ($ap === 0) { throw new Exception('$ap is not an object'); } $ap->sp = PHP_ParserGenerator_Symbol::Symbol_new("{default}"); for ($ap = $ap->next; $ap; $ap = $ap->next) { if ($ap->type == PHP_ParserGenerator_Action::REDUCE && $ap->x === $rbest) { $ap->type = PHP_ParserGenerator_Action::NOT_USED; } } $stp->ap = PHP_ParserGenerator_Action::Action_sort($stp->ap); } } /** * Renumber and resort states so that states with fewer choices * occur at the end. Except, keep state 0 as the first state. */ function ResortStates() { for ($i = 0; $i < $this->nstate; $i++) { $stp = $this->sorted[$i]->data; $stp->nTknAct = $stp->nNtAct = 0; $stp->iDflt = $this->nstate + $this->nrule; $stp->iTknOfst = PHP_ParserGenerator_Data::NO_OFFSET; $stp->iNtOfst = PHP_ParserGenerator_Data::NO_OFFSET; for ($ap = $stp->ap; $ap; $ap = $ap->next) { if ($this->compute_action($ap) >= 0) { if ($ap->sp->index < $this->nterminal) { $stp->nTknAct++; } elseif ($ap->sp->index < $this->nsymbol) { $stp->nNtAct++; } else { $stp->iDflt = $this->compute_action($ap); } } } $this->sorted[$i] = $stp; } $save = $this->sorted[0]; unset($this->sorted[0]); usort($this->sorted, array('PHP_ParserGenerator_State', 'stateResortCompare')); array_unshift($this->sorted, $save); for($i = 0; $i < $this->nstate; $i++) { $this->sorted[$i]->statenum = $i; } } /** * Given an action, compute the integer value for that action * which is to be put in the action table of the generated machine. * Return negative if no action should be generated. * @param PHP_ParserGenerator_Action */ function compute_action($ap) { switch ($ap->type) { case PHP_ParserGenerator_Action::SHIFT: $act = $ap->x->statenum; break; case PHP_ParserGenerator_Action::REDUCE: $act = $ap->x->index + $this->nstate; break; case PHP_ParserGenerator_Action::ERROR: $act = $this->nstate + $this->nrule; break; case PHP_ParserGenerator_Action::ACCEPT: $act = $this->nstate + $this->nrule + 1; break; default: $act = -1; break; } return $act; } /** * Generate the "Parse.out" log file */ function ReportOutput() { $fp = fopen($this->filenosuffix . ".out", "wb"); if (!$fp) { return; } for ($i = 0; $i < $this->nstate; $i++) { $stp = $this->sorted[$i]; fprintf($fp, "State %d:\n", $stp->statenum); if ($this->basisflag) { $cfp = $stp->bp; } else { $cfp = $stp->cfp; } while ($cfp) { if ($cfp->dot == $cfp->rp->nrhs) { $buf = sprintf('(%d)', $cfp->rp->index); fprintf($fp, ' %5s ', $buf); } else { fwrite($fp,' '); } $cfp->ConfigPrint($fp); fwrite($fp, "\n"); if (0) { //SetPrint(fp,cfp->fws,$this); //PlinkPrint(fp,cfp->fplp,"To "); //PlinkPrint(fp,cfp->bplp,"From"); } if ($this->basisflag) { $cfp = $cfp->bp; } else { $cfp = $cfp->next; } } fwrite($fp, "\n"); for ($ap = $stp->ap; $ap; $ap = $ap->next) { if ($ap->PrintAction($fp, 30)) { fprintf($fp,"\n"); } } fwrite($fp,"\n"); } fclose($fp); } /** * The next function finds the template file and opens it, returning * a pointer to the opened file. * @return resource */ private function tplt_open() { $templatename = dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . "Lempar.php"; $buf = $this->filenosuffix . '.lt'; if (file_exists($buf) && is_readable($buf)) { $tpltname = $buf; } elseif (file_exists($templatename) && is_readable($templatename)) { $tpltname = $templatename; } elseif ($fp = @fopen($templatename, 'rb', true)) { return $fp; } if (!isset($tpltname)) { echo "Can't find the parser driver template file \"%s\".\n", $templatename; $this->errorcnt++; return 0; } $in = @fopen($tpltname,"rb"); if (!$in) { printf("Can't open the template file \"%s\".\n", $tpltname); $this->errorcnt++; return 0; } return $in; } #define LINESIZE 1000 /**#@+ * The next cluster of routines are for reading the template file * and writing the results to the generated parser */ /** * The first function transfers data from "in" to "out" until * a line is seen which begins with "%%". The line number is * tracked. * * if name!=0, then any word that begin with "Parse" is changed to * begin with *name instead. */ private function tplt_xfer($name, $in, $out, &$lineno) { while (($line = fgets($in, 1024)) && ($line[0] != '%' || $line[1] != '%')) { $lineno++; $iStart = 0; if ($name) { for ($i = 0; $i < strlen($line); $i++) { if ($line[$i] == 'P' && substr($line, $i, 5) == "Parse" && ($i === 0 || preg_match('/[^a-zA-Z]/', $line[$i - 1]))) { if ($i > $iStart) { fwrite($out, substr($line, $iStart, $i - $iStart)); } fwrite($out, $name); $i += 4; $iStart = $i + 1; } } } fwrite($out, substr($line, $iStart)); } } /** * Print a #line directive line to the output file. */ private function tplt_linedir($out, $lineno, $filename) { fwrite($out, '#line ' . $lineno . ' "' . $filename . "\"\n"); } /** * Print a string to the file and keep the linenumber up to date */ private function tplt_print($out, $str, $strln, &$lineno) { if ($str == '') { return; } $this->tplt_linedir($out, $strln, $this->filename); $lineno++; fwrite($out, $str); $lineno += count(explode("\n", $str)) - 1; $this->tplt_linedir($out, $lineno + 2, $this->outname); $lineno += 2; } /**#@-*/ /** * Compute all followsets. * * A followset is the set of all symbols which can come immediately * after a configuration. */ function FindFollowSets() { for ($i = 0; $i < $this->nstate; $i++) { for ($cfp = $this->sorted[$i]->data->cfp; $cfp; $cfp = $cfp->next) { $cfp->status = PHP_ParserGenerator_Config::INCOMPLETE; } } do { $progress = 0; for ($i = 0; $i < $this->nstate; $i++) { for ($cfp = $this->sorted[$i]->data->cfp; $cfp; $cfp = $cfp->next) { if ($cfp->status == PHP_ParserGenerator_Config::COMPLETE) { continue; } for ($plp = $cfp->fplp; $plp; $plp = $plp->next) { $a = array_diff_key($cfp->fws, $plp->cfp->fws); if (count($a)) { $plp->cfp->fws += $a; $plp->cfp->status = PHP_ParserGenerator_Config::INCOMPLETE; $progress = 1; } } $cfp->status = PHP_ParserGenerator_Config::COMPLETE; } } } while ($progress); } /** * Generate C source code for the parser * @param int Output in makeheaders format if true */ function ReportTable($mhflag) { // FILE *out, *in; // char line[LINESIZE]; // int lineno; // struct state *stp; // struct action *ap; // struct rule *rp; // struct acttab *pActtab; // int i, j, n; // char *name; // int mnTknOfst, mxTknOfst; // int mnNtOfst, mxNtOfst; // struct axset *ax; $in = $this->tplt_open(); if (!$in) { return; } $out = fopen($this->filenosuffix . ".php", "wb"); if (!$out) { fclose($in); return; } $this->outname = $this->filenosuffix . ".php"; $lineno = 1; $this->tplt_xfer($this->name, $in, $out, $lineno); /* Generate the include code, if any */ $this->tplt_print($out, $this->include_code, $this->includeln, $lineno); $this->tplt_xfer($this->name, $in, $out, $lineno); /* Generate the class declaration code */ $this->tplt_print($out, $this->declare_classcode, $this->declare_classln, $lineno); $this->tplt_xfer($this->name, $in, $out, $lineno); /* Generate the internal parser class include code, if any */ $this->tplt_print($out, $this->include_classcode, $this->include_classln, $lineno); $this->tplt_xfer($this->name, $in, $out, $lineno); /* Generate #defines for all tokens */ //if ($mhflag) { //fprintf($out, "#if INTERFACE\n"); $lineno++; if ($this->tokenprefix) { $prefix = $this->tokenprefix; } else { $prefix = ''; } for ($i = 1; $i < $this->nterminal; $i++) { fprintf($out, " const %s%-30s = %2d;\n", $prefix, $this->symbols[$i]->name, $i); $lineno++; } //fwrite($out, "#endif\n"); $lineno++; //} fwrite($out, " const YY_NO_ACTION = " . ($this->nstate + $this->nrule + 2) . ";\n"); $lineno++; fwrite($out, " const YY_ACCEPT_ACTION = " . ($this->nstate + $this->nrule + 1) . ";\n"); $lineno++; fwrite($out, " const YY_ERROR_ACTION = " . ($this->nstate + $this->nrule) . ";\n"); $lineno++; $this->tplt_xfer($this->name, $in, $out, $lineno); /* Generate the action table and its associates: ** ** yy_action[] A single table containing all actions. ** yy_lookahead[] A table containing the lookahead for each entry in ** yy_action. Used to detect hash collisions. ** yy_shift_ofst[] For each state, the offset into yy_action for ** shifting terminals. ** yy_reduce_ofst[] For each state, the offset into yy_action for ** shifting non-terminals after a reduce. ** yy_default[] Default action for each state. */ /* Compute the actions on all states and count them up */ $ax = array(); for ($i = 0; $i < $this->nstate; $i++) { $stp = $this->sorted[$i]; $ax[$i * 2] = array(); $ax[$i * 2]['stp'] = $stp; $ax[$i * 2]['isTkn'] = 1; $ax[$i * 2]['nAction'] = $stp->nTknAct; $ax[$i * 2 + 1] = array(); $ax[$i * 2 + 1]['stp'] = $stp; $ax[$i * 2 + 1]['isTkn'] = 0; $ax[$i * 2 + 1]['nAction'] = $stp->nNtAct; } $mxTknOfst = $mnTknOfst = 0; $mxNtOfst = $mnNtOfst = 0; /* Compute the action table. In order to try to keep the size of the ** action table to a minimum, the heuristic of placing the largest action ** sets first is used. */ usort($ax, array('PHP_ParserGenerator_Data', 'axset_compare')); $pActtab = new PHP_ParserGenerator_ActionTable; for ($i = 0; $i < $this->nstate * 2 && $ax[$i]['nAction'] > 0; $i++) { $stp = $ax[$i]['stp']; if ($ax[$i]['isTkn']) { for ($ap = $stp->ap; $ap; $ap = $ap->next) { if ($ap->sp->index >= $this->nterminal) { continue; } $action = $this->compute_action($ap); if ($action < 0) { continue; } $pActtab->acttab_action($ap->sp->index, $action); } $stp->iTknOfst = $pActtab->acttab_insert(); if ($stp->iTknOfst < $mnTknOfst) { $mnTknOfst = $stp->iTknOfst; } if ($stp->iTknOfst > $mxTknOfst) { $mxTknOfst = $stp->iTknOfst; } } else { for ($ap = $stp->ap; $ap; $ap = $ap->next) { if ($ap->sp->index < $this->nterminal) { continue; } if ($ap->sp->index == $this->nsymbol) { continue; } $action = $this->compute_action($ap); if ($action < 0) { continue; } $pActtab->acttab_action($ap->sp->index, $action); } $stp->iNtOfst = $pActtab->acttab_insert(); if ($stp->iNtOfst < $mnNtOfst) { $mnNtOfst = $stp->iNtOfst; } if ($stp->iNtOfst > $mxNtOfst) { $mxNtOfst = $stp->iNtOfst; } } } /* Output the yy_action table */ fprintf($out, " const YY_SZ_ACTTAB = %d;\n", $pActtab->nAction); $lineno++; fwrite($out, "static public \$yy_action = array(\n"); $lineno++; $n = $pActtab->nAction; for($i = $j = 0; $i < $n; $i++) { $action = $pActtab->aAction[$i]['action']; if ($action < 0) { $action = $this->nsymbol + $this->nrule + 2; } // change next line if ($j === 0) { fprintf($out, " /* %5d */ ", $i); } fprintf($out, " %4d,", $action); if ($j == 9 || $i == $n - 1) { fwrite($out, "\n"); $lineno++; $j = 0; } else { $j++; } } fwrite($out, " );\n"); $lineno++; /* Output the yy_lookahead table */ fwrite($out, " static public \$yy_lookahead = array(\n"); $lineno++; for ($i = $j = 0; $i < $n; $i++) { $la = $pActtab->aAction[$i]['lookahead']; if ($la < 0) { $la = $this->nsymbol; } // change next line if ($j === 0) { fprintf($out, " /* %5d */ ", $i); } fprintf($out, " %4d,", $la); if ($j == 9 || $i == $n - 1) { fwrite($out, "\n"); $lineno++; $j = 0; } else { $j++; } } fwrite($out, ");\n"); $lineno++; /* Output the yy_shift_ofst[] table */ fprintf($out, " const YY_SHIFT_USE_DFLT = %d;\n", $mnTknOfst - 1); $lineno++; $n = $this->nstate; while ($n > 0 && $this->sorted[$n - 1]->iTknOfst == PHP_ParserGenerator_Data::NO_OFFSET) { $n--; } fprintf($out, " const YY_SHIFT_MAX = %d;\n", $n - 1); $lineno++; fwrite($out, " static public \$yy_shift_ofst = array(\n"); $lineno++; for ($i = $j = 0; $i < $n; $i++) { $stp = $this->sorted[$i]; $ofst = $stp->iTknOfst; if ($ofst === PHP_ParserGenerator_Data::NO_OFFSET) { $ofst = $mnTknOfst - 1; } // change next line if ($j === 0) { fprintf($out, " /* %5d */ ", $i); } fprintf($out, " %4d,", $ofst); if ($j == 9 || $i == $n - 1) { fwrite($out, "\n"); $lineno++; $j = 0; } else { $j++; } } fwrite($out, ");\n"); $lineno++; /* Output the yy_reduce_ofst[] table */ fprintf($out, " const YY_REDUCE_USE_DFLT = %d;\n", $mnNtOfst - 1); $lineno++; $n = $this->nstate; while ($n > 0 && $this->sorted[$n - 1]->iNtOfst == PHP_ParserGenerator_Data::NO_OFFSET) { $n--; } fprintf($out, " const YY_REDUCE_MAX = %d;\n", $n - 1); $lineno++; fwrite($out, " static public \$yy_reduce_ofst = array(\n"); $lineno++; for ($i = $j = 0; $i < $n; $i++) { $stp = $this->sorted[$i]; $ofst = $stp->iNtOfst; if ($ofst == PHP_ParserGenerator_Data::NO_OFFSET) { $ofst = $mnNtOfst - 1; } // change next line if ($j == 0) { fprintf($out, " /* %5d */ ", $i); } fprintf($out, " %4d,", $ofst); if ($j == 9 || $i == $n - 1) { fwrite($out, "\n"); $lineno++; $j = 0; } else { $j++; } } fwrite($out, ");\n"); $lineno++; /* Output the expected tokens table */ fwrite($out, " static public \$yyExpectedTokens = array(\n"); $lineno++; for ($i = 0; $i < $this->nstate; $i++) { $stp = $this->sorted[$i]; fwrite($out, " /* $i */ array("); for ($ap = $stp->ap; $ap; $ap = $ap->next) { if ($ap->sp->index < $this->nterminal) { if ($ap->type == PHP_ParserGenerator_Action::SHIFT || $ap->type == PHP_ParserGenerator_Action::REDUCE) { fwrite($out, $ap->sp->index . ', '); } } } fwrite($out, "),\n"); $lineno++; } fwrite($out, ");\n"); $lineno++; /* Output the default action table */ fwrite($out, " static public \$yy_default = array(\n"); $lineno++; $n = $this->nstate; for ($i = $j = 0; $i < $n; $i++) { $stp = $this->sorted[$i]; // change next line if ($j == 0) { fprintf($out, " /* %5d */ ", $i); } fprintf($out, " %4d,", $stp->iDflt); if ($j == 9 || $i == $n - 1) { fprintf($out, "\n"); $lineno++; $j = 0; } else { $j++; } } fwrite($out, ");\n"); $lineno++; $this->tplt_xfer($this->name, $in, $out, $lineno); /* Generate the defines */ fprintf($out, " const YYNOCODE = %d;\n", $this->nsymbol + 1); $lineno++; if ($this->stacksize) { if($this->stacksize <= 0) { PHP_ParserGenerator::ErrorMsg($this->filename, 0, "Illegal stack size: [%s]. The stack size should be an integer constant.", $this->stacksize); $this->errorcnt++; $this->stacksize = "100"; } fprintf($out, " const YYSTACKDEPTH = %s;\n", $this->stacksize); $lineno++; } else { fwrite($out," const YYSTACKDEPTH = 100;\n"); $lineno++; } fprintf($out, " const YYNSTATE = %d;\n", $this->nstate); $lineno++; fprintf($out, " const YYNRULE = %d;\n", $this->nrule); $lineno++; fprintf($out, " const YYERRORSYMBOL = %d;\n", $this->errsym->index); $lineno++; fprintf($out, " const YYERRSYMDT = 'yy%d';\n", $this->errsym->dtnum); $lineno++; if ($this->has_fallback) { fwrite($out, " const YYFALLBACK = 1;\n"); } else { fwrite($out, " const YYFALLBACK = 0;\n"); } $lineno++; $this->tplt_xfer($this->name, $in, $out, $lineno); /* Generate the table of fallback tokens. */ if ($this->has_fallback) { for ($i = 0; $i < $this->nterminal; $i++) { $p = $this->symbols[$i]; if ($p->fallback === 0) { // change next line fprintf($out, " 0, /* %10s => nothing */\n", $p->name); } else { // change next line fprintf($out, " %3d, /* %10s => %s */\n", $p->fallback->index, $p->name, $p->fallback->name); } $lineno++; } } $this->tplt_xfer($this->name, $in, $out, $lineno); /* Generate a table containing the symbolic name of every symbol ($yyTokenName) */ for ($i = 0; $i < $this->nsymbol; $i++) { fprintf($out," %-15s", "'" . $this->symbols[$i]->name . "',"); if (($i & 3) == 3) { fwrite($out,"\n"); $lineno++; } } if (($i & 3) != 0) { fwrite($out, "\n"); $lineno++; } $this->tplt_xfer($this->name, $in, $out, $lineno); /* Generate a table containing a text string that describes every ** rule in the rule set of the grammer. This information is used ** when tracing REDUCE actions. */ for ($i = 0, $rp = $this->rule; $rp; $rp = $rp->next, $i++) { if ($rp->index !== $i) { throw new Exception('rp->index != i and should be'); } // change next line fprintf($out, " /* %3d */ \"%s ::=", $i, $rp->lhs->name); for ($j = 0; $j < $rp->nrhs; $j++) { $sp = $rp->rhs[$j]; fwrite($out,' ' . $sp->name); if ($sp->type == PHP_ParserGenerator_Symbol::MULTITERMINAL) { for($k = 1; $k < $sp->nsubsym; $k++) { fwrite($out, '|' . $sp->subsym[$k]->name); } } } fwrite($out, "\",\n"); $lineno++; } $this->tplt_xfer($this->name, $in, $out, $lineno); /* Generate code which executes every time a symbol is popped from ** the stack while processing errors or while destroying the parser. ** (In other words, generate the %destructor actions) */ if ($this->tokendest) { for ($i = 0; $i < $this->nsymbol; $i++) { $sp = $this->symbols[$i]; if ($sp === 0 || $sp->type != PHP_ParserGenerator_Symbol::TERMINAL) { continue; } fprintf($out, " case %d:\n", $sp->index); $lineno++; } for ($i = 0; $i < $this->nsymbol && $this->symbols[$i]->type != PHP_ParserGenerator_Symbol::TERMINAL; $i++); if ($i < $this->nsymbol) { $this->emit_destructor_code($out, $this->symbols[$i], $lineno); fprintf($out, " break;\n"); $lineno++; } } if ($this->vardest) { $dflt_sp = 0; for ($i = 0; $i < $this->nsymbol; $i++) { $sp = $this->symbols[$i]; if ($sp === 0 || $sp->type == PHP_ParserGenerator_Symbol::TERMINAL || $sp->index <= 0 || $sp->destructor != 0) { continue; } fprintf($out, " case %d:\n", $sp->index); $lineno++; $dflt_sp = $sp; } if ($dflt_sp != 0) { $this->emit_destructor_code($out, $dflt_sp, $lineno); fwrite($out, " break;\n"); $lineno++; } } for ($i = 0; $i < $this->nsymbol; $i++) { $sp = $this->symbols[$i]; if ($sp === 0 || $sp->type == PHP_ParserGenerator_Symbol::TERMINAL || $sp->destructor === 0) { continue; } fprintf($out, " case %d:\n", $sp->index); $lineno++; /* Combine duplicate destructors into a single case */ for ($j = $i + 1; $j < $this->nsymbol; $j++) { $sp2 = $this->symbols[$j]; if ($sp2 && $sp2->type != PHP_ParserGenerator_Symbol::TERMINAL && $sp2->destructor && $sp2->dtnum == $sp->dtnum && $sp->destructor == $sp2->destructor) { fprintf($out, " case %d:\n", $sp2->index); $lineno++; $sp2->destructor = 0; } } $this->emit_destructor_code($out, $this->symbols[$i], $lineno); fprintf($out, " break;\n"); $lineno++; } $this->tplt_xfer($this->name, $in, $out, $lineno); /* Generate code which executes whenever the parser stack overflows */ $this->tplt_print($out, $this->overflow, $this->overflowln, $lineno); $this->tplt_xfer($this->name, $in, $out, $lineno); /* Generate the table of rule information ** ** Note: This code depends on the fact that rules are number ** sequentually beginning with 0. */ for ($rp = $this->rule; $rp; $rp = $rp->next) { fprintf($out, " array( 'lhs' => %d, 'rhs' => %d ),\n", $rp->lhs->index, $rp->nrhs); $lineno++; } $this->tplt_xfer($this->name, $in, $out, $lineno); /* Generate code which executes during each REDUCE action */ for ($rp = $this->rule; $rp; $rp = $rp->next) { if ($rp->code) { $this->translate_code($rp); } } /* Generate the method map for each REDUCE action */ for ($rp = $this->rule; $rp; $rp = $rp->next) { if ($rp->code === 0) { continue; } fwrite($out, ' ' . $rp->index . ' => ' . $rp->index . ",\n"); $lineno++; for ($rp2 = $rp->next; $rp2; $rp2 = $rp2->next) { if ($rp2->code === $rp->code) { fwrite($out, ' ' . $rp2->index . ' => ' . $rp->index . ",\n"); $lineno++; $rp2->code = 0; } } } $this->tplt_xfer($this->name, $in, $out, $lineno); for ($rp = $this->rule; $rp; $rp = $rp->next) { if ($rp->code === 0) { continue; } $this->emit_code($out, $rp, $lineno); } $this->tplt_xfer($this->name, $in, $out, $lineno); /* Generate code which executes if a parse fails */ $this->tplt_print($out, $this->failure, $this->failureln, $lineno); $this->tplt_xfer($this->name, $in, $out, $lineno); /* Generate code which executes when a syntax error occurs */ $this->tplt_print($out, $this->error, $this->errorln, $lineno); $this->tplt_xfer($this->name, $in, $out, $lineno); /* Generate code which executes when the parser accepts its input */ $this->tplt_print($out, $this->accept, $this->acceptln, $lineno); $this->tplt_xfer($this->name, $in, $out, $lineno); /* Append any addition code the user desires */ $this->tplt_print($out, $this->extracode, $this->extracodeln, $lineno); fclose($in); fclose($out); } /** * Generate code which executes when the rule "rp" is reduced. Write * the code to "out". Make sure lineno stays up-to-date. */ function emit_code($out, PHP_ParserGenerator_Rule $rp, &$lineno) { $linecnt = 0; /* Generate code to do the reduce action */ if ($rp->code) { $this->tplt_linedir($out, $rp->line, $this->filename); fwrite($out, " function yy_r$rp->index(){" . $rp->code); $linecnt += count(explode("\n", $rp->code)) - 1; $lineno += 3 + $linecnt; fwrite($out, " }\n"); $this->tplt_linedir($out, $lineno, $this->outname); } /* End if( rp->code ) */ } /** * Append text to a dynamically allocated string. If zText is 0 then * reset the string to be empty again. Always return the complete text * of the string (which is overwritten with each call). * * n bytes of zText are stored. If n==0 then all of zText is stored. * * If n==-1, then the previous character is overwritten. * @param string * @param int */ function append_str($zText, $n) { static $z = ''; $zInt = ''; if ($zText === '') { $ret = $z; $z = ''; return $ret; } if ($n <= 0) { if ($n < 0) { if (!strlen($z)) { throw new Exception('z is zero-length'); } $z = substr($z, 0, strlen($z) - 1); if (!$z) { $z = ''; } } $n = strlen($zText); } $i = 0; $z .= substr($zText, 0, $n); return $z; } /** * zCode is a string that is the action associated with a rule. Expand * the symbols in this string so that the refer to elements of the parser * stack. */ function translate_code(PHP_ParserGenerator_Rule $rp) { $lhsused = 0; /* True if the LHS element has been used */ $used = array(); /* True for each RHS element which is used */ for($i = 0; $i < $rp->nrhs; $i++) { $used[$i] = 0; } $this->append_str('', 0); for ($i = 0; $i < strlen($rp->code); $i++) { $cp = $rp->code[$i]; if (preg_match('/[A-Za-z]/', $cp) && ($i === 0 || (!preg_match('/[A-Za-z0-9_]/', $rp->code[$i - 1])))) { //*xp = 0; // previous line is in essence a temporary substr, so // we will simulate it $test = substr($rp->code, $i); preg_match('/[A-Za-z0-9_]+/', $test, $matches); $tempcp = $matches[0]; $j = strlen($tempcp) + $i; if ($rp->lhsalias && $tempcp == $rp->lhsalias) { $this->append_str("\$this->_retvalue", 0); $cp = $rp->code[$j]; $i = $j; $lhsused = 1; } else { for ($ii = 0; $ii < $rp->nrhs; $ii++) { if ($rp->rhsalias[$ii] && $tempcp == $rp->rhsalias[$ii]) { if ($ii !== 0 && $rp->code[$ii - 1] == '@') { /* If the argument is of the form @X then substitute ** the token number of X, not the value of X */ $this->append_str("\$this->yystack[\$this->yyidx + " . ($ii - $rp->nrhs + 1) . "]->major", -1); } else { $sp = $rp->rhs[$ii]; if ($sp->type == PHP_ParserGenerator_Symbol::MULTITERMINAL) { $dtnum = $sp->subsym[0]->dtnum; } else { $dtnum = $sp->dtnum; } $this->append_str("\$this->yystack[\$this->yyidx + " . ($ii - $rp->nrhs + 1) . "]->minor", 0); } $cp = $rp->code[$j]; $i = $j; $used[$ii] = 1; break; } } } } $this->append_str($cp, 1); } /* End loop */ /* Check to make sure the LHS has been used */ if ($rp->lhsalias && !$lhsused) { PHP_ParserGenerator::ErrorMsg($this->filename, $rp->ruleline, "Label \"%s\" for \"%s(%s)\" is never used.", $rp->lhsalias, $rp->lhs->name, $rp->lhsalias); $this->errorcnt++; } /* Generate destructor code for RHS symbols which are not used in the ** reduce code */ for($i = 0; $i < $rp->nrhs; $i++) { if ($rp->rhsalias[$i] && !isset($used[$i])) { PHP_ParserGenerator::ErrorMsg($this->filename, $rp->ruleline, "Label %s for \"%s(%s)\" is never used.", $rp->rhsalias[$i], $rp->rhs[$i]->name, $rp->rhsalias[$i]); $this->errorcnt++; } elseif ($rp->rhsalias[$i] == 0) { if ($rp->rhs[$i]->type == PHP_ParserGenerator_Symbol::TERMINAL) { $hasdestructor = $this->tokendest != 0; }else{ $hasdestructor = $this->vardest !== 0 || $rp->rhs[$i]->destructor !== 0; } if ($hasdestructor) { $this->append_str(" \$this->yy_destructor(" . ($rp->rhs[$i]->index) . ", \$this->yystack[\$this->yyidx + " . ($i - $rp->nrhs + 1) . "]->minor);\n", 0); } else { /* No destructor defined for this term */ } } } $cp = $this->append_str('', 0); $rp->code = $cp; } /** * The following routine emits code for the destructor for the * symbol sp */ function emit_destructor_code($out, PHP_ParserGenerator_Symbol $sp, &$lineno) // FILE *out; // struct symbol *sp; // struct lemon *lemp; // int *lineno; { $cp = 0; $linecnt = 0; if ($sp->type == PHP_ParserGenerator_Symbol::TERMINAL) { $cp = $this->tokendest; if ($cp === 0) { return; } $this->tplt_linedir($out, $this->tokendestln, $this->filename); fwrite($out, "{"); } elseif ($sp->destructor) { $cp = $sp->destructor; $this->tplt_linedir($out, $sp->destructorln, $this->filename); fwrite($out, "{"); } elseif ($this->vardest) { $cp = $this->vardest; if ($cp === 0) { return; } $this->tplt_linedir($out, $this->vardestln, $this->filename); fwrite($out, "{"); } else { throw new Exception('emit_destructor'); /* Cannot happen */ } for ($i = 0; $i < strlen($cp); $i++) { if ($cp[$i]=='$' && $cp[$i + 1]=='$' ) { fprintf($out, "(yypminor->yy%d)", $sp->dtnum); $i++; continue; } if ($cp[$i] == "\n") { $linecnt++; } fwrite($out, $cp[$i]); } $lineno += 3 + $linecnt; fwrite($out, "}\n"); $this->tplt_linedir($out, $lineno, $this->outname); } /** * Compare to axset structures for sorting purposes */ static function axset_compare($a, $b) { return $b['nAction'] - $a['nAction']; } } smarty3-3.1.13/development/lexer/ParserGenerator/State.php0000644000175000017500000001773011275032024022176 0ustar mikemike * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the distribution. * * Neither the name of the PHP_ParserGenerator nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * @category php * @package PHP_ParserGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @version CVS: $Id: State.php,v 1.1 2006/07/18 00:53:10 cellog Exp $ * @since File available since Release 0.1.0 */ /** * The structure used to represent a state in the associative array * for a PHP_ParserGenerator_Config. * @package PHP_ParserGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @version 0.1.5 * @since Class available since Release 0.1.0 */ class PHP_ParserGenerator_StateNode { public $key; public $data; public $from = 0; public $next = 0; } /** * Each state of the generated parser's finite state machine * is encoded as an instance of this class * * @package PHP_ParserGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.php.net/license/3_01.txt PHP License 3.01 * @version 0.1.5 * @since Class available since Release 0.1.0 */ class PHP_ParserGenerator_State { /** * The basis configurations for this state * @var PHP_ParserGenerator_Config */ public $bp; /** * All configurations in this state * @var PHP_ParserGenerator_Config */ public $cfp; /** * Sequential number for this state * * @var int */ public $statenum; /** * Linked list of actions for this state. * @var PHP_ParserGenerator_Action */ public $ap; /** * Number of terminal (token) actions * * @var int */ public $nTknAct, /** * Number of non-terminal actions * * @var int */ $nNtAct; /** * The offset into the $yy_action table for terminal tokens. * * @var int */ public $iTknOfst, /** * The offset into the $yy_action table for non-terminals. * * @var int */ $iNtOfst; /** * Default action * * @var int */ public $iDflt; /** * Associative array of PHP_ParserGenerator_State objects * * @var array */ public static $x3a = array(); /** * Array of PHP_ParserGenerator_State objects * * @var array */ public static $states = array(); /** * Compare two states for sorting purposes. The smaller state is the * one with the most non-terminal actions. If they have the same number * of non-terminal actions, then the smaller is the one with the most * token actions. */ static function stateResortCompare($a, $b) { $n = $b->nNtAct - $a->nNtAct; if ($n === 0) { $n = $b->nTknAct - $a->nTknAct; } return $n; } /** * Compare two states based on their configurations * * @param PHP_ParserGenerator_Config|0 $a * @param PHP_ParserGenerator_Config|0 $b * @return int */ static function statecmp($a, $b) { for ($rc = 0; $rc == 0 && $a && $b; $a = $a->bp, $b = $b->bp) { $rc = $a->rp->index - $b->rp->index; if ($rc === 0) { $rc = $a->dot - $b->dot; } } if ($rc == 0) { if ($a) { $rc = 1; } if ($b) { $rc = -1; } } return $rc; } /** * Hash a state based on its configuration * @return int */ private static function statehash(PHP_ParserGenerator_Config $a) { $h = 0; while ($a) { $h = $h * 571 + $a->rp->index * 37 + $a->dot; $a = $a->bp; } return (int) $h; } /** * Return a pointer to data assigned to the given key. Return NULL * if no such key. * @param PHP_ParserGenerator_Config * @return null|PHP_ParserGenerator_State */ static function State_find(PHP_ParserGenerator_Config $key) { if (!count(self::$x3a)) { return 0; } $h = self::statehash($key); if (!isset(self::$x3a[$h])) { return 0; } $np = self::$x3a[$h]; while ($np) { if (self::statecmp($np->key, $key) == 0) { break; } $np = $np->next; } return $np ? $np->data : 0; } /** * Insert a new record into the array. Return TRUE if successful. * Prior data with the same key is NOT overwritten * * @param PHP_ParserGenerator_State $state * @param PHP_ParserGenerator_Config $key * @return unknown */ static function State_insert(PHP_ParserGenerator_State $state, PHP_ParserGenerator_Config $key) { $h = self::statehash($key); if (isset(self::$x3a[$h])) { $np = self::$x3a[$h]; } else { $np = 0; } while ($np) { if (self::statecmp($np->key, $key) == 0) { /* An existing entry with the same key is found. */ /* Fail because overwrite is not allows. */ return 0; } $np = $np->next; } /* Insert the new data */ $np = new PHP_ParserGenerator_StateNode; $np->key = $key; $np->data = $state; self::$states[] = $np; // the original lemon code sets the from link always to itself // setting up a faulty double-linked list // however, the from links are never used, so I suspect a copy/paste // error from a standard algorithm that was never caught if (isset(self::$x3a[$h])) { self::$x3a[$h]->from = $np; // lemon has $np->next here } else { self::$x3a[$h] = 0; // dummy to avoid notice } $np->next = self::$x3a[$h]; self::$x3a[$h] = $np; $np->from = self::$x3a[$h]; return 1; } /** * Get an array indexed by state number * * @return array */ static function State_arrayof() { return self::$states; } } smarty3-3.1.13/development/lexer/ParserGenerator/cli.php0000644000175000017500000000024611400774344021667 0ustar mikemikemain(); ?>smarty3-3.1.13/development/lexer/ParserGenerator/Rule.php0000644000175000017500000001054511275032024022022 0ustar mikemike * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the distribution. * * Neither the name of the PHP_ParserGenerator nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * @category php * @package PHP_ParserGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @version CVS: $Id: Rule.php,v 1.1 2006/07/18 00:53:10 cellog Exp $ * @since File available since Release 0.1.0 */ /** * Each production rule in the grammar is stored in this class * * @package PHP_ParserGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @version 0.1.5 * @since Class available since Release 0.1.0 */ class PHP_ParserGenerator_Rule { /** * Left-hand side of the rule * @var array an array of {@link PHP_ParserGenerator_Symbol} objects */ public $lhs; /** * Alias for the LHS (NULL if none) * * @var array */ public $lhsalias = array(); /** * Line number for the rule * @var int */ public $ruleline; /** * Number of right-hand side symbols */ public $nrhs; /** * The right-hand side symbols * @var array an array of {@link PHP_ParserGenerator_Symbol} objects */ public $rhs; /** * Aliases for each right-hand side symbol, or null if no alis. * * In this rule: *
     * foo ::= BAR(A) baz(B).
     * 
* * The right-hand side aliases are A for BAR, and B for baz. * @var array aliases are indexed by the right-hand side symbol index. */ public $rhsalias = array(); /** * Line number at which code begins * @var int */ public $line; /** * The code executed when this rule is reduced * *
     * foo(R) ::= BAR(A) baz(B). {R = A + B;}
     * 
* * In the rule above, the code is "R = A + B;" * @var string|0 */ public $code; /** * Precedence symbol for this rule * @var PHP_ParserGenerator_Symbol */ public $precsym; /** * An index number for this rule * * Used in both naming of reduce functions and determining which rule code * to use for reduce actions * @var int */ public $index; /** * True if this rule is ever reduced * @var boolean */ public $canReduce; /** * Next rule with the same left-hand side * @var PHP_ParserGenerator_Rule|0 */ public $nextlhs; /** * Next rule in the global list * @var PHP_ParserGenerator_Rule|0 */ public $next; } smarty3-3.1.13/development/lexer/ParserGenerator/Parser.php0000644000175000017500000011117511434504200022345 0ustar mikemike * @copyright 2006 Gregory Beaver * @license http://www.php.net/license/3_01.txt PHP License 3.01 * @version CVS: $Id: Parser.php,v 1.2 2007/03/02 16:36:24 cellog Exp $ * @since File available since Release 0.1.0 */ /** * The grammar parser for lemon grammar files. * * @package PHP_ParserGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.php.net/license/3_01.txt PHP License 3.01 * @since Class available since Release 0.1.0 */ class PHP_ParserGenerator_Parser { const INITIALIZE = 1; const WAITING_FOR_DECL_OR_RULE = 2; const WAITING_FOR_DECL_KEYWORD = 3; const WAITING_FOR_DECL_ARG = 4; const WAITING_FOR_PRECEDENCE_SYMBOL = 5; const WAITING_FOR_ARROW = 6; const IN_RHS = 7; const LHS_ALIAS_1 = 8; const LHS_ALIAS_2 = 9; const LHS_ALIAS_3 = 10; const RHS_ALIAS_1 = 11; const RHS_ALIAS_2 = 12; const PRECEDENCE_MARK_1 = 13; const PRECEDENCE_MARK_2 = 14; const RESYNC_AFTER_RULE_ERROR = 15; const RESYNC_AFTER_DECL_ERROR = 16; const WAITING_FOR_DESTRUCTOR_SYMBOL = 17; const WAITING_FOR_DATATYPE_SYMBOL = 18; const WAITING_FOR_FALLBACK_ID = 19; /** * Name of the input file * * @var string */ public $filename; /** * Linenumber at which current token starts * @var int */ public $tokenlineno; /** * Number of parsing errors so far * @var int */ public $errorcnt; /** * Index of current token within the input string * @var int */ public $tokenstart; /** * Global state vector * @var PHP_ParserGenerator_Data */ public $gp; /** * Parser state (one of the class constants for this class) * * - PHP_ParserGenerator_Parser::INITIALIZE, * - PHP_ParserGenerator_Parser::WAITING_FOR_DECL_OR_RULE, * - PHP_ParserGenerator_Parser::WAITING_FOR_DECL_KEYWORD, * - PHP_ParserGenerator_Parser::WAITING_FOR_DECL_ARG, * - PHP_ParserGenerator_Parser::WAITING_FOR_PRECEDENCE_SYMBOL, * - PHP_ParserGenerator_Parser::WAITING_FOR_ARROW, * - PHP_ParserGenerator_Parser::IN_RHS, * - PHP_ParserGenerator_Parser::LHS_ALIAS_1, * - PHP_ParserGenerator_Parser::LHS_ALIAS_2, * - PHP_ParserGenerator_Parser::LHS_ALIAS_3, * - PHP_ParserGenerator_Parser::RHS_ALIAS_1, * - PHP_ParserGenerator_Parser::RHS_ALIAS_2, * - PHP_ParserGenerator_Parser::PRECEDENCE_MARK_1, * - PHP_ParserGenerator_Parser::PRECEDENCE_MARK_2, * - PHP_ParserGenerator_Parser::RESYNC_AFTER_RULE_ERROR, * - PHP_ParserGenerator_Parser::RESYNC_AFTER_DECL_ERROR, * - PHP_ParserGenerator_Parser::WAITING_FOR_DESTRUCTOR_SYMBOL, * - PHP_ParserGenerator_Parser::WAITING_FOR_DATATYPE_SYMBOL, * - PHP_ParserGenerator_Parser::WAITING_FOR_FALLBACK_ID * @var int */ public $state; /** * The fallback token * @var PHP_ParserGenerator_Symbol */ public $fallback; /** * Left-hand side of the current rule * @var PHP_ParserGenerator_Symbol */ public $lhs; /** * Alias for the LHS * @var string */ public $lhsalias; /** * Number of right-hand side symbols seen * @var int */ public $nrhs; /** * Right-hand side symbols * @var array array of {@link PHP_ParserGenerator_Symbol} objects */ public $rhs = array(); /** * Aliases for each RHS symbol name (or NULL) * @var array array of strings */ public $alias = array(); /** * Previous rule parsed * @var PHP_ParserGenerator_Rule */ public $prevrule; /** * Keyword of a declaration * * This is one of the %keyword keywords in the grammar file * @var string */ public $declkeyword; /** * Where the declaration argument should be put * * This is assigned as a reference to an internal variable * @var mixed */ public $declargslot = array(); /** * Where the declaration linenumber is put * * This is assigned as a reference to an internal variable * @var mixed */ public $decllnslot; /*enum e_assoc*/ public $declassoc; /* Assign this association to decl arguments */ public $preccounter; /* Assign this precedence to decl arguments */ /** * @var PHP_ParserGenerator_Rule */ public $firstrule; /* Pointer to first rule in the grammar */ /** * @var PHP_ParserGenerator_Rule */ public $lastrule; /* Pointer to the most recently parsed rule */ /** * @var PHP_ParserGenerator */ private $lemon; function __construct(PHP_ParserGenerator $lem) { $this->lemon = $lem; } /** * Run the preprocessor over the input file text. The Lemon variable * $azDefine contains the names of all defined * macros. This routine looks for "%ifdef" and "%ifndef" and "%endif" and * comments them out. Text in between is also commented out as appropriate. * @param string */ private function preprocess_input(&$z) { $start = 0; $lineno = $exclude = 0; for ($i=0; $i < strlen($z); $i++) { if ($z[$i] == "\n") { $lineno++; } if ($z[$i] != '%' || ($i > 0 && $z[$i-1] != "\n")) { continue; } if (substr($z, $i, 6) === "%endif" && trim($z[$i+6]) === '') { if ($exclude) { $exclude--; if ($exclude === 0) { for ($j = $start; $j < $i; $j++) { if ($z[$j] != "\n") $z[$j] = ' '; } } } for ($j = $i; $j < strlen($z) && $z[$j] != "\n"; $j++) { $z[$j] = ' '; } } elseif (substr($z, $i, 6) === "%ifdef" && trim($z[$i+6]) === '' || substr($z, $i, 7) === "%ifndef" && trim($z[$i+7]) === '') { if ($exclude) { $exclude++; } else { $j = $i; $n = strtok(substr($z, $j), " \t"); $exclude = 1; if (isset($this->lemon->azDefine[$n])) { $exclude = 0; } if ($z[$i + 3]=='n') { // this is a rather obtuse way of checking whether this is %ifndef $exclude = !$exclude; } if ($exclude) { $start = $i; $start_lineno = $lineno; } } //for ($j = $i; $j < strlen($z) && $z[$j] != "\n"; $j++) $z[$j] = ' '; $j = strpos(substr($z, $i), "\n"); if ($j === false) { $z = substr($z, 0, $i); // remove instead of adding ' ' } else { $z = substr($z, 0, $i) . substr($z, $i + $j); // remove instead of adding ' ' } } } if ($exclude) { throw new Exception("unterminated %ifdef starting on line $start_lineno\n"); } } /** * In spite of its name, this function is really a scanner. * * It reads in the entire input file (all at once) then tokenizes it. * Each token is passed to the function "parseonetoken" which builds all * the appropriate data structures in the global state vector "gp". * @param PHP_ParserGenerator_Data */ function Parse(PHP_ParserGenerator_Data $gp) { $startline = 0; $this->gp = $gp; $this->filename = $gp->filename; $this->errorcnt = 0; $this->state = self::INITIALIZE; /* Begin by reading the input file */ $filebuf = file_get_contents($this->filename); if (!$filebuf) { PHP_ParserGenerator::ErrorMsg($this->filename, 0, "Can't open this file for reading."); $gp->errorcnt++; return; } if (filesize($this->filename) != strlen($filebuf)) { ErrorMsg($this->filename, 0, "Can't read in all %d bytes of this file.", filesize($this->filename)); $gp->errorcnt++; return; } /* Make an initial pass through the file to handle %ifdef and %ifndef */ $this->preprocess_input($filebuf); /* Now scan the text of the input file */ $lineno = 1; for ($cp = 0, $c = $filebuf[0]; $cp < strlen($filebuf); $cp++) { $c = $filebuf[$cp]; if ($c == "\n") $lineno++; /* Keep track of the line number */ if (trim($c) === '') { continue; } /* Skip all white space */ if ($filebuf[$cp] == '/' && ($cp + 1 < strlen($filebuf)) && $filebuf[$cp + 1] == '/') { /* Skip C++ style comments */ $cp += 2; $z = strpos(substr($filebuf, $cp), "\n"); if ($z === false) { $cp = strlen($filebuf); break; } $lineno++; $cp += $z; continue; } if ($filebuf[$cp] == '/' && ($cp + 1 < strlen($filebuf)) && $filebuf[$cp + 1] == '*') { /* Skip C style comments */ $cp += 2; $z = strpos(substr($filebuf, $cp), '*/'); if ($z !== false) { $lineno += count(explode("\n", substr($filebuf, $cp, $z))) - 1; } $cp += $z + 1; continue; } $this->tokenstart = $cp; /* Mark the beginning of the token */ $this->tokenlineno = $lineno; /* Linenumber on which token begins */ if ($filebuf[$cp] == '"') { /* String literals */ $cp++; $oldcp = $cp; $test = strpos(substr($filebuf, $cp), '"'); if ($test === false) { PHP_ParserGenerator::ErrorMsg($this->filename, $startline, "String starting on this line is not terminated before the end of the file."); $this->errorcnt++; $nextcp = $cp = strlen($filebuf); } else { $cp += $test; $nextcp = $cp + 1; } $lineno += count(explode("\n", substr($filebuf, $oldcp, $cp - $oldcp))) - 1; } elseif ($filebuf[$cp] == '{') { /* A block of C code */ $cp++; for ($level = 1; $cp < strlen($filebuf) && ($level > 1 || $filebuf[$cp] != '}'); $cp++) { if ($filebuf[$cp] == "\n") { $lineno++; } elseif ($filebuf[$cp] == '{') { $level++; } elseif ($filebuf[$cp] == '}') { $level--; } elseif ($filebuf[$cp] == '/' && $filebuf[$cp + 1] == '*') { /* Skip comments */ $cp += 2; $z = strpos(substr($filebuf, $cp), '*/'); if ($z !== false) { $lineno += count(explode("\n", substr($filebuf, $cp, $z))) - 1; } $cp += $z + 2; } elseif ($filebuf[$cp] == '/' && $filebuf[$cp + 1] == '/') { /* Skip C++ style comments too */ $cp += 2; $z = strpos(substr($filebuf, $cp), "\n"); if ($z === false) { $cp = strlen($filebuf); break; } else { $lineno++; } $cp += $z; } elseif ($filebuf[$cp] == "'" || $filebuf[$cp] == '"') { /* String a character literals */ $startchar = $filebuf[$cp]; $prevc = 0; for ($cp++; $cp < strlen($filebuf) && ($filebuf[$cp] != $startchar || $prevc === '\\'); $cp++) { if ($filebuf[$cp] == "\n") { $lineno++; } if ($prevc === '\\') { $prevc = 0; } else { $prevc = $filebuf[$cp]; } } } } if ($cp >= strlen($filebuf)) { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "PHP code starting on this line is not terminated before the end of the file."); $this->errorcnt++; $nextcp = $cp; } else { $nextcp = $cp + 1; } } elseif (preg_match('/[a-zA-Z0-9]/', $filebuf[$cp])) { /* Identifiers */ preg_match('/[a-zA-Z0-9_]+/', substr($filebuf, $cp), $preg_results); $cp += strlen($preg_results[0]); $nextcp = $cp; } elseif ($filebuf[$cp] == ':' && $filebuf[$cp + 1] == ':' && $filebuf[$cp + 2] == '=') { /* The operator "::=" */ $cp += 3; $nextcp = $cp; } elseif (($filebuf[$cp] == '/' || $filebuf[$cp] == '|') && preg_match('/[a-zA-Z]/', $filebuf[$cp + 1])) { $cp += 2; preg_match('/[a-zA-Z0-9_]+/', substr($filebuf, $cp), $preg_results); $cp += strlen($preg_results[0]); $nextcp = $cp; } else { /* All other (one character) operators */ $cp ++; $nextcp = $cp; } $this->parseonetoken(substr($filebuf, $this->tokenstart, $cp - $this->tokenstart)); /* Parse the token */ $cp = $nextcp - 1; } $gp->rule = $this->firstrule; $gp->errorcnt = $this->errorcnt; } /** * Parse a single token * @param string token */ function parseonetoken($token) { $x = $token; $this->a = 0; // for referencing in WAITING_FOR_DECL_KEYWORD if (PHP_ParserGenerator::DEBUG) { printf("%s:%d: Token=[%s] state=%d\n", $this->filename, $this->tokenlineno, $token, $this->state); } switch ($this->state) { case self::INITIALIZE: $this->prevrule = 0; $this->preccounter = 0; $this->firstrule = $this->lastrule = 0; $this->gp->nrule = 0; /* Fall thru to next case */ case self::WAITING_FOR_DECL_OR_RULE: if ($x[0] == '%') { $this->state = self::WAITING_FOR_DECL_KEYWORD; } elseif (preg_match('/[a-z]/', $x[0])) { $this->lhs = PHP_ParserGenerator_Symbol::Symbol_new($x); $this->nrhs = 0; $this->lhsalias = 0; $this->state = self::WAITING_FOR_ARROW; } elseif ($x[0] == '{') { if ($this->prevrule === 0) { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "There is no prior rule opon which to attach the code fragment which begins on this line."); $this->errorcnt++; } elseif ($this->prevrule->code != 0) { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "Code fragment beginning on this line is not the first \ to follow the previous rule."); $this->errorcnt++; } else { $this->prevrule->line = $this->tokenlineno; $this->prevrule->code = substr($x, 1); } } elseif ($x[0] == '[') { $this->state = self::PRECEDENCE_MARK_1; } else { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "Token \"%s\" should be either \"%%\" or a nonterminal name.", $x); $this->errorcnt++; } break; case self::PRECEDENCE_MARK_1: if (!preg_match('/[A-Z]/', $x[0])) { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "The precedence symbol must be a terminal."); $this->errorcnt++; } elseif ($this->prevrule === 0) { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "There is no prior rule to assign precedence \"[%s]\".", $x); $this->errorcnt++; } elseif ($this->prevrule->precsym != 0) { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "Precedence mark on this line is not the first to follow the previous rule."); $this->errorcnt++; } else { $this->prevrule->precsym = PHP_ParserGenerator_Symbol::Symbol_new($x); } $this->state = self::PRECEDENCE_MARK_2; break; case self::PRECEDENCE_MARK_2: if ($x[0] != ']') { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "Missing \"]\" on precedence mark."); $this->errorcnt++; } $this->state = self::WAITING_FOR_DECL_OR_RULE; break; case self::WAITING_FOR_ARROW: if ($x[0] == ':' && $x[1] == ':' && $x[2] == '=') { $this->state = self::IN_RHS; } elseif ($x[0] == '(') { $this->state = self::LHS_ALIAS_1; } else { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "Expected to see a \":\" following the LHS symbol \"%s\".", $this->lhs->name); $this->errorcnt++; $this->state = self::RESYNC_AFTER_RULE_ERROR; } break; case self::LHS_ALIAS_1: if (preg_match('/[A-Za-z]/', $x[0])) { $this->lhsalias = $x; $this->state = self::LHS_ALIAS_2; } else { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "\"%s\" is not a valid alias for the LHS \"%s\"\n", $x, $this->lhs->name); $this->errorcnt++; $this->state = self::RESYNC_AFTER_RULE_ERROR; } break; case self::LHS_ALIAS_2: if ($x[0] == ')') { $this->state = self::LHS_ALIAS_3; } else { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "Missing \")\" following LHS alias name \"%s\".",$this->lhsalias); $this->errorcnt++; $this->state = self::RESYNC_AFTER_RULE_ERROR; } break; case self::LHS_ALIAS_3: if ($x == '::=') { $this->state = self::IN_RHS; } else { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "Missing \"->\" following: \"%s(%s)\".", $this->lhs->name, $this->lhsalias); $this->errorcnt++; $this->state = self::RESYNC_AFTER_RULE_ERROR; } break; case self::IN_RHS: if ($x[0] == '.') { $rp = new PHP_ParserGenerator_Rule; $rp->ruleline = $this->tokenlineno; for ($i = 0; $i < $this->nrhs; $i++) { $rp->rhs[$i] = $this->rhs[$i]; $rp->rhsalias[$i] = $this->alias[$i]; } if (count(array_unique($rp->rhsalias)) != count($rp->rhsalias)) { $used = array(); foreach ($rp->rhsalias as $i => $symbol) { if (!is_string($symbol)) { continue; } if (isset($used[$symbol])) { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "RHS symbol \"%s\" used multiple times.", $symbol); $this->errorcnt++; } else { $used[$symbol] = $i; } } } $rp->lhs = $this->lhs; $rp->lhsalias = $this->lhsalias; $rp->nrhs = $this->nrhs; $rp->code = 0; $rp->precsym = 0; $rp->index = $this->gp->nrule++; $rp->nextlhs = $rp->lhs->rule; $rp->lhs->rule = $rp; $rp->next = 0; if ($this->firstrule === 0) { $this->firstrule = $this->lastrule = $rp; } else { $this->lastrule->next = $rp; $this->lastrule = $rp; } $this->prevrule = $rp; $this->state = self::WAITING_FOR_DECL_OR_RULE; } elseif (preg_match('/[a-zA-Z]/', $x[0])) { if ($this->nrhs >= PHP_ParserGenerator::MAXRHS) { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "Too many symbols on RHS or rule beginning at \"%s\".", $x); $this->errorcnt++; $this->state = self::RESYNC_AFTER_RULE_ERROR; } else { if (isset($this->rhs[$this->nrhs - 1])) { $msp = $this->rhs[$this->nrhs - 1]; if ($msp->type == PHP_ParserGenerator_Symbol::MULTITERMINAL) { $inf = array_reduce($msp->subsym, array($this, '_printmulti'), ''); PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, 'WARNING: symbol ' . $x . ' will not' . ' be part of previous multiterminal %s', substr($inf, 0, strlen($inf) - 1) ); } } $this->rhs[$this->nrhs] = PHP_ParserGenerator_Symbol::Symbol_new($x); $this->alias[$this->nrhs] = 0; $this->nrhs++; } } elseif (($x[0] == '|' || $x[0] == '/') && $this->nrhs > 0) { $msp = $this->rhs[$this->nrhs - 1]; if ($msp->type != PHP_ParserGenerator_Symbol::MULTITERMINAL) { $origsp = $msp; $msp = new PHP_ParserGenerator_Symbol; $msp->type = PHP_ParserGenerator_Symbol::MULTITERMINAL; $msp->nsubsym = 1; $msp->subsym = array($origsp); $msp->name = $origsp->name; $this->rhs[$this->nrhs - 1] = $msp; } $msp->nsubsym++; $msp->subsym[$msp->nsubsym - 1] = PHP_ParserGenerator_Symbol::Symbol_new(substr($x, 1)); if (preg_match('/[a-z]/', $x[1]) || preg_match('/[a-z]/', $msp->subsym[0]->name[0])) { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "Cannot form a compound containing a non-terminal"); $this->errorcnt++; } } elseif ($x[0] == '(' && $this->nrhs > 0) { $this->state = self::RHS_ALIAS_1; } else { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "Illegal character on RHS of rule: \"%s\".", $x); $this->errorcnt++; $this->state = self::RESYNC_AFTER_RULE_ERROR; } break; case self::RHS_ALIAS_1: if (preg_match('/[A-Za-z]/', $x[0])) { $this->alias[$this->nrhs - 1] = $x; $this->state = self::RHS_ALIAS_2; } else { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "\"%s\" is not a valid alias for the RHS symbol \"%s\"\n", $x, $this->rhs[$this->nrhs - 1]->name); $this->errorcnt++; $this->state = self::RESYNC_AFTER_RULE_ERROR; } break; case self::RHS_ALIAS_2: if ($x[0] == ')') { $this->state = self::IN_RHS; } else { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "Missing \")\" following LHS alias name \"%s\".", $this->lhsalias); $this->errorcnt++; $this->state = self::RESYNC_AFTER_RULE_ERROR; } break; case self::WAITING_FOR_DECL_KEYWORD: if(preg_match('/[A-Za-z]/', $x[0])) { $this->declkeyword = $x; $this->declargslot = &$this->a; $this->decllnslot = &$this->a; $this->state = self::WAITING_FOR_DECL_ARG; if ('name' == $x) { $this->declargslot = &$this->gp->name; } elseif ('include' == $x) { $this->declargslot = &$this->gp->include_code; $this->decllnslot = &$this->gp->includeln; } elseif ('include_class' == $x) { $this->declargslot = &$this->gp->include_classcode; $this->decllnslot = &$this->gp->include_classln; } elseif ('declare_class' == $x) { $this->declargslot = &$this->gp->declare_classcode; $this->decllnslot = &$this->gp->declare_classln; } elseif ('code' == $x) { $this->declargslot = &$this->gp->extracode; $this->decllnslot = &$this->gp->extracodeln; } elseif ('token_destructor' == $x) { $this->declargslot = &$this->gp->tokendest; $this->decllnslot = &$this->gp->tokendestln; } elseif ('default_destructor' == $x) { $this->declargslot = &$this->gp->vardest; $this->decllnslot = &$this->gp->vardestln; } elseif ('token_prefix' == $x) { $this->declargslot = &$this->gp->tokenprefix; } elseif ('syntax_error' == $x) { $this->declargslot = &$this->gp->error; $this->decllnslot = &$this->gp->errorln; } elseif ('parse_accept' == $x) { $this->declargslot = &$this->gp->accept; $this->decllnslot = &$this->gp->acceptln; } elseif ('parse_failure' == $x) { $this->declargslot = &$this->gp->failure; $this->decllnslot = &$this->gp->failureln; } elseif ('stack_overflow' == $x) { $this->declargslot = &$this->gp->overflow; $this->decllnslot = &$this->gp->overflowln; } elseif ('token_type' == $x) { $this->declargslot = &$this->gp->tokentype; } elseif ('default_type' == $x) { $this->declargslot = &$this->gp->vartype; } elseif ('stack_size' == $x) { $this->declargslot = &$this->gp->stacksize; } elseif ('start_symbol' == $x) { $this->declargslot = &$this->gp->start; } elseif ('left' == $x) { $this->preccounter++; $this->declassoc = PHP_ParserGenerator_Symbol::LEFT; $this->state = self::WAITING_FOR_PRECEDENCE_SYMBOL; } elseif ('right' == $x) { $this->preccounter++; $this->declassoc = PHP_ParserGenerator_Symbol::RIGHT; $this->state = self::WAITING_FOR_PRECEDENCE_SYMBOL; } elseif ('nonassoc' == $x) { $this->preccounter++; $this->declassoc = PHP_ParserGenerator_Symbol::NONE; $this->state = self::WAITING_FOR_PRECEDENCE_SYMBOL; } elseif ('destructor' == $x) { $this->state = self::WAITING_FOR_DESTRUCTOR_SYMBOL; } elseif ('type' == $x) { $this->state = self::WAITING_FOR_DATATYPE_SYMBOL; } elseif ('fallback' == $x) { $this->fallback = 0; $this->state = self::WAITING_FOR_FALLBACK_ID; } else { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "Unknown declaration keyword: \"%%%s\".", $x); $this->errorcnt++; $this->state = self::RESYNC_AFTER_DECL_ERROR; } } else { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "Illegal declaration keyword: \"%s\".", $x); $this->errorcnt++; $this->state = self::RESYNC_AFTER_DECL_ERROR; } break; case self::WAITING_FOR_DESTRUCTOR_SYMBOL: if (!preg_match('/[A-Za-z]/', $x[0])) { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "Symbol name missing after %destructor keyword"); $this->errorcnt++; $this->state = self::RESYNC_AFTER_DECL_ERROR; } else { $sp = PHP_ParserGenerator_Symbol::Symbol_new($x); $this->declargslot = &$sp->destructor; $this->decllnslot = &$sp->destructorln; $this->state = self::WAITING_FOR_DECL_ARG; } break; case self::WAITING_FOR_DATATYPE_SYMBOL: if (!preg_match('/[A-Za-z]/', $x[0])) { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "Symbol name missing after %destructor keyword"); $this->errorcnt++; $this->state = self::RESYNC_AFTER_DECL_ERROR; } else { $sp = PHP_ParserGenerator_Symbol::Symbol_new($x); $this->declargslot = &$sp->datatype; $this->state = self::WAITING_FOR_DECL_ARG; } break; case self::WAITING_FOR_PRECEDENCE_SYMBOL: if ($x[0] == '.') { $this->state = self::WAITING_FOR_DECL_OR_RULE; } elseif (preg_match('/[A-Z]/', $x[0])) { $sp = PHP_ParserGenerator_Symbol::Symbol_new($x); if ($sp->prec >= 0) { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "Symbol \"%s\" has already been given a precedence.", $x); $this->errorcnt++; } else { $sp->prec = $this->preccounter; $sp->assoc = $this->declassoc; } } else { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "Can't assign a precedence to \"%s\".", $x); $this->errorcnt++; } break; case self::WAITING_FOR_DECL_ARG: if (preg_match('/[A-Za-z0-9{"]/', $x[0])) { if ($this->declargslot != 0) { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "The argument \"%s\" to declaration \"%%%s\" is not the first.", $x[0] == '"' ? substr($x, 1) : $x, $this->declkeyword); $this->errorcnt++; $this->state = self::RESYNC_AFTER_DECL_ERROR; } else { $this->declargslot = ($x[0] == '"' || $x[0] == '{') ? substr($x, 1) : $x; $this->a = 1; if (!$this->decllnslot) { $this->decllnslot = $this->tokenlineno; } $this->state = self::WAITING_FOR_DECL_OR_RULE; } } else { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "Illegal argument to %%%s: %s",$this->declkeyword, $x); $this->errorcnt++; $this->state = self::RESYNC_AFTER_DECL_ERROR; } break; case self::WAITING_FOR_FALLBACK_ID: if ($x[0] == '.') { $this->state = self::WAITING_FOR_DECL_OR_RULE; } elseif (!preg_match('/[A-Z]/', $x[0])) { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "%%fallback argument \"%s\" should be a token", $x); $this->errorcnt++; } else { $sp = PHP_ParserGenerator_Symbol::Symbol_new($x); if ($this->fallback === 0) { $this->fallback = $sp; } elseif (is_object($sp->fallback)) { PHP_ParserGenerator::ErrorMsg($this->filename, $this->tokenlineno, "More than one fallback assigned to token %s", $x); $this->errorcnt++; } else { $sp->fallback = $this->fallback; $this->gp->has_fallback = 1; } } break; case self::RESYNC_AFTER_RULE_ERROR: /* if ($x[0] == '.') $this->state = self::WAITING_FOR_DECL_OR_RULE; ** break; */ case self::RESYNC_AFTER_DECL_ERROR: if ($x[0] == '.') { $this->state = self::WAITING_FOR_DECL_OR_RULE; } if ($x[0] == '%') { $this->state = self::WAITING_FOR_DECL_KEYWORD; } break; } } /** * return a descriptive string for a multi-terminal token. * * @param string $a * @param string $b * @return string */ private function _printmulti($a, $b) { if (!$a) { $a = ''; } $a .= $b->name . '|'; return $a; } }smarty3-3.1.13/development/lexer/ParserGenerator/ActionTable.php0000644000175000017500000002534011275032024023277 0ustar mikemike * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the distribution. * * Neither the name of the PHP_ParserGenerator nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * @category php * @package PHP_ParserGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @version CVS: $Id: ActionTable.php,v 1.1 2006/07/18 00:53:10 cellog Exp $ * @since File available since Release 0.1.0 */ /** * The state of the yy_action table under construction is an instance of * the following structure * @package PHP_ParserGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @version 0.1.5 * @since Class available since Release 0.1.0 */ class PHP_ParserGenerator_ActionTable { /** * Number of used slots in {@link $aAction} * @var int */ public $nAction = 0; /** * The $yy_action table under construction. * * Each entry is of format: * * array( * 'lookahead' => -1, // Value of the lookahead token (symbol index) * 'action' => -1 // Action to take on the given lookahead (action index) * ); * * @see PHP_ParserGenerator_Data::compute_action() * @var array */ public $aAction = array(array( 'lookahead' => -1, 'action' => -1 )); /** * A single new transaction set. * * @see $aAction format of the internal array is described here * @var array */ public $aLookahead = array(array( 'lookahead' => 0, 'action' => 0 )); /** * The smallest (minimum) value of any lookahead token in {@link $aLookahead} * * The lowest non-terminal is always introduced earlier in the parser file, * and is therefore a more significant token. * @var int */ public $mnLookahead = 0; /** * The action associated with the smallest lookahead token. * @see $mnLookahead * @var int */ public $mnAction = 0; /** * The largest (maximum) value of any lookahead token in {@link $aLookahead} * @var int */ public $mxLookahead = 0; /** * The number of slots used in {@link $aLookahead}. * * This is the same as count($aLookahead), but there was no pressing reason * to change this when porting from C. * @see $mnLookahead * @var int */ public $nLookahead = 0; /** * Add a new action to the current transaction set * @param int * @param int */ function acttab_action($lookahead, $action) { if ($this->nLookahead === 0) { $this->aLookahead = array(); $this->mxLookahead = $lookahead; $this->mnLookahead = $lookahead; $this->mnAction = $action; } else { if ($this->mxLookahead < $lookahead) { $this->mxLookahead = $lookahead; } if ($this->mnLookahead > $lookahead) { $this->mnLookahead = $lookahead; $this->mnAction = $action; } } $this->aLookahead[$this->nLookahead] = array( 'lookahead' => $lookahead, 'action' => $action); $this->nLookahead++; } /** * Add the transaction set built up with prior calls to acttab_action() * into the current action table. Then reset the transaction set back * to an empty set in preparation for a new round of acttab_action() calls. * * Return the offset into the action table of the new transaction. * @return int Return the offset that should be added to the lookahead in * order to get the index into $yy_action of the action. This will be used * in generation of $yy_ofst tables (reduce and shift) * @throws Exception */ function acttab_insert() { if ($this->nLookahead <= 0) { throw new Exception('nLookahead is not set up?'); } /* Scan the existing action table looking for an offset where we can ** insert the current transaction set. Fall out of the loop when that ** offset is found. In the worst case, we fall out of the loop when ** i reaches $this->nAction, which means we append the new transaction set. ** ** i is the index in $this->aAction[] where $this->mnLookahead is inserted. */ for ($i = 0; $i < $this->nAction + $this->mnLookahead; $i++) { if (!isset($this->aAction[$i])) { $this->aAction[$i] = array( 'lookahead' => -1, 'action' => -1, ); } if ($this->aAction[$i]['lookahead'] < 0) { for ($j = 0; $j < $this->nLookahead; $j++) { if (!isset($this->aLookahead[$j])) { $this->aLookahead[$j] = array( 'lookahead' => 0, 'action' => 0, ); } $k = $this->aLookahead[$j]['lookahead'] - $this->mnLookahead + $i; if ($k < 0) { break; } if (!isset($this->aAction[$k])) { $this->aAction[$k] = array( 'lookahead' => -1, 'action' => -1, ); } if ($this->aAction[$k]['lookahead'] >= 0) { break; } } if ($j < $this->nLookahead ) { continue; } for ($j = 0; $j < $this->nAction; $j++) { if (!isset($this->aAction[$j])) { $this->aAction[$j] = array( 'lookahead' => -1, 'action' => -1, ); } if ($this->aAction[$j]['lookahead'] == $j + $this->mnLookahead - $i) { break; } } if ($j == $this->nAction) { break; /* Fits in empty slots */ } } elseif ($this->aAction[$i]['lookahead'] == $this->mnLookahead) { if ($this->aAction[$i]['action'] != $this->mnAction) { continue; } for ($j = 0; $j < $this->nLookahead; $j++) { $k = $this->aLookahead[$j]['lookahead'] - $this->mnLookahead + $i; if ($k < 0 || $k >= $this->nAction) { break; } if (!isset($this->aAction[$k])) { $this->aAction[$k] = array( 'lookahead' => -1, 'action' => -1, ); } if ($this->aLookahead[$j]['lookahead'] != $this->aAction[$k]['lookahead']) { break; } if ($this->aLookahead[$j]['action'] != $this->aAction[$k]['action']) { break; } } if ($j < $this->nLookahead) { continue; } $n = 0; for ($j = 0; $j < $this->nAction; $j++) { if (!isset($this->aAction[$j])) { $this->aAction[$j] = array( 'lookahead' => -1, 'action' => -1, ); } if ($this->aAction[$j]['lookahead'] < 0) { continue; } if ($this->aAction[$j]['lookahead'] == $j + $this->mnLookahead - $i) { $n++; } } if ($n == $this->nLookahead) { break; /* Same as a prior transaction set */ } } } /* Insert transaction set at index i. */ for ($j = 0; $j < $this->nLookahead; $j++) { if (!isset($this->aLookahead[$j])) { $this->aLookahead[$j] = array( 'lookahead' => 0, 'action' => 0, ); } $k = $this->aLookahead[$j]['lookahead'] - $this->mnLookahead + $i; $this->aAction[$k] = $this->aLookahead[$j]; if ($k >= $this->nAction) { $this->nAction = $k + 1; } } $this->nLookahead = 0; $this->aLookahead = array(); /* Return the offset that is added to the lookahead in order to get the ** index into yy_action of the action */ return $i - $this->mnLookahead; } } ?>smarty3-3.1.13/development/lexer/ParserGenerator/Action.php0000644000175000017500000002103211315675047022336 0ustar mikemike * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the distribution. * * Neither the name of the PHP_ParserGenerator nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * @category php * @package PHP_ParserGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @version CVS: $Id: Action.php,v 1.2 2007/03/04 17:52:05 cellog Exp $ * @since File available since Release 0.1.0 */ /** * Every shift or reduce operation is stored as one of the following objects. * * @package PHP_ParserGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @version 0.1.5 * @since Class available since Release 0.1.0 */ class PHP_ParserGenerator_Action { const SHIFT = 1, ACCEPT = 2, REDUCE = 3, ERROR = 4, /** * Was a reduce, but part of a conflict */ CONFLICT = 5, /** * Was a shift. Precedence resolved conflict */ SH_RESOLVED = 6, /** * Was a reduce. Precedence resolved conflict */ RD_RESOLVED = 7, /** * Deleted by compression * @see PHP_ParserGenerator::CompressTables() */ NOT_USED = 8; /** * The look-ahead symbol that triggers this action * @var PHP_ParserGenerator_Symbol */ public $sp; /* The look-ahead symbol */ /** * This defines the kind of action, and must be one * of the class constants. * * - {@link PHP_ParserGenerator_Action::SHIFT} * - {@link PHP_ParserGenerator_Action::ACCEPT} * - {@link PHP_ParserGenerator_Action::REDUCE} * - {@link PHP_ParserGenerator_Action::ERROR} * - {@link PHP_ParserGenerator_Action::CONFLICT} * - {@link PHP_ParserGenerator_Action::SH_RESOLVED} * - {@link PHP_ParserGenerator_Action:: RD_RESOLVED} * - {@link PHP_ParserGenerator_Action::NOT_USED} */ public $type; /** * The new state, if this is a shift, * the parser rule index, if this is a reduce. * * @var PHP_ParserGenerator_State|PHP_ParserGenerator_Rule */ public $x; /** * The next action for this state. * @var PHP_ParserGenerator_Action */ public $next; /** * Compare two actions * * This is used by {@link Action_sort()} to compare actions */ static function actioncmp(PHP_ParserGenerator_Action $ap1, PHP_ParserGenerator_Action $ap2) { $rc = $ap1->sp->index - $ap2->sp->index; if ($rc === 0) { $rc = $ap1->type - $ap2->type; } if ($rc === 0) { if ($ap1->type == self::SHIFT) { if ($ap1->x->statenum != $ap2->x->statenum) { throw new Exception('Shift conflict: ' . $ap1->sp->name . ' shifts both to state ' . $ap1->x->statenum . ' (rule ' . $ap1->x->cfp->rp->lhs->name . ' on line ' . $ap1->x->cfp->rp->ruleline . ') and to state ' . $ap2->x->statenum . ' (rule ' . $ap2->x->cfp->rp->lhs->name . ' on line ' . $ap2->x->cfp->rp->ruleline . ')'); } } if ($ap1->type != self::REDUCE && $ap1->type != self::RD_RESOLVED && $ap1->type != self::CONFLICT) { throw new Exception('action has not been processed: ' . $ap1->sp->name . ' on line ' . $ap1->x->cfp->rp->ruleline . ', rule ' . $ap1->x->cfp->rp->lhs->name); } if ($ap2->type != self::REDUCE && $ap2->type != self::RD_RESOLVED && $ap2->type != self::CONFLICT) { throw new Exception('action has not been processed: ' . $ap2->sp->name . ' on line ' . $ap2->x->cfp->rp->ruleline . ', rule ' . $ap2->x->cfp->rp->lhs->name); } $rc = $ap1->x->index - $ap2->x->index; } return $rc; } function display($processed = false) { $map = array( self::ACCEPT => 'ACCEPT', self::CONFLICT => 'CONFLICT', self::REDUCE => 'REDUCE', self::SHIFT => 'SHIFT' ); $sep = isset($_SERVER['_']) ? "\n" : "
"; echo $map[$this->type] . ' for ' . $this->sp->name; if ($this->type == self::REDUCE) { echo ' - rule ' . $this->x->lhs->name . $sep; } elseif ($this->type == self::SHIFT) { echo ' - state ' . $this->x->statenum . ', basis ' . $this->x->cfp->rp->lhs->name . $sep; } else { echo $sep; } } /** * create linked list of PHP_ParserGenerator_Actions * * @param PHP_ParserGenerator_Action|null * @param int one of the class constants from PHP_ParserGenerator_Action * @param PHP_ParserGenerator_Symbol * @param PHP_ParserGenerator_State|PHP_ParserGenerator_Rule */ static function Action_add(&$app, $type, PHP_ParserGenerator_Symbol $sp, $arg) { $new = new PHP_ParserGenerator_Action; $new->next = $app; $app = $new; $new->type = $type; $new->sp = $sp; $new->x = $arg; echo ' Adding '; $new->display(); } /** * Sort parser actions * @see PHP_ParserGenerator_Data::FindActions() */ static function Action_sort(PHP_ParserGenerator_Action $ap) { $ap = PHP_ParserGenerator::msort($ap, 'next', array('PHP_ParserGenerator_Action', 'actioncmp')); return $ap; } /** * Print an action to the given file descriptor. Return FALSE if * nothing was actually printed. * @see PHP_ParserGenerator_Data::ReportOutput() */ function PrintAction($fp, $indent) { if (!$fp) { $fp = STDOUT; } $result = 1; switch ($this->type) { case self::SHIFT: fprintf($fp, "%${indent}s shift %d", $this->sp->name, $this->x->statenum); break; case self::REDUCE: fprintf($fp, "%${indent}s reduce %d", $this->sp->name, $this->x->index); break; case self::ACCEPT: fprintf($fp, "%${indent}s accept", $this->sp->name); break; case self::ERROR: fprintf($fp, "%${indent}s error", $this->sp->name); break; case self::CONFLICT: fprintf($fp, "%${indent}s reduce %-3d ** Parsing conflict **", $this->sp->name, $this->x->index); break; case self::SH_RESOLVED: case self::RD_RESOLVED: case self::NOT_USED: $result = 0; break; } return $result; } } ?> smarty3-3.1.13/development/lexer/ParserGenerator/Symbol.php0000644000175000017500000002107111275032024022354 0ustar mikemike * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the distribution. * * Neither the name of the PHP_ParserGenerator nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * @category php * @package PHP_ParserGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @version CVS: $Id: Symbol.php,v 1.1 2006/07/18 00:53:10 cellog Exp $ * @since File available since Release 0.1.0 */ /** * Symbols (terminals and nonterminals) of the grammar are stored in this class * * @package PHP_ParserGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @version 0.1.5 * @since Class available since Release 0.1.0 */ class PHP_ParserGenerator_Symbol { /** * Symbols that start with a capital letter like FOO. * * These are tokens directly from the lexer */ const TERMINAL = 1; /** * Symbols that start with a lower-case letter like foo. * * These are grammar rules like "foo ::= BLAH." */ const NONTERMINAL = 2; /** * Multiple terminal symbols. * * These are a grammar rule that consists of several terminals like * FOO|BAR|BAZ. Note that non-terminals cannot be in a multi-terminal, * and a multi-terminal acts like a single terminal. * * "FOO|BAR FOO|BAZ" is actually two multi-terminals, FOO|BAR and FOO|BAZ. */ const MULTITERMINAL = 3; const LEFT = 1; const RIGHT = 2; const NONE = 3; const UNK = 4; /** * Name of the symbol * * @var string */ public $name; /** * Index of this symbol. * * This will ultimately end up representing the symbol in the generated * parser * @var int */ public $index; /** * Symbol type * * One of PHP_ParserGenerator_Symbol::TERMINAL, * PHP_ParserGenerator_Symbol::NONTERMINAL or * PHP_ParserGenerator_Symbol::MULTITERMINAL * @var int */ public $type; /** * Linked list of rules that use this symbol, if it is a non-terminal. * @var PHP_ParserGenerator_Rule */ public $rule; /** * Fallback token in case this token doesn't parse * @var PHP_ParserGenerator_Symbol */ public $fallback; /** * Precendence, if defined. * * -1 if no unusual precedence * @var int */ public $prec = -1; /** * Associativity if precedence is defined. * * One of PHP_ParserGenerator_Symbol::LEFT, * PHP_ParserGenerator_Symbol::RIGHT, PHP_ParserGenerator_Symbol::NONE * or PHP_ParserGenerator_Symbol::UNK * @var unknown_type */ public $assoc; /** * First-set for all rules of this symbol * * @var array */ public $firstset; /** * True if this symbol is a non-terminal and can generate an empty * result. * * For instance "foo ::= ." * @var boolean */ public $lambda; /** * Code that executes whenever this symbol is popped from the stack during * error processing. * * @var string|0 */ public $destructor = 0; /** * Line number of destructor code * @var int */ public $destructorln; /** * Unused relic of the C version of Lemon. * * The data type of information held by this object. Only used * if this is a non-terminal * @var string */ public $datatype; /** * Unused relic of the C version of Lemon. * * The data type number. In the parser, the value * stack is a union. The .yy%d element of this * union is the correct data type for this object * @var string */ public $dtnum; /**#@+ * The following fields are used by MULTITERMINALs only */ /** * Number of terminal symbols in the MULTITERMINAL * * This is of course the same as count($this->subsym) * @var int */ public $nsubsym; /** * Array of terminal symbols in the MULTITERMINAL * @var array an array of {@link PHP_ParserGenerator_Symbol} objects */ public $subsym = array(); /**#@-*/ /** * Singleton storage of symbols * * @var array an array of PHP_ParserGenerator_Symbol objects */ private static $symbol_table = array(); /** * Return a pointer to the (terminal or nonterminal) symbol "x". * Create a new symbol if this is the first time "x" has been seen. * (this is a singleton) * @param string * @return PHP_ParserGenerator_Symbol */ public static function Symbol_new($x) { if (isset(self::$symbol_table[$x])) { return self::$symbol_table[$x]; } $sp = new PHP_ParserGenerator_Symbol; $sp->name = $x; $sp->type = preg_match('/[A-Z]/', $x[0]) ? self::TERMINAL : self::NONTERMINAL; $sp->rule = 0; $sp->fallback = 0; $sp->prec = -1; $sp->assoc = self::UNK; $sp->firstset = array(); $sp->lambda = false; $sp->destructor = 0; $sp->datatype = 0; self::$symbol_table[$sp->name] = $sp; return $sp; } /** * Return the number of unique symbols * @return int */ public static function Symbol_count() { return count(self::$symbol_table); } public static function Symbol_arrayof() { return array_values(self::$symbol_table); } public static function Symbol_find($x) { if (isset(self::$symbol_table[$x])) { return self::$symbol_table[$x]; } return 0; } /** * Sort function helper for symbols * * Symbols that begin with upper case letters (terminals or tokens) * must sort before symbols that begin with lower case letters * (non-terminals). Other than that, the order does not matter. * * We find experimentally that leaving the symbols in their original * order (the order they appeared in the grammar file) gives the * smallest parser tables in SQLite. * @param PHP_ParserGenerator_Symbol * @param PHP_ParserGenerator_Symbol */ public static function sortSymbols($a, $b) { $i1 = $a->index + 10000000*(ord($a->name[0]) > ord('Z')); $i2 = $b->index + 10000000*(ord($b->name[0]) > ord('Z')); return $i1 - $i2; } /** * Return true if two symbols are the same. */ public static function same_symbol(PHP_ParserGenerator_Symbol $a, PHP_ParserGenerator_Symbol $b) { if ($a === $b) return 1; if ($a->type != self::MULTITERMINAL) return 0; if ($b->type != self::MULTITERMINAL) return 0; if ($a->nsubsym != $b->nsubsym) return 0; for ($i = 0; $i < $a->nsubsym; $i++) { if ($a->subsym[$i] != $b->subsym[$i]) return 0; } return 1; } } smarty3-3.1.13/development/lexer/LexerGenerator/0000755000175000017500000000000012141655567020240 5ustar mikemikesmarty3-3.1.13/development/lexer/LexerGenerator/Regex/0000755000175000017500000000000012141655567021312 5ustar mikemikesmarty3-3.1.13/development/lexer/LexerGenerator/Regex/Lexer.php0000644000175000017500000013317611634664106023110 0ustar mikemikeinput = $data; $this->N = 0; } function reset($data, $line) { $this->input = $data; $this->N = 0; // passed in from parent parser $this->line = $line; $this->yybegin(self::INITIAL); } private $_yy_state = 1; private $_yy_stack = array(); function yylex() { return $this->{'yylex' . $this->_yy_state}(); } function yypushstate($state) { array_push($this->_yy_stack, $this->_yy_state); $this->_yy_state = $state; } function yypopstate() { $this->_yy_state = array_pop($this->_yy_stack); } function yybegin($state) { $this->_yy_state = $state; } function yylex1() { $tokenMap = array ( 1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0, 8 => 0, 9 => 0, 10 => 0, 11 => 0, 12 => 0, 13 => 0, 14 => 0, 15 => 0, 16 => 0, 17 => 0, 18 => 0, 19 => 0, 20 => 0, 21 => 0, 22 => 0, 23 => 0, ); if ($this->N >= strlen($this->input)) { return false; // end of input } $yy_global_pattern = '/\G(\\\\\\\\)|\G([^[\\\\^$.|()?*+{}]+)|\G(\\\\[][{}*.^$|?()+])|\G(\\[)|\G(\\|)|\G(\\\\[frnt]|\\\\x[0-9a-fA-F][0-9a-fA-F]?|\\\\[0-7][0-7][0-7]|\\\\x\\{[0-9a-fA-F]+\\})|\G(\\\\[0-9][0-9])|\G(\\\\[abBGcedDsSwW0C]|\\\\c\\\\)|\G(\\^)|\G(\\\\A)|\G(\\))|\G(\\$)|\G(\\*\\?|\\+\\?|[*?+]|\\{[0-9]+\\}|\\{[0-9]+,\\}|\\{[0-9]+,[0-9]+\\})|\G(\\\\[zZ])|\G(\\(\\?)|\G(\\()|\G(\\.)|\G(\\\\[1-9])|\G(\\\\p\\{\\^?..?\\}|\\\\P\\{..?\\}|\\\\X)|\G(\\\\p\\{C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p\\{\\^C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p[CLMNPSZ])|\G(\\\\)/'; do { if (preg_match($yy_global_pattern,$this->input, $yymatches, null, $this->N)) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns if (!count($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->input, $this->N, 5) . '... state INITIAL'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number if ($tokenMap[$this->token]) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, $this->token + 1, $tokenMap[$this->token]); } else { $yysubmatches = array(); } $this->value = current($yymatches); // token value $r = $this->{'yy_r1_' . $this->token}($yysubmatches); if ($r === null) { $this->N += strlen($this->value); $this->line += substr_count($this->value, "\n"); // accept this token return true; } elseif ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { $this->N += strlen($this->value); $this->line += substr_count($this->value, "\n"); if ($this->N >= strlen($this->input)) { return false; // end of input } // skip this token continue; } else { $yy_yymore_patterns = array( 1 => array(0, "\G([^[\\\\^$.|()?*+{}]+)|\G(\\\\[][{}*.^$|?()+])|\G(\\[)|\G(\\|)|\G(\\\\[frnt]|\\\\x[0-9a-fA-F][0-9a-fA-F]?|\\\\[0-7][0-7][0-7]|\\\\x\\{[0-9a-fA-F]+\\})|\G(\\\\[0-9][0-9])|\G(\\\\[abBGcedDsSwW0C]|\\\\c\\\\)|\G(\\^)|\G(\\\\A)|\G(\\))|\G(\\$)|\G(\\*\\?|\\+\\?|[*?+]|\\{[0-9]+\\}|\\{[0-9]+,\\}|\\{[0-9]+,[0-9]+\\})|\G(\\\\[zZ])|\G(\\(\\?)|\G(\\()|\G(\\.)|\G(\\\\[1-9])|\G(\\\\p\\{\\^?..?\\}|\\\\P\\{..?\\}|\\\\X)|\G(\\\\p\\{C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p\\{\\^C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p[CLMNPSZ])|\G(\\\\)"), 2 => array(0, "\G(\\\\[][{}*.^$|?()+])|\G(\\[)|\G(\\|)|\G(\\\\[frnt]|\\\\x[0-9a-fA-F][0-9a-fA-F]?|\\\\[0-7][0-7][0-7]|\\\\x\\{[0-9a-fA-F]+\\})|\G(\\\\[0-9][0-9])|\G(\\\\[abBGcedDsSwW0C]|\\\\c\\\\)|\G(\\^)|\G(\\\\A)|\G(\\))|\G(\\$)|\G(\\*\\?|\\+\\?|[*?+]|\\{[0-9]+\\}|\\{[0-9]+,\\}|\\{[0-9]+,[0-9]+\\})|\G(\\\\[zZ])|\G(\\(\\?)|\G(\\()|\G(\\.)|\G(\\\\[1-9])|\G(\\\\p\\{\\^?..?\\}|\\\\P\\{..?\\}|\\\\X)|\G(\\\\p\\{C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p\\{\\^C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p[CLMNPSZ])|\G(\\\\)"), 3 => array(0, "\G(\\[)|\G(\\|)|\G(\\\\[frnt]|\\\\x[0-9a-fA-F][0-9a-fA-F]?|\\\\[0-7][0-7][0-7]|\\\\x\\{[0-9a-fA-F]+\\})|\G(\\\\[0-9][0-9])|\G(\\\\[abBGcedDsSwW0C]|\\\\c\\\\)|\G(\\^)|\G(\\\\A)|\G(\\))|\G(\\$)|\G(\\*\\?|\\+\\?|[*?+]|\\{[0-9]+\\}|\\{[0-9]+,\\}|\\{[0-9]+,[0-9]+\\})|\G(\\\\[zZ])|\G(\\(\\?)|\G(\\()|\G(\\.)|\G(\\\\[1-9])|\G(\\\\p\\{\\^?..?\\}|\\\\P\\{..?\\}|\\\\X)|\G(\\\\p\\{C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p\\{\\^C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p[CLMNPSZ])|\G(\\\\)"), 4 => array(0, "\G(\\|)|\G(\\\\[frnt]|\\\\x[0-9a-fA-F][0-9a-fA-F]?|\\\\[0-7][0-7][0-7]|\\\\x\\{[0-9a-fA-F]+\\})|\G(\\\\[0-9][0-9])|\G(\\\\[abBGcedDsSwW0C]|\\\\c\\\\)|\G(\\^)|\G(\\\\A)|\G(\\))|\G(\\$)|\G(\\*\\?|\\+\\?|[*?+]|\\{[0-9]+\\}|\\{[0-9]+,\\}|\\{[0-9]+,[0-9]+\\})|\G(\\\\[zZ])|\G(\\(\\?)|\G(\\()|\G(\\.)|\G(\\\\[1-9])|\G(\\\\p\\{\\^?..?\\}|\\\\P\\{..?\\}|\\\\X)|\G(\\\\p\\{C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p\\{\\^C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p[CLMNPSZ])|\G(\\\\)"), 5 => array(0, "\G(\\\\[frnt]|\\\\x[0-9a-fA-F][0-9a-fA-F]?|\\\\[0-7][0-7][0-7]|\\\\x\\{[0-9a-fA-F]+\\})|\G(\\\\[0-9][0-9])|\G(\\\\[abBGcedDsSwW0C]|\\\\c\\\\)|\G(\\^)|\G(\\\\A)|\G(\\))|\G(\\$)|\G(\\*\\?|\\+\\?|[*?+]|\\{[0-9]+\\}|\\{[0-9]+,\\}|\\{[0-9]+,[0-9]+\\})|\G(\\\\[zZ])|\G(\\(\\?)|\G(\\()|\G(\\.)|\G(\\\\[1-9])|\G(\\\\p\\{\\^?..?\\}|\\\\P\\{..?\\}|\\\\X)|\G(\\\\p\\{C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p\\{\\^C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p[CLMNPSZ])|\G(\\\\)"), 6 => array(0, "\G(\\\\[0-9][0-9])|\G(\\\\[abBGcedDsSwW0C]|\\\\c\\\\)|\G(\\^)|\G(\\\\A)|\G(\\))|\G(\\$)|\G(\\*\\?|\\+\\?|[*?+]|\\{[0-9]+\\}|\\{[0-9]+,\\}|\\{[0-9]+,[0-9]+\\})|\G(\\\\[zZ])|\G(\\(\\?)|\G(\\()|\G(\\.)|\G(\\\\[1-9])|\G(\\\\p\\{\\^?..?\\}|\\\\P\\{..?\\}|\\\\X)|\G(\\\\p\\{C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p\\{\\^C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p[CLMNPSZ])|\G(\\\\)"), 7 => array(0, "\G(\\\\[abBGcedDsSwW0C]|\\\\c\\\\)|\G(\\^)|\G(\\\\A)|\G(\\))|\G(\\$)|\G(\\*\\?|\\+\\?|[*?+]|\\{[0-9]+\\}|\\{[0-9]+,\\}|\\{[0-9]+,[0-9]+\\})|\G(\\\\[zZ])|\G(\\(\\?)|\G(\\()|\G(\\.)|\G(\\\\[1-9])|\G(\\\\p\\{\\^?..?\\}|\\\\P\\{..?\\}|\\\\X)|\G(\\\\p\\{C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p\\{\\^C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p[CLMNPSZ])|\G(\\\\)"), 8 => array(0, "\G(\\^)|\G(\\\\A)|\G(\\))|\G(\\$)|\G(\\*\\?|\\+\\?|[*?+]|\\{[0-9]+\\}|\\{[0-9]+,\\}|\\{[0-9]+,[0-9]+\\})|\G(\\\\[zZ])|\G(\\(\\?)|\G(\\()|\G(\\.)|\G(\\\\[1-9])|\G(\\\\p\\{\\^?..?\\}|\\\\P\\{..?\\}|\\\\X)|\G(\\\\p\\{C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p\\{\\^C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p[CLMNPSZ])|\G(\\\\)"), 9 => array(0, "\G(\\\\A)|\G(\\))|\G(\\$)|\G(\\*\\?|\\+\\?|[*?+]|\\{[0-9]+\\}|\\{[0-9]+,\\}|\\{[0-9]+,[0-9]+\\})|\G(\\\\[zZ])|\G(\\(\\?)|\G(\\()|\G(\\.)|\G(\\\\[1-9])|\G(\\\\p\\{\\^?..?\\}|\\\\P\\{..?\\}|\\\\X)|\G(\\\\p\\{C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p\\{\\^C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p[CLMNPSZ])|\G(\\\\)"), 10 => array(0, "\G(\\))|\G(\\$)|\G(\\*\\?|\\+\\?|[*?+]|\\{[0-9]+\\}|\\{[0-9]+,\\}|\\{[0-9]+,[0-9]+\\})|\G(\\\\[zZ])|\G(\\(\\?)|\G(\\()|\G(\\.)|\G(\\\\[1-9])|\G(\\\\p\\{\\^?..?\\}|\\\\P\\{..?\\}|\\\\X)|\G(\\\\p\\{C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p\\{\\^C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p[CLMNPSZ])|\G(\\\\)"), 11 => array(0, "\G(\\$)|\G(\\*\\?|\\+\\?|[*?+]|\\{[0-9]+\\}|\\{[0-9]+,\\}|\\{[0-9]+,[0-9]+\\})|\G(\\\\[zZ])|\G(\\(\\?)|\G(\\()|\G(\\.)|\G(\\\\[1-9])|\G(\\\\p\\{\\^?..?\\}|\\\\P\\{..?\\}|\\\\X)|\G(\\\\p\\{C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p\\{\\^C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p[CLMNPSZ])|\G(\\\\)"), 12 => array(0, "\G(\\*\\?|\\+\\?|[*?+]|\\{[0-9]+\\}|\\{[0-9]+,\\}|\\{[0-9]+,[0-9]+\\})|\G(\\\\[zZ])|\G(\\(\\?)|\G(\\()|\G(\\.)|\G(\\\\[1-9])|\G(\\\\p\\{\\^?..?\\}|\\\\P\\{..?\\}|\\\\X)|\G(\\\\p\\{C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p\\{\\^C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p[CLMNPSZ])|\G(\\\\)"), 13 => array(0, "\G(\\\\[zZ])|\G(\\(\\?)|\G(\\()|\G(\\.)|\G(\\\\[1-9])|\G(\\\\p\\{\\^?..?\\}|\\\\P\\{..?\\}|\\\\X)|\G(\\\\p\\{C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p\\{\\^C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p[CLMNPSZ])|\G(\\\\)"), 14 => array(0, "\G(\\(\\?)|\G(\\()|\G(\\.)|\G(\\\\[1-9])|\G(\\\\p\\{\\^?..?\\}|\\\\P\\{..?\\}|\\\\X)|\G(\\\\p\\{C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p\\{\\^C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p[CLMNPSZ])|\G(\\\\)"), 15 => array(0, "\G(\\()|\G(\\.)|\G(\\\\[1-9])|\G(\\\\p\\{\\^?..?\\}|\\\\P\\{..?\\}|\\\\X)|\G(\\\\p\\{C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p\\{\\^C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p[CLMNPSZ])|\G(\\\\)"), 16 => array(0, "\G(\\.)|\G(\\\\[1-9])|\G(\\\\p\\{\\^?..?\\}|\\\\P\\{..?\\}|\\\\X)|\G(\\\\p\\{C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p\\{\\^C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p[CLMNPSZ])|\G(\\\\)"), 17 => array(0, "\G(\\\\[1-9])|\G(\\\\p\\{\\^?..?\\}|\\\\P\\{..?\\}|\\\\X)|\G(\\\\p\\{C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p\\{\\^C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p[CLMNPSZ])|\G(\\\\)"), 18 => array(0, "\G(\\\\p\\{\\^?..?\\}|\\\\P\\{..?\\}|\\\\X)|\G(\\\\p\\{C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p\\{\\^C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p[CLMNPSZ])|\G(\\\\)"), 19 => array(0, "\G(\\\\p\\{C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p\\{\\^C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p[CLMNPSZ])|\G(\\\\)"), 20 => array(0, "\G(\\\\p\\{\\^C[cfnos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?\\})|\G(\\\\p[CLMNPSZ])|\G(\\\\)"), 21 => array(0, "\G(\\\\p[CLMNPSZ])|\G(\\\\)"), 22 => array(0, "\G(\\\\)"), 23 => array(0, ""), ); // yymore is needed do { if (!strlen($yy_yymore_patterns[$this->token][1])) { throw new Exception('cannot do yymore for the last token'); } $yysubmatches = array(); if (preg_match('/' . $yy_yymore_patterns[$this->token][1] . '/', $this->input, $yymatches, null, $this->N)) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns next($yymatches); // skip global match $this->token += key($yymatches) + $yy_yymore_patterns[$this->token][0]; // token number $this->value = current($yymatches); // token value $this->line = substr_count($this->value, "\n"); if ($tokenMap[$this->token]) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, $this->token + 1, $tokenMap[$this->token]); } else { $yysubmatches = array(); } } $r = $this->{'yy_r1_' . $this->token}($yysubmatches); } while ($r !== null && !is_bool($r)); if ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { $this->N += strlen($this->value); $this->line += substr_count($this->value, "\n"); if ($this->N >= strlen($this->input)) { return false; // end of input } // skip this token continue; } else { // accept $this->N += strlen($this->value); $this->line += substr_count($this->value, "\n"); return true; } } } else { throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->input[$this->N]); } break; } while (true); } // end function const INITIAL = 1; function yy_r1_1($yy_subpatterns) { $this->token = self::ESCAPEDBACKSLASH; } function yy_r1_2($yy_subpatterns) { $this->token = self::TEXT; } function yy_r1_3($yy_subpatterns) { $this->token = self::CONTROLCHAR; } function yy_r1_4($yy_subpatterns) { $this->token = self::OPENCHARCLASS; $this->yybegin(self::CHARACTERCLASSSTART); } function yy_r1_5($yy_subpatterns) { $this->token = self::BAR; } function yy_r1_6($yy_subpatterns) { $this->token = self::TEXT; } function yy_r1_7($yy_subpatterns) { $this->token = self::COULDBEBACKREF; } function yy_r1_8($yy_subpatterns) { $this->token = self::CONTROLCHAR; } function yy_r1_9($yy_subpatterns) { $this->token = self::MATCHSTART; } function yy_r1_10($yy_subpatterns) { $this->token = self::MATCHSTART; } function yy_r1_11($yy_subpatterns) { $this->token = self::CLOSEPAREN; $this->yybegin(self::INITIAL); } function yy_r1_12($yy_subpatterns) { $this->token = self::MATCHEND; } function yy_r1_13($yy_subpatterns) { $this->token = self::MULTIPLIER; } function yy_r1_14($yy_subpatterns) { $this->token = self::MATCHEND; } function yy_r1_15($yy_subpatterns) { $this->token = self::OPENASSERTION; $this->yybegin(self::ASSERTION); } function yy_r1_16($yy_subpatterns) { $this->token = self::OPENPAREN; } function yy_r1_17($yy_subpatterns) { $this->token = self::FULLSTOP; } function yy_r1_18($yy_subpatterns) { $this->token = self::BACKREFERENCE; } function yy_r1_19($yy_subpatterns) { $this->token = self::CONTROLCHAR; } function yy_r1_20($yy_subpatterns) { $this->token = self::CONTROLCHAR; } function yy_r1_21($yy_subpatterns) { $this->token = self::CONTROLCHAR; } function yy_r1_22($yy_subpatterns) { $this->token = self::CONTROLCHAR; } function yy_r1_23($yy_subpatterns) { return false; } function yylex2() { $tokenMap = array ( 1 => 0, 2 => 0, 3 => 0, ); if ($this->N >= strlen($this->input)) { return false; // end of input } $yy_global_pattern = '/\G(\\^)|\G(\\])|\G(.)/'; do { if (preg_match($yy_global_pattern,$this->input, $yymatches, null, $this->N)) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns if (!count($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->input, $this->N, 5) . '... state CHARACTERCLASSSTART'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number if ($tokenMap[$this->token]) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, $this->token + 1, $tokenMap[$this->token]); } else { $yysubmatches = array(); } $this->value = current($yymatches); // token value $r = $this->{'yy_r2_' . $this->token}($yysubmatches); if ($r === null) { $this->N += strlen($this->value); $this->line += substr_count($this->value, "\n"); // accept this token return true; } elseif ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { $this->N += strlen($this->value); $this->line += substr_count($this->value, "\n"); if ($this->N >= strlen($this->input)) { return false; // end of input } // skip this token continue; } else { $yy_yymore_patterns = array( 1 => array(0, "\G(\\])|\G(.)"), 2 => array(0, "\G(.)"), 3 => array(0, ""), ); // yymore is needed do { if (!strlen($yy_yymore_patterns[$this->token][1])) { throw new Exception('cannot do yymore for the last token'); } $yysubmatches = array(); if (preg_match('/' . $yy_yymore_patterns[$this->token][1] . '/', $this->input, $yymatches, null, $this->N)) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns next($yymatches); // skip global match $this->token += key($yymatches) + $yy_yymore_patterns[$this->token][0]; // token number $this->value = current($yymatches); // token value $this->line = substr_count($this->value, "\n"); if ($tokenMap[$this->token]) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, $this->token + 1, $tokenMap[$this->token]); } else { $yysubmatches = array(); } } $r = $this->{'yy_r2_' . $this->token}($yysubmatches); } while ($r !== null && !is_bool($r)); if ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { $this->N += strlen($this->value); $this->line += substr_count($this->value, "\n"); if ($this->N >= strlen($this->input)) { return false; // end of input } // skip this token continue; } else { // accept $this->N += strlen($this->value); $this->line += substr_count($this->value, "\n"); return true; } } } else { throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->input[$this->N]); } break; } while (true); } // end function const CHARACTERCLASSSTART = 2; function yy_r2_1($yy_subpatterns) { $this->token = self::NEGATE; } function yy_r2_2($yy_subpatterns) { $this->yybegin(self::CHARACTERCLASS); $this->token = self::TEXT; } function yy_r2_3($yy_subpatterns) { $this->yybegin(self::CHARACTERCLASS); return true; } function yylex3() { $tokenMap = array ( 1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0, 8 => 0, 9 => 0, 10 => 0, 11 => 0, ); if ($this->N >= strlen($this->input)) { return false; // end of input } $yy_global_pattern = '/\G(\\\\\\\\)|\G(\\])|\G(\\\\[frnt]|\\\\x[0-9a-fA-F][0-9a-fA-F]?|\\\\[0-7][0-7][0-7]|\\\\x\\{[0-9a-fA-F]+\\})|\G(\\\\[bacedDsSwW0C]|\\\\c\\\\|\\\\x\\{[0-9a-fA-F]+\\}|\\\\[0-7][0-7][0-7]|\\\\x[0-9a-fA-F][0-9a-fA-F]?)|\G(\\\\[0-9][0-9])|\G(\\\\[1-9])|\G(\\\\[]\.\-\^])|\G(-(?!]))|\G([^\-\\\\])|\G(\\\\)|\G(.)/'; do { if (preg_match($yy_global_pattern,$this->input, $yymatches, null, $this->N)) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns if (!count($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->input, $this->N, 5) . '... state CHARACTERCLASS'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number if ($tokenMap[$this->token]) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, $this->token + 1, $tokenMap[$this->token]); } else { $yysubmatches = array(); } $this->value = current($yymatches); // token value $r = $this->{'yy_r3_' . $this->token}($yysubmatches); if ($r === null) { $this->N += strlen($this->value); $this->line += substr_count($this->value, "\n"); // accept this token return true; } elseif ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { $this->N += strlen($this->value); $this->line += substr_count($this->value, "\n"); if ($this->N >= strlen($this->input)) { return false; // end of input } // skip this token continue; } else { $yy_yymore_patterns = array( 1 => array(0, "\G(\\])|\G(\\\\[frnt]|\\\\x[0-9a-fA-F][0-9a-fA-F]?|\\\\[0-7][0-7][0-7]|\\\\x\\{[0-9a-fA-F]+\\})|\G(\\\\[bacedDsSwW0C]|\\\\c\\\\|\\\\x\\{[0-9a-fA-F]+\\}|\\\\[0-7][0-7][0-7]|\\\\x[0-9a-fA-F][0-9a-fA-F]?)|\G(\\\\[0-9][0-9])|\G(\\\\[1-9])|\G(\\\\[]\.\-\^])|\G(-(?!]))|\G([^\-\\\\])|\G(\\\\)|\G(.)"), 2 => array(0, "\G(\\\\[frnt]|\\\\x[0-9a-fA-F][0-9a-fA-F]?|\\\\[0-7][0-7][0-7]|\\\\x\\{[0-9a-fA-F]+\\})|\G(\\\\[bacedDsSwW0C]|\\\\c\\\\|\\\\x\\{[0-9a-fA-F]+\\}|\\\\[0-7][0-7][0-7]|\\\\x[0-9a-fA-F][0-9a-fA-F]?)|\G(\\\\[0-9][0-9])|\G(\\\\[1-9])|\G(\\\\[]\.\-\^])|\G(-(?!]))|\G([^\-\\\\])|\G(\\\\)|\G(.)"), 3 => array(0, "\G(\\\\[bacedDsSwW0C]|\\\\c\\\\|\\\\x\\{[0-9a-fA-F]+\\}|\\\\[0-7][0-7][0-7]|\\\\x[0-9a-fA-F][0-9a-fA-F]?)|\G(\\\\[0-9][0-9])|\G(\\\\[1-9])|\G(\\\\[]\.\-\^])|\G(-(?!]))|\G([^\-\\\\])|\G(\\\\)|\G(.)"), 4 => array(0, "\G(\\\\[0-9][0-9])|\G(\\\\[1-9])|\G(\\\\[]\.\-\^])|\G(-(?!]))|\G([^\-\\\\])|\G(\\\\)|\G(.)"), 5 => array(0, "\G(\\\\[1-9])|\G(\\\\[]\.\-\^])|\G(-(?!]))|\G([^\-\\\\])|\G(\\\\)|\G(.)"), 6 => array(0, "\G(\\\\[]\.\-\^])|\G(-(?!]))|\G([^\-\\\\])|\G(\\\\)|\G(.)"), 7 => array(0, "\G(-(?!]))|\G([^\-\\\\])|\G(\\\\)|\G(.)"), 8 => array(0, "\G([^\-\\\\])|\G(\\\\)|\G(.)"), 9 => array(0, "\G(\\\\)|\G(.)"), 10 => array(0, "\G(.)"), 11 => array(0, ""), ); // yymore is needed do { if (!strlen($yy_yymore_patterns[$this->token][1])) { throw new Exception('cannot do yymore for the last token'); } $yysubmatches = array(); if (preg_match('/' . $yy_yymore_patterns[$this->token][1] . '/', $this->input, $yymatches, null, $this->N)) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns next($yymatches); // skip global match $this->token += key($yymatches) + $yy_yymore_patterns[$this->token][0]; // token number $this->value = current($yymatches); // token value $this->line = substr_count($this->value, "\n"); if ($tokenMap[$this->token]) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, $this->token + 1, $tokenMap[$this->token]); } else { $yysubmatches = array(); } } $r = $this->{'yy_r3_' . $this->token}($yysubmatches); } while ($r !== null && !is_bool($r)); if ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { $this->N += strlen($this->value); $this->line += substr_count($this->value, "\n"); if ($this->N >= strlen($this->input)) { return false; // end of input } // skip this token continue; } else { // accept $this->N += strlen($this->value); $this->line += substr_count($this->value, "\n"); return true; } } } else { throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->input[$this->N]); } break; } while (true); } // end function const CHARACTERCLASS = 3; function yy_r3_1($yy_subpatterns) { $this->token = self::ESCAPEDBACKSLASH; } function yy_r3_2($yy_subpatterns) { $this->yybegin(self::INITIAL); $this->token = self::CLOSECHARCLASS; } function yy_r3_3($yy_subpatterns) { $this->token = self::TEXT; } function yy_r3_4($yy_subpatterns) { $this->token = self::TEXT; } function yy_r3_5($yy_subpatterns) { $this->token = self::COULDBEBACKREF; } function yy_r3_6($yy_subpatterns) { $this->token = self::BACKREFERENCE; } function yy_r3_7($yy_subpatterns) { $this->token = self::TEXT; } function yy_r3_8($yy_subpatterns) { $this->token = self::HYPHEN; $this->yybegin(self::RANGE); } function yy_r3_9($yy_subpatterns) { $this->token = self::TEXT; } function yy_r3_10($yy_subpatterns) { return false; // ignore escaping of normal text } function yy_r3_11($yy_subpatterns) { $this->token = self::TEXT; } function yylex4() { $tokenMap = array ( 1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0, ); if ($this->N >= strlen($this->input)) { return false; // end of input } $yy_global_pattern = '/\G(\\\\\\\\)|\G(\\\\\\])|\G(\\\\[bacedDsSwW0C]|\\\\c\\\\|\\\\x\\{[0-9a-fA-F]+\\}|\\\\[0-7][0-7][0-7]|\\\\x[0-9a-fA-F][0-9a-fA-F]?)|\G(\\\\[0-9][0-9])|\G(\\\\[1-9])|\G([^\-\\\\])|\G(\\\\)/'; do { if (preg_match($yy_global_pattern,$this->input, $yymatches, null, $this->N)) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns if (!count($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->input, $this->N, 5) . '... state RANGE'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number if ($tokenMap[$this->token]) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, $this->token + 1, $tokenMap[$this->token]); } else { $yysubmatches = array(); } $this->value = current($yymatches); // token value $r = $this->{'yy_r4_' . $this->token}($yysubmatches); if ($r === null) { $this->N += strlen($this->value); $this->line += substr_count($this->value, "\n"); // accept this token return true; } elseif ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { $this->N += strlen($this->value); $this->line += substr_count($this->value, "\n"); if ($this->N >= strlen($this->input)) { return false; // end of input } // skip this token continue; } else { $yy_yymore_patterns = array( 1 => array(0, "\G(\\\\\\])|\G(\\\\[bacedDsSwW0C]|\\\\c\\\\|\\\\x\\{[0-9a-fA-F]+\\}|\\\\[0-7][0-7][0-7]|\\\\x[0-9a-fA-F][0-9a-fA-F]?)|\G(\\\\[0-9][0-9])|\G(\\\\[1-9])|\G([^\-\\\\])|\G(\\\\)"), 2 => array(0, "\G(\\\\[bacedDsSwW0C]|\\\\c\\\\|\\\\x\\{[0-9a-fA-F]+\\}|\\\\[0-7][0-7][0-7]|\\\\x[0-9a-fA-F][0-9a-fA-F]?)|\G(\\\\[0-9][0-9])|\G(\\\\[1-9])|\G([^\-\\\\])|\G(\\\\)"), 3 => array(0, "\G(\\\\[0-9][0-9])|\G(\\\\[1-9])|\G([^\-\\\\])|\G(\\\\)"), 4 => array(0, "\G(\\\\[1-9])|\G([^\-\\\\])|\G(\\\\)"), 5 => array(0, "\G([^\-\\\\])|\G(\\\\)"), 6 => array(0, "\G(\\\\)"), 7 => array(0, ""), ); // yymore is needed do { if (!strlen($yy_yymore_patterns[$this->token][1])) { throw new Exception('cannot do yymore for the last token'); } $yysubmatches = array(); if (preg_match('/' . $yy_yymore_patterns[$this->token][1] . '/', $this->input, $yymatches, null, $this->N)) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns next($yymatches); // skip global match $this->token += key($yymatches) + $yy_yymore_patterns[$this->token][0]; // token number $this->value = current($yymatches); // token value $this->line = substr_count($this->value, "\n"); if ($tokenMap[$this->token]) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, $this->token + 1, $tokenMap[$this->token]); } else { $yysubmatches = array(); } } $r = $this->{'yy_r4_' . $this->token}($yysubmatches); } while ($r !== null && !is_bool($r)); if ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { $this->N += strlen($this->value); $this->line += substr_count($this->value, "\n"); if ($this->N >= strlen($this->input)) { return false; // end of input } // skip this token continue; } else { // accept $this->N += strlen($this->value); $this->line += substr_count($this->value, "\n"); return true; } } } else { throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->input[$this->N]); } break; } while (true); } // end function const RANGE = 4; function yy_r4_1($yy_subpatterns) { $this->token = self::ESCAPEDBACKSLASH; } function yy_r4_2($yy_subpatterns) { $this->token = self::TEXT; $this->yybegin(self::CHARACTERCLASS); } function yy_r4_3($yy_subpatterns) { $this->token = self::TEXT; $this->yybegin(self::CHARACTERCLASS); } function yy_r4_4($yy_subpatterns) { $this->token = self::COULDBEBACKREF; } function yy_r4_5($yy_subpatterns) { $this->token = self::BACKREFERENCE; } function yy_r4_6($yy_subpatterns) { $this->token = self::TEXT; $this->yybegin(self::CHARACTERCLASS); } function yy_r4_7($yy_subpatterns) { return false; // ignore escaping of normal text } function yylex5() { $tokenMap = array ( 1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0, 8 => 0, 9 => 0, 10 => 0, 11 => 0, 12 => 0, 13 => 0, ); if ($this->N >= strlen($this->input)) { return false; // end of input } $yy_global_pattern = '/\G([imsxUX]+-[imsxUX]+|[imsxUX]+|-[imsxUX]+)|\G(:)|\G(\\))|\G(P<[^>]+>)|\G(<=)|\G()|\G(\\(\\?)|\G(#[^)]+)|\G(R)|\G(.)/'; do { if (preg_match($yy_global_pattern,$this->input, $yymatches, null, $this->N)) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns if (!count($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->input, $this->N, 5) . '... state ASSERTION'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number if ($tokenMap[$this->token]) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, $this->token + 1, $tokenMap[$this->token]); } else { $yysubmatches = array(); } $this->value = current($yymatches); // token value $r = $this->{'yy_r5_' . $this->token}($yysubmatches); if ($r === null) { $this->N += strlen($this->value); $this->line += substr_count($this->value, "\n"); // accept this token return true; } elseif ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { $this->N += strlen($this->value); $this->line += substr_count($this->value, "\n"); if ($this->N >= strlen($this->input)) { return false; // end of input } // skip this token continue; } else { $yy_yymore_patterns = array( 1 => array(0, "\G(:)|\G(\\))|\G(P<[^>]+>)|\G(<=)|\G()|\G(\\(\\?)|\G(#[^)]+)|\G(R)|\G(.)"), 2 => array(0, "\G(\\))|\G(P<[^>]+>)|\G(<=)|\G()|\G(\\(\\?)|\G(#[^)]+)|\G(R)|\G(.)"), 3 => array(0, "\G(P<[^>]+>)|\G(<=)|\G()|\G(\\(\\?)|\G(#[^)]+)|\G(R)|\G(.)"), 4 => array(0, "\G(<=)|\G()|\G(\\(\\?)|\G(#[^)]+)|\G(R)|\G(.)"), 5 => array(0, "\G()|\G(\\(\\?)|\G(#[^)]+)|\G(R)|\G(.)"), 6 => array(0, "\G(=)|\G(!)|\G(>)|\G(\\(\\?)|\G(#[^)]+)|\G(R)|\G(.)"), 7 => array(0, "\G(!)|\G(>)|\G(\\(\\?)|\G(#[^)]+)|\G(R)|\G(.)"), 8 => array(0, "\G(>)|\G(\\(\\?)|\G(#[^)]+)|\G(R)|\G(.)"), 9 => array(0, "\G(\\(\\?)|\G(#[^)]+)|\G(R)|\G(.)"), 10 => array(0, "\G(#[^)]+)|\G(R)|\G(.)"), 11 => array(0, "\G(R)|\G(.)"), 12 => array(0, "\G(.)"), 13 => array(0, ""), ); // yymore is needed do { if (!strlen($yy_yymore_patterns[$this->token][1])) { throw new Exception('cannot do yymore for the last token'); } $yysubmatches = array(); if (preg_match('/' . $yy_yymore_patterns[$this->token][1] . '/', $this->input, $yymatches, null, $this->N)) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns next($yymatches); // skip global match $this->token += key($yymatches) + $yy_yymore_patterns[$this->token][0]; // token number $this->value = current($yymatches); // token value $this->line = substr_count($this->value, "\n"); if ($tokenMap[$this->token]) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, $this->token + 1, $tokenMap[$this->token]); } else { $yysubmatches = array(); } } $r = $this->{'yy_r5_' . $this->token}($yysubmatches); } while ($r !== null && !is_bool($r)); if ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { $this->N += strlen($this->value); $this->line += substr_count($this->value, "\n"); if ($this->N >= strlen($this->input)) { return false; // end of input } // skip this token continue; } else { // accept $this->N += strlen($this->value); $this->line += substr_count($this->value, "\n"); return true; } } } else { throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->input[$this->N]); } break; } while (true); } // end function const ASSERTION = 5; function yy_r5_1($yy_subpatterns) { $this->token = self::INTERNALOPTIONS; } function yy_r5_2($yy_subpatterns) { $this->token = self::COLON; $this->yybegin(self::INITIAL); } function yy_r5_3($yy_subpatterns) { $this->token = self::CLOSEPAREN; $this->yybegin(self::INITIAL); } function yy_r5_4($yy_subpatterns) { $this->token = self::PATTERNNAME; $this->yybegin(self::INITIAL); } function yy_r5_5($yy_subpatterns) { $this->token = self::POSITIVELOOKBEHIND; $this->yybegin(self::INITIAL); } function yy_r5_6($yy_subpatterns) { $this->token = self::NEGATIVELOOKBEHIND; $this->yybegin(self::INITIAL); } function yy_r5_7($yy_subpatterns) { $this->token = self::POSITIVELOOKAHEAD; $this->yybegin(self::INITIAL); } function yy_r5_8($yy_subpatterns) { $this->token = self::NEGATIVELOOKAHEAD; $this->yybegin(self::INITIAL); } function yy_r5_9($yy_subpatterns) { $this->token = self::ONCEONLY; $this->yybegin(self::INITIAL); } function yy_r5_10($yy_subpatterns) { $this->token = self::OPENASSERTION; } function yy_r5_11($yy_subpatterns) { $this->token = self::COMMENT; $this->yybegin(self::INITIAL); } function yy_r5_12($yy_subpatterns) { $this->token = self::RECUR; } function yy_r5_13($yy_subpatterns) { $this->yybegin(self::INITIAL); return true; } }smarty3-3.1.13/development/lexer/LexerGenerator/Regex/Parser.php0000644000175000017500000024762311634664106023270 0ustar mikemikestring = $s->string; $this->metadata = $s->metadata; } else { $this->string = (string) $s; if ($m instanceof PHP_LexerGenerator_Regex_yyToken) { $this->metadata = $m->metadata; } elseif (is_array($m)) { $this->metadata = $m; } } } function __toString() { return $this->_string; } function offsetExists($offset) { return isset($this->metadata[$offset]); } function offsetGet($offset) { return $this->metadata[$offset]; } function offsetSet($offset, $value) { if ($offset === null) { if (isset($value[0])) { $x = ($value instanceof PHP_LexerGenerator_Regex_yyToken) ? $value->metadata : $value; $this->metadata = array_merge($this->metadata, $x); return; } $offset = count($this->metadata); } if ($value === null) { return; } if ($value instanceof PHP_LexerGenerator_Regex_yyToken) { if ($value->metadata) { $this->metadata[$offset] = $value->metadata; } } elseif ($value) { $this->metadata[$offset] = $value; } } function offsetUnset($offset) { unset($this->metadata[$offset]); } } /** The following structure represents a single element of the * parser's stack. Information stored includes: * * + The state number for the parser at this level of the stack. * * + The value of the token stored at this level of the stack. * (In other words, the "major" token.) * * + The semantic value stored at this level of the stack. This is * the information used by the action routines in the grammar. * It is sometimes called the "minor" token. */ class PHP_LexerGenerator_Regex_yyStackEntry { public $stateno; /* The state-number */ public $major; /* The major token value. This is the code ** number for the token at this stack level */ public $minor; /* The user-supplied minor token value. This ** is the value of the token */ }; // code external to the class is included here #line 2 "Parser.y" require_once './LexerGenerator/Exception.php'; #line 102 "Parser.php" // declare_class is output here #line 5 "Parser.y" class PHP_LexerGenerator_Regex_Parser#line 107 "Parser.php" { /* First off, code is included which follows the "include_class" declaration ** in the input file. */ #line 21 "Parser.y" private $_lex; private $_subpatterns; private $_updatePattern; private $_patternIndex; public $result; function __construct($lex) { $this->result = new PHP_LexerGenerator_ParseryyToken(''); $this->_lex = $lex; $this->_subpatterns = 0; $this->_patternIndex = 1; } function reset($patternIndex, $updatePattern = false) { $this->_updatePattern = $updatePattern; $this->_patternIndex = $patternIndex; $this->_subpatterns = 0; $this->result = new PHP_LexerGenerator_ParseryyToken(''); } #line 134 "Parser.php" /* Next is all token values, as class constants */ /* ** These constants (all generated automatically by the parser generator) ** specify the various kinds of tokens (terminals) that the parser ** understands. ** ** Each symbol here is a terminal symbol in the grammar. */ const OPENPAREN = 1; const OPENASSERTION = 2; const BAR = 3; const MULTIPLIER = 4; const MATCHSTART = 5; const MATCHEND = 6; const OPENCHARCLASS = 7; const CLOSECHARCLASS = 8; const NEGATE = 9; const TEXT = 10; const ESCAPEDBACKSLASH = 11; const HYPHEN = 12; const BACKREFERENCE = 13; const COULDBEBACKREF = 14; const CONTROLCHAR = 15; const FULLSTOP = 16; const INTERNALOPTIONS = 17; const CLOSEPAREN = 18; const COLON = 19; const POSITIVELOOKAHEAD = 20; const NEGATIVELOOKAHEAD = 21; const POSITIVELOOKBEHIND = 22; const NEGATIVELOOKBEHIND = 23; const PATTERNNAME = 24; const ONCEONLY = 25; const COMMENT = 26; const RECUR = 27; const YY_NO_ACTION = 230; const YY_ACCEPT_ACTION = 229; const YY_ERROR_ACTION = 228; /* Next are that tables used to determine what action to take based on the ** current state and lookahead token. These tables are used to implement ** functions that take a state number and lookahead value and return an ** action integer. ** ** Suppose the action integer is N. Then the action is determined as ** follows ** ** 0 <= N < self::YYNSTATE Shift N. That is, ** push the lookahead ** token onto the stack ** and goto state N. ** ** self::YYNSTATE <= N < self::YYNSTATE+self::YYNRULE Reduce by rule N-YYNSTATE. ** ** N == self::YYNSTATE+self::YYNRULE A syntax error has occurred. ** ** N == self::YYNSTATE+self::YYNRULE+1 The parser accepts its ** input. (and concludes parsing) ** ** N == self::YYNSTATE+self::YYNRULE+2 No such action. Denotes unused ** slots in the yy_action[] table. ** ** The action table is constructed as a single large static array $yy_action. ** Given state S and lookahead X, the action is computed as ** ** self::$yy_action[self::$yy_shift_ofst[S] + X ] ** ** If the index value self::$yy_shift_ofst[S]+X is out of range or if the value ** self::$yy_lookahead[self::$yy_shift_ofst[S]+X] is not equal to X or if ** self::$yy_shift_ofst[S] is equal to self::YY_SHIFT_USE_DFLT, it means that ** the action is not in the table and that self::$yy_default[S] should be used instead. ** ** The formula above is for computing the action when the lookahead is ** a terminal symbol. If the lookahead is a non-terminal (as occurs after ** a reduce action) then the static $yy_reduce_ofst array is used in place of ** the static $yy_shift_ofst array and self::YY_REDUCE_USE_DFLT is used in place of ** self::YY_SHIFT_USE_DFLT. ** ** The following are the tables generated in this section: ** ** self::$yy_action A single table containing all actions. ** self::$yy_lookahead A table containing the lookahead for each entry in ** yy_action. Used to detect hash collisions. ** self::$yy_shift_ofst For each state, the offset into self::$yy_action for ** shifting terminals. ** self::$yy_reduce_ofst For each state, the offset into self::$yy_action for ** shifting non-terminals after a reduce. ** self::$yy_default Default action for each state. */ const YY_SZ_ACTTAB = 354; static public $yy_action = array( /* 0 */ 229, 45, 15, 23, 104, 106, 107, 109, 108, 118, /* 10 */ 119, 129, 128, 130, 36, 15, 23, 104, 106, 107, /* 20 */ 109, 108, 118, 119, 129, 128, 130, 39, 15, 23, /* 30 */ 104, 106, 107, 109, 108, 118, 119, 129, 128, 130, /* 40 */ 25, 15, 23, 104, 106, 107, 109, 108, 118, 119, /* 50 */ 129, 128, 130, 32, 15, 23, 104, 106, 107, 109, /* 60 */ 108, 118, 119, 129, 128, 130, 28, 15, 23, 104, /* 70 */ 106, 107, 109, 108, 118, 119, 129, 128, 130, 35, /* 80 */ 15, 23, 104, 106, 107, 109, 108, 118, 119, 129, /* 90 */ 128, 130, 92, 15, 23, 104, 106, 107, 109, 108, /* 100 */ 118, 119, 129, 128, 130, 38, 15, 23, 104, 106, /* 110 */ 107, 109, 108, 118, 119, 129, 128, 130, 40, 15, /* 120 */ 23, 104, 106, 107, 109, 108, 118, 119, 129, 128, /* 130 */ 130, 33, 15, 23, 104, 106, 107, 109, 108, 118, /* 140 */ 119, 129, 128, 130, 30, 15, 23, 104, 106, 107, /* 150 */ 109, 108, 118, 119, 129, 128, 130, 37, 15, 23, /* 160 */ 104, 106, 107, 109, 108, 118, 119, 129, 128, 130, /* 170 */ 34, 15, 23, 104, 106, 107, 109, 108, 118, 119, /* 180 */ 129, 128, 130, 16, 23, 104, 106, 107, 109, 108, /* 190 */ 118, 119, 129, 128, 130, 54, 24, 22, 72, 76, /* 200 */ 85, 84, 82, 81, 80, 97, 134, 125, 93, 12, /* 210 */ 12, 26, 83, 2, 5, 1, 11, 4, 10, 13, /* 220 */ 49, 50, 9, 17, 46, 98, 14, 12, 18, 113, /* 230 */ 124, 52, 43, 79, 44, 57, 42, 41, 9, 17, /* 240 */ 127, 12, 53, 91, 18, 126, 12, 52, 43, 120, /* 250 */ 44, 57, 42, 41, 9, 17, 47, 12, 31, 117, /* 260 */ 18, 88, 99, 52, 43, 75, 44, 57, 42, 41, /* 270 */ 9, 17, 51, 19, 67, 69, 18, 101, 87, 52, /* 280 */ 43, 12, 44, 57, 42, 41, 132, 64, 63, 103, /* 290 */ 62, 58, 66, 65, 59, 12, 60, 68, 90, 111, /* 300 */ 116, 122, 61, 100, 60, 68, 12, 111, 116, 122, /* 310 */ 71, 5, 1, 11, 4, 67, 69, 12, 101, 87, /* 320 */ 12, 102, 12, 12, 112, 6, 105, 131, 78, 7, /* 330 */ 8, 95, 77, 74, 70, 56, 123, 48, 133, 73, /* 340 */ 27, 114, 86, 55, 115, 89, 110, 121, 3, 94, /* 350 */ 21, 29, 96, 20, ); static public $yy_lookahead = array( /* 0 */ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, /* 10 */ 39, 40, 41, 42, 30, 31, 32, 33, 34, 35, /* 20 */ 36, 37, 38, 39, 40, 41, 42, 30, 31, 32, /* 30 */ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, /* 40 */ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, /* 50 */ 40, 41, 42, 30, 31, 32, 33, 34, 35, 36, /* 60 */ 37, 38, 39, 40, 41, 42, 30, 31, 32, 33, /* 70 */ 34, 35, 36, 37, 38, 39, 40, 41, 42, 30, /* 80 */ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, /* 90 */ 41, 42, 30, 31, 32, 33, 34, 35, 36, 37, /* 100 */ 38, 39, 40, 41, 42, 30, 31, 32, 33, 34, /* 110 */ 35, 36, 37, 38, 39, 40, 41, 42, 30, 31, /* 120 */ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, /* 130 */ 42, 30, 31, 32, 33, 34, 35, 36, 37, 38, /* 140 */ 39, 40, 41, 42, 30, 31, 32, 33, 34, 35, /* 150 */ 36, 37, 38, 39, 40, 41, 42, 30, 31, 32, /* 160 */ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, /* 170 */ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, /* 180 */ 40, 41, 42, 31, 32, 33, 34, 35, 36, 37, /* 190 */ 38, 39, 40, 41, 42, 1, 2, 32, 33, 34, /* 200 */ 35, 36, 37, 38, 39, 40, 41, 42, 18, 3, /* 210 */ 3, 17, 10, 19, 20, 21, 22, 23, 24, 25, /* 220 */ 26, 27, 1, 2, 18, 18, 5, 3, 7, 10, /* 230 */ 11, 10, 11, 4, 13, 14, 15, 16, 1, 2, /* 240 */ 10, 3, 18, 6, 7, 15, 3, 10, 11, 4, /* 250 */ 13, 14, 15, 16, 1, 2, 18, 3, 12, 6, /* 260 */ 7, 18, 4, 10, 11, 4, 13, 14, 15, 16, /* 270 */ 1, 2, 18, 9, 10, 11, 7, 13, 14, 10, /* 280 */ 11, 3, 13, 14, 15, 16, 4, 10, 11, 4, /* 290 */ 13, 14, 15, 16, 8, 3, 10, 11, 18, 13, /* 300 */ 14, 15, 8, 4, 10, 11, 3, 13, 14, 15, /* 310 */ 18, 20, 21, 22, 23, 10, 11, 3, 13, 14, /* 320 */ 3, 18, 3, 3, 18, 19, 10, 11, 4, 36, /* 330 */ 37, 4, 18, 4, 12, 18, 4, 18, 18, 4, /* 340 */ 12, 4, 4, 10, 4, 4, 4, 4, 18, 4, /* 350 */ 43, 12, 4, 43, ); const YY_SHIFT_USE_DFLT = -1; const YY_SHIFT_MAX = 70; static public $yy_shift_ofst = array( /* 0 */ 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, /* 10 */ 221, 221, 221, 221, 269, 253, 237, 194, 264, 305, /* 20 */ 286, 294, 277, 277, 291, 320, 306, 316, 317, 219, /* 30 */ 224, 230, 238, 206, 207, 319, 243, 314, 303, 254, /* 40 */ 292, 345, 348, 261, 282, 278, 285, 324, 327, 280, /* 50 */ 190, 229, 245, 343, 333, 330, 342, 337, 329, 332, /* 60 */ 328, 340, 335, 338, 341, 299, 258, 339, 246, 322, /* 70 */ 202, ); const YY_REDUCE_USE_DFLT = -30; const YY_REDUCE_MAX = 19; static public $yy_reduce_ofst = array( /* 0 */ -29, 127, 114, 101, 140, 88, 10, -3, 23, 36, /* 10 */ 49, 75, 62, -16, 152, 165, 165, 293, 310, 307, ); static public $yyExpectedTokens = array( /* 0 */ array(1, 2, 5, 7, 10, 11, 13, 14, 15, 16, ), /* 1 */ array(1, 2, 5, 7, 10, 11, 13, 14, 15, 16, ), /* 2 */ array(1, 2, 5, 7, 10, 11, 13, 14, 15, 16, ), /* 3 */ array(1, 2, 5, 7, 10, 11, 13, 14, 15, 16, ), /* 4 */ array(1, 2, 5, 7, 10, 11, 13, 14, 15, 16, ), /* 5 */ array(1, 2, 5, 7, 10, 11, 13, 14, 15, 16, ), /* 6 */ array(1, 2, 5, 7, 10, 11, 13, 14, 15, 16, ), /* 7 */ array(1, 2, 5, 7, 10, 11, 13, 14, 15, 16, ), /* 8 */ array(1, 2, 5, 7, 10, 11, 13, 14, 15, 16, ), /* 9 */ array(1, 2, 5, 7, 10, 11, 13, 14, 15, 16, ), /* 10 */ array(1, 2, 5, 7, 10, 11, 13, 14, 15, 16, ), /* 11 */ array(1, 2, 5, 7, 10, 11, 13, 14, 15, 16, ), /* 12 */ array(1, 2, 5, 7, 10, 11, 13, 14, 15, 16, ), /* 13 */ array(1, 2, 5, 7, 10, 11, 13, 14, 15, 16, ), /* 14 */ array(1, 2, 7, 10, 11, 13, 14, 15, 16, ), /* 15 */ array(1, 2, 6, 7, 10, 11, 13, 14, 15, 16, ), /* 16 */ array(1, 2, 6, 7, 10, 11, 13, 14, 15, 16, ), /* 17 */ array(1, 2, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, ), /* 18 */ array(9, 10, 11, 13, 14, ), /* 19 */ array(10, 11, 13, 14, ), /* 20 */ array(8, 10, 11, 13, 14, 15, ), /* 21 */ array(8, 10, 11, 13, 14, 15, ), /* 22 */ array(10, 11, 13, 14, 15, 16, ), /* 23 */ array(10, 11, 13, 14, 15, 16, ), /* 24 */ array(20, 21, 22, 23, ), /* 25 */ array(3, 18, ), /* 26 */ array(18, 19, ), /* 27 */ array(10, 11, ), /* 28 */ array(3, 18, ), /* 29 */ array(10, 11, ), /* 30 */ array(3, 18, ), /* 31 */ array(10, 15, ), /* 32 */ array(3, 18, ), /* 33 */ array(3, 18, ), /* 34 */ array(3, 18, ), /* 35 */ array(3, 18, ), /* 36 */ array(3, 18, ), /* 37 */ array(3, 18, ), /* 38 */ array(3, 18, ), /* 39 */ array(3, 18, ), /* 40 */ array(3, 18, ), /* 41 */ array(4, ), /* 42 */ array(4, ), /* 43 */ array(4, ), /* 44 */ array(4, ), /* 45 */ array(3, ), /* 46 */ array(4, ), /* 47 */ array(4, ), /* 48 */ array(4, ), /* 49 */ array(18, ), /* 50 */ array(18, ), /* 51 */ array(4, ), /* 52 */ array(4, ), /* 53 */ array(4, ), /* 54 */ array(10, ), /* 55 */ array(18, ), /* 56 */ array(4, ), /* 57 */ array(4, ), /* 58 */ array(4, ), /* 59 */ array(4, ), /* 60 */ array(12, ), /* 61 */ array(4, ), /* 62 */ array(4, ), /* 63 */ array(4, ), /* 64 */ array(4, ), /* 65 */ array(4, ), /* 66 */ array(4, ), /* 67 */ array(12, ), /* 68 */ array(12, ), /* 69 */ array(12, ), /* 70 */ array(10, ), /* 71 */ array(), /* 72 */ array(), /* 73 */ array(), /* 74 */ array(), /* 75 */ array(), /* 76 */ array(), /* 77 */ array(), /* 78 */ array(), /* 79 */ array(), /* 80 */ array(), /* 81 */ array(), /* 82 */ array(), /* 83 */ array(), /* 84 */ array(), /* 85 */ array(), /* 86 */ array(), /* 87 */ array(), /* 88 */ array(), /* 89 */ array(), /* 90 */ array(), /* 91 */ array(), /* 92 */ array(), /* 93 */ array(), /* 94 */ array(), /* 95 */ array(), /* 96 */ array(), /* 97 */ array(), /* 98 */ array(), /* 99 */ array(), /* 100 */ array(), /* 101 */ array(), /* 102 */ array(), /* 103 */ array(), /* 104 */ array(), /* 105 */ array(), /* 106 */ array(), /* 107 */ array(), /* 108 */ array(), /* 109 */ array(), /* 110 */ array(), /* 111 */ array(), /* 112 */ array(), /* 113 */ array(), /* 114 */ array(), /* 115 */ array(), /* 116 */ array(), /* 117 */ array(), /* 118 */ array(), /* 119 */ array(), /* 120 */ array(), /* 121 */ array(), /* 122 */ array(), /* 123 */ array(), /* 124 */ array(), /* 125 */ array(), /* 126 */ array(), /* 127 */ array(), /* 128 */ array(), /* 129 */ array(), /* 130 */ array(), /* 131 */ array(), /* 132 */ array(), /* 133 */ array(), /* 134 */ array(), ); static public $yy_default = array( /* 0 */ 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, /* 10 */ 228, 228, 228, 228, 228, 139, 137, 228, 228, 228, /* 20 */ 228, 228, 152, 141, 228, 228, 228, 228, 228, 228, /* 30 */ 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, /* 40 */ 228, 185, 187, 189, 191, 135, 212, 215, 221, 228, /* 50 */ 228, 213, 183, 209, 228, 228, 223, 193, 205, 163, /* 60 */ 176, 164, 203, 201, 195, 197, 199, 167, 175, 168, /* 70 */ 228, 217, 153, 204, 206, 190, 154, 218, 216, 214, /* 80 */ 159, 158, 157, 169, 156, 155, 202, 173, 225, 196, /* 90 */ 226, 136, 140, 227, 186, 222, 188, 160, 220, 200, /* 100 */ 198, 172, 219, 211, 142, 180, 143, 144, 146, 145, /* 110 */ 224, 181, 207, 170, 194, 166, 182, 138, 147, 148, /* 120 */ 184, 210, 174, 165, 171, 162, 177, 178, 150, 149, /* 130 */ 151, 179, 192, 208, 161, ); /* The next thing included is series of defines which control ** various aspects of the generated parser. ** self::YYNOCODE is a number which corresponds ** to no legal terminal or nonterminal number. This ** number is used to fill in empty slots of the hash ** table. ** self::YYFALLBACK If defined, this indicates that one or more tokens ** have fall-back values which should be used if the ** original value of the token will not parse. ** self::YYSTACKDEPTH is the maximum depth of the parser's stack. ** self::YYNSTATE the combined number of states. ** self::YYNRULE the number of rules in the grammar ** self::YYERRORSYMBOL is the code number of the error symbol. If not ** defined, then do no error processing. */ const YYNOCODE = 45; const YYSTACKDEPTH = 100; const YYNSTATE = 135; const YYNRULE = 93; const YYERRORSYMBOL = 28; const YYERRSYMDT = 'yy0'; const YYFALLBACK = 0; /** The next table maps tokens into fallback tokens. If a construct * like the following: * * %fallback ID X Y Z. * * appears in the grammer, then ID becomes a fallback token for X, Y, * and Z. Whenever one of the tokens X, Y, or Z is input to the parser * but it does not parse, the type of the token is changed to ID and * the parse is retried before an error is thrown. */ static public $yyFallback = array( ); /** * Turn parser tracing on by giving a stream to which to write the trace * and a prompt to preface each trace message. Tracing is turned off * by making either argument NULL * * Inputs: * * - A stream resource to which trace output should be written. * If NULL, then tracing is turned off. * - A prefix string written at the beginning of every * line of trace output. If NULL, then tracing is * turned off. * * Outputs: * * - None. * @param resource * @param string */ static function Trace($TraceFILE, $zTracePrompt) { if (!$TraceFILE) { $zTracePrompt = 0; } elseif (!$zTracePrompt) { $TraceFILE = 0; } self::$yyTraceFILE = $TraceFILE; self::$yyTracePrompt = $zTracePrompt; } /** * Output debug information to output (php://output stream) */ static function PrintTrace() { self::$yyTraceFILE = fopen('php://output', 'w'); self::$yyTracePrompt = ''; } /** * @var resource|0 */ static public $yyTraceFILE; /** * String to prepend to debug output * @var string|0 */ static public $yyTracePrompt; /** * @var int */ public $yyidx; /* Index of top element in stack */ /** * @var int */ public $yyerrcnt; /* Shifts left before out of the error */ /** * @var array */ public $yystack = array(); /* The parser's stack */ /** * For tracing shifts, the names of all terminals and nonterminals * are required. The following table supplies these names * @var array */ static public $yyTokenName = array( '$', 'OPENPAREN', 'OPENASSERTION', 'BAR', 'MULTIPLIER', 'MATCHSTART', 'MATCHEND', 'OPENCHARCLASS', 'CLOSECHARCLASS', 'NEGATE', 'TEXT', 'ESCAPEDBACKSLASH', 'HYPHEN', 'BACKREFERENCE', 'COULDBEBACKREF', 'CONTROLCHAR', 'FULLSTOP', 'INTERNALOPTIONS', 'CLOSEPAREN', 'COLON', 'POSITIVELOOKAHEAD', 'NEGATIVELOOKAHEAD', 'POSITIVELOOKBEHIND', 'NEGATIVELOOKBEHIND', 'PATTERNNAME', 'ONCEONLY', 'COMMENT', 'RECUR', 'error', 'start', 'pattern', 'basic_pattern', 'basic_text', 'character_class', 'assertion', 'grouping', 'lookahead', 'lookbehind', 'subpattern', 'onceonly', 'comment', 'recur', 'conditional', 'character_class_contents', ); /** * For tracing reduce actions, the names of all rules are required. * @var array */ static public $yyRuleName = array( /* 0 */ "start ::= pattern", /* 1 */ "pattern ::= MATCHSTART basic_pattern MATCHEND", /* 2 */ "pattern ::= MATCHSTART basic_pattern", /* 3 */ "pattern ::= basic_pattern MATCHEND", /* 4 */ "pattern ::= basic_pattern", /* 5 */ "pattern ::= pattern BAR pattern", /* 6 */ "basic_pattern ::= basic_text", /* 7 */ "basic_pattern ::= character_class", /* 8 */ "basic_pattern ::= assertion", /* 9 */ "basic_pattern ::= grouping", /* 10 */ "basic_pattern ::= lookahead", /* 11 */ "basic_pattern ::= lookbehind", /* 12 */ "basic_pattern ::= subpattern", /* 13 */ "basic_pattern ::= onceonly", /* 14 */ "basic_pattern ::= comment", /* 15 */ "basic_pattern ::= recur", /* 16 */ "basic_pattern ::= conditional", /* 17 */ "basic_pattern ::= basic_pattern basic_text", /* 18 */ "basic_pattern ::= basic_pattern character_class", /* 19 */ "basic_pattern ::= basic_pattern assertion", /* 20 */ "basic_pattern ::= basic_pattern grouping", /* 21 */ "basic_pattern ::= basic_pattern lookahead", /* 22 */ "basic_pattern ::= basic_pattern lookbehind", /* 23 */ "basic_pattern ::= basic_pattern subpattern", /* 24 */ "basic_pattern ::= basic_pattern onceonly", /* 25 */ "basic_pattern ::= basic_pattern comment", /* 26 */ "basic_pattern ::= basic_pattern recur", /* 27 */ "basic_pattern ::= basic_pattern conditional", /* 28 */ "character_class ::= OPENCHARCLASS character_class_contents CLOSECHARCLASS", /* 29 */ "character_class ::= OPENCHARCLASS NEGATE character_class_contents CLOSECHARCLASS", /* 30 */ "character_class ::= OPENCHARCLASS character_class_contents CLOSECHARCLASS MULTIPLIER", /* 31 */ "character_class ::= OPENCHARCLASS NEGATE character_class_contents CLOSECHARCLASS MULTIPLIER", /* 32 */ "character_class_contents ::= TEXT", /* 33 */ "character_class_contents ::= ESCAPEDBACKSLASH", /* 34 */ "character_class_contents ::= ESCAPEDBACKSLASH HYPHEN TEXT", /* 35 */ "character_class_contents ::= TEXT HYPHEN TEXT", /* 36 */ "character_class_contents ::= TEXT HYPHEN ESCAPEDBACKSLASH", /* 37 */ "character_class_contents ::= BACKREFERENCE", /* 38 */ "character_class_contents ::= COULDBEBACKREF", /* 39 */ "character_class_contents ::= character_class_contents CONTROLCHAR", /* 40 */ "character_class_contents ::= character_class_contents ESCAPEDBACKSLASH", /* 41 */ "character_class_contents ::= character_class_contents TEXT", /* 42 */ "character_class_contents ::= character_class_contents ESCAPEDBACKSLASH HYPHEN CONTROLCHAR", /* 43 */ "character_class_contents ::= character_class_contents ESCAPEDBACKSLASH HYPHEN TEXT", /* 44 */ "character_class_contents ::= character_class_contents TEXT HYPHEN ESCAPEDBACKSLASH", /* 45 */ "character_class_contents ::= character_class_contents TEXT HYPHEN TEXT", /* 46 */ "character_class_contents ::= character_class_contents BACKREFERENCE", /* 47 */ "character_class_contents ::= character_class_contents COULDBEBACKREF", /* 48 */ "basic_text ::= TEXT", /* 49 */ "basic_text ::= TEXT MULTIPLIER", /* 50 */ "basic_text ::= FULLSTOP", /* 51 */ "basic_text ::= FULLSTOP MULTIPLIER", /* 52 */ "basic_text ::= CONTROLCHAR", /* 53 */ "basic_text ::= CONTROLCHAR MULTIPLIER", /* 54 */ "basic_text ::= ESCAPEDBACKSLASH", /* 55 */ "basic_text ::= ESCAPEDBACKSLASH MULTIPLIER", /* 56 */ "basic_text ::= BACKREFERENCE", /* 57 */ "basic_text ::= BACKREFERENCE MULTIPLIER", /* 58 */ "basic_text ::= COULDBEBACKREF", /* 59 */ "basic_text ::= COULDBEBACKREF MULTIPLIER", /* 60 */ "basic_text ::= basic_text TEXT", /* 61 */ "basic_text ::= basic_text TEXT MULTIPLIER", /* 62 */ "basic_text ::= basic_text FULLSTOP", /* 63 */ "basic_text ::= basic_text FULLSTOP MULTIPLIER", /* 64 */ "basic_text ::= basic_text CONTROLCHAR", /* 65 */ "basic_text ::= basic_text CONTROLCHAR MULTIPLIER", /* 66 */ "basic_text ::= basic_text ESCAPEDBACKSLASH", /* 67 */ "basic_text ::= basic_text ESCAPEDBACKSLASH MULTIPLIER", /* 68 */ "basic_text ::= basic_text BACKREFERENCE", /* 69 */ "basic_text ::= basic_text BACKREFERENCE MULTIPLIER", /* 70 */ "basic_text ::= basic_text COULDBEBACKREF", /* 71 */ "basic_text ::= basic_text COULDBEBACKREF MULTIPLIER", /* 72 */ "assertion ::= OPENASSERTION INTERNALOPTIONS CLOSEPAREN", /* 73 */ "assertion ::= OPENASSERTION INTERNALOPTIONS COLON pattern CLOSEPAREN", /* 74 */ "grouping ::= OPENASSERTION COLON pattern CLOSEPAREN", /* 75 */ "grouping ::= OPENASSERTION COLON pattern CLOSEPAREN MULTIPLIER", /* 76 */ "conditional ::= OPENASSERTION OPENPAREN TEXT CLOSEPAREN pattern CLOSEPAREN MULTIPLIER", /* 77 */ "conditional ::= OPENASSERTION OPENPAREN TEXT CLOSEPAREN pattern CLOSEPAREN", /* 78 */ "conditional ::= OPENASSERTION lookahead pattern CLOSEPAREN", /* 79 */ "conditional ::= OPENASSERTION lookahead pattern CLOSEPAREN MULTIPLIER", /* 80 */ "conditional ::= OPENASSERTION lookbehind pattern CLOSEPAREN", /* 81 */ "conditional ::= OPENASSERTION lookbehind pattern CLOSEPAREN MULTIPLIER", /* 82 */ "lookahead ::= OPENASSERTION POSITIVELOOKAHEAD pattern CLOSEPAREN", /* 83 */ "lookahead ::= OPENASSERTION NEGATIVELOOKAHEAD pattern CLOSEPAREN", /* 84 */ "lookbehind ::= OPENASSERTION POSITIVELOOKBEHIND pattern CLOSEPAREN", /* 85 */ "lookbehind ::= OPENASSERTION NEGATIVELOOKBEHIND pattern CLOSEPAREN", /* 86 */ "subpattern ::= OPENASSERTION PATTERNNAME pattern CLOSEPAREN", /* 87 */ "subpattern ::= OPENASSERTION PATTERNNAME pattern CLOSEPAREN MULTIPLIER", /* 88 */ "subpattern ::= OPENPAREN pattern CLOSEPAREN", /* 89 */ "subpattern ::= OPENPAREN pattern CLOSEPAREN MULTIPLIER", /* 90 */ "onceonly ::= OPENASSERTION ONCEONLY pattern CLOSEPAREN", /* 91 */ "comment ::= OPENASSERTION COMMENT CLOSEPAREN", /* 92 */ "recur ::= OPENASSERTION RECUR CLOSEPAREN", ); /** * This function returns the symbolic name associated with a token * value. * @param int * @return string */ function tokenName($tokenType) { if ($tokenType === 0) { return 'End of Input'; } if ($tokenType > 0 && $tokenType < count(self::$yyTokenName)) { return self::$yyTokenName[$tokenType]; } else { return "Unknown"; } } /** * The following function deletes the value associated with a * symbol. The symbol can be either a terminal or nonterminal. * @param int the symbol code * @param mixed the symbol's value */ static function yy_destructor($yymajor, $yypminor) { switch ($yymajor) { /* Here is inserted the actions which take place when a ** terminal or non-terminal is destroyed. This can happen ** when the symbol is popped from the stack during a ** reduce or during error processing or when a parser is ** being destroyed before it is finished parsing. ** ** Note: during a reduce, the only symbols destroyed are those ** which appear on the RHS of the rule, but which are not used ** inside the C code. */ default: break; /* If no destructor action specified: do nothing */ } } /** * Pop the parser's stack once. * * If there is a destructor routine associated with the token which * is popped from the stack, then call it. * * Return the major token number for the symbol popped. * @param PHP_LexerGenerator_Regex_yyParser * @return int */ function yy_pop_parser_stack() { if (!count($this->yystack)) { return; } $yytos = array_pop($this->yystack); if (self::$yyTraceFILE && $this->yyidx >= 0) { fwrite(self::$yyTraceFILE, self::$yyTracePrompt . 'Popping ' . self::$yyTokenName[$yytos->major] . "\n"); } $yymajor = $yytos->major; self::yy_destructor($yymajor, $yytos->minor); $this->yyidx--; return $yymajor; } /** * Deallocate and destroy a parser. Destructors are all called for * all stack elements before shutting the parser down. */ function __destruct() { while ($this->yyidx >= 0) { $this->yy_pop_parser_stack(); } if (is_resource(self::$yyTraceFILE)) { fclose(self::$yyTraceFILE); } } /** * Based on the current state and parser stack, get a list of all * possible lookahead tokens * @param int * @return array */ function yy_get_expected_tokens($token) { $state = $this->yystack[$this->yyidx]->stateno; $expected = self::$yyExpectedTokens[$state]; if (in_array($token, self::$yyExpectedTokens[$state], true)) { return $expected; } $stack = $this->yystack; $yyidx = $this->yyidx; do { $yyact = $this->yy_find_shift_action($token); if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) { // reduce action $done = 0; do { if ($done++ == 100) { $this->yyidx = $yyidx; $this->yystack = $stack; // too much recursion prevents proper detection // so give up return array_unique($expected); } $yyruleno = $yyact - self::YYNSTATE; $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs']; $nextstate = $this->yy_find_reduce_action( $this->yystack[$this->yyidx]->stateno, self::$yyRuleInfo[$yyruleno]['lhs']); if (isset(self::$yyExpectedTokens[$nextstate])) { $expected += self::$yyExpectedTokens[$nextstate]; if (in_array($token, self::$yyExpectedTokens[$nextstate], true)) { $this->yyidx = $yyidx; $this->yystack = $stack; return array_unique($expected); } } if ($nextstate < self::YYNSTATE) { // we need to shift a non-terminal $this->yyidx++; $x = new PHP_LexerGenerator_Regex_yyStackEntry; $x->stateno = $nextstate; $x->major = self::$yyRuleInfo[$yyruleno]['lhs']; $this->yystack[$this->yyidx] = $x; continue 2; } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { $this->yyidx = $yyidx; $this->yystack = $stack; // the last token was just ignored, we can't accept // by ignoring input, this is in essence ignoring a // syntax error! return array_unique($expected); } elseif ($nextstate === self::YY_NO_ACTION) { $this->yyidx = $yyidx; $this->yystack = $stack; // input accepted, but not shifted (I guess) return $expected; } else { $yyact = $nextstate; } } while (true); } break; } while (true); return array_unique($expected); } /** * Based on the parser state and current parser stack, determine whether * the lookahead token is possible. * * The parser will convert the token value to an error token if not. This * catches some unusual edge cases where the parser would fail. * @param int * @return bool */ function yy_is_expected_token($token) { if ($token === 0) { return true; // 0 is not part of this } $state = $this->yystack[$this->yyidx]->stateno; if (in_array($token, self::$yyExpectedTokens[$state], true)) { return true; } $stack = $this->yystack; $yyidx = $this->yyidx; do { $yyact = $this->yy_find_shift_action($token); if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) { // reduce action $done = 0; do { if ($done++ == 100) { $this->yyidx = $yyidx; $this->yystack = $stack; // too much recursion prevents proper detection // so give up return true; } $yyruleno = $yyact - self::YYNSTATE; $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs']; $nextstate = $this->yy_find_reduce_action( $this->yystack[$this->yyidx]->stateno, self::$yyRuleInfo[$yyruleno]['lhs']); if (isset(self::$yyExpectedTokens[$nextstate]) && in_array($token, self::$yyExpectedTokens[$nextstate], true)) { $this->yyidx = $yyidx; $this->yystack = $stack; return true; } if ($nextstate < self::YYNSTATE) { // we need to shift a non-terminal $this->yyidx++; $x = new PHP_LexerGenerator_Regex_yyStackEntry; $x->stateno = $nextstate; $x->major = self::$yyRuleInfo[$yyruleno]['lhs']; $this->yystack[$this->yyidx] = $x; continue 2; } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { $this->yyidx = $yyidx; $this->yystack = $stack; if (!$token) { // end of input: this is valid return true; } // the last token was just ignored, we can't accept // by ignoring input, this is in essence ignoring a // syntax error! return false; } elseif ($nextstate === self::YY_NO_ACTION) { $this->yyidx = $yyidx; $this->yystack = $stack; // input accepted, but not shifted (I guess) return true; } else { $yyact = $nextstate; } } while (true); } break; } while (true); $this->yyidx = $yyidx; $this->yystack = $stack; return true; } /** * Find the appropriate action for a parser given the terminal * look-ahead token iLookAhead. * * If the look-ahead token is YYNOCODE, then check to see if the action is * independent of the look-ahead. If it is, return the action, otherwise * return YY_NO_ACTION. * @param int The look-ahead token */ function yy_find_shift_action($iLookAhead) { $stateno = $this->yystack[$this->yyidx]->stateno; /* if ($this->yyidx < 0) return self::YY_NO_ACTION; */ if (!isset(self::$yy_shift_ofst[$stateno])) { // no shift actions return self::$yy_default[$stateno]; } $i = self::$yy_shift_ofst[$stateno]; if ($i === self::YY_SHIFT_USE_DFLT) { return self::$yy_default[$stateno]; } if ($iLookAhead == self::YYNOCODE) { return self::YY_NO_ACTION; } $i += $iLookAhead; if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[$i] != $iLookAhead) { if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback) && ($iFallback = self::$yyFallback[$iLookAhead]) != 0) { if (self::$yyTraceFILE) { fwrite(self::$yyTraceFILE, self::$yyTracePrompt . "FALLBACK " . self::$yyTokenName[$iLookAhead] . " => " . self::$yyTokenName[$iFallback] . "\n"); } return $this->yy_find_shift_action($iFallback); } return self::$yy_default[$stateno]; } else { return self::$yy_action[$i]; } } /** * Find the appropriate action for a parser given the non-terminal * look-ahead token $iLookAhead. * * If the look-ahead token is self::YYNOCODE, then check to see if the action is * independent of the look-ahead. If it is, return the action, otherwise * return self::YY_NO_ACTION. * @param int Current state number * @param int The look-ahead token */ function yy_find_reduce_action($stateno, $iLookAhead) { /* $stateno = $this->yystack[$this->yyidx]->stateno; */ if (!isset(self::$yy_reduce_ofst[$stateno])) { return self::$yy_default[$stateno]; } $i = self::$yy_reduce_ofst[$stateno]; if ($i == self::YY_REDUCE_USE_DFLT) { return self::$yy_default[$stateno]; } if ($iLookAhead == self::YYNOCODE) { return self::YY_NO_ACTION; } $i += $iLookAhead; if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[$i] != $iLookAhead) { return self::$yy_default[$stateno]; } else { return self::$yy_action[$i]; } } /** * Perform a shift action. * @param int The new state to shift in * @param int The major token to shift in * @param mixed the minor token to shift in */ function yy_shift($yyNewState, $yyMajor, $yypMinor) { $this->yyidx++; if ($this->yyidx >= self::YYSTACKDEPTH) { $this->yyidx--; if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sStack Overflow!\n", self::$yyTracePrompt); } while ($this->yyidx >= 0) { $this->yy_pop_parser_stack(); } /* Here code is inserted which will execute if the parser ** stack ever overflows */ return; } $yytos = new PHP_LexerGenerator_Regex_yyStackEntry; $yytos->stateno = $yyNewState; $yytos->major = $yyMajor; $yytos->minor = $yypMinor; array_push($this->yystack, $yytos); if (self::$yyTraceFILE && $this->yyidx > 0) { fprintf(self::$yyTraceFILE, "%sShift %d\n", self::$yyTracePrompt, $yyNewState); fprintf(self::$yyTraceFILE, "%sStack:", self::$yyTracePrompt); for($i = 1; $i <= $this->yyidx; $i++) { fprintf(self::$yyTraceFILE, " %s", self::$yyTokenName[$this->yystack[$i]->major]); } fwrite(self::$yyTraceFILE,"\n"); } } /** * The following table contains information about every rule that * is used during the reduce. * *
     * array(
     *  array(
     *   int $lhs;         Symbol on the left-hand side of the rule
     *   int $nrhs;     Number of right-hand side symbols in the rule
     *  ),...
     * );
     * 
*/ static public $yyRuleInfo = array( array( 'lhs' => 29, 'rhs' => 1 ), array( 'lhs' => 30, 'rhs' => 3 ), array( 'lhs' => 30, 'rhs' => 2 ), array( 'lhs' => 30, 'rhs' => 2 ), array( 'lhs' => 30, 'rhs' => 1 ), array( 'lhs' => 30, 'rhs' => 3 ), array( 'lhs' => 31, 'rhs' => 1 ), array( 'lhs' => 31, 'rhs' => 1 ), array( 'lhs' => 31, 'rhs' => 1 ), array( 'lhs' => 31, 'rhs' => 1 ), array( 'lhs' => 31, 'rhs' => 1 ), array( 'lhs' => 31, 'rhs' => 1 ), array( 'lhs' => 31, 'rhs' => 1 ), array( 'lhs' => 31, 'rhs' => 1 ), array( 'lhs' => 31, 'rhs' => 1 ), array( 'lhs' => 31, 'rhs' => 1 ), array( 'lhs' => 31, 'rhs' => 1 ), array( 'lhs' => 31, 'rhs' => 2 ), array( 'lhs' => 31, 'rhs' => 2 ), array( 'lhs' => 31, 'rhs' => 2 ), array( 'lhs' => 31, 'rhs' => 2 ), array( 'lhs' => 31, 'rhs' => 2 ), array( 'lhs' => 31, 'rhs' => 2 ), array( 'lhs' => 31, 'rhs' => 2 ), array( 'lhs' => 31, 'rhs' => 2 ), array( 'lhs' => 31, 'rhs' => 2 ), array( 'lhs' => 31, 'rhs' => 2 ), array( 'lhs' => 31, 'rhs' => 2 ), array( 'lhs' => 33, 'rhs' => 3 ), array( 'lhs' => 33, 'rhs' => 4 ), array( 'lhs' => 33, 'rhs' => 4 ), array( 'lhs' => 33, 'rhs' => 5 ), array( 'lhs' => 43, 'rhs' => 1 ), array( 'lhs' => 43, 'rhs' => 1 ), array( 'lhs' => 43, 'rhs' => 3 ), array( 'lhs' => 43, 'rhs' => 3 ), array( 'lhs' => 43, 'rhs' => 3 ), array( 'lhs' => 43, 'rhs' => 1 ), array( 'lhs' => 43, 'rhs' => 1 ), array( 'lhs' => 43, 'rhs' => 2 ), array( 'lhs' => 43, 'rhs' => 2 ), array( 'lhs' => 43, 'rhs' => 2 ), array( 'lhs' => 43, 'rhs' => 4 ), array( 'lhs' => 43, 'rhs' => 4 ), array( 'lhs' => 43, 'rhs' => 4 ), array( 'lhs' => 43, 'rhs' => 4 ), array( 'lhs' => 43, 'rhs' => 2 ), array( 'lhs' => 43, 'rhs' => 2 ), array( 'lhs' => 32, 'rhs' => 1 ), array( 'lhs' => 32, 'rhs' => 2 ), array( 'lhs' => 32, 'rhs' => 1 ), array( 'lhs' => 32, 'rhs' => 2 ), array( 'lhs' => 32, 'rhs' => 1 ), array( 'lhs' => 32, 'rhs' => 2 ), array( 'lhs' => 32, 'rhs' => 1 ), array( 'lhs' => 32, 'rhs' => 2 ), array( 'lhs' => 32, 'rhs' => 1 ), array( 'lhs' => 32, 'rhs' => 2 ), array( 'lhs' => 32, 'rhs' => 1 ), array( 'lhs' => 32, 'rhs' => 2 ), array( 'lhs' => 32, 'rhs' => 2 ), array( 'lhs' => 32, 'rhs' => 3 ), array( 'lhs' => 32, 'rhs' => 2 ), array( 'lhs' => 32, 'rhs' => 3 ), array( 'lhs' => 32, 'rhs' => 2 ), array( 'lhs' => 32, 'rhs' => 3 ), array( 'lhs' => 32, 'rhs' => 2 ), array( 'lhs' => 32, 'rhs' => 3 ), array( 'lhs' => 32, 'rhs' => 2 ), array( 'lhs' => 32, 'rhs' => 3 ), array( 'lhs' => 32, 'rhs' => 2 ), array( 'lhs' => 32, 'rhs' => 3 ), array( 'lhs' => 34, 'rhs' => 3 ), array( 'lhs' => 34, 'rhs' => 5 ), array( 'lhs' => 35, 'rhs' => 4 ), array( 'lhs' => 35, 'rhs' => 5 ), array( 'lhs' => 42, 'rhs' => 7 ), array( 'lhs' => 42, 'rhs' => 6 ), array( 'lhs' => 42, 'rhs' => 4 ), array( 'lhs' => 42, 'rhs' => 5 ), array( 'lhs' => 42, 'rhs' => 4 ), array( 'lhs' => 42, 'rhs' => 5 ), array( 'lhs' => 36, 'rhs' => 4 ), array( 'lhs' => 36, 'rhs' => 4 ), array( 'lhs' => 37, 'rhs' => 4 ), array( 'lhs' => 37, 'rhs' => 4 ), array( 'lhs' => 38, 'rhs' => 4 ), array( 'lhs' => 38, 'rhs' => 5 ), array( 'lhs' => 38, 'rhs' => 3 ), array( 'lhs' => 38, 'rhs' => 4 ), array( 'lhs' => 39, 'rhs' => 4 ), array( 'lhs' => 40, 'rhs' => 3 ), array( 'lhs' => 41, 'rhs' => 3 ), ); /** * The following table contains a mapping of reduce action to method name * that handles the reduction. * * If a rule is not set, it has no handler. */ static public $yyReduceMap = array( 0 => 0, 1 => 1, 2 => 2, 3 => 3, 4 => 4, 6 => 4, 7 => 4, 9 => 4, 10 => 4, 12 => 4, 13 => 4, 14 => 4, 15 => 4, 16 => 4, 5 => 5, 17 => 17, 18 => 17, 20 => 17, 21 => 17, 23 => 17, 24 => 17, 25 => 17, 26 => 17, 27 => 17, 28 => 28, 29 => 29, 30 => 30, 31 => 31, 32 => 32, 48 => 32, 50 => 32, 33 => 33, 54 => 33, 34 => 34, 35 => 35, 36 => 36, 37 => 37, 56 => 37, 38 => 38, 58 => 38, 39 => 39, 64 => 39, 40 => 40, 66 => 40, 41 => 41, 60 => 41, 62 => 41, 42 => 42, 43 => 43, 44 => 44, 45 => 45, 46 => 46, 68 => 46, 47 => 47, 70 => 47, 49 => 49, 51 => 49, 52 => 52, 53 => 53, 55 => 55, 57 => 57, 59 => 59, 61 => 61, 63 => 61, 65 => 65, 67 => 67, 69 => 69, 71 => 71, 72 => 72, 73 => 73, 74 => 74, 75 => 75, 76 => 76, 77 => 77, 78 => 78, 79 => 79, 80 => 80, 84 => 80, 81 => 81, 82 => 82, 83 => 83, 85 => 85, 86 => 86, 87 => 87, 88 => 88, 89 => 89, 90 => 90, 91 => 91, 92 => 92, ); /* Beginning here are the reduction cases. A typical example ** follows: ** #line ** function yy_r0($yymsp){ ... } // User supplied code ** #line */ #line 47 "Parser.y" function yy_r0(){ $this->yystack[$this->yyidx + 0]->minor->string = str_replace('"', '\\"', $this->yystack[$this->yyidx + 0]->minor->string); $x = $this->yystack[$this->yyidx + 0]->minor->metadata; $x['subpatterns'] = $this->_subpatterns; $this->yystack[$this->yyidx + 0]->minor->metadata = $x; $this->_subpatterns = 0; $this->result = $this->yystack[$this->yyidx + 0]->minor; } #line 1259 "Parser.php" #line 56 "Parser.y" function yy_r1(){ throw new PHP_LexerGenerator_Exception('Cannot include start match "' . $this->yystack[$this->yyidx + -2]->minor . '" or end match "' . $this->yystack[$this->yyidx + 0]->minor . '"'); } #line 1265 "Parser.php" #line 60 "Parser.y" function yy_r2(){ throw new PHP_LexerGenerator_Exception('Cannot include start match "' . B . '"'); } #line 1271 "Parser.php" #line 64 "Parser.y" function yy_r3(){ throw new PHP_LexerGenerator_Exception('Cannot include end match "' . $this->yystack[$this->yyidx + 0]->minor . '"'); } #line 1276 "Parser.php" #line 67 "Parser.y" function yy_r4(){$this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; } #line 1279 "Parser.php" #line 68 "Parser.y" function yy_r5(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken($this->yystack[$this->yyidx + -2]->minor->string . '|' . $this->yystack[$this->yyidx + 0]->minor->string, array( 'pattern' => $this->yystack[$this->yyidx + -2]->minor['pattern'] . '|' . $this->yystack[$this->yyidx + 0]->minor['pattern'])); } #line 1285 "Parser.php" #line 84 "Parser.y" function yy_r17(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken($this->yystack[$this->yyidx + -1]->minor->string . $this->yystack[$this->yyidx + 0]->minor->string, array( 'pattern' => $this->yystack[$this->yyidx + -1]->minor['pattern'] . $this->yystack[$this->yyidx + 0]->minor['pattern'])); } #line 1291 "Parser.php" #line 123 "Parser.y" function yy_r28(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken('[' . $this->yystack[$this->yyidx + -1]->minor->string . ']', array( 'pattern' => '[' . $this->yystack[$this->yyidx + -1]->minor['pattern'] . ']')); } #line 1297 "Parser.php" #line 127 "Parser.y" function yy_r29(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken('[^' . $this->yystack[$this->yyidx + -1]->minor->string . ']', array( 'pattern' => '[^' . $this->yystack[$this->yyidx + -1]->minor['pattern'] . ']')); } #line 1303 "Parser.php" #line 131 "Parser.y" function yy_r30(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken('[' . $this->yystack[$this->yyidx + -2]->minor->string . ']' . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => '[' . $this->yystack[$this->yyidx + -2]->minor['pattern'] . ']' . $this->yystack[$this->yyidx + 0]->minor)); } #line 1309 "Parser.php" #line 135 "Parser.y" function yy_r31(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken('[^' . $this->yystack[$this->yyidx + -2]->minor->string . ']' . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => '[^' . $this->yystack[$this->yyidx + -2]->minor['pattern'] . ']' . $this->yystack[$this->yyidx + 0]->minor)); } #line 1315 "Parser.php" #line 140 "Parser.y" function yy_r32(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken($this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => $this->yystack[$this->yyidx + 0]->minor)); } #line 1321 "Parser.php" #line 144 "Parser.y" function yy_r33(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken('\\\\' . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => $this->yystack[$this->yyidx + 0]->minor)); } #line 1327 "Parser.php" #line 148 "Parser.y" function yy_r34(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken('\\\\' . $this->yystack[$this->yyidx + -2]->minor . '-' . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => $this->yystack[$this->yyidx + -2]->minor . '-' . $this->yystack[$this->yyidx + 0]->minor)); } #line 1333 "Parser.php" #line 152 "Parser.y" function yy_r35(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken($this->yystack[$this->yyidx + -2]->minor . '-' . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => $this->yystack[$this->yyidx + -2]->minor . '-' . $this->yystack[$this->yyidx + 0]->minor)); } #line 1339 "Parser.php" #line 156 "Parser.y" function yy_r36(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken($this->yystack[$this->yyidx + -2]->minor . '-\\\\' . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => $this->yystack[$this->yyidx + -2]->minor . '-' . $this->yystack[$this->yyidx + 0]->minor)); } #line 1345 "Parser.php" #line 160 "Parser.y" function yy_r37(){ if (((int) substr($this->yystack[$this->yyidx + 0]->minor, 1)) > $this->_subpatterns) { throw new PHP_LexerGenerator_Exception('Back-reference refers to non-existent ' . 'sub-pattern ' . substr($this->yystack[$this->yyidx + 0]->minor, 1)); } $this->yystack[$this->yyidx + 0]->minor = substr($this->yystack[$this->yyidx + 0]->minor, 1); // adjust back-reference for containing () $this->_retvalue = new PHP_LexerGenerator_ParseryyToken('\\\\' . ($this->yystack[$this->yyidx + 0]->minor + $this->_patternIndex), array( 'pattern' => '\\' . ($this->_updatePattern ? ($this->yystack[$this->yyidx + 0]->minor + $this->_patternIndex) : $this->yystack[$this->yyidx + 0]->minor))); } #line 1357 "Parser.php" #line 170 "Parser.y" function yy_r38(){ if (((int) substr($this->yystack[$this->yyidx + 0]->minor, 1)) > $this->_subpatterns) { throw new PHP_LexerGenerator_Exception($this->yystack[$this->yyidx + 0]->minor . ' will be interpreted as an invalid' . ' back-reference, use "\\0' . substr($this->yystack[$this->yyidx + 0]->minor, 1) . ' for octal'); } $this->yystack[$this->yyidx + 0]->minor = substr($this->yystack[$this->yyidx + 0]->minor, 1); $this->_retvalue = new PHP_LexerGenerator_ParseryyToken('\\\\' . ($this->yystack[$this->yyidx + 0]->minor + $this->_patternIndex), array( 'pattern' => '\\' . ($this->_updatePattern ? ($this->yystack[$this->yyidx + 0]->minor + $this->_patternIndex) : $this->yystack[$this->yyidx + 0]->minor))); } #line 1368 "Parser.php" #line 179 "Parser.y" function yy_r39(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken($this->yystack[$this->yyidx + -1]->minor->string . '\\' . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => $this->yystack[$this->yyidx + -1]->minor['pattern'] . $this->yystack[$this->yyidx + 0]->minor)); } #line 1374 "Parser.php" #line 183 "Parser.y" function yy_r40(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken($this->yystack[$this->yyidx + -1]->minor->string . '\\\\' . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => $this->yystack[$this->yyidx + -1]->minor['pattern'] . $this->yystack[$this->yyidx + 0]->minor)); } #line 1380 "Parser.php" #line 187 "Parser.y" function yy_r41(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken($this->yystack[$this->yyidx + -1]->minor->string . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => $this->yystack[$this->yyidx + -1]->minor['pattern'] . $this->yystack[$this->yyidx + 0]->minor)); } #line 1386 "Parser.php" #line 191 "Parser.y" function yy_r42(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken($this->yystack[$this->yyidx + -3]->minor->string . '\\\\' . $this->yystack[$this->yyidx + -2]->minor . '-\\' . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => $this->yystack[$this->yyidx + -3]->minor['pattern'] . $this->yystack[$this->yyidx + -2]->minor . '-' . $this->yystack[$this->yyidx + 0]->minor)); } #line 1392 "Parser.php" #line 195 "Parser.y" function yy_r43(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken($this->yystack[$this->yyidx + -3]->minor->string . '\\\\' . $this->yystack[$this->yyidx + -2]->minor . '-' . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => $this->yystack[$this->yyidx + -3]->minor['pattern'] . $this->yystack[$this->yyidx + -2]->minor . '-' . $this->yystack[$this->yyidx + 0]->minor)); } #line 1398 "Parser.php" #line 199 "Parser.y" function yy_r44(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken($this->yystack[$this->yyidx + -3]->minor->string . $this->yystack[$this->yyidx + -2]->minor . '-\\\\' . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => $this->yystack[$this->yyidx + -3]->minor['pattern'] . $this->yystack[$this->yyidx + -2]->minor . '-' . $this->yystack[$this->yyidx + 0]->minor)); } #line 1404 "Parser.php" #line 203 "Parser.y" function yy_r45(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken($this->yystack[$this->yyidx + -3]->minor->string . $this->yystack[$this->yyidx + -2]->minor . '-' . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => $this->yystack[$this->yyidx + -3]->minor['pattern'] . $this->yystack[$this->yyidx + -2]->minor . '-' . $this->yystack[$this->yyidx + 0]->minor)); } #line 1410 "Parser.php" #line 207 "Parser.y" function yy_r46(){ if (((int) substr($this->yystack[$this->yyidx + 0]->minor, 1)) > $this->_subpatterns) { throw new PHP_LexerGenerator_Exception('Back-reference refers to non-existent ' . 'sub-pattern ' . substr($this->yystack[$this->yyidx + 0]->minor, 1)); } $this->yystack[$this->yyidx + 0]->minor = substr($this->yystack[$this->yyidx + 0]->minor, 1); $this->_retvalue = new PHP_LexerGenerator_ParseryyToken($this->yystack[$this->yyidx + -1]->minor->string . '\\\\' . ($this->yystack[$this->yyidx + 0]->minor + $this->_patternIndex), array( 'pattern' => $this->yystack[$this->yyidx + -1]->minor['pattern'] . '\\' . ($this->_updatePattern ? ($this->yystack[$this->yyidx + 0]->minor + $this->_patternIndex) : $this->yystack[$this->yyidx + 0]->minor))); } #line 1421 "Parser.php" #line 216 "Parser.y" function yy_r47(){ if (((int) substr($this->yystack[$this->yyidx + 0]->minor, 1)) > $this->_subpatterns) { throw new PHP_LexerGenerator_Exception($this->yystack[$this->yyidx + 0]->minor . ' will be interpreted as an invalid' . ' back-reference, use "\\0' . substr($this->yystack[$this->yyidx + 0]->minor, 1) . ' for octal'); } $this->yystack[$this->yyidx + 0]->minor = substr($this->yystack[$this->yyidx + 0]->minor, 1); $this->_retvalue = new PHP_LexerGenerator_ParseryyToken($this->yystack[$this->yyidx + -1]->minor->string . '\\\\' . ($this->yystack[$this->yyidx + 0]->minor + $this->_patternIndex), array( 'pattern' => $this->yystack[$this->yyidx + -1]->minor['pattern'] . '\\' . ($this->_updatePattern ? ($this->yystack[$this->yyidx + 0]->minor + $this->_patternIndex) : $this->yystack[$this->yyidx + 0]->minor))); } #line 1432 "Parser.php" #line 230 "Parser.y" function yy_r49(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken($this->yystack[$this->yyidx + -1]->minor . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => $this->yystack[$this->yyidx + -1]->minor . $this->yystack[$this->yyidx + 0]->minor)); } #line 1438 "Parser.php" #line 242 "Parser.y" function yy_r52(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken('\\' . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => $this->yystack[$this->yyidx + 0]->minor)); } #line 1444 "Parser.php" #line 246 "Parser.y" function yy_r53(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken('\\' . $this->yystack[$this->yyidx + -1]->minor . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => $this->yystack[$this->yyidx + -1]->minor . $this->yystack[$this->yyidx + 0]->minor)); } #line 1450 "Parser.php" #line 254 "Parser.y" function yy_r55(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken('\\\\' . $this->yystack[$this->yyidx + -1]->minor . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => $this->yystack[$this->yyidx + -1]->minor . $this->yystack[$this->yyidx + 0]->minor)); } #line 1456 "Parser.php" #line 268 "Parser.y" function yy_r57(){ if (((int) substr($this->yystack[$this->yyidx + -1]->minor, 1)) > $this->_subpatterns) { throw new PHP_LexerGenerator_Exception('Back-reference refers to non-existent ' . 'sub-pattern ' . substr($this->yystack[$this->yyidx + -1]->minor, 1)); } $this->yystack[$this->yyidx + -1]->minor = substr($this->yystack[$this->yyidx + -1]->minor, 1); // adjust back-reference for containing () $this->_retvalue = new PHP_LexerGenerator_ParseryyToken('\\\\' . ($this->yystack[$this->yyidx + -1]->minor + $this->_patternIndex) . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => '\\' . ($this->_updatePattern ? ($this->yystack[$this->yyidx + -1]->minor + $this->_patternIndex) : $this->yystack[$this->yyidx + -1]->minor) . $this->yystack[$this->yyidx + 0]->minor)); } #line 1468 "Parser.php" #line 287 "Parser.y" function yy_r59(){ if (((int) substr($this->yystack[$this->yyidx + -1]->minor, 1)) > $this->_subpatterns) { throw new PHP_LexerGenerator_Exception($this->yystack[$this->yyidx + -1]->minor . ' will be interpreted as an invalid' . ' back-reference, use "\\0' . substr($this->yystack[$this->yyidx + -1]->minor, 1) . ' for octal'); } $this->yystack[$this->yyidx + -1]->minor = substr($this->yystack[$this->yyidx + -1]->minor, 1); $this->_retvalue = new PHP_LexerGenerator_ParseryyToken('\\\\' . ($this->yystack[$this->yyidx + -1]->minor + $this->_patternIndex) . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => '\\' . ($this->_updatePattern ? ($this->yystack[$this->yyidx + -1]->minor + $this->_patternIndex) : $this->yystack[$this->yyidx + -1]->minor) . $this->yystack[$this->yyidx + 0]->minor)); } #line 1479 "Parser.php" #line 300 "Parser.y" function yy_r61(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken($this->yystack[$this->yyidx + -2]->minor->string . $this->yystack[$this->yyidx + -1]->minor . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => $this->yystack[$this->yyidx + -2]->minor['pattern'] . $this->yystack[$this->yyidx + -1]->minor . $this->yystack[$this->yyidx + 0]->minor)); } #line 1485 "Parser.php" #line 316 "Parser.y" function yy_r65(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken($this->yystack[$this->yyidx + -2]->minor->string . '\\' . $this->yystack[$this->yyidx + -1]->minor . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => $this->yystack[$this->yyidx + -2]->minor['pattern'] . $this->yystack[$this->yyidx + -1]->minor . $this->yystack[$this->yyidx + 0]->minor)); } #line 1491 "Parser.php" #line 324 "Parser.y" function yy_r67(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken($this->yystack[$this->yyidx + -2]->minor->string . '\\\\' . $this->yystack[$this->yyidx + -1]->minor . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => $this->yystack[$this->yyidx + -2]->minor['pattern'] . $this->yystack[$this->yyidx + -1]->minor . $this->yystack[$this->yyidx + 0]->minor)); } #line 1497 "Parser.php" #line 337 "Parser.y" function yy_r69(){ if (((int) substr($this->yystack[$this->yyidx + -1]->minor, 1)) > $this->_subpatterns) { throw new PHP_LexerGenerator_Exception('Back-reference refers to non-existent ' . 'sub-pattern ' . substr($this->yystack[$this->yyidx + -1]->minor, 1)); } $this->yystack[$this->yyidx + -1]->minor = substr($this->yystack[$this->yyidx + -1]->minor, 1); $this->_retvalue = new PHP_LexerGenerator_ParseryyToken($this->yystack[$this->yyidx + -2]->minor->string . '\\\\' . ($this->yystack[$this->yyidx + -1]->minor + $this->_patternIndex) . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => $this->yystack[$this->yyidx + -2]->minor['pattern'] . '\\' . ($this->_updatePattern ? ($this->yystack[$this->yyidx + -1]->minor + $this->_patternIndex) : $this->yystack[$this->yyidx + -1]->minor) . $this->yystack[$this->yyidx + 0]->minor)); } #line 1508 "Parser.php" #line 355 "Parser.y" function yy_r71(){ if (((int) substr($this->yystack[$this->yyidx + -1]->minor, 1)) > $this->_subpatterns) { throw new PHP_LexerGenerator_Exception($this->yystack[$this->yyidx + -1]->minor . ' will be interpreted as an invalid' . ' back-reference, use "\\0' . substr($this->yystack[$this->yyidx + -1]->minor, 1) . ' for octal'); } $this->yystack[$this->yyidx + -1]->minor = substr($this->yystack[$this->yyidx + -1]->minor, 1); $this->_retvalue = new PHP_LexerGenerator_ParseryyToken($this->yystack[$this->yyidx + -2]->minor->string . '\\\\' . ($this->yystack[$this->yyidx + -1]->minor + $this->_patternIndex) . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => $this->yystack[$this->yyidx + -2]->minor['pattern'] . '\\' . ($this->_updatePattern ? ($this->yystack[$this->yyidx + -1]->minor + $this->_patternIndex) : $this->yystack[$this->yyidx + -1]->minor) . $this->yystack[$this->yyidx + 0]->minor)); } #line 1519 "Parser.php" #line 365 "Parser.y" function yy_r72(){ throw new PHP_LexerGenerator_Exception('Error: cannot set preg options directly with "' . $this->yystack[$this->yyidx + -2]->minor . $this->yystack[$this->yyidx + -1]->minor . $this->yystack[$this->yyidx + 0]->minor . '"'); } #line 1525 "Parser.php" #line 369 "Parser.y" function yy_r73(){ throw new PHP_LexerGenerator_Exception('Error: cannot set preg options directly with "' . $this->yystack[$this->yyidx + -4]->minor . $this->yystack[$this->yyidx + -3]->minor . $this->yystack[$this->yyidx + -2]->minor . $this->yystack[$this->yyidx + -1]->minor['pattern'] . $this->yystack[$this->yyidx + 0]->minor . '"'); } #line 1531 "Parser.php" #line 374 "Parser.y" function yy_r74(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken('(?:' . $this->yystack[$this->yyidx + -1]->minor->string . ')', array( 'pattern' => '(?:' . $this->yystack[$this->yyidx + -1]->minor['pattern'] . ')')); } #line 1537 "Parser.php" #line 378 "Parser.y" function yy_r75(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken('(?:' . $this->yystack[$this->yyidx + -2]->minor->string . ')' . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => '(?:' . $this->yystack[$this->yyidx + -2]->minor['pattern'] . ')' . $this->yystack[$this->yyidx + 0]->minor)); } #line 1543 "Parser.php" #line 383 "Parser.y" function yy_r76(){ if ($this->yystack[$this->yyidx + -4]->minor != 'R') { if (!preg_match('/[1-9][0-9]*/', $this->yystack[$this->yyidx + -4]->minor)) { throw new PHP_LexerGenerator_Exception('Invalid sub-pattern conditional: "(?(' . $this->yystack[$this->yyidx + -4]->minor . ')"'); } if ($this->yystack[$this->yyidx + -4]->minor > $this->_subpatterns) { throw new PHP_LexerGenerator_Exception('sub-pattern conditional . "' . $this->yystack[$this->yyidx + -4]->minor . '" refers to non-existent sub-pattern'); } } else { throw new PHP_LexerGenerator_Exception('Recursive conditional (?(' . $this->yystack[$this->yyidx + -4]->minor . ')" cannot work in this lexer'); } $this->_retvalue = new PHP_LexerGenerator_ParseryyToken('(?(' . $this->yystack[$this->yyidx + -4]->minor . ')' . $this->yystack[$this->yyidx + -2]->minor->string . ')' . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => '(?(' . $this->yystack[$this->yyidx + -4]->minor . ')' . $this->yystack[$this->yyidx + -2]->minor['pattern'] . ')' . $this->yystack[$this->yyidx + 0]->minor)); } #line 1559 "Parser.php" #line 397 "Parser.y" function yy_r77(){ if ($this->yystack[$this->yyidx + -3]->minor != 'R') { if (!preg_match('/[1-9][0-9]*/', $this->yystack[$this->yyidx + -3]->minor)) { throw new PHP_LexerGenerator_Exception('Invalid sub-pattern conditional: "(?(' . $this->yystack[$this->yyidx + -3]->minor . ')"'); } if ($this->yystack[$this->yyidx + -3]->minor > $this->_subpatterns) { throw new PHP_LexerGenerator_Exception('sub-pattern conditional . "' . $this->yystack[$this->yyidx + -3]->minor . '" refers to non-existent sub-pattern'); } } else { throw new PHP_LexerGenerator_Exception('Recursive conditional (?(' . $this->yystack[$this->yyidx + -3]->minor . ')" cannot work in this lexer'); } $this->_retvalue = new PHP_LexerGenerator_ParseryyToken('(?(' . $this->yystack[$this->yyidx + -3]->minor . ')' . $this->yystack[$this->yyidx + -1]->minor->string . ')', array( 'pattern' => '(?(' . $this->yystack[$this->yyidx + -3]->minor . ')' . $this->yystack[$this->yyidx + -1]->minor['pattern'] . ')')); } #line 1575 "Parser.php" #line 411 "Parser.y" function yy_r78(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken('(?' . $this->yystack[$this->yyidx + -2]->minor->string . $this->yystack[$this->yyidx + -1]->minor->string . ')', array( 'pattern' => '(?' . $this->yystack[$this->yyidx + -2]->minor['pattern'] . $this->yystack[$this->yyidx + -1]->minor['pattern'] . ')')); } #line 1581 "Parser.php" #line 415 "Parser.y" function yy_r79(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken('(?' . $this->yystack[$this->yyidx + -3]->minor->string . $this->yystack[$this->yyidx + -2]->minor->string . ')' . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => '(?' . $this->yystack[$this->yyidx + -3]->minor['pattern'] . $this->yystack[$this->yyidx + -2]->minor['pattern'] . ')' . $this->yystack[$this->yyidx + 0]->minor)); } #line 1587 "Parser.php" #line 419 "Parser.y" function yy_r80(){ throw new PHP_LexerGenerator_Exception('Look-behind assertions cannot be used: "(?<=' . $this->yystack[$this->yyidx + -1]->minor['pattern'] . ')'); } #line 1593 "Parser.php" #line 423 "Parser.y" function yy_r81(){ throw new PHP_LexerGenerator_Exception('Look-behind assertions cannot be used: "(?<=' . $this->yystack[$this->yyidx + -2]->minor['pattern'] . ')'); } #line 1599 "Parser.php" #line 428 "Parser.y" function yy_r82(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken('(?=' . $this->yystack[$this->yyidx + -1]->minor->string . ')', array( 'pattern'=> '(?=' . $this->yystack[$this->yyidx + -1]->minor['pattern'] . ')')); } #line 1605 "Parser.php" #line 432 "Parser.y" function yy_r83(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken('(?!' . $this->yystack[$this->yyidx + -1]->minor->string . ')', array( 'pattern' => '(?!' . $this->yystack[$this->yyidx + -1]->minor['pattern'] . ')')); } #line 1611 "Parser.php" #line 441 "Parser.y" function yy_r85(){ throw new PHP_LexerGenerator_Exception('Look-behind assertions cannot be used: "(?yystack[$this->yyidx + -1]->minor['pattern'] . ')'); } #line 1617 "Parser.php" #line 446 "Parser.y" function yy_r86(){ throw new PHP_LexerGenerator_Exception('Cannot use named sub-patterns: "(' . $this->yystack[$this->yyidx + -2]->minor['pattern'] . ')'); } #line 1623 "Parser.php" #line 450 "Parser.y" function yy_r87(){ throw new PHP_LexerGenerator_Exception('Cannot use named sub-patterns: "(' . $this->yystack[$this->yyidx + -3]->minor['pattern'] . ')'); } #line 1629 "Parser.php" #line 454 "Parser.y" function yy_r88(){ $this->_subpatterns++; $this->_retvalue = new PHP_LexerGenerator_ParseryyToken('(' . $this->yystack[$this->yyidx + -1]->minor->string . ')', array( 'pattern' => '(' . $this->yystack[$this->yyidx + -1]->minor['pattern'] . ')')); } #line 1636 "Parser.php" #line 459 "Parser.y" function yy_r89(){ $this->_subpatterns++; $this->_retvalue = new PHP_LexerGenerator_ParseryyToken('(' . $this->yystack[$this->yyidx + -2]->minor->string . ')' . $this->yystack[$this->yyidx + 0]->minor, array( 'pattern' => '(' . $this->yystack[$this->yyidx + -2]->minor['pattern'] . ')' . $this->yystack[$this->yyidx + 0]->minor)); } #line 1643 "Parser.php" #line 465 "Parser.y" function yy_r90(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken('(?>' . $this->yystack[$this->yyidx + -1]->minor->string . ')', array( 'pattern' => '(?>' . $this->yystack[$this->yyidx + -1]->minor['pattern'] . ')')); } #line 1649 "Parser.php" #line 470 "Parser.y" function yy_r91(){ $this->_retvalue = new PHP_LexerGenerator_ParseryyToken('(' . $this->yystack[$this->yyidx + -1]->minor->string . ')', array( 'pattern' => '(' . $this->yystack[$this->yyidx + -1]->minor['pattern'] . ')')); } #line 1655 "Parser.php" #line 475 "Parser.y" function yy_r92(){ throw new Exception('(?R) cannot work in this lexer'); } #line 1660 "Parser.php" /** * placeholder for the left hand side in a reduce operation. * * For a parser with a rule like this: *
     * rule(A) ::= B. { A = 1; }
     * 
* * The parser will translate to something like: * * * function yy_r0(){$this->_retvalue = 1;} * */ private $_retvalue; /** * Perform a reduce action and the shift that must immediately * follow the reduce. * * For a rule such as: * *
     * A ::= B blah C. { dosomething(); }
     * 
* * This function will first call the action, if any, ("dosomething();" in our * example), and then it will pop three states from the stack, * one for each entry on the right-hand side of the expression * (B, blah, and C in our example rule), and then push the result of the action * back on to the stack with the resulting state reduced to (as described in the .out * file) * @param int Number of the rule by which to reduce */ function yy_reduce($yyruleno) { //int $yygoto; /* The next state */ //int $yyact; /* The next action */ //mixed $yygotominor; /* The LHS of the rule reduced */ //PHP_LexerGenerator_Regex_yyStackEntry $yymsp; /* The top of the parser's stack */ //int $yysize; /* Amount to pop the stack */ $yymsp = $this->yystack[$this->yyidx]; if (self::$yyTraceFILE && $yyruleno >= 0 && $yyruleno < count(self::$yyRuleName)) { fprintf(self::$yyTraceFILE, "%sReduce (%d) [%s].\n", self::$yyTracePrompt, $yyruleno, self::$yyRuleName[$yyruleno]); } $this->_retvalue = $yy_lefthand_side = null; if (array_key_exists($yyruleno, self::$yyReduceMap)) { // call the action $this->_retvalue = null; $this->{'yy_r' . self::$yyReduceMap[$yyruleno]}(); $yy_lefthand_side = $this->_retvalue; } $yygoto = self::$yyRuleInfo[$yyruleno]['lhs']; $yysize = self::$yyRuleInfo[$yyruleno]['rhs']; $this->yyidx -= $yysize; for($i = $yysize; $i; $i--) { // pop all of the right-hand side parameters array_pop($this->yystack); } $yyact = $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno, $yygoto); if ($yyact < self::YYNSTATE) { /* If we are not debugging and the reduce action popped at least ** one element off the stack, then we can push the new element back ** onto the stack here, and skip the stack overflow test in yy_shift(). ** That gives a significant speed improvement. */ if (!self::$yyTraceFILE && $yysize) { $this->yyidx++; $x = new PHP_LexerGenerator_Regex_yyStackEntry; $x->stateno = $yyact; $x->major = $yygoto; $x->minor = $yy_lefthand_side; $this->yystack[$this->yyidx] = $x; } else { $this->yy_shift($yyact, $yygoto, $yy_lefthand_side); } } elseif ($yyact == self::YYNSTATE + self::YYNRULE + 1) { $this->yy_accept(); } } /** * The following code executes when the parse fails * * Code from %parse_fail is inserted here */ function yy_parse_failed() { if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sFail!\n", self::$yyTracePrompt); } while ($this->yyidx >= 0) { $this->yy_pop_parser_stack(); } /* Here code is inserted which will be executed whenever the ** parser fails */ } /** * The following code executes when a syntax error first occurs. * * %syntax_error code is inserted here * @param int The major type of the error token * @param mixed The minor type of the error token */ function yy_syntax_error($yymajor, $TOKEN) { #line 6 "Parser.y" /* ?>_lex->line . ": token '" . $this->_lex->value . "' while parsing rule:"; foreach ($this->yystack as $entry) { echo $this->tokenName($entry->major) . ' '; } foreach ($this->yy_get_expected_tokens($yymajor) as $token) { $expect[] = self::$yyTokenName[$token]; } throw new Exception('Unexpected ' . $this->tokenName($yymajor) . '(' . $TOKEN . '), expected one of: ' . implode(',', $expect)); #line 1788 "Parser.php" } /** * The following is executed when the parser accepts * * %parse_accept code is inserted here */ function yy_accept() { if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sAccept!\n", self::$yyTracePrompt); } while ($this->yyidx >= 0) { $stack = $this->yy_pop_parser_stack(); } /* Here code is inserted which will be executed whenever the ** parser accepts */ } /** * The main parser program. * * The first argument is the major token number. The second is * the token value string as scanned from the input. * * @param int the token number * @param mixed the token value * @param mixed any extra arguments that should be passed to handlers */ function doParse($yymajor, $yytokenvalue) { // $yyact; /* The parser action. */ // $yyendofinput; /* True if we are at the end of input */ $yyerrorhit = 0; /* True if yymajor has invoked an error */ /* (re)initialize the parser, if necessary */ if ($this->yyidx === null || $this->yyidx < 0) { /* if ($yymajor == 0) return; // not sure why this was here... */ $this->yyidx = 0; $this->yyerrcnt = -1; $x = new PHP_LexerGenerator_Regex_yyStackEntry; $x->stateno = 0; $x->major = 0; $this->yystack = array(); array_push($this->yystack, $x); } $yyendofinput = ($yymajor==0); if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sInput %s\n", self::$yyTracePrompt, self::$yyTokenName[$yymajor]); } do { $yyact = $this->yy_find_shift_action($yymajor); if ($yymajor < self::YYERRORSYMBOL && !$this->yy_is_expected_token($yymajor)) { // force a syntax error $yyact = self::YY_ERROR_ACTION; } if ($yyact < self::YYNSTATE) { $this->yy_shift($yyact, $yymajor, $yytokenvalue); $this->yyerrcnt--; if ($yyendofinput && $this->yyidx >= 0) { $yymajor = 0; } else { $yymajor = self::YYNOCODE; } } elseif ($yyact < self::YYNSTATE + self::YYNRULE) { $this->yy_reduce($yyact - self::YYNSTATE); } elseif ($yyact == self::YY_ERROR_ACTION) { if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sSyntax Error!\n", self::$yyTracePrompt); } if (self::YYERRORSYMBOL) { /* A syntax error has occurred. ** The response to an error depends upon whether or not the ** grammar defines an error token "ERROR". ** ** This is what we do if the grammar does define ERROR: ** ** * Call the %syntax_error function. ** ** * Begin popping the stack until we enter a state where ** it is legal to shift the error symbol, then shift ** the error symbol. ** ** * Set the error count to three. ** ** * Begin accepting and shifting new tokens. No new error ** processing will occur until three tokens have been ** shifted successfully. ** */ if ($this->yyerrcnt < 0) { $this->yy_syntax_error($yymajor, $yytokenvalue); } $yymx = $this->yystack[$this->yyidx]->major; if ($yymx == self::YYERRORSYMBOL || $yyerrorhit ){ if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sDiscard input token %s\n", self::$yyTracePrompt, self::$yyTokenName[$yymajor]); } $this->yy_destructor($yymajor, $yytokenvalue); $yymajor = self::YYNOCODE; } else { while ($this->yyidx >= 0 && $yymx != self::YYERRORSYMBOL && ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE ){ $this->yy_pop_parser_stack(); } if ($this->yyidx < 0 || $yymajor==0) { $this->yy_destructor($yymajor, $yytokenvalue); $this->yy_parse_failed(); $yymajor = self::YYNOCODE; } elseif ($yymx != self::YYERRORSYMBOL) { $u2 = 0; $this->yy_shift($yyact, self::YYERRORSYMBOL, $u2); } } $this->yyerrcnt = 3; $yyerrorhit = 1; } else { /* YYERRORSYMBOL is not defined */ /* This is what we do if the grammar does not define ERROR: ** ** * Report an error message, and throw away the input token. ** ** * If the input token is $, then fail the parse. ** ** As before, subsequent error messages are suppressed until ** three input tokens have been successfully shifted. */ if ($this->yyerrcnt <= 0) { $this->yy_syntax_error($yymajor, $yytokenvalue); } $this->yyerrcnt = 3; $this->yy_destructor($yymajor, $yytokenvalue); if ($yyendofinput) { $this->yy_parse_failed(); } $yymajor = self::YYNOCODE; } } else { $this->yy_accept(); $yymajor = self::YYNOCODE; } } while ($yymajor != self::YYNOCODE && $this->yyidx >= 0); } }smarty3-3.1.13/development/lexer/LexerGenerator/Exception.php0000644000175000017500000000450511634664106022706 0ustar mikemike * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the distribution. * * Neither the name of the PHP_LexerGenerator nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * @category php * @package PHP_LexerGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.opensource.org/licenses/bsd-license.php New BSD License */ require_once './Exception.php'; /** * @package PHP_LexerGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @version @package_version@ * @since File available since Release 0.1.0 */ class PHP_LexerGenerator_Exception extends PEAR_Exception {} ?>smarty3-3.1.13/development/lexer/LexerGenerator/ParserOriginal.php0000644000175000017500000022550011307232731023661 0ustar mikemikestring = $s->string; $this->metadata = $s->metadata; } else { $this->string = (string) $s; if ($m instanceof PHP_LexerGenerator_ParseryyToken) { $this->metadata = $m->metadata; } elseif (is_array($m)) { $this->metadata = $m; } } } function __toString() { return $this->_string; } function offsetExists($offset) { return isset($this->metadata[$offset]); } function offsetGet($offset) { return $this->metadata[$offset]; } function offsetSet($offset, $value) { if ($offset === null) { if (isset($value[0])) { $x = ($value instanceof PHP_LexerGenerator_ParseryyToken) ? $value->metadata : $value; $this->metadata = array_merge($this->metadata, $x); return; } $offset = count($this->metadata); } if ($value === null) { return; } if ($value instanceof PHP_LexerGenerator_ParseryyToken) { if ($value->metadata) { $this->metadata[$offset] = $value->metadata; } } elseif ($value) { $this->metadata[$offset] = $value; } } function offsetUnset($offset) { unset($this->metadata[$offset]); } } /** The following structure represents a single element of the * parser's stack. Information stored includes: * * + The state number for the parser at this level of the stack. * * + The value of the token stored at this level of the stack. * (In other words, the "major" token.) * * + The semantic value stored at this level of the stack. This is * the information used by the action routines in the grammar. * It is sometimes called the "minor" token. */ class PHP_LexerGenerator_ParseryyStackEntry { public $stateno; /* The state-number */ public $major; /* The major token value. This is the code ** number for the token at this stack level */ public $minor; /* The user-supplied minor token value. This ** is the value of the token */ }; // code external to the class is included here #line 3 "Parser.y" /* ?> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the distribution. * * Neither the name of the PHP_LexerGenerator nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * @category php * @package PHP_LexerGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @version CVS: $Id: Parser.php,v 1.9 2007/08/18 23:50:28 cellog Exp $ * @since File available since Release 0.1.0 */ /** * For regular expression validation */ require_once './LexerGenerator/Regex/Lexer.php'; require_once './LexerGenerator/Regex/Parser.php'; require_once './LexerGenerator/Exception.php'; /** * Token parser for plex files. * * This parser converts tokens pulled from {@link PHP_LexerGenerator_Lexer} * into abstract patterns and rules, then creates the output file * @package PHP_LexerGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.php.net/license/3_01.txt PHP License 3.01 * @version 0.3.4 * @since Class available since Release 0.1.0 */ #line 166 "Parser.php" // declare_class is output here #line 2 "Parser.y" class PHP_LexerGenerator_Parser#line 171 "Parser.php" { /* First off, code is included which follows the "include_class" declaration ** in the input file. */ #line 78 "Parser.y" private $patterns; private $out; private $lex; private $input; private $counter; private $token; private $value; private $line; private $matchlongest; private $_regexLexer; private $_regexParser; private $_patternIndex = 0; public $transTable = array( 1 => self::PHPCODE, 2 => self::COMMENTSTART, 3 => self::COMMENTEND, 4 => self::QUOTE, 5 => self::PATTERN, 6 => self::CODE, 7 => self::SUBPATTERN, 8 => self::PI, ); function __construct($outfile, $lex) { $this->out = fopen($outfile, 'wb'); if (!$this->out) { throw new Exception('unable to open lexer output file "' . $outfile . '"'); } $this->lex = $lex; $this->_regexLexer = new PHP_LexerGenerator_Regex_Lexer(''); $this->_regexParser = new PHP_LexerGenerator_Regex_Parser($this->_regexLexer); } function doLongestMatch($rules, $statename, $ruleindex) { fwrite($this->out, ' if (' . $this->counter . ' >= strlen(' . $this->input . ')) { return false; // end of input } do { $rules = array('); foreach ($rules as $rule) { fwrite($this->out, ' \'/^' . $rule['pattern'] . '/\','); } fwrite($this->out, ' ); $match = false; foreach ($rules as $index => $rule) { if (preg_match($rule, substr(' . $this->input . ', ' . $this->counter . '), $yymatches)) { if ($match) { if (strlen($yymatches[0]) > strlen($match[0][0])) { $match = array($yymatches, $index); // matches, token } } else { $match = array($yymatches, $index); } } } if (!$match) { throw new Exception(\'Unexpected input at line\' . ' . $this->line . ' . \': \' . ' . $this->input . '[' . $this->counter . ']); } ' . $this->token . ' = $match[1]; ' . $this->value . ' = $match[0][0]; $yysubmatches = $match[0]; array_shift($yysubmatches); if (!$yysubmatches) { $yysubmatches = array(); } $r = $this->{\'yy_r' . $ruleindex . '_\' . ' . $this->token . '}($yysubmatches); if ($r === null) { ' . $this->counter . ' += strlen($this->value); ' . $this->line . ' += substr_count(' . $this->value . ', "\n"); // accept this token return true; } elseif ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { ' . $this->counter . ' += strlen($this->value); ' . $this->line . ' += substr_count(' . $this->value . ', "\n"); if (' . $this->counter . ' >= strlen(' . $this->input . ')) { return false; // end of input } // skip this token continue; } else {'); fwrite($this->out, ' $yy_yymore_patterns = array_slice($rules, $this->token, true); // yymore is needed do { if (!isset($yy_yymore_patterns[' . $this->token . '])) { throw new Exception(\'cannot do yymore for the last token\'); } $match = false; foreach ($yy_yymore_patterns[' . $this->token . '] as $index => $rule) { if (preg_match(\'/\' . $rule . \'/\', substr(' . $this->input . ', ' . $this->counter . '), $yymatches)) { $yymatches = array_filter($yymatches, \'strlen\'); // remove empty sub-patterns if ($match) { if (strlen($yymatches[0]) > strlen($match[0][0])) { $match = array($yymatches, $index); // matches, token } } else { $match = array($yymatches, $index); } } } if (!$match) { throw new Exception(\'Unexpected input at line\' . ' . $this->line . ' . \': \' . ' . $this->input . '[' . $this->counter . ']); } ' . $this->token . ' = $match[1]; ' . $this->value . ' = $match[0][0]; $yysubmatches = $match[0]; array_shift($yysubmatches); if (!$yysubmatches) { $yysubmatches = array(); } ' . $this->line . ' = substr_count(' . $this->value . ', "\n"); $r = $this->{\'yy_r' . $ruleindex . '_\' . ' . $this->token . '}(); } while ($r !== null || !$r); if ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } else { // accept ' . $this->counter . ' += strlen($this->value); ' . $this->line . ' += substr_count(' . $this->value . ', "\n"); return true; } } } while (true); '); } function doFirstMatch($rules, $statename, $ruleindex) { $patterns = array(); $pattern = '/'; $ruleMap = array(); $tokenindex = array(); $actualindex = 1; $i = 0; foreach ($rules as $rule) { $ruleMap[$i++] = $actualindex; $tokenindex[$actualindex] = $rule['subpatterns']; $actualindex += $rule['subpatterns'] + 1; $patterns[] = '^(' . $rule['pattern'] . ')'; } $tokencount = $tokenindex; $tokenindex = var_export($tokenindex, true); $tokenindex = explode("\n", $tokenindex); // indent for prettiness $tokenindex = implode("\n ", $tokenindex); $pattern .= implode('|', $patterns); $pattern .= '/'; fwrite($this->out, ' $tokenMap = ' . $tokenindex . '; if (' . $this->counter . ' >= strlen(' . $this->input . ')) { return false; // end of input } '); fwrite($this->out, '$yy_global_pattern = "' . $pattern . '";' . "\n"); fwrite($this->out, ' do { if (preg_match($yy_global_pattern, substr(' . $this->input . ', ' . $this->counter . '), $yymatches)) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, \'strlen\'); // remove empty sub-patterns if (!count($yymatches)) { throw new Exception(\'Error: lexing failed because a rule matched\' . \'an empty string. Input "\' . substr(' . $this->input . ', ' . $this->counter . ', 5) . \'... state ' . $statename . '\'); } next($yymatches); // skip global match ' . $this->token . ' = key($yymatches); // token number if ($tokenMap[' . $this->token . ']) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, ' . $this->token . ' + 1, $tokenMap[' . $this->token . ']); } else { $yysubmatches = array(); } ' . $this->value . ' = current($yymatches); // token value $r = $this->{\'yy_r' . $ruleindex . '_\' . ' . $this->token . '}($yysubmatches); if ($r === null) { ' . $this->counter . ' += strlen($this->value); ' . $this->line . ' += substr_count(' . $this->value . ', "\n"); // accept this token return true; } elseif ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { ' . $this->counter . ' += strlen($this->value); ' . $this->line . ' += substr_count(' . $this->value . ', "\n"); if (' . $this->counter . ' >= strlen(' . $this->input . ')) { return false; // end of input } // skip this token continue; } else {'); fwrite($this->out, ' $yy_yymore_patterns = array(' . "\n"); $extra = 0; for($i = 0; count($patterns); $i++) { unset($patterns[$i]); $extra += $tokencount[0]; array_shift($tokencount); fwrite($this->out, ' ' . $ruleMap[$i] . ' => array(' . $extra . ', "' . implode('|', $patterns) . "\"),\n"); } fwrite($this->out, ' );' . "\n"); fwrite($this->out, ' // yymore is needed do { if (!strlen($yy_yymore_patterns[' . $this->token . '][1])) { throw new Exception(\'cannot do yymore for the last token\'); } $yysubmatches = array(); if (preg_match(\'/\' . $yy_yymore_patterns[' . $this->token . '][1] . \'/\', substr(' . $this->input . ', ' . $this->counter . '), $yymatches)) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, \'strlen\'); // remove empty sub-patterns next($yymatches); // skip global match ' . $this->token . ' += key($yymatches) + $yy_yymore_patterns[' . $this->token . '][0]; // token number ' . $this->value . ' = current($yymatches); // token value ' . $this->line . ' = substr_count(' . $this->value . ', "\n"); if ($tokenMap[' . $this->token . ']) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, ' . $this->token . ' + 1, $tokenMap[' . $this->token . ']); } else { $yysubmatches = array(); } } $r = $this->{\'yy_r' . $ruleindex . '_\' . ' . $this->token . '}($yysubmatches); } while ($r !== null && !is_bool($r)); if ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { ' . $this->counter . ' += strlen($this->value); ' . $this->line . ' += substr_count(' . $this->value . ', "\n"); if (' . $this->counter . ' >= strlen(' . $this->input . ')) { return false; // end of input } // skip this token continue; } else { // accept ' . $this->counter . ' += strlen($this->value); ' . $this->line . ' += substr_count(' . $this->value . ', "\n"); return true; } } } else { throw new Exception(\'Unexpected input at line\' . ' . $this->line . ' . \': \' . ' . $this->input . '[' . $this->counter . ']); } break; } while (true); '); } function outputRules($rules, $statename) { static $ruleindex = 1; if (!$statename) { $statename = $ruleindex; } fwrite($this->out, ' function yylex' . $ruleindex . '() {'); if ($this->matchlongest) { $ruleMap = array(); foreach ($rules as $i => $rule) { $ruleMap[$i] = $i; } $this->doLongestMatch($rules, $statename, $ruleindex); } else { $ruleMap = array(); $actualindex = 1; $i = 0; foreach ($rules as $rule) { $ruleMap[$i++] = $actualindex; $actualindex += $rule['subpatterns'] + 1; } $this->doFirstMatch($rules, $statename, $ruleindex); } fwrite($this->out, ' } // end function '); if (is_string($statename)) { fwrite($this->out, ' const ' . $statename . ' = ' . $ruleindex . '; '); } foreach ($rules as $i => $rule) { fwrite($this->out, ' function yy_r' . $ruleindex . '_' . $ruleMap[$i] . '($yy_subpatterns) { ' . $rule['code'] . ' } '); } $ruleindex++; // for next set of rules } function error($msg) { echo 'Error on line ' . $this->lex->line . ': ' , $msg; } function _validatePattern($pattern, $update = false) { $this->_regexLexer->reset($pattern, $this->lex->line); $this->_regexParser->reset($this->_patternIndex, $update); try { while ($this->_regexLexer->yylex()) { $this->_regexParser->doParse( $this->_regexLexer->token, $this->_regexLexer->value); } $this->_regexParser->doParse(0, 0); } catch (PHP_LexerGenerator_Exception $e) { $this->error($e->getMessage()); throw new PHP_LexerGenerator_Exception('Invalid pattern "' . $pattern . '"'); } return $this->_regexParser->result; } #line 518 "Parser.php" /* Next is all token values, as class constants */ /* ** These constants (all generated automatically by the parser generator) ** specify the various kinds of tokens (terminals) that the parser ** understands. ** ** Each symbol here is a terminal symbol in the grammar. */ const PHPCODE = 1; const COMMENTSTART = 2; const COMMENTEND = 3; const PI = 4; const SUBPATTERN = 5; const CODE = 6; const PATTERN = 7; const QUOTE = 8; const YY_NO_ACTION = 91; const YY_ACCEPT_ACTION = 90; const YY_ERROR_ACTION = 89; /* Next are that tables used to determine what action to take based on the ** current state and lookahead token. These tables are used to implement ** functions that take a state number and lookahead value and return an ** action integer. ** ** Suppose the action integer is N. Then the action is determined as ** follows ** ** 0 <= N < self::YYNSTATE Shift N. That is, ** push the lookahead ** token onto the stack ** and goto state N. ** ** self::YYNSTATE <= N < self::YYNSTATE+self::YYNRULE Reduce by rule N-YYNSTATE. ** ** N == self::YYNSTATE+self::YYNRULE A syntax error has occurred. ** ** N == self::YYNSTATE+self::YYNRULE+1 The parser accepts its ** input. (and concludes parsing) ** ** N == self::YYNSTATE+self::YYNRULE+2 No such action. Denotes unused ** slots in the yy_action[] table. ** ** The action table is constructed as a single large static array $yy_action. ** Given state S and lookahead X, the action is computed as ** ** self::$yy_action[self::$yy_shift_ofst[S] + X ] ** ** If the index value self::$yy_shift_ofst[S]+X is out of range or if the value ** self::$yy_lookahead[self::$yy_shift_ofst[S]+X] is not equal to X or if ** self::$yy_shift_ofst[S] is equal to self::YY_SHIFT_USE_DFLT, it means that ** the action is not in the table and that self::$yy_default[S] should be used instead. ** ** The formula above is for computing the action when the lookahead is ** a terminal symbol. If the lookahead is a non-terminal (as occurs after ** a reduce action) then the static $yy_reduce_ofst array is used in place of ** the static $yy_shift_ofst array and self::YY_REDUCE_USE_DFLT is used in place of ** self::YY_SHIFT_USE_DFLT. ** ** The following are the tables generated in this section: ** ** self::$yy_action A single table containing all actions. ** self::$yy_lookahead A table containing the lookahead for each entry in ** yy_action. Used to detect hash collisions. ** self::$yy_shift_ofst For each state, the offset into self::$yy_action for ** shifting terminals. ** self::$yy_reduce_ofst For each state, the offset into self::$yy_action for ** shifting non-terminals after a reduce. ** self::$yy_default Default action for each state. */ const YY_SZ_ACTTAB = 80; static public $yy_action = array( /* 0 */ 35, 24, 50, 50, 48, 51, 51, 54, 47, 43, /* 10 */ 53, 54, 45, 31, 53, 32, 30, 50, 50, 1, /* 20 */ 51, 51, 34, 50, 17, 8, 51, 90, 52, 6, /* 30 */ 3, 29, 50, 50, 25, 51, 51, 11, 38, 18, /* 40 */ 1, 41, 42, 39, 10, 36, 18, 12, 37, 18, /* 50 */ 20, 7, 2, 16, 13, 15, 18, 27, 9, 2, /* 60 */ 5, 28, 14, 1, 44, 40, 33, 49, 56, 46, /* 70 */ 26, 19, 1, 55, 2, 21, 4, 23, 22, 8, ); static public $yy_lookahead = array( /* 0 */ 3, 3, 5, 5, 1, 8, 8, 5, 6, 2, /* 10 */ 8, 5, 6, 13, 8, 3, 3, 5, 5, 19, /* 20 */ 8, 8, 4, 5, 1, 2, 8, 10, 11, 12, /* 30 */ 5, 4, 5, 5, 13, 8, 8, 18, 5, 20, /* 40 */ 19, 8, 5, 6, 18, 5, 20, 18, 8, 20, /* 50 */ 4, 1, 2, 7, 18, 7, 20, 13, 1, 2, /* 60 */ 5, 14, 15, 19, 5, 6, 13, 1, 1, 1, /* 70 */ 16, 20, 19, 3, 2, 17, 12, 4, 17, 2, ); const YY_SHIFT_USE_DFLT = -4; const YY_SHIFT_MAX = 35; static public $yy_shift_ofst = array( /* 0 */ 23, 27, 18, 28, 50, 28, 57, 72, 73, 72, /* 10 */ 13, 12, -3, -2, 46, 40, 40, 77, 2, 6, /* 20 */ 59, 33, 33, 37, 3, 7, 48, 7, 70, 55, /* 30 */ 68, 7, 67, 7, 25, 66, ); const YY_REDUCE_USE_DFLT = -1; const YY_REDUCE_MAX = 17; static public $yy_reduce_ofst = array( /* 0 */ 17, 29, 19, 26, 21, 36, 53, 44, 47, 0, /* 10 */ 51, 51, 51, 51, 54, 58, 61, 64, ); static public $yyExpectedTokens = array( /* 0 */ array(1, 2, ), /* 1 */ array(4, 5, 8, ), /* 2 */ array(4, 5, 8, ), /* 3 */ array(5, 8, ), /* 4 */ array(1, 2, ), /* 5 */ array(5, 8, ), /* 6 */ array(1, 2, ), /* 7 */ array(2, ), /* 8 */ array(4, ), /* 9 */ array(2, ), /* 10 */ array(3, 5, 8, ), /* 11 */ array(3, 5, 8, ), /* 12 */ array(3, 5, 8, ), /* 13 */ array(3, 5, 8, ), /* 14 */ array(4, 7, ), /* 15 */ array(5, 8, ), /* 16 */ array(5, 8, ), /* 17 */ array(2, ), /* 18 */ array(5, 6, 8, ), /* 19 */ array(5, 6, 8, ), /* 20 */ array(5, 6, ), /* 21 */ array(5, 8, ), /* 22 */ array(5, 8, ), /* 23 */ array(5, 6, ), /* 24 */ array(1, ), /* 25 */ array(2, ), /* 26 */ array(7, ), /* 27 */ array(2, ), /* 28 */ array(3, ), /* 29 */ array(5, ), /* 30 */ array(1, ), /* 31 */ array(2, ), /* 32 */ array(1, ), /* 33 */ array(2, ), /* 34 */ array(5, ), /* 35 */ array(1, ), /* 36 */ array(), /* 37 */ array(), /* 38 */ array(), /* 39 */ array(), /* 40 */ array(), /* 41 */ array(), /* 42 */ array(), /* 43 */ array(), /* 44 */ array(), /* 45 */ array(), /* 46 */ array(), /* 47 */ array(), /* 48 */ array(), /* 49 */ array(), /* 50 */ array(), /* 51 */ array(), /* 52 */ array(), /* 53 */ array(), /* 54 */ array(), /* 55 */ array(), /* 56 */ array(), ); static public $yy_default = array( /* 0 */ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* 10 */ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* 20 */ 89, 69, 68, 89, 75, 60, 63, 61, 89, 89, /* 30 */ 71, 59, 70, 58, 89, 74, 86, 85, 88, 65, /* 40 */ 67, 87, 64, 78, 66, 80, 73, 79, 77, 76, /* 50 */ 82, 81, 57, 83, 84, 62, 72, ); /* The next thing included is series of defines which control ** various aspects of the generated parser. ** self::YYNOCODE is a number which corresponds ** to no legal terminal or nonterminal number. This ** number is used to fill in empty slots of the hash ** table. ** self::YYFALLBACK If defined, this indicates that one or more tokens ** have fall-back values which should be used if the ** original value of the token will not parse. ** self::YYSTACKDEPTH is the maximum depth of the parser's stack. ** self::YYNSTATE the combined number of states. ** self::YYNRULE the number of rules in the grammar ** self::YYERRORSYMBOL is the code number of the error symbol. If not ** defined, then do no error processing. */ const YYNOCODE = 22; const YYSTACKDEPTH = 100; const YYNSTATE = 57; const YYNRULE = 32; const YYERRORSYMBOL = 9; const YYERRSYMDT = 'yy0'; const YYFALLBACK = 0; /** The next table maps tokens into fallback tokens. If a construct * like the following: * * %fallback ID X Y Z. * * appears in the grammer, then ID becomes a fallback token for X, Y, * and Z. Whenever one of the tokens X, Y, or Z is input to the parser * but it does not parse, the type of the token is changed to ID and * the parse is retried before an error is thrown. */ static public $yyFallback = array( ); /** * Turn parser tracing on by giving a stream to which to write the trace * and a prompt to preface each trace message. Tracing is turned off * by making either argument NULL * * Inputs: * * - A stream resource to which trace output should be written. * If NULL, then tracing is turned off. * - A prefix string written at the beginning of every * line of trace output. If NULL, then tracing is * turned off. * * Outputs: * * - None. * @param resource * @param string */ static function Trace($TraceFILE, $zTracePrompt) { if (!$TraceFILE) { $zTracePrompt = 0; } elseif (!$zTracePrompt) { $TraceFILE = 0; } self::$yyTraceFILE = $TraceFILE; self::$yyTracePrompt = $zTracePrompt; } /** * Output debug information to output (php://output stream) */ static function PrintTrace() { self::$yyTraceFILE = fopen('php://output', 'w'); self::$yyTracePrompt = ''; } /** * @var resource|0 */ static public $yyTraceFILE; /** * String to prepend to debug output * @var string|0 */ static public $yyTracePrompt; /** * @var int */ public $yyidx; /* Index of top element in stack */ /** * @var int */ public $yyerrcnt; /* Shifts left before out of the error */ /** * @var array */ public $yystack = array(); /* The parser's stack */ /** * For tracing shifts, the names of all terminals and nonterminals * are required. The following table supplies these names * @var array */ static public $yyTokenName = array( '$', 'PHPCODE', 'COMMENTSTART', 'COMMENTEND', 'PI', 'SUBPATTERN', 'CODE', 'PATTERN', 'QUOTE', 'error', 'start', 'lexfile', 'declare', 'rules', 'declarations', 'processing_instructions', 'pattern_declarations', 'subpattern', 'rule', 'reset_rules', 'rule_subpattern', ); /** * For tracing reduce actions, the names of all rules are required. * @var array */ static public $yyRuleName = array( /* 0 */ "start ::= lexfile", /* 1 */ "lexfile ::= declare rules", /* 2 */ "lexfile ::= declare PHPCODE rules", /* 3 */ "lexfile ::= PHPCODE declare rules", /* 4 */ "lexfile ::= PHPCODE declare PHPCODE rules", /* 5 */ "declare ::= COMMENTSTART declarations COMMENTEND", /* 6 */ "declarations ::= processing_instructions pattern_declarations", /* 7 */ "processing_instructions ::= PI SUBPATTERN", /* 8 */ "processing_instructions ::= PI CODE", /* 9 */ "processing_instructions ::= processing_instructions PI SUBPATTERN", /* 10 */ "processing_instructions ::= processing_instructions PI CODE", /* 11 */ "pattern_declarations ::= PATTERN subpattern", /* 12 */ "pattern_declarations ::= pattern_declarations PATTERN subpattern", /* 13 */ "rules ::= COMMENTSTART rule COMMENTEND", /* 14 */ "rules ::= COMMENTSTART PI SUBPATTERN rule COMMENTEND", /* 15 */ "rules ::= COMMENTSTART rule COMMENTEND PHPCODE", /* 16 */ "rules ::= COMMENTSTART PI SUBPATTERN rule COMMENTEND PHPCODE", /* 17 */ "rules ::= reset_rules rule COMMENTEND", /* 18 */ "rules ::= reset_rules PI SUBPATTERN rule COMMENTEND", /* 19 */ "rules ::= reset_rules rule COMMENTEND PHPCODE", /* 20 */ "rules ::= reset_rules PI SUBPATTERN rule COMMENTEND PHPCODE", /* 21 */ "reset_rules ::= rules COMMENTSTART", /* 22 */ "rule ::= rule_subpattern CODE", /* 23 */ "rule ::= rule rule_subpattern CODE", /* 24 */ "rule_subpattern ::= QUOTE", /* 25 */ "rule_subpattern ::= SUBPATTERN", /* 26 */ "rule_subpattern ::= rule_subpattern QUOTE", /* 27 */ "rule_subpattern ::= rule_subpattern SUBPATTERN", /* 28 */ "subpattern ::= QUOTE", /* 29 */ "subpattern ::= SUBPATTERN", /* 30 */ "subpattern ::= subpattern QUOTE", /* 31 */ "subpattern ::= subpattern SUBPATTERN", ); /** * This function returns the symbolic name associated with a token * value. * @param int * @return string */ function tokenName($tokenType) { if ($tokenType === 0) { return 'End of Input'; } if ($tokenType > 0 && $tokenType < count(self::$yyTokenName)) { return self::$yyTokenName[$tokenType]; } else { return "Unknown"; } } /** * The following function deletes the value associated with a * symbol. The symbol can be either a terminal or nonterminal. * @param int the symbol code * @param mixed the symbol's value */ static function yy_destructor($yymajor, $yypminor) { switch ($yymajor) { /* Here is inserted the actions which take place when a ** terminal or non-terminal is destroyed. This can happen ** when the symbol is popped from the stack during a ** reduce or during error processing or when a parser is ** being destroyed before it is finished parsing. ** ** Note: during a reduce, the only symbols destroyed are those ** which appear on the RHS of the rule, but which are not used ** inside the C code. */ default: break; /* If no destructor action specified: do nothing */ } } /** * Pop the parser's stack once. * * If there is a destructor routine associated with the token which * is popped from the stack, then call it. * * Return the major token number for the symbol popped. * @param PHP_LexerGenerator_ParseryyParser * @return int */ function yy_pop_parser_stack() { if (!count($this->yystack)) { return; } $yytos = array_pop($this->yystack); if (self::$yyTraceFILE && $this->yyidx >= 0) { fwrite(self::$yyTraceFILE, self::$yyTracePrompt . 'Popping ' . self::$yyTokenName[$yytos->major] . "\n"); } $yymajor = $yytos->major; self::yy_destructor($yymajor, $yytos->minor); $this->yyidx--; return $yymajor; } /** * Deallocate and destroy a parser. Destructors are all called for * all stack elements before shutting the parser down. */ function __destruct() { while ($this->yyidx >= 0) { $this->yy_pop_parser_stack(); } if (is_resource(self::$yyTraceFILE)) { fclose(self::$yyTraceFILE); } } /** * Based on the current state and parser stack, get a list of all * possible lookahead tokens * @param int * @return array */ function yy_get_expected_tokens($token) { $state = $this->yystack[$this->yyidx]->stateno; $expected = self::$yyExpectedTokens[$state]; if (in_array($token, self::$yyExpectedTokens[$state], true)) { return $expected; } $stack = $this->yystack; $yyidx = $this->yyidx; do { $yyact = $this->yy_find_shift_action($token); if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) { // reduce action $done = 0; do { if ($done++ == 100) { $this->yyidx = $yyidx; $this->yystack = $stack; // too much recursion prevents proper detection // so give up return array_unique($expected); } $yyruleno = $yyact - self::YYNSTATE; $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs']; $nextstate = $this->yy_find_reduce_action( $this->yystack[$this->yyidx]->stateno, self::$yyRuleInfo[$yyruleno]['lhs']); if (isset(self::$yyExpectedTokens[$nextstate])) { $expected += self::$yyExpectedTokens[$nextstate]; if (in_array($token, self::$yyExpectedTokens[$nextstate], true)) { $this->yyidx = $yyidx; $this->yystack = $stack; return array_unique($expected); } } if ($nextstate < self::YYNSTATE) { // we need to shift a non-terminal $this->yyidx++; $x = new PHP_LexerGenerator_ParseryyStackEntry; $x->stateno = $nextstate; $x->major = self::$yyRuleInfo[$yyruleno]['lhs']; $this->yystack[$this->yyidx] = $x; continue 2; } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { $this->yyidx = $yyidx; $this->yystack = $stack; // the last token was just ignored, we can't accept // by ignoring input, this is in essence ignoring a // syntax error! return array_unique($expected); } elseif ($nextstate === self::YY_NO_ACTION) { $this->yyidx = $yyidx; $this->yystack = $stack; // input accepted, but not shifted (I guess) return $expected; } else { $yyact = $nextstate; } } while (true); } break; } while (true); return array_unique($expected); } /** * Based on the parser state and current parser stack, determine whether * the lookahead token is possible. * * The parser will convert the token value to an error token if not. This * catches some unusual edge cases where the parser would fail. * @param int * @return bool */ function yy_is_expected_token($token) { if ($token === 0) { return true; // 0 is not part of this } $state = $this->yystack[$this->yyidx]->stateno; if (in_array($token, self::$yyExpectedTokens[$state], true)) { return true; } $stack = $this->yystack; $yyidx = $this->yyidx; do { $yyact = $this->yy_find_shift_action($token); if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) { // reduce action $done = 0; do { if ($done++ == 100) { $this->yyidx = $yyidx; $this->yystack = $stack; // too much recursion prevents proper detection // so give up return true; } $yyruleno = $yyact - self::YYNSTATE; $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs']; $nextstate = $this->yy_find_reduce_action( $this->yystack[$this->yyidx]->stateno, self::$yyRuleInfo[$yyruleno]['lhs']); if (isset(self::$yyExpectedTokens[$nextstate]) && in_array($token, self::$yyExpectedTokens[$nextstate], true)) { $this->yyidx = $yyidx; $this->yystack = $stack; return true; } if ($nextstate < self::YYNSTATE) { // we need to shift a non-terminal $this->yyidx++; $x = new PHP_LexerGenerator_ParseryyStackEntry; $x->stateno = $nextstate; $x->major = self::$yyRuleInfo[$yyruleno]['lhs']; $this->yystack[$this->yyidx] = $x; continue 2; } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { $this->yyidx = $yyidx; $this->yystack = $stack; if (!$token) { // end of input: this is valid return true; } // the last token was just ignored, we can't accept // by ignoring input, this is in essence ignoring a // syntax error! return false; } elseif ($nextstate === self::YY_NO_ACTION) { $this->yyidx = $yyidx; $this->yystack = $stack; // input accepted, but not shifted (I guess) return true; } else { $yyact = $nextstate; } } while (true); } break; } while (true); $this->yyidx = $yyidx; $this->yystack = $stack; return true; } /** * Find the appropriate action for a parser given the terminal * look-ahead token iLookAhead. * * If the look-ahead token is YYNOCODE, then check to see if the action is * independent of the look-ahead. If it is, return the action, otherwise * return YY_NO_ACTION. * @param int The look-ahead token */ function yy_find_shift_action($iLookAhead) { $stateno = $this->yystack[$this->yyidx]->stateno; /* if ($this->yyidx < 0) return self::YY_NO_ACTION; */ if (!isset(self::$yy_shift_ofst[$stateno])) { // no shift actions return self::$yy_default[$stateno]; } $i = self::$yy_shift_ofst[$stateno]; if ($i === self::YY_SHIFT_USE_DFLT) { return self::$yy_default[$stateno]; } if ($iLookAhead == self::YYNOCODE) { return self::YY_NO_ACTION; } $i += $iLookAhead; if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[$i] != $iLookAhead) { if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback) && ($iFallback = self::$yyFallback[$iLookAhead]) != 0) { if (self::$yyTraceFILE) { fwrite(self::$yyTraceFILE, self::$yyTracePrompt . "FALLBACK " . self::$yyTokenName[$iLookAhead] . " => " . self::$yyTokenName[$iFallback] . "\n"); } return $this->yy_find_shift_action($iFallback); } return self::$yy_default[$stateno]; } else { return self::$yy_action[$i]; } } /** * Find the appropriate action for a parser given the non-terminal * look-ahead token $iLookAhead. * * If the look-ahead token is self::YYNOCODE, then check to see if the action is * independent of the look-ahead. If it is, return the action, otherwise * return self::YY_NO_ACTION. * @param int Current state number * @param int The look-ahead token */ function yy_find_reduce_action($stateno, $iLookAhead) { /* $stateno = $this->yystack[$this->yyidx]->stateno; */ if (!isset(self::$yy_reduce_ofst[$stateno])) { return self::$yy_default[$stateno]; } $i = self::$yy_reduce_ofst[$stateno]; if ($i == self::YY_REDUCE_USE_DFLT) { return self::$yy_default[$stateno]; } if ($iLookAhead == self::YYNOCODE) { return self::YY_NO_ACTION; } $i += $iLookAhead; if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[$i] != $iLookAhead) { return self::$yy_default[$stateno]; } else { return self::$yy_action[$i]; } } /** * Perform a shift action. * @param int The new state to shift in * @param int The major token to shift in * @param mixed the minor token to shift in */ function yy_shift($yyNewState, $yyMajor, $yypMinor) { $this->yyidx++; if ($this->yyidx >= self::YYSTACKDEPTH) { $this->yyidx--; if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sStack Overflow!\n", self::$yyTracePrompt); } while ($this->yyidx >= 0) { $this->yy_pop_parser_stack(); } /* Here code is inserted which will execute if the parser ** stack ever overflows */ return; } $yytos = new PHP_LexerGenerator_ParseryyStackEntry; $yytos->stateno = $yyNewState; $yytos->major = $yyMajor; $yytos->minor = $yypMinor; array_push($this->yystack, $yytos); if (self::$yyTraceFILE && $this->yyidx > 0) { fprintf(self::$yyTraceFILE, "%sShift %d\n", self::$yyTracePrompt, $yyNewState); fprintf(self::$yyTraceFILE, "%sStack:", self::$yyTracePrompt); for($i = 1; $i <= $this->yyidx; $i++) { fprintf(self::$yyTraceFILE, " %s", self::$yyTokenName[$this->yystack[$i]->major]); } fwrite(self::$yyTraceFILE,"\n"); } } /** * The following table contains information about every rule that * is used during the reduce. * *
     * array(
     *  array(
     *   int $lhs;         Symbol on the left-hand side of the rule
     *   int $nrhs;     Number of right-hand side symbols in the rule
     *  ),...
     * );
     * 
*/ static public $yyRuleInfo = array( array( 'lhs' => 10, 'rhs' => 1 ), array( 'lhs' => 11, 'rhs' => 2 ), array( 'lhs' => 11, 'rhs' => 3 ), array( 'lhs' => 11, 'rhs' => 3 ), array( 'lhs' => 11, 'rhs' => 4 ), array( 'lhs' => 12, 'rhs' => 3 ), array( 'lhs' => 14, 'rhs' => 2 ), array( 'lhs' => 15, 'rhs' => 2 ), array( 'lhs' => 15, 'rhs' => 2 ), array( 'lhs' => 15, 'rhs' => 3 ), array( 'lhs' => 15, 'rhs' => 3 ), array( 'lhs' => 16, 'rhs' => 2 ), array( 'lhs' => 16, 'rhs' => 3 ), array( 'lhs' => 13, 'rhs' => 3 ), array( 'lhs' => 13, 'rhs' => 5 ), array( 'lhs' => 13, 'rhs' => 4 ), array( 'lhs' => 13, 'rhs' => 6 ), array( 'lhs' => 13, 'rhs' => 3 ), array( 'lhs' => 13, 'rhs' => 5 ), array( 'lhs' => 13, 'rhs' => 4 ), array( 'lhs' => 13, 'rhs' => 6 ), array( 'lhs' => 19, 'rhs' => 2 ), array( 'lhs' => 18, 'rhs' => 2 ), array( 'lhs' => 18, 'rhs' => 3 ), array( 'lhs' => 20, 'rhs' => 1 ), array( 'lhs' => 20, 'rhs' => 1 ), array( 'lhs' => 20, 'rhs' => 2 ), array( 'lhs' => 20, 'rhs' => 2 ), array( 'lhs' => 17, 'rhs' => 1 ), array( 'lhs' => 17, 'rhs' => 1 ), array( 'lhs' => 17, 'rhs' => 2 ), array( 'lhs' => 17, 'rhs' => 2 ), ); /** * The following table contains a mapping of reduce action to method name * that handles the reduction. * * If a rule is not set, it has no handler. */ static public $yyReduceMap = array( 1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 7, 9 => 9, 10 => 9, 11 => 11, 12 => 12, 13 => 13, 14 => 14, 15 => 15, 16 => 16, 17 => 17, 18 => 18, 19 => 19, 20 => 20, 21 => 21, 22 => 22, 23 => 23, 24 => 24, 25 => 25, 26 => 26, 27 => 27, 28 => 28, 29 => 29, 30 => 30, 31 => 31, ); /* Beginning here are the reduction cases. A typical example ** follows: ** #line ** function yy_r0($yymsp){ ... } // User supplied code ** #line */ #line 423 "Parser.y" function yy_r1(){ fwrite($this->out, ' public $_yy_state = 1; private $_yy_stack = array(); function yylex() { return $this->{\'yylex\' . $this->_yy_state}(); } function yypushstate($state) { array_push($this->_yy_stack, $this->_yy_state); $this->_yy_state = $state; } function yypopstate() { $this->_yy_state = array_pop($this->_yy_stack); } function yybegin($state) { $this->_yy_state = $state; } '); foreach ($this->yystack[$this->yyidx + 0]->minor as $rule) { $this->outputRules($rule['rules'], $rule['statename']); if ($rule['code']) { fwrite($this->out, $rule['code']); } } } #line 1319 "Parser.php" #line 457 "Parser.y" function yy_r2(){ fwrite($this->out, ' private $_yy_state = 1; private $_yy_stack = array(); function yylex() { return $this->{\'yylex\' . $this->_yy_state}(); } function yypushstate($state) { array_push($this->_yy_stack, $this->_yy_state); $this->_yy_state = $state; } function yypopstate() { $this->_yy_state = array_pop($this->_yy_stack); } function yybegin($state) { $this->_yy_state = $state; } '); if (strlen($this->yystack[$this->yyidx + -1]->minor)) { fwrite($this->out, $this->yystack[$this->yyidx + -1]->minor); } foreach ($this->yystack[$this->yyidx + 0]->minor as $rule) { $this->outputRules($rule['rules'], $rule['statename']); if ($rule['code']) { fwrite($this->out, $rule['code']); } } } #line 1358 "Parser.php" #line 494 "Parser.y" function yy_r3(){ if (strlen($this->yystack[$this->yyidx + -2]->minor)) { fwrite($this->out, $this->yystack[$this->yyidx + -2]->minor); } fwrite($this->out, ' private $_yy_state = 1; private $_yy_stack = array(); function yylex() { return $this->{\'yylex\' . $this->_yy_state}(); } function yypushstate($state) { array_push($this->_yy_stack, $this->_yy_state); $this->_yy_state = $state; } function yypopstate() { $this->_yy_state = array_pop($this->_yy_stack); } function yybegin($state) { $this->_yy_state = $state; } '); foreach ($this->yystack[$this->yyidx + 0]->minor as $rule) { $this->outputRules($rule['rules'], $rule['statename']); if ($rule['code']) { fwrite($this->out, $rule['code']); } } } #line 1397 "Parser.php" #line 531 "Parser.y" function yy_r4(){ if (strlen($this->yystack[$this->yyidx + -3]->minor)) { fwrite($this->out, $this->yystack[$this->yyidx + -3]->minor); } fwrite($this->out, ' private $_yy_state = 1; private $_yy_stack = array(); function yylex() { return $this->{\'yylex\' . $this->_yy_state}(); } function yypushstate($state) { array_push($this->_yy_stack, $this->_yy_state); $this->_yy_state = $state; } function yypopstate() { $this->_yy_state = array_pop($this->_yy_stack); } function yybegin($state) { $this->_yy_state = $state; } '); if (strlen($this->yystack[$this->yyidx + -1]->minor)) { fwrite($this->out, $this->yystack[$this->yyidx + -1]->minor); } foreach ($this->yystack[$this->yyidx + 0]->minor as $rule) { $this->outputRules($rule['rules'], $rule['statename']); if ($rule['code']) { fwrite($this->out, $rule['code']); } } } #line 1439 "Parser.php" #line 572 "Parser.y" function yy_r5(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; $this->patterns = $this->yystack[$this->yyidx + -1]->minor['patterns']; $this->_patternIndex = 1; } #line 1446 "Parser.php" #line 578 "Parser.y" function yy_r6(){ $expected = array( 'counter' => true, 'input' => true, 'token' => true, 'value' => true, 'line' => true, ); foreach ($this->yystack[$this->yyidx + -1]->minor as $pi) { if (isset($expected[$pi['pi']])) { unset($expected[$pi['pi']]); continue; } if (count($expected)) { throw new Exception('Processing Instructions "' . implode(', ', array_keys($expected)) . '" must be defined'); } } $expected = array( 'counter' => true, 'input' => true, 'token' => true, 'value' => true, 'line' => true, 'matchlongest' => true, ); foreach ($this->yystack[$this->yyidx + -1]->minor as $pi) { if (isset($expected[$pi['pi']])) { $this->{$pi['pi']} = $pi['definition']; if ($pi['pi'] == 'matchlongest') { $this->matchlongest = true; } continue; } $this->error('Unknown processing instruction %' . $pi['pi'] . ', should be one of "' . implode(', ', array_keys($expected)) . '"'); } $this->_retvalue = array('patterns' => $this->yystack[$this->yyidx + 0]->minor, 'pis' => $this->yystack[$this->yyidx + -1]->minor); $this->_patternIndex = 1; } #line 1488 "Parser.php" #line 619 "Parser.y" function yy_r7(){ $this->_retvalue = array(array('pi' => $this->yystack[$this->yyidx + -1]->minor, 'definition' => $this->yystack[$this->yyidx + 0]->minor)); } #line 1493 "Parser.php" #line 625 "Parser.y" function yy_r9(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor; $this->_retvalue[] = array('pi' => $this->yystack[$this->yyidx + -1]->minor, 'definition' => $this->yystack[$this->yyidx + 0]->minor); } #line 1499 "Parser.php" #line 634 "Parser.y" function yy_r11(){ $this->_retvalue = array($this->yystack[$this->yyidx + -1]->minor => $this->yystack[$this->yyidx + 0]->minor); // reset internal indicator of where we are in a pattern $this->_patternIndex = 0; } #line 1506 "Parser.php" #line 639 "Parser.y" function yy_r12(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor; if (isset($this->_retvalue[$this->yystack[$this->yyidx + -1]->minor])) { throw new Exception('Pattern "' . $this->yystack[$this->yyidx + -1]->minor . '" is already defined as "' . $this->_retvalue[$this->yystack[$this->yyidx + -1]->minor] . '", cannot redefine as "' . $this->yystack[$this->yyidx + 0]->minor->string . '"'); } $this->_retvalue[$this->yystack[$this->yyidx + -1]->minor] = $this->yystack[$this->yyidx + 0]->minor; // reset internal indicator of where we are in a pattern declaration $this->_patternIndex = 0; } #line 1518 "Parser.php" #line 650 "Parser.y" function yy_r13(){ $this->_retvalue = array(array('rules' => $this->yystack[$this->yyidx + -1]->minor, 'code' => '', 'statename' => '')); } #line 1523 "Parser.php" #line 653 "Parser.y" function yy_r14(){ if ($this->yystack[$this->yyidx + -3]->minor != 'statename') { throw new Exception('Error: only %statename processing instruction ' . 'is allowed in rule sections'); } $this->_retvalue = array(array('rules' => $this->yystack[$this->yyidx + -1]->minor, 'code' => '', 'statename' => $this->yystack[$this->yyidx + -2]->minor)); } #line 1532 "Parser.php" #line 660 "Parser.y" function yy_r15(){ $this->_retvalue = array(array('rules' => $this->yystack[$this->yyidx + -2]->minor, 'code' => $this->yystack[$this->yyidx + 0]->minor, 'statename' => '')); } #line 1537 "Parser.php" #line 663 "Parser.y" function yy_r16(){ if ($this->yystack[$this->yyidx + -4]->minor != 'statename') { throw new Exception('Error: only %statename processing instruction ' . 'is allowed in rule sections'); } $this->_retvalue = array(array('rules' => $this->yystack[$this->yyidx + -2]->minor, 'code' => $this->yystack[$this->yyidx + 0]->minor, 'statename' => $this->yystack[$this->yyidx + -3]->minor)); $this->_patternIndex = 1; } #line 1547 "Parser.php" #line 671 "Parser.y" function yy_r17(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor; $this->_retvalue[] = array('rules' => $this->yystack[$this->yyidx + -1]->minor, 'code' => '', 'statename' => ''); $this->_patternIndex = 1; } #line 1554 "Parser.php" #line 676 "Parser.y" function yy_r18(){ if ($this->yystack[$this->yyidx + -3]->minor != 'statename') { throw new Exception('Error: only %statename processing instruction ' . 'is allowed in rule sections'); } $this->_retvalue = $this->yystack[$this->yyidx + -4]->minor; $this->_retvalue[] = array('rules' => $this->yystack[$this->yyidx + -1]->minor, 'code' => '', 'statename' => $this->yystack[$this->yyidx + -2]->minor); } #line 1564 "Parser.php" #line 684 "Parser.y" function yy_r19(){ $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor; $this->_retvalue[] = array('rules' => $this->yystack[$this->yyidx + -2]->minor, 'code' => $this->yystack[$this->yyidx + 0]->minor, 'statename' => ''); } #line 1570 "Parser.php" #line 688 "Parser.y" function yy_r20(){ if ($this->yystack[$this->yyidx + -4]->minor != 'statename') { throw new Exception('Error: only %statename processing instruction ' . 'is allowed in rule sections'); } $this->_retvalue = $this->yystack[$this->yyidx + -5]->minor; $this->_retvalue[] = array('rules' => $this->yystack[$this->yyidx + -2]->minor, 'code' => $this->yystack[$this->yyidx + 0]->minor, 'statename' => $this->yystack[$this->yyidx + -3]->minor); } #line 1580 "Parser.php" #line 697 "Parser.y" function yy_r21(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; $this->_patternIndex = 1; } #line 1586 "Parser.php" #line 702 "Parser.y" function yy_r22(){ $name = $this->yystack[$this->yyidx + -1]->minor[1]; $this->yystack[$this->yyidx + -1]->minor = $this->yystack[$this->yyidx + -1]->minor[0]; $this->yystack[$this->yyidx + -1]->minor = $this->_validatePattern($this->yystack[$this->yyidx + -1]->minor); $this->_patternIndex += $this->yystack[$this->yyidx + -1]->minor['subpatterns'] + 1; if (@preg_match('/' . str_replace('/', '\\/', $this->yystack[$this->yyidx + -1]->minor['pattern']) . '/', '')) { $this->error('Rule "' . $name . '" can match the empty string, this will break lexing'); } $this->_retvalue = array(array('pattern' => str_replace('/', '\\/', $this->yystack[$this->yyidx + -1]->minor->string), 'code' => $this->yystack[$this->yyidx + 0]->minor, 'subpatterns' => $this->yystack[$this->yyidx + -1]->minor['subpatterns'])); } #line 1598 "Parser.php" #line 712 "Parser.y" function yy_r23(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor; $name = $this->yystack[$this->yyidx + -1]->minor[1]; $this->yystack[$this->yyidx + -1]->minor = $this->yystack[$this->yyidx + -1]->minor[0]; $this->yystack[$this->yyidx + -1]->minor = $this->_validatePattern($this->yystack[$this->yyidx + -1]->minor); $this->_patternIndex += $this->yystack[$this->yyidx + -1]->minor['subpatterns'] + 1; if (@preg_match('/' . str_replace('/', '\\/', $this->yystack[$this->yyidx + -1]->minor['pattern']) . '/', '')) { $this->error('Rule "' . $name . '" can match the empty string, this will break lexing'); } $this->_retvalue[] = array('pattern' => str_replace('/', '\\/', $this->yystack[$this->yyidx + -1]->minor->string), 'code' => $this->yystack[$this->yyidx + 0]->minor, 'subpatterns' => $this->yystack[$this->yyidx + -1]->minor['subpatterns']); } #line 1611 "Parser.php" #line 724 "Parser.y" function yy_r24(){ $this->_retvalue = array(preg_quote($this->yystack[$this->yyidx + 0]->minor, '/'), $this->yystack[$this->yyidx + 0]->minor); } #line 1616 "Parser.php" #line 727 "Parser.y" function yy_r25(){ if (!isset($this->patterns[$this->yystack[$this->yyidx + 0]->minor])) { $this->error('Undefined pattern "' . $this->yystack[$this->yyidx + 0]->minor . '" used in rules'); throw new Exception('Undefined pattern "' . $this->yystack[$this->yyidx + 0]->minor . '" used in rules'); } $this->_retvalue = array($this->patterns[$this->yystack[$this->yyidx + 0]->minor], $this->yystack[$this->yyidx + 0]->minor); } #line 1625 "Parser.php" #line 734 "Parser.y" function yy_r26(){ $this->_retvalue = array($this->yystack[$this->yyidx + -1]->minor[0] . preg_quote($this->yystack[$this->yyidx + 0]->minor, '/'), $this->yystack[$this->yyidx + -1]->minor[1] . ' ' . $this->yystack[$this->yyidx + 0]->minor); } #line 1630 "Parser.php" #line 737 "Parser.y" function yy_r27(){ if (!isset($this->patterns[$this->yystack[$this->yyidx + 0]->minor])) { $this->error('Undefined pattern "' . $this->yystack[$this->yyidx + 0]->minor . '" used in rules'); throw new Exception('Undefined pattern "' . $this->yystack[$this->yyidx + 0]->minor . '" used in rules'); } $this->_retvalue = array($this->yystack[$this->yyidx + -1]->minor[0] . $this->patterns[$this->yystack[$this->yyidx + 0]->minor], $this->yystack[$this->yyidx + -1]->minor[1] . ' ' . $this->yystack[$this->yyidx + 0]->minor); } #line 1639 "Parser.php" #line 745 "Parser.y" function yy_r28(){ $this->_retvalue = preg_quote($this->yystack[$this->yyidx + 0]->minor, '/'); } #line 1644 "Parser.php" #line 748 "Parser.y" function yy_r29(){ // increment internal sub-pattern counter // adjust back-references in pattern based on previous pattern $test = $this->_validatePattern($this->yystack[$this->yyidx + 0]->minor, true); $this->_patternIndex += $test['subpatterns']; $this->_retvalue = $test['pattern']; } #line 1653 "Parser.php" #line 755 "Parser.y" function yy_r30(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor . preg_quote($this->yystack[$this->yyidx + 0]->minor, '/'); } #line 1658 "Parser.php" #line 758 "Parser.y" function yy_r31(){ // increment internal sub-pattern counter // adjust back-references in pattern based on previous pattern $test = $this->_validatePattern($this->yystack[$this->yyidx + 0]->minor, true); $this->_patternIndex += $test['subpatterns']; $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor . $test['pattern']; } #line 1667 "Parser.php" /** * placeholder for the left hand side in a reduce operation. * * For a parser with a rule like this: *
     * rule(A) ::= B. { A = 1; }
     * 
* * The parser will translate to something like: * * * function yy_r0(){$this->_retvalue = 1;} * */ private $_retvalue; /** * Perform a reduce action and the shift that must immediately * follow the reduce. * * For a rule such as: * *
     * A ::= B blah C. { dosomething(); }
     * 
* * This function will first call the action, if any, ("dosomething();" in our * example), and then it will pop three states from the stack, * one for each entry on the right-hand side of the expression * (B, blah, and C in our example rule), and then push the result of the action * back on to the stack with the resulting state reduced to (as described in the .out * file) * @param int Number of the rule by which to reduce */ function yy_reduce($yyruleno) { //int $yygoto; /* The next state */ //int $yyact; /* The next action */ //mixed $yygotominor; /* The LHS of the rule reduced */ //PHP_LexerGenerator_ParseryyStackEntry $yymsp; /* The top of the parser's stack */ //int $yysize; /* Amount to pop the stack */ $yymsp = $this->yystack[$this->yyidx]; if (self::$yyTraceFILE && $yyruleno >= 0 && $yyruleno < count(self::$yyRuleName)) { fprintf(self::$yyTraceFILE, "%sReduce (%d) [%s].\n", self::$yyTracePrompt, $yyruleno, self::$yyRuleName[$yyruleno]); } $this->_retvalue = $yy_lefthand_side = null; if (array_key_exists($yyruleno, self::$yyReduceMap)) { // call the action $this->_retvalue = null; $this->{'yy_r' . self::$yyReduceMap[$yyruleno]}(); $yy_lefthand_side = $this->_retvalue; } $yygoto = self::$yyRuleInfo[$yyruleno]['lhs']; $yysize = self::$yyRuleInfo[$yyruleno]['rhs']; $this->yyidx -= $yysize; for($i = $yysize; $i; $i--) { // pop all of the right-hand side parameters array_pop($this->yystack); } $yyact = $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno, $yygoto); if ($yyact < self::YYNSTATE) { /* If we are not debugging and the reduce action popped at least ** one element off the stack, then we can push the new element back ** onto the stack here, and skip the stack overflow test in yy_shift(). ** That gives a significant speed improvement. */ if (!self::$yyTraceFILE && $yysize) { $this->yyidx++; $x = new PHP_LexerGenerator_ParseryyStackEntry; $x->stateno = $yyact; $x->major = $yygoto; $x->minor = $yy_lefthand_side; $this->yystack[$this->yyidx] = $x; } else { $this->yy_shift($yyact, $yygoto, $yy_lefthand_side); } } elseif ($yyact == self::YYNSTATE + self::YYNRULE + 1) { $this->yy_accept(); } } /** * The following code executes when the parse fails * * Code from %parse_fail is inserted here */ function yy_parse_failed() { if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sFail!\n", self::$yyTracePrompt); } while ($this->yyidx >= 0) { $this->yy_pop_parser_stack(); } /* Here code is inserted which will be executed whenever the ** parser fails */ } /** * The following code executes when a syntax error first occurs. * * %syntax_error code is inserted here * @param int The major type of the error token * @param mixed The minor type of the error token */ function yy_syntax_error($yymajor, $TOKEN) { #line 66 "Parser.y" echo "Syntax Error on line " . $this->lex->line . ": token '" . $this->lex->value . "' while parsing rule:"; foreach ($this->yystack as $entry) { echo $this->tokenName($entry->major) . ' '; } foreach ($this->yy_get_expected_tokens($yymajor) as $token) { $expect[] = self::$yyTokenName[$token]; } throw new Exception('Unexpected ' . $this->tokenName($yymajor) . '(' . $TOKEN . '), expected one of: ' . implode(',', $expect)); #line 1792 "Parser.php" } /** * The following is executed when the parser accepts * * %parse_accept code is inserted here */ function yy_accept() { if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sAccept!\n", self::$yyTracePrompt); } while ($this->yyidx >= 0) { $stack = $this->yy_pop_parser_stack(); } /* Here code is inserted which will be executed whenever the ** parser accepts */ } /** * The main parser program. * * The first argument is the major token number. The second is * the token value string as scanned from the input. * * @param int the token number * @param mixed the token value * @param mixed any extra arguments that should be passed to handlers */ function doParse($yymajor, $yytokenvalue) { // $yyact; /* The parser action. */ // $yyendofinput; /* True if we are at the end of input */ $yyerrorhit = 0; /* True if yymajor has invoked an error */ /* (re)initialize the parser, if necessary */ if ($this->yyidx === null || $this->yyidx < 0) { /* if ($yymajor == 0) return; // not sure why this was here... */ $this->yyidx = 0; $this->yyerrcnt = -1; $x = new PHP_LexerGenerator_ParseryyStackEntry; $x->stateno = 0; $x->major = 0; $this->yystack = array(); array_push($this->yystack, $x); } $yyendofinput = ($yymajor==0); if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sInput %s\n", self::$yyTracePrompt, self::$yyTokenName[$yymajor]); } do { $yyact = $this->yy_find_shift_action($yymajor); if ($yymajor < self::YYERRORSYMBOL && !$this->yy_is_expected_token($yymajor)) { // force a syntax error $yyact = self::YY_ERROR_ACTION; } if ($yyact < self::YYNSTATE) { $this->yy_shift($yyact, $yymajor, $yytokenvalue); $this->yyerrcnt--; if ($yyendofinput && $this->yyidx >= 0) { $yymajor = 0; } else { $yymajor = self::YYNOCODE; } } elseif ($yyact < self::YYNSTATE + self::YYNRULE) { $this->yy_reduce($yyact - self::YYNSTATE); } elseif ($yyact == self::YY_ERROR_ACTION) { if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sSyntax Error!\n", self::$yyTracePrompt); } if (self::YYERRORSYMBOL) { /* A syntax error has occurred. ** The response to an error depends upon whether or not the ** grammar defines an error token "ERROR". ** ** This is what we do if the grammar does define ERROR: ** ** * Call the %syntax_error function. ** ** * Begin popping the stack until we enter a state where ** it is legal to shift the error symbol, then shift ** the error symbol. ** ** * Set the error count to three. ** ** * Begin accepting and shifting new tokens. No new error ** processing will occur until three tokens have been ** shifted successfully. ** */ if ($this->yyerrcnt < 0) { $this->yy_syntax_error($yymajor, $yytokenvalue); } $yymx = $this->yystack[$this->yyidx]->major; if ($yymx == self::YYERRORSYMBOL || $yyerrorhit ){ if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sDiscard input token %s\n", self::$yyTracePrompt, self::$yyTokenName[$yymajor]); } $this->yy_destructor($yymajor, $yytokenvalue); $yymajor = self::YYNOCODE; } else { while ($this->yyidx >= 0 && $yymx != self::YYERRORSYMBOL && ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE ){ $this->yy_pop_parser_stack(); } if ($this->yyidx < 0 || $yymajor==0) { $this->yy_destructor($yymajor, $yytokenvalue); $this->yy_parse_failed(); $yymajor = self::YYNOCODE; } elseif ($yymx != self::YYERRORSYMBOL) { $u2 = 0; $this->yy_shift($yyact, self::YYERRORSYMBOL, $u2); } } $this->yyerrcnt = 3; $yyerrorhit = 1; } else { /* YYERRORSYMBOL is not defined */ /* This is what we do if the grammar does not define ERROR: ** ** * Report an error message, and throw away the input token. ** ** * If the input token is $, then fail the parse. ** ** As before, subsequent error messages are suppressed until ** three input tokens have been successfully shifted. */ if ($this->yyerrcnt <= 0) { $this->yy_syntax_error($yymajor, $yytokenvalue); } $this->yyerrcnt = 3; $this->yy_destructor($yymajor, $yytokenvalue); if ($yyendofinput) { $this->yy_parse_failed(); } $yymajor = self::YYNOCODE; } } else { $this->yy_accept(); $yymajor = self::YYNOCODE; } } while ($yymajor != self::YYNOCODE && $this->yyidx >= 0); } } smarty3-3.1.13/development/lexer/LexerGenerator/Lexer.php0000644000175000017500000004116711634664106022034 0ustar mikemike * @copyright 2006 Gregory Beaver * @license http://www.php.net/license/3_01.txt PHP License 3.01 * @version CVS: $Id: Lexer.php 246683 2007-11-22 04:43:52Z instance $ * @since File available since Release 0.1.0 */ require_once './LexerGenerator/Parser.php'; /** * Token scanner for plex files. * * This scanner detects comments beginning with "/*!lex2php" and * then returns their components (processing instructions, patterns, strings * action code, and regexes) * @package PHP_LexerGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.php.net/license/3_01.txt PHP License 3.01 * @version @package_version@ * @since Class available since Release 0.1.0 */ class PHP_LexerGenerator_Lexer { private $data; private $N; private $state; /** * Current line number in input * @var int */ public $line; /** * Number of scanning errors detected * @var int */ public $errors = 0; /** * integer identifier of the current token * @var int */ public $token; /** * string content of current token * @var string */ public $value; const CODE = PHP_LexerGenerator_Parser::CODE; const COMMENTEND = PHP_LexerGenerator_Parser::COMMENTEND; const COMMENTSTART = PHP_LexerGenerator_Parser::COMMENTSTART; const PATTERN = PHP_LexerGenerator_Parser::PATTERN; const PHPCODE = PHP_LexerGenerator_Parser::PHPCODE; const PI = PHP_LexerGenerator_Parser::PI; const QUOTE = PHP_LexerGenerator_Parser::QUOTE; const SINGLEQUOTE = PHP_LexerGenerator_Parser::SINGLEQUOTE; const SUBPATTERN = PHP_LexerGenerator_Parser::SUBPATTERN; /** * prepare scanning * @param string the input */ function __construct($data) { $this->data = str_replace("\r\n", "\n", $data); $this->N = 0; $this->line = 1; $this->state = 'Start'; $this->errors = 0; } /** * Output an error message * @param string */ private function error($msg) { echo 'Error on line ' . $this->line . ': ' . $msg; $this->errors++; } /** * Initial scanning state lexer * @return boolean */ private function lexStart() { if ($this->N >= strlen($this->data)) { return false; } $a = strpos($this->data, '/*!lex2php' . "\n", $this->N); if ($a === false) { $this->value = substr($this->data, $this->N); $this->N = strlen($this->data); $this->token = self::PHPCODE; return true; } if ($a > $this->N) { $this->value = substr($this->data, $this->N, $a - $this->N); $this->N = $a; $this->token = self::PHPCODE; return true; } $this->value = '/*!lex2php' . "\n"; $this->N += 11; // strlen("/*lex2php\n") $this->token = self::COMMENTSTART; $this->state = 'Declare'; return true; } /** * lexer for top-level canning state after the initial declaration comment * @return boolean */ private function lexStartNonDeclare() { if ($this->N >= strlen($this->data)) { return false; } $a = strpos($this->data, '/*!lex2php' . "\n", $this->N); if ($a === false) { $this->value = substr($this->data, $this->N); $this->N = strlen($this->data); $this->token = self::PHPCODE; return true; } if ($a > $this->N) { $this->value = substr($this->data, $this->N, $a - $this->N); $this->N = $a; $this->token = self::PHPCODE; return true; } $this->value = '/*!lex2php' . "\n"; $this->N += 11; // strlen("/*lex2php\n") $this->token = self::COMMENTSTART; $this->state = 'Rule'; return true; } /** * lexer for declaration comment state * @return boolean */ private function lexDeclare() { while (true) { $this -> skipWhitespaceEol(); if ( $this->N + 1 >= strlen($this->data) || $this->data[$this->N] != '/' || $this->data[$this->N + 1] != '/' ) { break; } // Skip single-line comment while ( $this->N < strlen($this->data) && $this->data[$this->N] != "\n" ) { ++$this->N; } } if ($this->data[$this->N] == '*' && $this->data[$this->N + 1] == '/') { $this->state = 'StartNonDeclare'; $this->value = '*/'; $this->N += 2; $this->token = self::COMMENTEND; return true; } if (preg_match('/\G%([a-z]+)/', $this->data, $token, null, $this->N)) { $this->value = $token[1]; $this->N += strlen($token[1]) + 1; $this->state = 'DeclarePI'; $this->token = self::PI; return true; } if (preg_match('/\G[a-zA-Z_][a-zA-Z0-9_]*/', $this->data, $token, null, $this->N)) { $this->value = $token[0]; $this->token = self::PATTERN; $this->N += strlen($token[0]); $this->state = 'DeclareEquals'; return true; } $this->error('expecting declaration of sub-patterns'); return false; } /** * lexer for processor instructions within declaration comment * @return boolean */ private function lexDeclarePI() { $this -> skipWhitespace(); if ($this->data[$this->N] == "\n") { $this->N++; $this->state = 'Declare'; $this->line++; return $this->lexDeclare(); } if ($this->data[$this->N] == '{') { return $this->lexCode(); } if (!preg_match("/\G[^\n]+/", $this->data, $token, null, $this->N)) { $this->error('Unexpected end of file'); return false; } $this->value = $token[0]; $this->N += strlen($this->value); $this->token = self::SUBPATTERN; return true; } /** * lexer for processor instructions inside rule comments * @return boolean */ private function lexDeclarePIRule() { $this -> skipWhitespace(); if ($this->data[$this->N] == "\n") { $this->N++; $this->state = 'Rule'; $this->line++; return $this->lexRule(); } if ($this->data[$this->N] == '{') { return $this->lexCode(); } if (!preg_match("/\G[^\n]+/", $this->data, $token, null, $this->N)) { $this->error('Unexpected end of file'); return false; } $this->value = $token[0]; $this->N += strlen($this->value); $this->token = self::SUBPATTERN; return true; } /** * lexer for the state representing scanning between a pattern and the "=" sign * @return boolean */ private function lexDeclareEquals() { $this -> skipWhitespace(); if ($this->N >= strlen($this->data)) { $this->error('unexpected end of input, expecting "=" for sub-pattern declaration'); } if ($this->data[$this->N] != '=') { $this->error('expecting "=" for sub-pattern declaration'); return false; } $this->N++; $this->state = 'DeclareRightside'; $this -> skipWhitespace(); if ($this->N >= strlen($this->data)) { $this->error('unexpected end of file, expecting right side of sub-pattern declaration'); return false; } return $this->lexDeclareRightside(); } /** * lexer for the right side of a pattern, detects quotes or regexes * @return boolean */ private function lexDeclareRightside() { if ($this->data[$this->N] == "\n") { $this->state = 'lexDeclare'; $this->N++; $this->line++; return $this->lexDeclare(); } if ($this->data[$this->N] == '"') { return $this->lexQuote(); } if ($this->data[$this->N] == '\'') { return $this->lexQuote('\''); } $this -> skipWhitespace(); // match a pattern $test = $this->data[$this->N]; $token = $this->N + 1; $a = 0; do { if ($a++) { $token++; } $token = strpos($this->data, $test, $token); } while ($token !== false && ($this->data[$token - 1] == '\\' && $this->data[$token - 2] != '\\')); if ($token === false) { $this->error('Unterminated regex pattern (started with "' . $test . '"'); return false; } if (substr_count($this->data, "\n", $this->N, $token - $this->N)) { $this->error('Regex pattern extends over multiple lines'); return false; } $this->value = substr($this->data, $this->N + 1, $token - $this->N - 1); // unescape the regex marker // we will re-escape when creating the final regex $this->value = str_replace('\\' . $test, $test, $this->value); $this->N = $token + 1; $this->token = self::SUBPATTERN; return true; } /** * lexer for quoted literals * @return boolean */ private function lexQuote($quote = '"') { $token = $this->N + 1; $a = 0; do { if ($a++) { $token++; } $token = strpos($this->data, $quote, $token); } while ($token !== false && $token < strlen($this->data) && ($this->data[$token - 1] == '\\' && $this->data[$token - 2] != '\\')); if ($token === false) { $this->error('unterminated quote'); return false; } if (substr_count($this->data, "\n", $this->N, $token - $this->N)) { $this->error('quote extends over multiple lines'); return false; } $this->value = substr($this->data, $this->N + 1, $token - $this->N - 1); $this->value = str_replace('\\'.$quote, $quote, $this->value); $this->value = str_replace('\\\\', '\\', $this->value); $this->N = $token + 1; if ($quote == '\'' ) { $this->token = self::SINGLEQUOTE; } else { $this->token = self::QUOTE; } return true; } /** * lexer for rules * @return boolean */ private function lexRule() { while ( $this->N < strlen($this->data) && ( $this->data[$this->N] == ' ' || $this->data[$this->N] == "\t" || $this->data[$this->N] == "\n" ) || ( $this->N < strlen($this->data) - 1 && $this->data[$this->N] == '/' && $this->data[$this->N + 1] == '/' ) ) { if ( $this->data[$this->N] == '/' && $this->data[$this->N + 1] == '/' ) { // Skip single line comments $next_newline = strpos($this->data, "\n", $this->N) + 1; if ($next_newline) { $this->N = $next_newline; } else { $this->N = sizeof($this->data); } $this->line++; } else { if ($this->data[$this->N] == "\n") { $this->line++; } $this->N++; // skip all whitespace } } if ($this->N >= strlen($this->data)) { $this->error('unexpected end of input, expecting rule declaration'); } if ($this->data[$this->N] == '*' && $this->data[$this->N + 1] == '/') { $this->state = 'StartNonDeclare'; $this->value = '*/'; $this->N += 2; $this->token = self::COMMENTEND; return true; } if ($this->data[$this->N] == '\'') { return $this->lexQuote('\''); } if (preg_match('/\G%([a-zA-Z_]+)/', $this->data, $token, null, $this->N)) { $this->value = $token[1]; $this->N += strlen($token[1]) + 1; $this->state = 'DeclarePIRule'; $this->token = self::PI; return true; } if ($this->data[$this->N] == "{") { return $this->lexCode(); } if ($this->data[$this->N] == '"') { return $this->lexQuote(); } if (preg_match('/\G[a-zA-Z_][a-zA-Z0-9_]*/', $this->data, $token, null, $this->N)) { $this->value = $token[0]; $this->N += strlen($token[0]); $this->token = self::SUBPATTERN; return true; } else { $this->error('expecting token rule (quotes or sub-patterns)'); return false; } } /** * lexer for php code blocks * @return boolean */ private function lexCode() { $cp = $this->N + 1; for ($level = 1; $cp < strlen($this->data) && ($level > 1 || $this->data[$cp] != '}'); $cp++) { if ($this->data[$cp] == '{') { $level++; } elseif ($this->data[$cp] == '}') { $level--; } elseif ($this->data[$cp] == '/' && $this->data[$cp + 1] == '/') { /* Skip C++ style comments */ $cp += 2; $z = strpos($this->data, "\n", $cp); if ($z === false) { $cp = strlen($this->data); break; } $cp = $z; } elseif ($this->data[$cp] == "'" || $this->data[$cp] == '"') { /* String a character literals */ $startchar = $this->data[$cp]; $prevc = 0; for ($cp++; $cp < strlen($this->data) && ($this->data[$cp] != $startchar || $prevc === '\\'); $cp++) { if ($prevc === '\\') { $prevc = 0; } else { $prevc = $this->data[$cp]; } } } } if ($cp >= strlen($this->data)) { $this->error("PHP code starting on this line is not terminated before the end of the file."); $this->error++; return false; } else { $this->value = substr($this->data, $this->N + 1, $cp - $this->N - 1); $this->token = self::CODE; $this->N = $cp + 1; return true; } } /** * Skip whitespace characters */ private function skipWhitespace() { while ( $this->N < strlen($this->data) && ( $this->data[$this->N] == ' ' || $this->data[$this->N] == "\t" ) ) { $this->N++; // skip whitespace } } /** * Skip whitespace and EOL characters */ private function skipWhitespaceEol() { while ( $this->N < strlen($this->data) && ( $this->data[$this->N] == ' ' || $this->data[$this->N] == "\t" || $this->data[$this->N] == "\n" ) ) { if ($this->data[$this->N] == "\n") { ++$this -> line; } $this->N++; // skip whitespace } } /** * Primary scanner * * In addition to lexing, this properly increments the line number of lexing. * This calls the proper sub-lexer based on the parser state * @param unknown_type $parser * @return unknown */ public function advance($parser) { if ($this->N >= strlen($this->data)) { return false; } if ($this->{'lex' . $this->state}()) { $this->line += substr_count($this->value, "\n"); return true; } return false; } } ?>smarty3-3.1.13/development/lexer/LexerGenerator/Parser.y0000644000175000017500000007061411634664106021671 0ustar mikemike%name PHP_LexerGenerator_Parser %declare_class {class PHP_LexerGenerator_Parser} %include { /* ?> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the distribution. * * Neither the name of the PHP_LexerGenerator nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * @category php * @package PHP_LexerGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @version CVS: $Id: Parser.y 246683 2007-11-22 04:43:52Z instance $ * @since File available since Release 0.1.0 */ /** * For regular expression validation */ require_once 'PHP/LexerGenerator/Regex/Lexer.php'; require_once 'PHP/LexerGenerator/Regex/Parser.php'; require_once 'PHP/LexerGenerator/Exception.php'; /** * Token parser for plex files. * * This parser converts tokens pulled from {@link PHP_LexerGenerator_Lexer} * into abstract patterns and rules, then creates the output file * @package PHP_LexerGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.php.net/license/3_01.txt PHP License 3.01 * @version @package_version@ * @since Class available since Release 0.1.0 */ } %syntax_error { echo "Syntax Error on line " . $this->lex->line . ": token '" . $this->lex->value . "' while parsing rule:"; foreach ($this->yystack as $entry) { echo $this->tokenName($entry->major) . ' '; } foreach ($this->yy_get_expected_tokens($yymajor) as $token) { $expect[] = self::$yyTokenName[$token]; } throw new Exception('Unexpected ' . $this->tokenName($yymajor) . '(' . $TOKEN . '), expected one of: ' . implode(',', $expect)); } %include_class { private $patterns; private $out; private $lex; private $input; private $counter; private $token; private $value; private $line; private $matchlongest; private $_regexLexer; private $_regexParser; private $_patternIndex = 0; private $_outRuleIndex = 1; private $caseinsensitive; private $patternFlags; private $unicode; public $transTable = array( 1 => self::PHPCODE, 2 => self::COMMENTSTART, 3 => self::COMMENTEND, 4 => self::QUOTE, 5 => self::SINGLEQUOTE, 6 => self::PATTERN, 7 => self::CODE, 8 => self::SUBPATTERN, 9 => self::PI, ); function __construct($outfile, $lex) { $this->out = fopen($outfile, 'wb'); if (!$this->out) { throw new Exception('unable to open lexer output file "' . $outfile . '"'); } $this->lex = $lex; $this->_regexLexer = new PHP_LexerGenerator_Regex_Lexer(''); $this->_regexParser = new PHP_LexerGenerator_Regex_Parser($this->_regexLexer); } function doLongestMatch($rules, $statename, $ruleindex) { fwrite($this->out, ' if (' . $this->counter . ' >= strlen(' . $this->input . ')) { return false; // end of input } do { $rules = array('); foreach ($rules as $rule) { fwrite($this->out, ' \'/\G' . $rule['pattern'] . '/' . $this->patternFlags . ' \','); } fwrite($this->out, ' ); $match = false; foreach ($rules as $index => $rule) { if (preg_match($rule, substr(' . $this->input . ', ' . $this->counter . '), $yymatches)) { if ($match) { if (strlen($yymatches[0]) > strlen($match[0][0])) { $match = array($yymatches, $index); // matches, token } } else { $match = array($yymatches, $index); } } } if (!$match) { throw new Exception(\'Unexpected input at line \' . ' . $this->line . ' . \': \' . ' . $this->input . '[' . $this->counter . ']); } ' . $this->token . ' = $match[1]; ' . $this->value . ' = $match[0][0]; $yysubmatches = $match[0]; array_shift($yysubmatches); if (!$yysubmatches) { $yysubmatches = array(); } $r = $this->{\'yy_r' . $ruleindex . '_\' . ' . $this->token . '}($yysubmatches); if ($r === null) { ' . $this->counter . ' += strlen(' . $this->value . '); ' . $this->line . ' += substr_count(' . $this->value . ', "\n"); // accept this token return true; } elseif ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { ' . $this->counter . ' += strlen(' . $this->value . '); ' . $this->line . ' += substr_count(' . $this->value . ', "\n"); if (' . $this->counter . ' >= strlen(' . $this->input . ')) { return false; // end of input } // skip this token continue; } else {'); fwrite($this->out, ' $yy_yymore_patterns = array_slice($rules, $this->token, true); // yymore is needed do { if (!isset($yy_yymore_patterns[' . $this->token . '])) { throw new Exception(\'cannot do yymore for the last token\'); } $match = false; foreach ($yy_yymore_patterns[' . $this->token . '] as $index => $rule) { if (preg_match(\'/\' . $rule . \'/' . $this->patternFlags . '\', ' . $this->input . ', $yymatches, null, ' . $this->counter . ')) { $yymatches = array_filter($yymatches, \'strlen\'); // remove empty sub-patterns if ($match) { if (strlen($yymatches[0]) > strlen($match[0][0])) { $match = array($yymatches, $index); // matches, token } } else { $match = array($yymatches, $index); } } } if (!$match) { throw new Exception(\'Unexpected input at line \' . ' . $this->line . ' . \': \' . ' . $this->input . '[' . $this->counter . ']); } ' . $this->token . ' = $match[1]; ' . $this->value . ' = $match[0][0]; $yysubmatches = $match[0]; array_shift($yysubmatches); if (!$yysubmatches) { $yysubmatches = array(); } ' . $this->line . ' = substr_count(' . $this->value . ', "\n"); $r = $this->{\'yy_r' . $ruleindex . '_\' . ' . $this->token . '}(); } while ($r !== null || !$r); if ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } else { // accept ' . $this->counter . ' += strlen(' . $this->value . '); ' . $this->line . ' += substr_count(' . $this->value . ', "\n"); return true; } } } while (true); '); } function doFirstMatch($rules, $statename, $ruleindex) { $patterns = array(); $pattern = '/'; $ruleMap = array(); $tokenindex = array(); $actualindex = 1; $i = 0; foreach ($rules as $rule) { $ruleMap[$i++] = $actualindex; $tokenindex[$actualindex] = $rule['subpatterns']; $actualindex += $rule['subpatterns'] + 1; $patterns[] = '\G(' . $rule['pattern'] . ')'; } // Re-index tokencount from zero. $tokencount = array_values($tokenindex); $tokenindex = var_export($tokenindex, true); $tokenindex = explode("\n", $tokenindex); // indent for prettiness $tokenindex = implode("\n ", $tokenindex); $pattern .= implode('|', $patterns); $pattern .= '/' . $this->patternFlags; fwrite($this->out, ' $tokenMap = ' . $tokenindex . '; if (' . $this->counter . ' >= strlen(' . $this->input . ')) { return false; // end of input } '); fwrite($this->out, '$yy_global_pattern = \'' . $pattern . '\';' . "\n"); fwrite($this->out, ' do { if (preg_match($yy_global_pattern,' . $this->input . ', $yymatches, null, ' . $this->counter . ')) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, \'strlen\'); // remove empty sub-patterns if (!count($yymatches)) { throw new Exception(\'Error: lexing failed because a rule matched\' . \' an empty string. Input "\' . substr(' . $this->input . ', ' . $this->counter . ', 5) . \'... state ' . $statename . '\'); } next($yymatches); // skip global match ' . $this->token . ' = key($yymatches); // token number if ($tokenMap[' . $this->token . ']) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, ' . $this->token . ' + 1, $tokenMap[' . $this->token . ']); } else { $yysubmatches = array(); } ' . $this->value . ' = current($yymatches); // token value $r = $this->{\'yy_r' . $ruleindex . '_\' . ' . $this->token . '}($yysubmatches); if ($r === null) { ' . $this->counter . ' += strlen(' . $this->value . '); ' . $this->line . ' += substr_count(' . $this->value . ', "\n"); // accept this token return true; } elseif ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { ' . $this->counter . ' += strlen(' . $this->value . '); ' . $this->line . ' += substr_count(' . $this->value . ', "\n"); if (' . $this->counter . ' >= strlen(' . $this->input . ')) { return false; // end of input } // skip this token continue; } else {'); fwrite($this->out, ' $yy_yymore_patterns = array(' . "\n"); $extra = 0; for($i = 0; count($patterns); $i++) { unset($patterns[$i]); $extra += $tokencount[0]; array_shift($tokencount); fwrite($this->out, ' ' . $ruleMap[$i] . ' => array(' . $extra . ', "' . implode('|', $patterns) . "\"),\n"); } fwrite($this->out, ' );' . "\n"); fwrite($this->out, ' // yymore is needed do { if (!strlen($yy_yymore_patterns[' . $this->token . '][1])) { throw new Exception(\'cannot do yymore for the last token\'); } $yysubmatches = array(); if (preg_match(\'/\' . $yy_yymore_patterns[' . $this->token . '][1] . \'/' . $this->patternFlags . '\', ' . $this->input . ', $yymatches, null, ' . $this->counter .')) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, \'strlen\'); // remove empty sub-patterns next($yymatches); // skip global match ' . $this->token . ' += key($yymatches) + $yy_yymore_patterns[' . $this->token . '][0]; // token number ' . $this->value . ' = current($yymatches); // token value ' . $this->line . ' = substr_count(' . $this->value . ', "\n"); if ($tokenMap[' . $this->token . ']) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, ' . $this->token . ' + 1, $tokenMap[' . $this->token . ']); } else { $yysubmatches = array(); } } $r = $this->{\'yy_r' . $ruleindex . '_\' . ' . $this->token . '}($yysubmatches); } while ($r !== null && !is_bool($r)); if ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { ' . $this->counter . ' += strlen(' . $this->value . '); ' . $this->line . ' += substr_count(' . $this->value . ', "\n"); if (' . $this->counter . ' >= strlen(' . $this->input . ')) { return false; // end of input } // skip this token continue; } else { // accept ' . $this->counter . ' += strlen(' . $this->value . '); ' . $this->line . ' += substr_count(' . $this->value . ', "\n"); return true; } } } else { throw new Exception(\'Unexpected input at line\' . ' . $this->line . ' . \': \' . ' . $this->input . '[' . $this->counter . ']); } break; } while (true); '); } function makeCaseInsensitve($string) { return preg_replace('/[a-z]/ie', "'[\\0'.strtoupper('\\0').']'", strtolower($string)); } function outputRules($rules, $statename) { if (!$statename) { $statename = $this -> _outRuleIndex; } fwrite($this->out, ' function yylex' . $this -> _outRuleIndex . '() {'); if ($this->matchlongest) { $ruleMap = array(); foreach ($rules as $i => $rule) { $ruleMap[$i] = $i; } $this->doLongestMatch($rules, $statename, $this -> _outRuleIndex); } else { $ruleMap = array(); $actualindex = 1; $i = 0; foreach ($rules as $rule) { $ruleMap[$i++] = $actualindex; $actualindex += $rule['subpatterns'] + 1; } $this->doFirstMatch($rules, $statename, $this -> _outRuleIndex); } fwrite($this->out, ' } // end function '); if (is_string($statename)) { fwrite($this->out, ' const ' . $statename . ' = ' . $this -> _outRuleIndex . '; '); } foreach ($rules as $i => $rule) { fwrite($this->out, ' function yy_r' . $this -> _outRuleIndex . '_' . $ruleMap[$i] . '($yy_subpatterns) { ' . $rule['code'] . ' } '); } $this -> _outRuleIndex++; // for next set of rules } function error($msg) { echo 'Error on line ' . $this->lex->line . ': ' , $msg; } function _validatePattern($pattern, $update = false) { $this->_regexLexer->reset($pattern, $this->lex->line); $this->_regexParser->reset($this->_patternIndex, $update); try { while ($this->_regexLexer->yylex()) { $this->_regexParser->doParse( $this->_regexLexer->token, $this->_regexLexer->value); } $this->_regexParser->doParse(0, 0); } catch (PHP_LexerGenerator_Exception $e) { $this->error($e->getMessage()); throw new PHP_LexerGenerator_Exception('Invalid pattern "' . $pattern . '"'); } return $this->_regexParser->result; } } start ::= lexfile. lexfile ::= declare rules(B). { fwrite($this->out, ' private $_yy_state = 1; private $_yy_stack = array(); function yylex() { return $this->{\'yylex\' . $this->_yy_state}(); } function yypushstate($state) { array_push($this->_yy_stack, $this->_yy_state); $this->_yy_state = $state; } function yypopstate() { $this->_yy_state = array_pop($this->_yy_stack); } function yybegin($state) { $this->_yy_state = $state; } '); foreach (B as $rule) { $this->outputRules($rule['rules'], $rule['statename']); if ($rule['code']) { fwrite($this->out, $rule['code']); } } } lexfile ::= declare(D) PHPCODE(B) rules(C). { fwrite($this->out, ' private $_yy_state = 1; private $_yy_stack = array(); function yylex() { return $this->{\'yylex\' . $this->_yy_state}(); } function yypushstate($state) { array_push($this->_yy_stack, $this->_yy_state); $this->_yy_state = $state; } function yypopstate() { $this->_yy_state = array_pop($this->_yy_stack); } function yybegin($state) { $this->_yy_state = $state; } '); if (strlen(B)) { fwrite($this->out, B); } foreach (C as $rule) { $this->outputRules($rule['rules'], $rule['statename']); if ($rule['code']) { fwrite($this->out, $rule['code']); } } } lexfile ::= PHPCODE(B) declare(D) rules(C). { if (strlen(B)) { fwrite($this->out, B); } fwrite($this->out, ' private $_yy_state = 1; private $_yy_stack = array(); function yylex() { return $this->{\'yylex\' . $this->_yy_state}(); } function yypushstate($state) { array_push($this->_yy_stack, $this->_yy_state); $this->_yy_state = $state; } function yypopstate() { $this->_yy_state = array_pop($this->_yy_stack); } function yybegin($state) { $this->_yy_state = $state; } '); foreach (C as $rule) { $this->outputRules($rule['rules'], $rule['statename']); if ($rule['code']) { fwrite($this->out, $rule['code']); } } } lexfile ::= PHPCODE(A) declare(D) PHPCODE(B) rules(C). { if (strlen(A)) { fwrite($this->out, A); } fwrite($this->out, ' private $_yy_state = 1; private $_yy_stack = array(); function yylex() { return $this->{\'yylex\' . $this->_yy_state}(); } function yypushstate($state) { array_push($this->_yy_stack, $this->_yy_state); $this->_yy_state = $state; } function yypopstate() { $this->_yy_state = array_pop($this->_yy_stack); } function yybegin($state) { $this->_yy_state = $state; } '); if (strlen(B)) { fwrite($this->out, B); } foreach (C as $rule) { $this->outputRules($rule['rules'], $rule['statename']); if ($rule['code']) { fwrite($this->out, $rule['code']); } } } declare(A) ::= COMMENTSTART declarations(B) COMMENTEND. { A = B; $this->patterns = B['patterns']; $this->_patternIndex = 1; } declarations(A) ::= processing_instructions(B) pattern_declarations(C). { $expected = array( 'counter' => true, 'input' => true, 'token' => true, 'value' => true, 'line' => true, ); foreach (B as $pi) { if (isset($expected[$pi['pi']])) { unset($expected[$pi['pi']]); continue; } if (count($expected)) { throw new Exception('Processing Instructions "' . implode(', ', array_keys($expected)) . '" must be defined'); } } $expected = array( 'caseinsensitive' => true, 'counter' => true, 'input' => true, 'token' => true, 'value' => true, 'line' => true, 'matchlongest' => true, 'unicode' => true, ); foreach (B as $pi) { if (isset($expected[$pi['pi']])) { $this->{$pi['pi']} = $pi['definition']; if ($pi['pi'] == 'matchlongest') { $this->matchlongest = true; } continue; } $this->error('Unknown processing instruction %' . $pi['pi'] . ', should be one of "' . implode(', ', array_keys($expected)) . '"'); } $this->patternFlags = ($this->caseinsensitive ? 'i' : '') . ($this->unicode ? 'u' : ''); A = array('patterns' => C, 'pis' => B); $this->_patternIndex = 1; } processing_instructions(A) ::= PI(B) SUBPATTERN(C). { A = array(array('pi' => B, 'definition' => C)); } processing_instructions(A) ::= PI(B) CODE(C). { A = array(array('pi' => B, 'definition' => C)); } processing_instructions(A) ::= processing_instructions(P) PI(B) SUBPATTERN(C). { A = P; A[] = array('pi' => B, 'definition' => C); } processing_instructions(A) ::= processing_instructions(P) PI(B) CODE(C). { A = P; A[] = array('pi' => B, 'definition' => C); } pattern_declarations(A) ::= PATTERN(B) subpattern(C). { A = array(B => C); // reset internal indicator of where we are in a pattern $this->_patternIndex = 0; } pattern_declarations(A) ::= pattern_declarations(B) PATTERN(C) subpattern(D). { A = B; if (isset(A[C])) { throw new Exception('Pattern "' . C . '" is already defined as "' . A[C] . '", cannot redefine as "' . D->string . '"'); } A[C] = D; // reset internal indicator of where we are in a pattern declaration $this->_patternIndex = 0; } rules(A) ::= COMMENTSTART rule(B) COMMENTEND. { A = array(array('rules' => B, 'code' => '', 'statename' => '')); } rules(A) ::= COMMENTSTART PI(P) SUBPATTERN(S) rule(B) COMMENTEND. { if (P != 'statename') { throw new Exception('Error: only %statename processing instruction ' . 'is allowed in rule sections (found ' . P . ').'); } A = array(array('rules' => B, 'code' => '', 'statename' => S)); } rules(A) ::= COMMENTSTART rule(B) COMMENTEND PHPCODE(C). { A = array(array('rules' => B, 'code' => C, 'statename' => '')); } rules(A) ::= COMMENTSTART PI(P) SUBPATTERN(S) rule(B) COMMENTEND PHPCODE(C). { if (P != 'statename') { throw new Exception('Error: only %statename processing instruction ' . 'is allowed in rule sections (found ' . P . ').'); } A = array(array('rules' => B, 'code' => C, 'statename' => S)); $this->_patternIndex = 1; } rules(A) ::= reset_rules(R) rule(B) COMMENTEND. { A = R; A[] = array('rules' => B, 'code' => '', 'statename' => ''); $this->_patternIndex = 1; } rules(A) ::= reset_rules(R) PI(P) SUBPATTERN(S) rule(B) COMMENTEND. { if (P != 'statename') { throw new Exception('Error: only %statename processing instruction ' . 'is allowed in rule sections (found ' . P . ').'); } A = R; A[] = array('rules' => B, 'code' => '', 'statename' => S); } rules(A) ::= reset_rules(R) rule(B) COMMENTEND PHPCODE(C). { A = R; A[] = array('rules' => B, 'code' => C, 'statename' => ''); } rules(A) ::= reset_rules(R) PI(P) SUBPATTERN(S) rule(B) COMMENTEND PHPCODE(C). { if (P != 'statename') { throw new Exception('Error: only %statename processing instruction ' . 'is allowed in rule sections (found ' . P . ').'); } A = R; A[] = array('rules' => B, 'code' => C, 'statename' => S); } reset_rules(A) ::= rules(R) COMMENTSTART. { A = R; $this->_patternIndex = 1; } rule(A) ::= rule_subpattern(B) CODE(C). { $name = B[1]; B = B[0]; B = $this->_validatePattern(B); $this->_patternIndex += B['subpatterns'] + 1; if (@preg_match('/' . str_replace('/', '\\/', B['pattern']) . '/', '')) { $this->error('Rule "' . $name . '" can match the empty string, this will break lexing'); } A = array(array('pattern' => str_replace('/', '\\/', B->string), 'code' => C, 'subpatterns' => B['subpatterns'])); } rule(A) ::= rule(R) rule_subpattern(B) CODE(C).{ A = R; $name = B[1]; B = B[0]; B = $this->_validatePattern(B); $this->_patternIndex += B['subpatterns'] + 1; if (@preg_match('/' . str_replace('/', '\\/', B['pattern']) . '/', '')) { $this->error('Rule "' . $name . '" can match the empty string, this will break lexing'); } A[] = array('pattern' => str_replace('/', '\\/', B->string), 'code' => C, 'subpatterns' => B['subpatterns']); } rule_subpattern(A) ::= QUOTE(B). { A = array(preg_quote(B, '/'), B); } rule_subpattern(A) ::= SINGLEQUOTE(B). { A = array($this->makeCaseInsensitve(preg_quote(B, '/')), B); } rule_subpattern(A) ::= SUBPATTERN(B). { if (!isset($this->patterns[B])) { $this->error('Undefined pattern "' . B . '" used in rules'); throw new Exception('Undefined pattern "' . B . '" used in rules'); } A = array($this->patterns[B], B); } rule_subpattern(A) ::= rule_subpattern(B) QUOTE(C). { A = array(B[0] . preg_quote(C, '/'), B[1] . ' ' . C); } rule_subpattern(A) ::= rule_subpattern(B) SINGLEQUOTE(C). { A = array(B[0] . $this->makeCaseInsensitve(preg_quote(C, '/')), B[1] . ' ' . C); } rule_subpattern(A) ::= rule_subpattern(B) SUBPATTERN(C). { if (!isset($this->patterns[C])) { $this->error('Undefined pattern "' . C . '" used in rules'); throw new Exception('Undefined pattern "' . C . '" used in rules'); } A = array(B[0] . $this->patterns[C], B[1] . ' ' . C); } subpattern(A) ::= QUOTE(B). { A = preg_quote(B, '/'); } subpattern(A) ::= SINGLEQUOTE(B). { A = $this->makeCaseInsensitve(preg_quote(B, '/')); } subpattern(A) ::= SUBPATTERN(B). { // increment internal sub-pattern counter // adjust back-references in pattern based on previous pattern $test = $this->_validatePattern(B, true); $this->_patternIndex += $test['subpatterns']; A = $test['pattern']; } subpattern(A) ::= subpattern(B) QUOTE(C). { A = B . preg_quote(C, '/'); } subpattern(A) ::= subpattern(B) SINGLEQUOTE(C). { A = B . $this->makeCaseInsensitve(preg_quote(C, '/')); } subpattern(A) ::= subpattern(B) SUBPATTERN(C). { // increment internal sub-pattern counter // adjust back-references in pattern based on previous pattern $test = $this->_validatePattern(C, true); $this->_patternIndex += $test['subpatterns']; A = B . $test['pattern']; }smarty3-3.1.13/development/lexer/LexerGenerator/cli.php0000644000175000017500000000013711634664106021514 0ustar mikemikesmarty3-3.1.13/development/lexer/LexerGenerator/Parser.php0000644000175000017500000023175111674655710022216 0ustar mikemikestring = $s->string; $this->metadata = $s->metadata; } else { $this->string = (string) $s; if ($m instanceof PHP_LexerGenerator_ParseryyToken) { $this->metadata = $m->metadata; } elseif (is_array($m)) { $this->metadata = $m; } } } function __toString() { return $this->_string; } function offsetExists($offset) { return isset($this->metadata[$offset]); } function offsetGet($offset) { return $this->metadata[$offset]; } function offsetSet($offset, $value) { if ($offset === null) { if (isset($value[0])) { $x = ($value instanceof PHP_LexerGenerator_ParseryyToken) ? $value->metadata : $value; $this->metadata = array_merge($this->metadata, $x); return; } $offset = count($this->metadata); } if ($value === null) { return; } if ($value instanceof PHP_LexerGenerator_ParseryyToken) { if ($value->metadata) { $this->metadata[$offset] = $value->metadata; } } elseif ($value) { $this->metadata[$offset] = $value; } } function offsetUnset($offset) { unset($this->metadata[$offset]); } } /** The following structure represents a single element of the * parser's stack. Information stored includes: * * + The state number for the parser at this level of the stack. * * + The value of the token stored at this level of the stack. * (In other words, the "major" token.) * * + The semantic value stored at this level of the stack. This is * the information used by the action routines in the grammar. * It is sometimes called the "minor" token. */ class PHP_LexerGenerator_ParseryyStackEntry { public $stateno; /* The state-number */ public $major; /* The major token value. This is the code ** number for the token at this stack level */ public $minor; /* The user-supplied minor token value. This ** is the value of the token */ }; // code external to the class is included here #line 3 "Parser.y" /* ?> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the distribution. * * Neither the name of the PHP_LexerGenerator nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * @category php * @package PHP_LexerGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @version CVS: $Id: Parser.php 246683 2007-11-22 04:43:52Z instance $ * @since File available since Release 0.1.0 */ /** * For regular expression validation */ require_once './LexerGenerator/Regex/Lexer.php'; require_once './LexerGenerator/Regex/Parser.php'; require_once './LexerGenerator/Exception.php'; /** * Token parser for plex files. * * This parser converts tokens pulled from {@link PHP_LexerGenerator_Lexer} * into abstract patterns and rules, then creates the output file * @package PHP_LexerGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.php.net/license/3_01.txt PHP License 3.01 * @version @package_version@ * @since Class available since Release 0.1.0 */ #line 166 "Parser.php" // declare_class is output here #line 2 "Parser.y" class PHP_LexerGenerator_Parser#line 171 "Parser.php" { /* First off, code is included which follows the "include_class" declaration ** in the input file. */ #line 82 "Parser.y" private $patterns; private $out; private $lex; private $input; private $counter; private $token; private $value; private $line; private $matchlongest; private $_regexLexer; private $_regexParser; private $_patternIndex = 0; private $_outRuleIndex = 1; private $caseinsensitive; private $patternFlags; private $unicode; public $transTable = array( 1 => self::PHPCODE, 2 => self::COMMENTSTART, 3 => self::COMMENTEND, 4 => self::QUOTE, 5 => self::SINGLEQUOTE, 6 => self::PATTERN, 7 => self::CODE, 8 => self::SUBPATTERN, 9 => self::PI, ); function __construct($outfile, $lex) { $this->out = fopen($outfile, 'wb'); if (!$this->out) { throw new Exception('unable to open lexer output file "' . $outfile . '"'); } $this->lex = $lex; $this->_regexLexer = new PHP_LexerGenerator_Regex_Lexer(''); $this->_regexParser = new PHP_LexerGenerator_Regex_Parser($this->_regexLexer); } function doLongestMatch($rules, $statename, $ruleindex) { fwrite($this->out, ' if (' . $this->counter . ' >= strlen(' . $this->input . ')) { return false; // end of input } do { $rules = array('); foreach ($rules as $rule) { fwrite($this->out, ' \'/\G' . $rule['pattern'] . '/' . $this->patternFlags . ' \','); } fwrite($this->out, ' ); $match = false; foreach ($rules as $index => $rule) { if (preg_match($rule, substr(' . $this->input . ', ' . $this->counter . '), $yymatches)) { if ($match) { if (strlen($yymatches[0]) > strlen($match[0][0])) { $match = array($yymatches, $index); // matches, token } } else { $match = array($yymatches, $index); } } } if (!$match) { throw new Exception(\'Unexpected input at line \' . ' . $this->line . ' . \': \' . ' . $this->input . '[' . $this->counter . ']); } ' . $this->token . ' = $match[1]; ' . $this->value . ' = $match[0][0]; $yysubmatches = $match[0]; array_shift($yysubmatches); if (!$yysubmatches) { $yysubmatches = array(); } $r = $this->{\'yy_r' . $ruleindex . '_\' . ' . $this->token . '}($yysubmatches); if ($r === null) { ' . $this->counter . ' += strlen(' . $this->value . '); ' . $this->line . ' += substr_count(' . $this->value . ', "\n"); // accept this token return true; } elseif ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { ' . $this->counter . ' += strlen(' . $this->value . '); ' . $this->line . ' += substr_count(' . $this->value . ', "\n"); if (' . $this->counter . ' >= strlen(' . $this->input . ')) { return false; // end of input } // skip this token continue; } else {'); fwrite($this->out, ' $yy_yymore_patterns = array_slice($rules, $this->token, true); // yymore is needed do { if (!isset($yy_yymore_patterns[' . $this->token . '])) { throw new Exception(\'cannot do yymore for the last token\'); } $match = false; foreach ($yy_yymore_patterns[' . $this->token . '] as $index => $rule) { if (preg_match(\'/\' . $rule . \'/' . $this->patternFlags . '\', ' . $this->input . ', $yymatches, null, ' . $this->counter . ')) { $yymatches = array_filter($yymatches, \'strlen\'); // remove empty sub-patterns if ($match) { if (strlen($yymatches[0]) > strlen($match[0][0])) { $match = array($yymatches, $index); // matches, token } } else { $match = array($yymatches, $index); } } } if (!$match) { throw new Exception(\'Unexpected input at line \' . ' . $this->line . ' . \': \' . ' . $this->input . '[' . $this->counter . ']); } ' . $this->token . ' = $match[1]; ' . $this->value . ' = $match[0][0]; $yysubmatches = $match[0]; array_shift($yysubmatches); if (!$yysubmatches) { $yysubmatches = array(); } ' . $this->line . ' = substr_count(' . $this->value . ', "\n"); $r = $this->{\'yy_r' . $ruleindex . '_\' . ' . $this->token . '}(); } while ($r !== null || !$r); if ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } else { // accept ' . $this->counter . ' += strlen(' . $this->value . '); ' . $this->line . ' += substr_count(' . $this->value . ', "\n"); return true; } } } while (true); '); } function doFirstMatch($rules, $statename, $ruleindex) { $patterns = array(); $pattern = '/'; $ruleMap = array(); $tokenindex = array(); $actualindex = 1; $i = 0; foreach ($rules as $rule) { $ruleMap[$i++] = $actualindex; $tokenindex[$actualindex] = $rule['subpatterns']; $actualindex += $rule['subpatterns'] + 1; $patterns[] = '\G(' . $rule['pattern'] . ')'; } // Re-index tokencount from zero. $tokencount = array_values($tokenindex); $tokenindex = var_export($tokenindex, true); $tokenindex = explode("\n", $tokenindex); // indent for prettiness $tokenindex = implode("\n ", $tokenindex); $pattern .= implode('|', $patterns); $pattern .= '/' . $this->patternFlags; fwrite($this->out, ' $tokenMap = ' . $tokenindex . '; if (' . $this->counter . ' >= ($this->mbstring_overload ? mb_strlen(' . $this->input . ',\'latin1\'): strlen(' . $this->input . '))) { return false; // end of input } '); fwrite($this->out, '$yy_global_pattern = "' . $pattern . 'iS";' . "\n"); fwrite($this->out, ' do { if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr(' . $this->input . ', ' . $this->counter . ',2000000000,\'latin1\'), $yymatches) : preg_match($yy_global_pattern,' . $this->input . ', $yymatches, null, ' . $this->counter . ')) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, \'strlen\'); // remove empty sub-patterns if (!count($yymatches)) { throw new Exception(\'Error: lexing failed because a rule matched\' . \' an empty string. Input "\' . substr(' . $this->input . ', ' . $this->counter . ', 5) . \'... state ' . $statename . '\'); } next($yymatches); // skip global match ' . $this->token . ' = key($yymatches); // token number if ($tokenMap[' . $this->token . ']) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, ' . $this->token . ' + 1, $tokenMap[' . $this->token . ']); } else { $yysubmatches = array(); } ' . $this->value . ' = current($yymatches); // token value $r = $this->{\'yy_r' . $ruleindex . '_\' . ' . $this->token . '}($yysubmatches); if ($r === null) { ' . $this->counter . ' += ($this->mbstring_overload ? mb_strlen(' . $this->value . ',\'latin1\'): strlen(' . $this->value . ')); ' . $this->line . ' += substr_count(' . $this->value . ', "\n"); // accept this token return true; } elseif ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { ' . $this->counter . ' += ($this->mbstring_overload ? mb_strlen(' . $this->value . ',\'latin1\'): strlen(' . $this->value . ')); ' . $this->line . ' += substr_count(' . $this->value . ', "\n"); if (' . $this->counter . ' >= ($this->mbstring_overload ? mb_strlen(' . $this->input . ',\'latin1\'): strlen(' . $this->input . '))) { return false; // end of input } // skip this token continue; }'); // } else {'); /** fwrite($this->out, ' $yy_yymore_patterns = array(' . "\n"); $extra = 0; for($i = 0; count($patterns); $i++) { unset($patterns[$i]); $extra += $tokencount[0]; array_shift($tokencount); fwrite($this->out, ' ' . $ruleMap[$i] . ' => array(' . $extra . ', "' . implode('|', $patterns) . "\"),\n"); } fwrite($this->out, ' );' . "\n"); fwrite($this->out, ' // yymore is needed do { if (!strlen($yy_yymore_patterns[' . $this->token . '][1])) { throw new Exception(\'cannot do yymore for the last token\'); } $yysubmatches = array(); if (preg_match(\'/\' . $yy_yymore_patterns[' . $this->token . '][1] . \'/' . $this->patternFlags . '\', ' . $this->input . ', $yymatches, null, ' . $this->counter .')) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, \'strlen\'); // remove empty sub-patterns next($yymatches); // skip global match ' . $this->token . ' += key($yymatches) + $yy_yymore_patterns[' . $this->token . '][0]; // token number ' . $this->value . ' = current($yymatches); // token value ' . $this->line . ' = substr_count(' . $this->value . ', "\n"); if ($tokenMap[' . $this->token . ']) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, ' . $this->token . ' + 1, $tokenMap[' . $this->token . ']); } else { $yysubmatches = array(); } } $r = $this->{\'yy_r' . $ruleindex . '_\' . ' . $this->token . '}($yysubmatches); } while ($r !== null && !is_bool($r)); if ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { ' . $this->counter . ' += ($this->mbstring_overload ? mb_strlen(' . $this->value . ',\'latin1\'): strlen(' . $this->value . ')); ' . $this->line . ' += substr_count(' . $this->value . ', "\n"); if (' . $this->counter . ' >= ($this->mbstring_overload ? mb_strlen(' . $this->input . ',\'latin1\'): strlen(' . $this->input . '))) { return false; // end of input } // skip this token continue; } else { // accept ' . $this->counter . ' += ($this->mbstring_overload ? mb_strlen(' . $this->value . ',\'latin1\'): strlen(' . $this->value . ')); ' . $this->line . ' += substr_count(' . $this->value . ', "\n"); return true; } } */ fwrite($this->out, ' } else { throw new Exception(\'Unexpected input at line\' . ' . $this->line . ' . \': \' . ' . $this->input . '[' . $this->counter . ']); } break; } while (true); '); } function makeCaseInsensitve($string) { return preg_replace('/[a-z]/ie', "'[\\0'.strtoupper('\\0').']'", strtolower($string)); } function outputRules($rules, $statename) { if (!$statename) { $statename = $this -> _outRuleIndex; } fwrite($this->out, ' function yylex' . $this -> _outRuleIndex . '() {'); if ($this->matchlongest) { $ruleMap = array(); foreach ($rules as $i => $rule) { $ruleMap[$i] = $i; } $this->doLongestMatch($rules, $statename, $this -> _outRuleIndex); } else { $ruleMap = array(); $actualindex = 1; $i = 0; foreach ($rules as $rule) { $ruleMap[$i++] = $actualindex; $actualindex += $rule['subpatterns'] + 1; } $this->doFirstMatch($rules, $statename, $this -> _outRuleIndex); } fwrite($this->out, ' } // end function '); if (is_string($statename)) { fwrite($this->out, ' const ' . $statename . ' = ' . $this -> _outRuleIndex . '; '); } foreach ($rules as $i => $rule) { fwrite($this->out, ' function yy_r' . $this -> _outRuleIndex . '_' . $ruleMap[$i] . '($yy_subpatterns) { ' . $rule['code'] . ' } '); } $this -> _outRuleIndex++; // for next set of rules } function error($msg) { echo 'Error on line ' . $this->lex->line . ': ' , $msg; } function _validatePattern($pattern, $update = false) { $this->_regexLexer->reset($pattern, $this->lex->line); $this->_regexParser->reset($this->_patternIndex, $update); try { while ($this->_regexLexer->yylex()) { $this->_regexParser->doParse( $this->_regexLexer->token, $this->_regexLexer->value); } $this->_regexParser->doParse(0, 0); } catch (PHP_LexerGenerator_Exception $e) { $this->error($e->getMessage()); throw new PHP_LexerGenerator_Exception('Invalid pattern "' . $pattern . '"'); } return $this->_regexParser->result; } #line 529 "Parser.php" /* Next is all token values, as class constants */ /* ** These constants (all generated automatically by the parser generator) ** specify the various kinds of tokens (terminals) that the parser ** understands. ** ** Each symbol here is a terminal symbol in the grammar. */ const PHPCODE = 1; const COMMENTSTART = 2; const COMMENTEND = 3; const PI = 4; const SUBPATTERN = 5; const CODE = 6; const PATTERN = 7; const QUOTE = 8; const SINGLEQUOTE = 9; const YY_NO_ACTION = 99; const YY_ACCEPT_ACTION = 98; const YY_ERROR_ACTION = 97; /* Next are that tables used to determine what action to take based on the ** current state and lookahead token. These tables are used to implement ** functions that take a state number and lookahead value and return an ** action integer. ** ** Suppose the action integer is N. Then the action is determined as ** follows ** ** 0 <= N < self::YYNSTATE Shift N. That is, ** push the lookahead ** token onto the stack ** and goto state N. ** ** self::YYNSTATE <= N < self::YYNSTATE+self::YYNRULE Reduce by rule N-YYNSTATE. ** ** N == self::YYNSTATE+self::YYNRULE A syntax error has occurred. ** ** N == self::YYNSTATE+self::YYNRULE+1 The parser accepts its ** input. (and concludes parsing) ** ** N == self::YYNSTATE+self::YYNRULE+2 No such action. Denotes unused ** slots in the yy_action[] table. ** ** The action table is constructed as a single large static array $yy_action. ** Given state S and lookahead X, the action is computed as ** ** self::$yy_action[self::$yy_shift_ofst[S] + X ] ** ** If the index value self::$yy_shift_ofst[S]+X is out of range or if the value ** self::$yy_lookahead[self::$yy_shift_ofst[S]+X] is not equal to X or if ** self::$yy_shift_ofst[S] is equal to self::YY_SHIFT_USE_DFLT, it means that ** the action is not in the table and that self::$yy_default[S] should be used instead. ** ** The formula above is for computing the action when the lookahead is ** a terminal symbol. If the lookahead is a non-terminal (as occurs after ** a reduce action) then the static $yy_reduce_ofst array is used in place of ** the static $yy_shift_ofst array and self::YY_REDUCE_USE_DFLT is used in place of ** self::YY_SHIFT_USE_DFLT. ** ** The following are the tables generated in this section: ** ** self::$yy_action A single table containing all actions. ** self::$yy_lookahead A table containing the lookahead for each entry in ** yy_action. Used to detect hash collisions. ** self::$yy_shift_ofst For each state, the offset into self::$yy_action for ** shifting terminals. ** self::$yy_reduce_ofst For each state, the offset into self::$yy_action for ** shifting non-terminals after a reduce. ** self::$yy_default Default action for each state. */ const YY_SZ_ACTTAB = 91; static public $yy_action = array( /* 0 */ 25, 50, 49, 31, 49, 54, 53, 54, 53, 35, /* 10 */ 11, 49, 18, 22, 54, 53, 14, 59, 51, 28, /* 20 */ 55, 57, 58, 59, 47, 1, 55, 57, 32, 15, /* 30 */ 49, 29, 49, 54, 53, 54, 53, 30, 52, 49, /* 40 */ 42, 46, 54, 53, 98, 56, 5, 13, 38, 18, /* 50 */ 49, 43, 40, 54, 53, 12, 39, 18, 3, 37, /* 60 */ 36, 17, 7, 8, 2, 10, 33, 18, 9, 2, /* 70 */ 41, 44, 1, 24, 16, 34, 45, 27, 60, 48, /* 80 */ 4, 1, 2, 1, 20, 19, 21, 26, 23, 6, /* 90 */ 7, ); static public $yy_lookahead = array( /* 0 */ 3, 1, 5, 4, 5, 8, 9, 8, 9, 3, /* 10 */ 19, 5, 21, 4, 8, 9, 7, 5, 6, 14, /* 20 */ 8, 9, 3, 5, 6, 20, 8, 9, 3, 7, /* 30 */ 5, 4, 5, 8, 9, 8, 9, 3, 1, 5, /* 40 */ 5, 6, 8, 9, 11, 12, 13, 19, 5, 21, /* 50 */ 5, 8, 9, 8, 9, 19, 5, 21, 5, 8, /* 60 */ 9, 1, 2, 1, 2, 19, 14, 21, 1, 2, /* 70 */ 5, 6, 20, 15, 16, 14, 2, 14, 1, 1, /* 80 */ 5, 20, 2, 20, 18, 21, 18, 17, 4, 13, /* 90 */ 2, ); const YY_SHIFT_USE_DFLT = -4; const YY_SHIFT_MAX = 35; static public $yy_shift_ofst = array( /* 0 */ 60, 27, -1, 45, 45, 62, 67, 84, 80, 80, /* 10 */ 34, 25, -3, 6, 51, 51, 9, 88, 12, 18, /* 20 */ 43, 43, 65, 35, 19, 0, 22, 74, 74, 75, /* 30 */ 78, 53, 77, 74, 74, 37, ); const YY_REDUCE_USE_DFLT = -10; const YY_REDUCE_MAX = 17; static public $yy_reduce_ofst = array( /* 0 */ 33, 28, -9, 46, 36, 52, 63, 58, 61, 5, /* 10 */ 64, 64, 64, 64, 66, 68, 70, 76, ); static public $yyExpectedTokens = array( /* 0 */ array(1, 2, ), /* 1 */ array(4, 5, 8, 9, ), /* 2 */ array(4, 5, 8, 9, ), /* 3 */ array(5, 8, 9, ), /* 4 */ array(5, 8, 9, ), /* 5 */ array(1, 2, ), /* 6 */ array(1, 2, ), /* 7 */ array(4, ), /* 8 */ array(2, ), /* 9 */ array(2, ), /* 10 */ array(3, 5, 8, 9, ), /* 11 */ array(3, 5, 8, 9, ), /* 12 */ array(3, 5, 8, 9, ), /* 13 */ array(3, 5, 8, 9, ), /* 14 */ array(5, 8, 9, ), /* 15 */ array(5, 8, 9, ), /* 16 */ array(4, 7, ), /* 17 */ array(2, ), /* 18 */ array(5, 6, 8, 9, ), /* 19 */ array(5, 6, 8, 9, ), /* 20 */ array(5, 8, 9, ), /* 21 */ array(5, 8, 9, ), /* 22 */ array(5, 6, ), /* 23 */ array(5, 6, ), /* 24 */ array(3, ), /* 25 */ array(1, ), /* 26 */ array(7, ), /* 27 */ array(2, ), /* 28 */ array(2, ), /* 29 */ array(5, ), /* 30 */ array(1, ), /* 31 */ array(5, ), /* 32 */ array(1, ), /* 33 */ array(2, ), /* 34 */ array(2, ), /* 35 */ array(1, ), /* 36 */ array(), /* 37 */ array(), /* 38 */ array(), /* 39 */ array(), /* 40 */ array(), /* 41 */ array(), /* 42 */ array(), /* 43 */ array(), /* 44 */ array(), /* 45 */ array(), /* 46 */ array(), /* 47 */ array(), /* 48 */ array(), /* 49 */ array(), /* 50 */ array(), /* 51 */ array(), /* 52 */ array(), /* 53 */ array(), /* 54 */ array(), /* 55 */ array(), /* 56 */ array(), /* 57 */ array(), /* 58 */ array(), /* 59 */ array(), /* 60 */ array(), ); static public $yy_default = array( /* 0 */ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* 10 */ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, /* 20 */ 72, 73, 97, 97, 97, 79, 67, 64, 65, 97, /* 30 */ 75, 97, 74, 62, 63, 78, 92, 91, 96, 93, /* 40 */ 95, 70, 68, 94, 71, 82, 69, 84, 77, 87, /* 50 */ 81, 83, 80, 86, 85, 88, 61, 89, 66, 90, /* 60 */ 76, ); /* The next thing included is series of defines which control ** various aspects of the generated parser. ** self::YYNOCODE is a number which corresponds ** to no legal terminal or nonterminal number. This ** number is used to fill in empty slots of the hash ** table. ** self::YYFALLBACK If defined, this indicates that one or more tokens ** have fall-back values which should be used if the ** original value of the token will not parse. ** self::YYSTACKDEPTH is the maximum depth of the parser's stack. ** self::YYNSTATE the combined number of states. ** self::YYNRULE the number of rules in the grammar ** self::YYERRORSYMBOL is the code number of the error symbol. If not ** defined, then do no error processing. */ const YYNOCODE = 23; const YYSTACKDEPTH = 100; const YYNSTATE = 61; const YYNRULE = 36; const YYERRORSYMBOL = 10; const YYERRSYMDT = 'yy0'; const YYFALLBACK = 0; /** The next table maps tokens into fallback tokens. If a construct * like the following: * * %fallback ID X Y Z. * * appears in the grammer, then ID becomes a fallback token for X, Y, * and Z. Whenever one of the tokens X, Y, or Z is input to the parser * but it does not parse, the type of the token is changed to ID and * the parse is retried before an error is thrown. */ static public $yyFallback = array( ); /** * Turn parser tracing on by giving a stream to which to write the trace * and a prompt to preface each trace message. Tracing is turned off * by making either argument NULL * * Inputs: * * - A stream resource to which trace output should be written. * If NULL, then tracing is turned off. * - A prefix string written at the beginning of every * line of trace output. If NULL, then tracing is * turned off. * * Outputs: * * - None. * @param resource * @param string */ static function Trace($TraceFILE, $zTracePrompt) { if (!$TraceFILE) { $zTracePrompt = 0; } elseif (!$zTracePrompt) { $TraceFILE = 0; } self::$yyTraceFILE = $TraceFILE; self::$yyTracePrompt = $zTracePrompt; } /** * Output debug information to output (php://output stream) */ static function PrintTrace() { self::$yyTraceFILE = fopen('php://output', 'w'); self::$yyTracePrompt = ''; } /** * @var resource|0 */ static public $yyTraceFILE; /** * String to prepend to debug output * @var string|0 */ static public $yyTracePrompt; /** * @var int */ public $yyidx; /* Index of top element in stack */ /** * @var int */ public $yyerrcnt; /* Shifts left before out of the error */ /** * @var array */ public $yystack = array(); /* The parser's stack */ /** * For tracing shifts, the names of all terminals and nonterminals * are required. The following table supplies these names * @var array */ static public $yyTokenName = array( '$', 'PHPCODE', 'COMMENTSTART', 'COMMENTEND', 'PI', 'SUBPATTERN', 'CODE', 'PATTERN', 'QUOTE', 'SINGLEQUOTE', 'error', 'start', 'lexfile', 'declare', 'rules', 'declarations', 'processing_instructions', 'pattern_declarations', 'subpattern', 'rule', 'reset_rules', 'rule_subpattern', ); /** * For tracing reduce actions, the names of all rules are required. * @var array */ static public $yyRuleName = array( /* 0 */ "start ::= lexfile", /* 1 */ "lexfile ::= declare rules", /* 2 */ "lexfile ::= declare PHPCODE rules", /* 3 */ "lexfile ::= PHPCODE declare rules", /* 4 */ "lexfile ::= PHPCODE declare PHPCODE rules", /* 5 */ "declare ::= COMMENTSTART declarations COMMENTEND", /* 6 */ "declarations ::= processing_instructions pattern_declarations", /* 7 */ "processing_instructions ::= PI SUBPATTERN", /* 8 */ "processing_instructions ::= PI CODE", /* 9 */ "processing_instructions ::= processing_instructions PI SUBPATTERN", /* 10 */ "processing_instructions ::= processing_instructions PI CODE", /* 11 */ "pattern_declarations ::= PATTERN subpattern", /* 12 */ "pattern_declarations ::= pattern_declarations PATTERN subpattern", /* 13 */ "rules ::= COMMENTSTART rule COMMENTEND", /* 14 */ "rules ::= COMMENTSTART PI SUBPATTERN rule COMMENTEND", /* 15 */ "rules ::= COMMENTSTART rule COMMENTEND PHPCODE", /* 16 */ "rules ::= COMMENTSTART PI SUBPATTERN rule COMMENTEND PHPCODE", /* 17 */ "rules ::= reset_rules rule COMMENTEND", /* 18 */ "rules ::= reset_rules PI SUBPATTERN rule COMMENTEND", /* 19 */ "rules ::= reset_rules rule COMMENTEND PHPCODE", /* 20 */ "rules ::= reset_rules PI SUBPATTERN rule COMMENTEND PHPCODE", /* 21 */ "reset_rules ::= rules COMMENTSTART", /* 22 */ "rule ::= rule_subpattern CODE", /* 23 */ "rule ::= rule rule_subpattern CODE", /* 24 */ "rule_subpattern ::= QUOTE", /* 25 */ "rule_subpattern ::= SINGLEQUOTE", /* 26 */ "rule_subpattern ::= SUBPATTERN", /* 27 */ "rule_subpattern ::= rule_subpattern QUOTE", /* 28 */ "rule_subpattern ::= rule_subpattern SINGLEQUOTE", /* 29 */ "rule_subpattern ::= rule_subpattern SUBPATTERN", /* 30 */ "subpattern ::= QUOTE", /* 31 */ "subpattern ::= SINGLEQUOTE", /* 32 */ "subpattern ::= SUBPATTERN", /* 33 */ "subpattern ::= subpattern QUOTE", /* 34 */ "subpattern ::= subpattern SINGLEQUOTE", /* 35 */ "subpattern ::= subpattern SUBPATTERN", ); /** * This function returns the symbolic name associated with a token * value. * @param int * @return string */ function tokenName($tokenType) { if ($tokenType === 0) { return 'End of Input'; } if ($tokenType > 0 && $tokenType < count(self::$yyTokenName)) { return self::$yyTokenName[$tokenType]; } else { return "Unknown"; } } /** * The following function deletes the value associated with a * symbol. The symbol can be either a terminal or nonterminal. * @param int the symbol code * @param mixed the symbol's value */ static function yy_destructor($yymajor, $yypminor) { switch ($yymajor) { /* Here is inserted the actions which take place when a ** terminal or non-terminal is destroyed. This can happen ** when the symbol is popped from the stack during a ** reduce or during error processing or when a parser is ** being destroyed before it is finished parsing. ** ** Note: during a reduce, the only symbols destroyed are those ** which appear on the RHS of the rule, but which are not used ** inside the C code. */ default: break; /* If no destructor action specified: do nothing */ } } /** * Pop the parser's stack once. * * If there is a destructor routine associated with the token which * is popped from the stack, then call it. * * Return the major token number for the symbol popped. * @param PHP_LexerGenerator_ParseryyParser * @return int */ function yy_pop_parser_stack() { if (!count($this->yystack)) { return; } $yytos = array_pop($this->yystack); if (self::$yyTraceFILE && $this->yyidx >= 0) { fwrite(self::$yyTraceFILE, self::$yyTracePrompt . 'Popping ' . self::$yyTokenName[$yytos->major] . "\n"); } $yymajor = $yytos->major; self::yy_destructor($yymajor, $yytos->minor); $this->yyidx--; return $yymajor; } /** * Deallocate and destroy a parser. Destructors are all called for * all stack elements before shutting the parser down. */ function __destruct() { while ($this->yyidx >= 0) { $this->yy_pop_parser_stack(); } if (is_resource(self::$yyTraceFILE)) { fclose(self::$yyTraceFILE); } } /** * Based on the current state and parser stack, get a list of all * possible lookahead tokens * @param int * @return array */ function yy_get_expected_tokens($token) { $state = $this->yystack[$this->yyidx]->stateno; $expected = self::$yyExpectedTokens[$state]; if (in_array($token, self::$yyExpectedTokens[$state], true)) { return $expected; } $stack = $this->yystack; $yyidx = $this->yyidx; do { $yyact = $this->yy_find_shift_action($token); if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) { // reduce action $done = 0; do { if ($done++ == 100) { $this->yyidx = $yyidx; $this->yystack = $stack; // too much recursion prevents proper detection // so give up return array_unique($expected); } $yyruleno = $yyact - self::YYNSTATE; $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs']; $nextstate = $this->yy_find_reduce_action( $this->yystack[$this->yyidx]->stateno, self::$yyRuleInfo[$yyruleno]['lhs']); if (isset(self::$yyExpectedTokens[$nextstate])) { $expected += self::$yyExpectedTokens[$nextstate]; if (in_array($token, self::$yyExpectedTokens[$nextstate], true)) { $this->yyidx = $yyidx; $this->yystack = $stack; return array_unique($expected); } } if ($nextstate < self::YYNSTATE) { // we need to shift a non-terminal $this->yyidx++; $x = new PHP_LexerGenerator_ParseryyStackEntry; $x->stateno = $nextstate; $x->major = self::$yyRuleInfo[$yyruleno]['lhs']; $this->yystack[$this->yyidx] = $x; continue 2; } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { $this->yyidx = $yyidx; $this->yystack = $stack; // the last token was just ignored, we can't accept // by ignoring input, this is in essence ignoring a // syntax error! return array_unique($expected); } elseif ($nextstate === self::YY_NO_ACTION) { $this->yyidx = $yyidx; $this->yystack = $stack; // input accepted, but not shifted (I guess) return $expected; } else { $yyact = $nextstate; } } while (true); } break; } while (true); return array_unique($expected); } /** * Based on the parser state and current parser stack, determine whether * the lookahead token is possible. * * The parser will convert the token value to an error token if not. This * catches some unusual edge cases where the parser would fail. * @param int * @return bool */ function yy_is_expected_token($token) { if ($token === 0) { return true; // 0 is not part of this } $state = $this->yystack[$this->yyidx]->stateno; if (in_array($token, self::$yyExpectedTokens[$state], true)) { return true; } $stack = $this->yystack; $yyidx = $this->yyidx; do { $yyact = $this->yy_find_shift_action($token); if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) { // reduce action $done = 0; do { if ($done++ == 100) { $this->yyidx = $yyidx; $this->yystack = $stack; // too much recursion prevents proper detection // so give up return true; } $yyruleno = $yyact - self::YYNSTATE; $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs']; $nextstate = $this->yy_find_reduce_action( $this->yystack[$this->yyidx]->stateno, self::$yyRuleInfo[$yyruleno]['lhs']); if (isset(self::$yyExpectedTokens[$nextstate]) && in_array($token, self::$yyExpectedTokens[$nextstate], true)) { $this->yyidx = $yyidx; $this->yystack = $stack; return true; } if ($nextstate < self::YYNSTATE) { // we need to shift a non-terminal $this->yyidx++; $x = new PHP_LexerGenerator_ParseryyStackEntry; $x->stateno = $nextstate; $x->major = self::$yyRuleInfo[$yyruleno]['lhs']; $this->yystack[$this->yyidx] = $x; continue 2; } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { $this->yyidx = $yyidx; $this->yystack = $stack; if (!$token) { // end of input: this is valid return true; } // the last token was just ignored, we can't accept // by ignoring input, this is in essence ignoring a // syntax error! return false; } elseif ($nextstate === self::YY_NO_ACTION) { $this->yyidx = $yyidx; $this->yystack = $stack; // input accepted, but not shifted (I guess) return true; } else { $yyact = $nextstate; } } while (true); } break; } while (true); $this->yyidx = $yyidx; $this->yystack = $stack; return true; } /** * Find the appropriate action for a parser given the terminal * look-ahead token iLookAhead. * * If the look-ahead token is YYNOCODE, then check to see if the action is * independent of the look-ahead. If it is, return the action, otherwise * return YY_NO_ACTION. * @param int The look-ahead token */ function yy_find_shift_action($iLookAhead) { $stateno = $this->yystack[$this->yyidx]->stateno; /* if ($this->yyidx < 0) return self::YY_NO_ACTION; */ if (!isset(self::$yy_shift_ofst[$stateno])) { // no shift actions return self::$yy_default[$stateno]; } $i = self::$yy_shift_ofst[$stateno]; if ($i === self::YY_SHIFT_USE_DFLT) { return self::$yy_default[$stateno]; } if ($iLookAhead == self::YYNOCODE) { return self::YY_NO_ACTION; } $i += $iLookAhead; if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[$i] != $iLookAhead) { if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback) && ($iFallback = self::$yyFallback[$iLookAhead]) != 0) { if (self::$yyTraceFILE) { fwrite(self::$yyTraceFILE, self::$yyTracePrompt . "FALLBACK " . self::$yyTokenName[$iLookAhead] . " => " . self::$yyTokenName[$iFallback] . "\n"); } return $this->yy_find_shift_action($iFallback); } return self::$yy_default[$stateno]; } else { return self::$yy_action[$i]; } } /** * Find the appropriate action for a parser given the non-terminal * look-ahead token $iLookAhead. * * If the look-ahead token is self::YYNOCODE, then check to see if the action is * independent of the look-ahead. If it is, return the action, otherwise * return self::YY_NO_ACTION. * @param int Current state number * @param int The look-ahead token */ function yy_find_reduce_action($stateno, $iLookAhead) { /* $stateno = $this->yystack[$this->yyidx]->stateno; */ if (!isset(self::$yy_reduce_ofst[$stateno])) { return self::$yy_default[$stateno]; } $i = self::$yy_reduce_ofst[$stateno]; if ($i == self::YY_REDUCE_USE_DFLT) { return self::$yy_default[$stateno]; } if ($iLookAhead == self::YYNOCODE) { return self::YY_NO_ACTION; } $i += $iLookAhead; if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[$i] != $iLookAhead) { return self::$yy_default[$stateno]; } else { return self::$yy_action[$i]; } } /** * Perform a shift action. * @param int The new state to shift in * @param int The major token to shift in * @param mixed the minor token to shift in */ function yy_shift($yyNewState, $yyMajor, $yypMinor) { $this->yyidx++; if ($this->yyidx >= self::YYSTACKDEPTH) { $this->yyidx--; if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sStack Overflow!\n", self::$yyTracePrompt); } while ($this->yyidx >= 0) { $this->yy_pop_parser_stack(); } /* Here code is inserted which will execute if the parser ** stack ever overflows */ return; } $yytos = new PHP_LexerGenerator_ParseryyStackEntry; $yytos->stateno = $yyNewState; $yytos->major = $yyMajor; $yytos->minor = $yypMinor; array_push($this->yystack, $yytos); if (self::$yyTraceFILE && $this->yyidx > 0) { fprintf(self::$yyTraceFILE, "%sShift %d\n", self::$yyTracePrompt, $yyNewState); fprintf(self::$yyTraceFILE, "%sStack:", self::$yyTracePrompt); for($i = 1; $i <= $this->yyidx; $i++) { fprintf(self::$yyTraceFILE, " %s", self::$yyTokenName[$this->yystack[$i]->major]); } fwrite(self::$yyTraceFILE,"\n"); } } /** * The following table contains information about every rule that * is used during the reduce. * *
     * array(
     *  array(
     *   int $lhs;         Symbol on the left-hand side of the rule
     *   int $nrhs;     Number of right-hand side symbols in the rule
     *  ),...
     * );
     * 
*/ static public $yyRuleInfo = array( array( 'lhs' => 11, 'rhs' => 1 ), array( 'lhs' => 12, 'rhs' => 2 ), array( 'lhs' => 12, 'rhs' => 3 ), array( 'lhs' => 12, 'rhs' => 3 ), array( 'lhs' => 12, 'rhs' => 4 ), array( 'lhs' => 13, 'rhs' => 3 ), array( 'lhs' => 15, 'rhs' => 2 ), array( 'lhs' => 16, 'rhs' => 2 ), array( 'lhs' => 16, 'rhs' => 2 ), array( 'lhs' => 16, 'rhs' => 3 ), array( 'lhs' => 16, 'rhs' => 3 ), array( 'lhs' => 17, 'rhs' => 2 ), array( 'lhs' => 17, 'rhs' => 3 ), array( 'lhs' => 14, 'rhs' => 3 ), array( 'lhs' => 14, 'rhs' => 5 ), array( 'lhs' => 14, 'rhs' => 4 ), array( 'lhs' => 14, 'rhs' => 6 ), array( 'lhs' => 14, 'rhs' => 3 ), array( 'lhs' => 14, 'rhs' => 5 ), array( 'lhs' => 14, 'rhs' => 4 ), array( 'lhs' => 14, 'rhs' => 6 ), array( 'lhs' => 20, 'rhs' => 2 ), array( 'lhs' => 19, 'rhs' => 2 ), array( 'lhs' => 19, 'rhs' => 3 ), array( 'lhs' => 21, 'rhs' => 1 ), array( 'lhs' => 21, 'rhs' => 1 ), array( 'lhs' => 21, 'rhs' => 1 ), array( 'lhs' => 21, 'rhs' => 2 ), array( 'lhs' => 21, 'rhs' => 2 ), array( 'lhs' => 21, 'rhs' => 2 ), array( 'lhs' => 18, 'rhs' => 1 ), array( 'lhs' => 18, 'rhs' => 1 ), array( 'lhs' => 18, 'rhs' => 1 ), array( 'lhs' => 18, 'rhs' => 2 ), array( 'lhs' => 18, 'rhs' => 2 ), array( 'lhs' => 18, 'rhs' => 2 ), ); /** * The following table contains a mapping of reduce action to method name * that handles the reduction. * * If a rule is not set, it has no handler. */ static public $yyReduceMap = array( 1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 7, 9 => 9, 10 => 9, 11 => 11, 12 => 12, 13 => 13, 14 => 14, 15 => 15, 16 => 16, 17 => 17, 18 => 18, 19 => 19, 20 => 20, 21 => 21, 22 => 22, 23 => 23, 24 => 24, 25 => 25, 26 => 26, 27 => 27, 28 => 28, 29 => 29, 30 => 30, 31 => 31, 32 => 32, 33 => 33, 34 => 34, 35 => 35, ); /* Beginning here are the reduction cases. A typical example ** follows: ** #line ** function yy_r0($yymsp){ ... } // User supplied code ** #line */ #line 438 "Parser.y" function yy_r1(){ fwrite($this->out, ' private $_yy_state = 1; private $_yy_stack = array(); function yylex() { return $this->{\'yylex\' . $this->_yy_state}(); } function yypushstate($state) { array_push($this->_yy_stack, $this->_yy_state); $this->_yy_state = $state; } function yypopstate() { $this->_yy_state = array_pop($this->_yy_stack); } function yybegin($state) { $this->_yy_state = $state; } '); foreach ($this->yystack[$this->yyidx + 0]->minor as $rule) { $this->outputRules($rule['rules'], $rule['statename']); if ($rule['code']) { fwrite($this->out, $rule['code']); } } } #line 1352 "Parser.php" #line 472 "Parser.y" function yy_r2(){ fwrite($this->out, ' private $_yy_state = 1; private $_yy_stack = array(); function yylex() { return $this->{\'yylex\' . $this->_yy_state}(); } function yypushstate($state) { array_push($this->_yy_stack, $this->_yy_state); $this->_yy_state = $state; } function yypopstate() { $this->_yy_state = array_pop($this->_yy_stack); } function yybegin($state) { $this->_yy_state = $state; } '); if (strlen($this->yystack[$this->yyidx + -1]->minor)) { fwrite($this->out, $this->yystack[$this->yyidx + -1]->minor); } foreach ($this->yystack[$this->yyidx + 0]->minor as $rule) { $this->outputRules($rule['rules'], $rule['statename']); if ($rule['code']) { fwrite($this->out, $rule['code']); } } } #line 1391 "Parser.php" #line 509 "Parser.y" function yy_r3(){ if (strlen($this->yystack[$this->yyidx + -2]->minor)) { fwrite($this->out, $this->yystack[$this->yyidx + -2]->minor); } fwrite($this->out, ' private $_yy_state = 1; private $_yy_stack = array(); function yylex() { return $this->{\'yylex\' . $this->_yy_state}(); } function yypushstate($state) { array_push($this->_yy_stack, $this->_yy_state); $this->_yy_state = $state; } function yypopstate() { $this->_yy_state = array_pop($this->_yy_stack); } function yybegin($state) { $this->_yy_state = $state; } '); foreach ($this->yystack[$this->yyidx + 0]->minor as $rule) { $this->outputRules($rule['rules'], $rule['statename']); if ($rule['code']) { fwrite($this->out, $rule['code']); } } } #line 1430 "Parser.php" #line 546 "Parser.y" function yy_r4(){ if (strlen($this->yystack[$this->yyidx + -3]->minor)) { fwrite($this->out, $this->yystack[$this->yyidx + -3]->minor); } fwrite($this->out, ' private $_yy_state = 1; private $_yy_stack = array(); function yylex() { return $this->{\'yylex\' . $this->_yy_state}(); } function yypushstate($state) { array_push($this->_yy_stack, $this->_yy_state); $this->_yy_state = $state; } function yypopstate() { $this->_yy_state = array_pop($this->_yy_stack); } function yybegin($state) { $this->_yy_state = $state; } '); if (strlen($this->yystack[$this->yyidx + -1]->minor)) { fwrite($this->out, $this->yystack[$this->yyidx + -1]->minor); } foreach ($this->yystack[$this->yyidx + 0]->minor as $rule) { $this->outputRules($rule['rules'], $rule['statename']); if ($rule['code']) { fwrite($this->out, $rule['code']); } } } #line 1472 "Parser.php" #line 587 "Parser.y" function yy_r5(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; $this->patterns = $this->yystack[$this->yyidx + -1]->minor['patterns']; $this->_patternIndex = 1; } #line 1479 "Parser.php" #line 593 "Parser.y" function yy_r6(){ $expected = array( 'counter' => true, 'input' => true, 'token' => true, 'value' => true, 'line' => true, ); foreach ($this->yystack[$this->yyidx + -1]->minor as $pi) { if (isset($expected[$pi['pi']])) { unset($expected[$pi['pi']]); continue; } if (count($expected)) { throw new Exception('Processing Instructions "' . implode(', ', array_keys($expected)) . '" must be defined'); } } $expected = array( 'caseinsensitive' => true, 'counter' => true, 'input' => true, 'token' => true, 'value' => true, 'line' => true, 'matchlongest' => true, 'unicode' => true, ); foreach ($this->yystack[$this->yyidx + -1]->minor as $pi) { if (isset($expected[$pi['pi']])) { $this->{$pi['pi']} = $pi['definition']; if ($pi['pi'] == 'matchlongest') { $this->matchlongest = true; } continue; } $this->error('Unknown processing instruction %' . $pi['pi'] . ', should be one of "' . implode(', ', array_keys($expected)) . '"'); } $this->patternFlags = ($this->caseinsensitive ? 'i' : '') . ($this->unicode ? 'u' : ''); $this->_retvalue = array('patterns' => $this->yystack[$this->yyidx + 0]->minor, 'pis' => $this->yystack[$this->yyidx + -1]->minor); $this->_patternIndex = 1; } #line 1525 "Parser.php" #line 638 "Parser.y" function yy_r7(){ $this->_retvalue = array(array('pi' => $this->yystack[$this->yyidx + -1]->minor, 'definition' => $this->yystack[$this->yyidx + 0]->minor)); } #line 1530 "Parser.php" #line 644 "Parser.y" function yy_r9(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor; $this->_retvalue[] = array('pi' => $this->yystack[$this->yyidx + -1]->minor, 'definition' => $this->yystack[$this->yyidx + 0]->minor); } #line 1536 "Parser.php" #line 653 "Parser.y" function yy_r11(){ $this->_retvalue = array($this->yystack[$this->yyidx + -1]->minor => $this->yystack[$this->yyidx + 0]->minor); // reset internal indicator of where we are in a pattern $this->_patternIndex = 0; } #line 1543 "Parser.php" #line 658 "Parser.y" function yy_r12(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor; if (isset($this->_retvalue[$this->yystack[$this->yyidx + -1]->minor])) { throw new Exception('Pattern "' . $this->yystack[$this->yyidx + -1]->minor . '" is already defined as "' . $this->_retvalue[$this->yystack[$this->yyidx + -1]->minor] . '", cannot redefine as "' . $this->yystack[$this->yyidx + 0]->minor->string . '"'); } $this->_retvalue[$this->yystack[$this->yyidx + -1]->minor] = $this->yystack[$this->yyidx + 0]->minor; // reset internal indicator of where we are in a pattern declaration $this->_patternIndex = 0; } #line 1555 "Parser.php" #line 669 "Parser.y" function yy_r13(){ $this->_retvalue = array(array('rules' => $this->yystack[$this->yyidx + -1]->minor, 'code' => '', 'statename' => '')); } #line 1560 "Parser.php" #line 672 "Parser.y" function yy_r14(){ if ($this->yystack[$this->yyidx + -3]->minor != 'statename') { throw new Exception('Error: only %statename processing instruction ' . 'is allowed in rule sections (found ' . $this->yystack[$this->yyidx + -3]->minor . ').'); } $this->_retvalue = array(array('rules' => $this->yystack[$this->yyidx + -1]->minor, 'code' => '', 'statename' => $this->yystack[$this->yyidx + -2]->minor)); } #line 1569 "Parser.php" #line 679 "Parser.y" function yy_r15(){ $this->_retvalue = array(array('rules' => $this->yystack[$this->yyidx + -2]->minor, 'code' => $this->yystack[$this->yyidx + 0]->minor, 'statename' => '')); } #line 1574 "Parser.php" #line 682 "Parser.y" function yy_r16(){ if ($this->yystack[$this->yyidx + -4]->minor != 'statename') { throw new Exception('Error: only %statename processing instruction ' . 'is allowed in rule sections (found ' . $this->yystack[$this->yyidx + -4]->minor . ').'); } $this->_retvalue = array(array('rules' => $this->yystack[$this->yyidx + -2]->minor, 'code' => $this->yystack[$this->yyidx + 0]->minor, 'statename' => $this->yystack[$this->yyidx + -3]->minor)); $this->_patternIndex = 1; } #line 1584 "Parser.php" #line 690 "Parser.y" function yy_r17(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor; $this->_retvalue[] = array('rules' => $this->yystack[$this->yyidx + -1]->minor, 'code' => '', 'statename' => ''); $this->_patternIndex = 1; } #line 1591 "Parser.php" #line 695 "Parser.y" function yy_r18(){ if ($this->yystack[$this->yyidx + -3]->minor != 'statename') { throw new Exception('Error: only %statename processing instruction ' . 'is allowed in rule sections (found ' . $this->yystack[$this->yyidx + -3]->minor . ').'); } $this->_retvalue = $this->yystack[$this->yyidx + -4]->minor; $this->_retvalue[] = array('rules' => $this->yystack[$this->yyidx + -1]->minor, 'code' => '', 'statename' => $this->yystack[$this->yyidx + -2]->minor); } #line 1601 "Parser.php" #line 703 "Parser.y" function yy_r19(){ $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor; $this->_retvalue[] = array('rules' => $this->yystack[$this->yyidx + -2]->minor, 'code' => $this->yystack[$this->yyidx + 0]->minor, 'statename' => ''); } #line 1607 "Parser.php" #line 707 "Parser.y" function yy_r20(){ if ($this->yystack[$this->yyidx + -4]->minor != 'statename') { throw new Exception('Error: only %statename processing instruction ' . 'is allowed in rule sections (found ' . $this->yystack[$this->yyidx + -4]->minor . ').'); } $this->_retvalue = $this->yystack[$this->yyidx + -5]->minor; $this->_retvalue[] = array('rules' => $this->yystack[$this->yyidx + -2]->minor, 'code' => $this->yystack[$this->yyidx + 0]->minor, 'statename' => $this->yystack[$this->yyidx + -3]->minor); } #line 1617 "Parser.php" #line 716 "Parser.y" function yy_r21(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; $this->_patternIndex = 1; } #line 1623 "Parser.php" #line 721 "Parser.y" function yy_r22(){ $name = $this->yystack[$this->yyidx + -1]->minor[1]; $this->yystack[$this->yyidx + -1]->minor = $this->yystack[$this->yyidx + -1]->minor[0]; $this->yystack[$this->yyidx + -1]->minor = $this->_validatePattern($this->yystack[$this->yyidx + -1]->minor); $this->_patternIndex += $this->yystack[$this->yyidx + -1]->minor['subpatterns'] + 1; if (@preg_match('/' . str_replace('/', '\\/', $this->yystack[$this->yyidx + -1]->minor['pattern']) . '/', '')) { $this->error('Rule "' . $name . '" can match the empty string, this will break lexing'); } $this->_retvalue = array(array('pattern' => str_replace('/', '\\/', $this->yystack[$this->yyidx + -1]->minor->string), 'code' => $this->yystack[$this->yyidx + 0]->minor, 'subpatterns' => $this->yystack[$this->yyidx + -1]->minor['subpatterns'])); } #line 1635 "Parser.php" #line 731 "Parser.y" function yy_r23(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor; $name = $this->yystack[$this->yyidx + -1]->minor[1]; $this->yystack[$this->yyidx + -1]->minor = $this->yystack[$this->yyidx + -1]->minor[0]; $this->yystack[$this->yyidx + -1]->minor = $this->_validatePattern($this->yystack[$this->yyidx + -1]->minor); $this->_patternIndex += $this->yystack[$this->yyidx + -1]->minor['subpatterns'] + 1; if (@preg_match('/' . str_replace('/', '\\/', $this->yystack[$this->yyidx + -1]->minor['pattern']) . '/', '')) { $this->error('Rule "' . $name . '" can match the empty string, this will break lexing'); } $this->_retvalue[] = array('pattern' => str_replace('/', '\\/', $this->yystack[$this->yyidx + -1]->minor->string), 'code' => $this->yystack[$this->yyidx + 0]->minor, 'subpatterns' => $this->yystack[$this->yyidx + -1]->minor['subpatterns']); } #line 1648 "Parser.php" #line 743 "Parser.y" function yy_r24(){ $this->_retvalue = array(preg_quote($this->yystack[$this->yyidx + 0]->minor, '/'), $this->yystack[$this->yyidx + 0]->minor); } #line 1653 "Parser.php" #line 746 "Parser.y" function yy_r25(){ $this->_retvalue = array($this->makeCaseInsensitve(preg_quote($this->yystack[$this->yyidx + 0]->minor, '/')), $this->yystack[$this->yyidx + 0]->minor); } #line 1658 "Parser.php" #line 749 "Parser.y" function yy_r26(){ if (!isset($this->patterns[$this->yystack[$this->yyidx + 0]->minor])) { $this->error('Undefined pattern "' . $this->yystack[$this->yyidx + 0]->minor . '" used in rules'); throw new Exception('Undefined pattern "' . $this->yystack[$this->yyidx + 0]->minor . '" used in rules'); } $this->_retvalue = array($this->patterns[$this->yystack[$this->yyidx + 0]->minor], $this->yystack[$this->yyidx + 0]->minor); } #line 1667 "Parser.php" #line 756 "Parser.y" function yy_r27(){ $this->_retvalue = array($this->yystack[$this->yyidx + -1]->minor[0] . preg_quote($this->yystack[$this->yyidx + 0]->minor, '/'), $this->yystack[$this->yyidx + -1]->minor[1] . ' ' . $this->yystack[$this->yyidx + 0]->minor); } #line 1672 "Parser.php" #line 759 "Parser.y" function yy_r28(){ $this->_retvalue = array($this->yystack[$this->yyidx + -1]->minor[0] . $this->makeCaseInsensitve(preg_quote($this->yystack[$this->yyidx + 0]->minor, '/')), $this->yystack[$this->yyidx + -1]->minor[1] . ' ' . $this->yystack[$this->yyidx + 0]->minor); } #line 1677 "Parser.php" #line 762 "Parser.y" function yy_r29(){ if (!isset($this->patterns[$this->yystack[$this->yyidx + 0]->minor])) { $this->error('Undefined pattern "' . $this->yystack[$this->yyidx + 0]->minor . '" used in rules'); throw new Exception('Undefined pattern "' . $this->yystack[$this->yyidx + 0]->minor . '" used in rules'); } $this->_retvalue = array($this->yystack[$this->yyidx + -1]->minor[0] . $this->patterns[$this->yystack[$this->yyidx + 0]->minor], $this->yystack[$this->yyidx + -1]->minor[1] . ' ' . $this->yystack[$this->yyidx + 0]->minor); } #line 1686 "Parser.php" #line 770 "Parser.y" function yy_r30(){ $this->_retvalue = preg_quote($this->yystack[$this->yyidx + 0]->minor, '/'); } #line 1691 "Parser.php" #line 773 "Parser.y" function yy_r31(){ $this->_retvalue = $this->makeCaseInsensitve(preg_quote($this->yystack[$this->yyidx + 0]->minor, '/')); } #line 1696 "Parser.php" #line 776 "Parser.y" function yy_r32(){ // increment internal sub-pattern counter // adjust back-references in pattern based on previous pattern $test = $this->_validatePattern($this->yystack[$this->yyidx + 0]->minor, true); $this->_patternIndex += $test['subpatterns']; $this->_retvalue = $test['pattern']; } #line 1705 "Parser.php" #line 783 "Parser.y" function yy_r33(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor . preg_quote($this->yystack[$this->yyidx + 0]->minor, '/'); } #line 1710 "Parser.php" #line 786 "Parser.y" function yy_r34(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor . $this->makeCaseInsensitve(preg_quote($this->yystack[$this->yyidx + 0]->minor, '/')); } #line 1715 "Parser.php" #line 789 "Parser.y" function yy_r35(){ // increment internal sub-pattern counter // adjust back-references in pattern based on previous pattern $test = $this->_validatePattern($this->yystack[$this->yyidx + 0]->minor, true); $this->_patternIndex += $test['subpatterns']; $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor . $test['pattern']; } #line 1724 "Parser.php" /** * placeholder for the left hand side in a reduce operation. * * For a parser with a rule like this: *
     * rule(A) ::= B. { A = 1; }
     * 
* * The parser will translate to something like: * * * function yy_r0(){$this->_retvalue = 1;} * */ private $_retvalue; /** * Perform a reduce action and the shift that must immediately * follow the reduce. * * For a rule such as: * *
     * A ::= B blah C. { dosomething(); }
     * 
* * This function will first call the action, if any, ("dosomething();" in our * example), and then it will pop three states from the stack, * one for each entry on the right-hand side of the expression * (B, blah, and C in our example rule), and then push the result of the action * back on to the stack with the resulting state reduced to (as described in the .out * file) * @param int Number of the rule by which to reduce */ function yy_reduce($yyruleno) { //int $yygoto; /* The next state */ //int $yyact; /* The next action */ //mixed $yygotominor; /* The LHS of the rule reduced */ //PHP_LexerGenerator_ParseryyStackEntry $yymsp; /* The top of the parser's stack */ //int $yysize; /* Amount to pop the stack */ $yymsp = $this->yystack[$this->yyidx]; if (self::$yyTraceFILE && $yyruleno >= 0 && $yyruleno < count(self::$yyRuleName)) { fprintf(self::$yyTraceFILE, "%sReduce (%d) [%s].\n", self::$yyTracePrompt, $yyruleno, self::$yyRuleName[$yyruleno]); } $this->_retvalue = $yy_lefthand_side = null; if (array_key_exists($yyruleno, self::$yyReduceMap)) { // call the action $this->_retvalue = null; $this->{'yy_r' . self::$yyReduceMap[$yyruleno]}(); $yy_lefthand_side = $this->_retvalue; } $yygoto = self::$yyRuleInfo[$yyruleno]['lhs']; $yysize = self::$yyRuleInfo[$yyruleno]['rhs']; $this->yyidx -= $yysize; for($i = $yysize; $i; $i--) { // pop all of the right-hand side parameters array_pop($this->yystack); } $yyact = $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno, $yygoto); if ($yyact < self::YYNSTATE) { /* If we are not debugging and the reduce action popped at least ** one element off the stack, then we can push the new element back ** onto the stack here, and skip the stack overflow test in yy_shift(). ** That gives a significant speed improvement. */ if (!self::$yyTraceFILE && $yysize) { $this->yyidx++; $x = new PHP_LexerGenerator_ParseryyStackEntry; $x->stateno = $yyact; $x->major = $yygoto; $x->minor = $yy_lefthand_side; $this->yystack[$this->yyidx] = $x; } else { $this->yy_shift($yyact, $yygoto, $yy_lefthand_side); } } elseif ($yyact == self::YYNSTATE + self::YYNRULE + 1) { $this->yy_accept(); } } /** * The following code executes when the parse fails * * Code from %parse_fail is inserted here */ function yy_parse_failed() { if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sFail!\n", self::$yyTracePrompt); } while ($this->yyidx >= 0) { $this->yy_pop_parser_stack(); } /* Here code is inserted which will be executed whenever the ** parser fails */ } /** * The following code executes when a syntax error first occurs. * * %syntax_error code is inserted here * @param int The major type of the error token * @param mixed The minor type of the error token */ function yy_syntax_error($yymajor, $TOKEN) { #line 70 "Parser.y" echo "Syntax Error on line " . $this->lex->line . ": token '" . $this->lex->value . "' while parsing rule:"; foreach ($this->yystack as $entry) { echo $this->tokenName($entry->major) . ' '; } foreach ($this->yy_get_expected_tokens($yymajor) as $token) { $expect[] = self::$yyTokenName[$token]; } throw new Exception('Unexpected ' . $this->tokenName($yymajor) . '(' . $TOKEN . '), expected one of: ' . implode(',', $expect)); #line 1849 "Parser.php" } /** * The following is executed when the parser accepts * * %parse_accept code is inserted here */ function yy_accept() { if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sAccept!\n", self::$yyTracePrompt); } while ($this->yyidx >= 0) { $stack = $this->yy_pop_parser_stack(); } /* Here code is inserted which will be executed whenever the ** parser accepts */ } /** * The main parser program. * * The first argument is the major token number. The second is * the token value string as scanned from the input. * * @param int the token number * @param mixed the token value * @param mixed any extra arguments that should be passed to handlers */ function doParse($yymajor, $yytokenvalue) { // $yyact; /* The parser action. */ // $yyendofinput; /* True if we are at the end of input */ $yyerrorhit = 0; /* True if yymajor has invoked an error */ /* (re)initialize the parser, if necessary */ if ($this->yyidx === null || $this->yyidx < 0) { /* if ($yymajor == 0) return; // not sure why this was here... */ $this->yyidx = 0; $this->yyerrcnt = -1; $x = new PHP_LexerGenerator_ParseryyStackEntry; $x->stateno = 0; $x->major = 0; $this->yystack = array(); array_push($this->yystack, $x); } $yyendofinput = ($yymajor==0); if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sInput %s\n", self::$yyTracePrompt, self::$yyTokenName[$yymajor]); } do { $yyact = $this->yy_find_shift_action($yymajor); if ($yymajor < self::YYERRORSYMBOL && !$this->yy_is_expected_token($yymajor)) { // force a syntax error $yyact = self::YY_ERROR_ACTION; } if ($yyact < self::YYNSTATE) { $this->yy_shift($yyact, $yymajor, $yytokenvalue); $this->yyerrcnt--; if ($yyendofinput && $this->yyidx >= 0) { $yymajor = 0; } else { $yymajor = self::YYNOCODE; } } elseif ($yyact < self::YYNSTATE + self::YYNRULE) { $this->yy_reduce($yyact - self::YYNSTATE); } elseif ($yyact == self::YY_ERROR_ACTION) { if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sSyntax Error!\n", self::$yyTracePrompt); } if (self::YYERRORSYMBOL) { /* A syntax error has occurred. ** The response to an error depends upon whether or not the ** grammar defines an error token "ERROR". ** ** This is what we do if the grammar does define ERROR: ** ** * Call the %syntax_error function. ** ** * Begin popping the stack until we enter a state where ** it is legal to shift the error symbol, then shift ** the error symbol. ** ** * Set the error count to three. ** ** * Begin accepting and shifting new tokens. No new error ** processing will occur until three tokens have been ** shifted successfully. ** */ if ($this->yyerrcnt < 0) { $this->yy_syntax_error($yymajor, $yytokenvalue); } $yymx = $this->yystack[$this->yyidx]->major; if ($yymx == self::YYERRORSYMBOL || $yyerrorhit ){ if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sDiscard input token %s\n", self::$yyTracePrompt, self::$yyTokenName[$yymajor]); } $this->yy_destructor($yymajor, $yytokenvalue); $yymajor = self::YYNOCODE; } else { while ($this->yyidx >= 0 && $yymx != self::YYERRORSYMBOL && ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE ){ $this->yy_pop_parser_stack(); } if ($this->yyidx < 0 || $yymajor==0) { $this->yy_destructor($yymajor, $yytokenvalue); $this->yy_parse_failed(); $yymajor = self::YYNOCODE; } elseif ($yymx != self::YYERRORSYMBOL) { $u2 = 0; $this->yy_shift($yyact, self::YYERRORSYMBOL, $u2); } } $this->yyerrcnt = 3; $yyerrorhit = 1; } else { /* YYERRORSYMBOL is not defined */ /* This is what we do if the grammar does not define ERROR: ** ** * Report an error message, and throw away the input token. ** ** * If the input token is $, then fail the parse. ** ** As before, subsequent error messages are suppressed until ** three input tokens have been successfully shifted. */ if ($this->yyerrcnt <= 0) { $this->yy_syntax_error($yymajor, $yytokenvalue); } $this->yyerrcnt = 3; $this->yy_destructor($yymajor, $yytokenvalue); if ($yyendofinput) { $this->yy_parse_failed(); } $yymajor = self::YYNOCODE; } } else { $this->yy_accept(); $yymajor = self::YYNOCODE; } } while ($yymajor != self::YYNOCODE && $this->yyidx >= 0); } }smarty3-3.1.13/development/lexer/Lempar Original.php0000644000175000017500000010226111275032024020752 0ustar mikemikestring = $s->string; $this->metadata = $s->metadata; } else { $this->string = (string) $s; if ($m instanceof ParseyyToken) { $this->metadata = $m->metadata; } elseif (is_array($m)) { $this->metadata = $m; } } } function __toString() { return $this->_string; } function offsetExists($offset) { return isset($this->metadata[$offset]); } function offsetGet($offset) { return $this->metadata[$offset]; } function offsetSet($offset, $value) { if ($offset === null) { if (isset($value[0])) { $x = ($value instanceof ParseyyToken) ? $value->metadata : $value; $this->metadata = array_merge($this->metadata, $x); return; } $offset = count($this->metadata); } if ($value === null) { return; } if ($value instanceof ParseyyToken) { if ($value->metadata) { $this->metadata[$offset] = $value->metadata; } } elseif ($value) { $this->metadata[$offset] = $value; } } function offsetUnset($offset) { unset($this->metadata[$offset]); } } /** The following structure represents a single element of the * parser's stack. Information stored includes: * * + The state number for the parser at this level of the stack. * * + The value of the token stored at this level of the stack. * (In other words, the "major" token.) * * + The semantic value stored at this level of the stack. This is * the information used by the action routines in the grammar. * It is sometimes called the "minor" token. */ class ParseyyStackEntry { public $stateno; /* The state-number */ public $major; /* The major token value. This is the code ** number for the token at this stack level */ public $minor; /* The user-supplied minor token value. This ** is the value of the token */ }; // code external to the class is included here %% // declare_class is output here %% { /* First off, code is included which follows the "include_class" declaration ** in the input file. */ %% /* Next is all token values, as class constants */ /* ** These constants (all generated automatically by the parser generator) ** specify the various kinds of tokens (terminals) that the parser ** understands. ** ** Each symbol here is a terminal symbol in the grammar. */ %% /* Next are that tables used to determine what action to take based on the ** current state and lookahead token. These tables are used to implement ** functions that take a state number and lookahead value and return an ** action integer. ** ** Suppose the action integer is N. Then the action is determined as ** follows ** ** 0 <= N < self::YYNSTATE Shift N. That is, ** push the lookahead ** token onto the stack ** and goto state N. ** ** self::YYNSTATE <= N < self::YYNSTATE+self::YYNRULE Reduce by rule N-YYNSTATE. ** ** N == self::YYNSTATE+self::YYNRULE A syntax error has occurred. ** ** N == self::YYNSTATE+self::YYNRULE+1 The parser accepts its ** input. (and concludes parsing) ** ** N == self::YYNSTATE+self::YYNRULE+2 No such action. Denotes unused ** slots in the yy_action[] table. ** ** The action table is constructed as a single large static array $yy_action. ** Given state S and lookahead X, the action is computed as ** ** self::$yy_action[self::$yy_shift_ofst[S] + X ] ** ** If the index value self::$yy_shift_ofst[S]+X is out of range or if the value ** self::$yy_lookahead[self::$yy_shift_ofst[S]+X] is not equal to X or if ** self::$yy_shift_ofst[S] is equal to self::YY_SHIFT_USE_DFLT, it means that ** the action is not in the table and that self::$yy_default[S] should be used instead. ** ** The formula above is for computing the action when the lookahead is ** a terminal symbol. If the lookahead is a non-terminal (as occurs after ** a reduce action) then the static $yy_reduce_ofst array is used in place of ** the static $yy_shift_ofst array and self::YY_REDUCE_USE_DFLT is used in place of ** self::YY_SHIFT_USE_DFLT. ** ** The following are the tables generated in this section: ** ** self::$yy_action A single table containing all actions. ** self::$yy_lookahead A table containing the lookahead for each entry in ** yy_action. Used to detect hash collisions. ** self::$yy_shift_ofst For each state, the offset into self::$yy_action for ** shifting terminals. ** self::$yy_reduce_ofst For each state, the offset into self::$yy_action for ** shifting non-terminals after a reduce. ** self::$yy_default Default action for each state. */ %% /* The next thing included is series of defines which control ** various aspects of the generated parser. ** self::YYNOCODE is a number which corresponds ** to no legal terminal or nonterminal number. This ** number is used to fill in empty slots of the hash ** table. ** self::YYFALLBACK If defined, this indicates that one or more tokens ** have fall-back values which should be used if the ** original value of the token will not parse. ** self::YYSTACKDEPTH is the maximum depth of the parser's stack. ** self::YYNSTATE the combined number of states. ** self::YYNRULE the number of rules in the grammar ** self::YYERRORSYMBOL is the code number of the error symbol. If not ** defined, then do no error processing. */ %% /** The next table maps tokens into fallback tokens. If a construct * like the following: * * %fallback ID X Y Z. * * appears in the grammer, then ID becomes a fallback token for X, Y, * and Z. Whenever one of the tokens X, Y, or Z is input to the parser * but it does not parse, the type of the token is changed to ID and * the parse is retried before an error is thrown. */ static public $yyFallback = array( %% ); /** * Turn parser tracing on by giving a stream to which to write the trace * and a prompt to preface each trace message. Tracing is turned off * by making either argument NULL * * Inputs: * * - A stream resource to which trace output should be written. * If NULL, then tracing is turned off. * - A prefix string written at the beginning of every * line of trace output. If NULL, then tracing is * turned off. * * Outputs: * * - None. * @param resource * @param string */ static function Trace($TraceFILE, $zTracePrompt) { if (!$TraceFILE) { $zTracePrompt = 0; } elseif (!$zTracePrompt) { $TraceFILE = 0; } self::$yyTraceFILE = $TraceFILE; self::$yyTracePrompt = $zTracePrompt; } /** * Output debug information to output (php://output stream) */ static function PrintTrace() { self::$yyTraceFILE = fopen('php://output', 'w'); self::$yyTracePrompt = '
'; } /** * @var resource|0 */ static public $yyTraceFILE; /** * String to prepend to debug output * @var string|0 */ static public $yyTracePrompt; /** * @var int */ public $yyidx; /* Index of top element in stack */ /** * @var int */ public $yyerrcnt; /* Shifts left before out of the error */ /** * @var array */ public $yystack = array(); /* The parser's stack */ /** * For tracing shifts, the names of all terminals and nonterminals * are required. The following table supplies these names * @var array */ public $yyTokenName = array( %% ); /** * For tracing reduce actions, the names of all rules are required. * @var array */ static public $yyRuleName = array( %% ); /** * This function returns the symbolic name associated with a token * value. * @param int * @return string */ function tokenName($tokenType) { if ($tokenType === 0) { return 'End of Input'; } if ($tokenType > 0 && $tokenType < count(self::$yyTokenName)) { return self::$yyTokenName[$tokenType]; } else { return "Unknown"; } } /** * The following function deletes the value associated with a * symbol. The symbol can be either a terminal or nonterminal. * @param int the symbol code * @param mixed the symbol's value */ static function yy_destructor($yymajor, $yypminor) { switch ($yymajor) { /* Here is inserted the actions which take place when a ** terminal or non-terminal is destroyed. This can happen ** when the symbol is popped from the stack during a ** reduce or during error processing or when a parser is ** being destroyed before it is finished parsing. ** ** Note: during a reduce, the only symbols destroyed are those ** which appear on the RHS of the rule, but which are not used ** inside the C code. */ %% default: break; /* If no destructor action specified: do nothing */ } } /** * Pop the parser's stack once. * * If there is a destructor routine associated with the token which * is popped from the stack, then call it. * * Return the major token number for the symbol popped. * @param ParseyyParser * @return int */ function yy_pop_parser_stack() { if (!count($this->yystack)) { return; } $yytos = array_pop($this->yystack); if (self::$yyTraceFILE && $this->yyidx >= 0) { fwrite(self::$yyTraceFILE, self::$yyTracePrompt . 'Popping ' . self::$yyTokenName[$yytos->major] . "\n"); } $yymajor = $yytos->major; self::yy_destructor($yymajor, $yytos->minor); $this->yyidx--; return $yymajor; } /** * Deallocate and destroy a parser. Destructors are all called for * all stack elements before shutting the parser down. */ function __destruct() { while ($this->yyidx >= 0) { $this->yy_pop_parser_stack(); } if (is_resource(self::$yyTraceFILE)) { fclose(self::$yyTraceFILE); } } /** * Based on the current state and parser stack, get a list of all * possible lookahead tokens * @param int * @return array */ function yy_get_expected_tokens($token) { $state = $this->yystack[$this->yyidx]->stateno; $expected = self::$yyExpectedTokens[$state]; if (in_array($token, self::$yyExpectedTokens[$state], true)) { return $expected; } $stack = $this->yystack; $yyidx = $this->yyidx; do { $yyact = $this->yy_find_shift_action($token); if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) { // reduce action $done = 0; do { if ($done++ == 100) { $this->yyidx = $yyidx; $this->yystack = $stack; // too much recursion prevents proper detection // so give up return array_unique($expected); } $yyruleno = $yyact - self::YYNSTATE; $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs']; $nextstate = $this->yy_find_reduce_action( $this->yystack[$this->yyidx]->stateno, self::$yyRuleInfo[$yyruleno]['lhs']); if (isset(self::$yyExpectedTokens[$nextstate])) { $expected += self::$yyExpectedTokens[$nextstate]; if (in_array($token, self::$yyExpectedTokens[$nextstate], true)) { $this->yyidx = $yyidx; $this->yystack = $stack; return array_unique($expected); } } if ($nextstate < self::YYNSTATE) { // we need to shift a non-terminal $this->yyidx++; $x = new ParseyyStackEntry; $x->stateno = $nextstate; $x->major = self::$yyRuleInfo[$yyruleno]['lhs']; $this->yystack[$this->yyidx] = $x; continue 2; } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { $this->yyidx = $yyidx; $this->yystack = $stack; // the last token was just ignored, we can't accept // by ignoring input, this is in essence ignoring a // syntax error! return array_unique($expected); } elseif ($nextstate === self::YY_NO_ACTION) { $this->yyidx = $yyidx; $this->yystack = $stack; // input accepted, but not shifted (I guess) return $expected; } else { $yyact = $nextstate; } } while (true); } break; } while (true); return array_unique($expected); } /** * Based on the parser state and current parser stack, determine whether * the lookahead token is possible. * * The parser will convert the token value to an error token if not. This * catches some unusual edge cases where the parser would fail. * @param int * @return bool */ function yy_is_expected_token($token) { if ($token === 0) { return true; // 0 is not part of this } $state = $this->yystack[$this->yyidx]->stateno; if (in_array($token, self::$yyExpectedTokens[$state], true)) { return true; } $stack = $this->yystack; $yyidx = $this->yyidx; do { $yyact = $this->yy_find_shift_action($token); if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) { // reduce action $done = 0; do { if ($done++ == 100) { $this->yyidx = $yyidx; $this->yystack = $stack; // too much recursion prevents proper detection // so give up return true; } $yyruleno = $yyact - self::YYNSTATE; $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs']; $nextstate = $this->yy_find_reduce_action( $this->yystack[$this->yyidx]->stateno, self::$yyRuleInfo[$yyruleno]['lhs']); if (isset(self::$yyExpectedTokens[$nextstate]) && in_array($token, self::$yyExpectedTokens[$nextstate], true)) { $this->yyidx = $yyidx; $this->yystack = $stack; return true; } if ($nextstate < self::YYNSTATE) { // we need to shift a non-terminal $this->yyidx++; $x = new ParseyyStackEntry; $x->stateno = $nextstate; $x->major = self::$yyRuleInfo[$yyruleno]['lhs']; $this->yystack[$this->yyidx] = $x; continue 2; } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { $this->yyidx = $yyidx; $this->yystack = $stack; if (!$token) { // end of input: this is valid return true; } // the last token was just ignored, we can't accept // by ignoring input, this is in essence ignoring a // syntax error! return false; } elseif ($nextstate === self::YY_NO_ACTION) { $this->yyidx = $yyidx; $this->yystack = $stack; // input accepted, but not shifted (I guess) return true; } else { $yyact = $nextstate; } } while (true); } break; } while (true); $this->yyidx = $yyidx; $this->yystack = $stack; return true; } /** * Find the appropriate action for a parser given the terminal * look-ahead token iLookAhead. * * If the look-ahead token is YYNOCODE, then check to see if the action is * independent of the look-ahead. If it is, return the action, otherwise * return YY_NO_ACTION. * @param int The look-ahead token */ function yy_find_shift_action($iLookAhead) { $stateno = $this->yystack[$this->yyidx]->stateno; /* if ($this->yyidx < 0) return self::YY_NO_ACTION; */ if (!isset(self::$yy_shift_ofst[$stateno])) { // no shift actions return self::$yy_default[$stateno]; } $i = self::$yy_shift_ofst[$stateno]; if ($i === self::YY_SHIFT_USE_DFLT) { return self::$yy_default[$stateno]; } if ($iLookAhead == self::YYNOCODE) { return self::YY_NO_ACTION; } $i += $iLookAhead; if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[$i] != $iLookAhead) { if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback) && ($iFallback = self::$yyFallback[$iLookAhead]) != 0) { if (self::$yyTraceFILE) { fwrite(self::$yyTraceFILE, self::$yyTracePrompt . "FALLBACK " . self::$yyTokenName[$iLookAhead] . " => " . self::$yyTokenName[$iFallback] . "\n"); } return $this->yy_find_shift_action($iFallback); } return self::$yy_default[$stateno]; } else { return self::$yy_action[$i]; } } /** * Find the appropriate action for a parser given the non-terminal * look-ahead token $iLookAhead. * * If the look-ahead token is self::YYNOCODE, then check to see if the action is * independent of the look-ahead. If it is, return the action, otherwise * return self::YY_NO_ACTION. * @param int Current state number * @param int The look-ahead token */ function yy_find_reduce_action($stateno, $iLookAhead) { /* $stateno = $this->yystack[$this->yyidx]->stateno; */ if (!isset(self::$yy_reduce_ofst[$stateno])) { return self::$yy_default[$stateno]; } $i = self::$yy_reduce_ofst[$stateno]; if ($i == self::YY_REDUCE_USE_DFLT) { return self::$yy_default[$stateno]; } if ($iLookAhead == self::YYNOCODE) { return self::YY_NO_ACTION; } $i += $iLookAhead; if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[$i] != $iLookAhead) { return self::$yy_default[$stateno]; } else { return self::$yy_action[$i]; } } /** * Perform a shift action. * @param int The new state to shift in * @param int The major token to shift in * @param mixed the minor token to shift in */ function yy_shift($yyNewState, $yyMajor, $yypMinor) { $this->yyidx++; if ($this->yyidx >= self::YYSTACKDEPTH) { $this->yyidx--; if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sStack Overflow!\n", self::$yyTracePrompt); } while ($this->yyidx >= 0) { $this->yy_pop_parser_stack(); } /* Here code is inserted which will execute if the parser ** stack ever overflows */ %% return; } $yytos = new ParseyyStackEntry; $yytos->stateno = $yyNewState; $yytos->major = $yyMajor; $yytos->minor = $yypMinor; array_push($this->yystack, $yytos); if (self::$yyTraceFILE && $this->yyidx > 0) { fprintf(self::$yyTraceFILE, "%sShift %d\n", self::$yyTracePrompt, $yyNewState); fprintf(self::$yyTraceFILE, "%sStack:", self::$yyTracePrompt); for($i = 1; $i <= $this->yyidx; $i++) { fprintf(self::$yyTraceFILE, " %s", self::$yyTokenName[$this->yystack[$i]->major]); } fwrite(self::$yyTraceFILE,"\n"); } } /** * The following table contains information about every rule that * is used during the reduce. * *
     * array(
     *  array(
     *   int $lhs;         Symbol on the left-hand side of the rule
     *   int $nrhs;     Number of right-hand side symbols in the rule
     *  ),...
     * );
     * 
*/ static public $yyRuleInfo = array( %% ); /** * The following table contains a mapping of reduce action to method name * that handles the reduction. * * If a rule is not set, it has no handler. */ static public $yyReduceMap = array( %% ); /* Beginning here are the reduction cases. A typical example ** follows: ** #line ** function yy_r0($yymsp){ ... } // User supplied code ** #line */ %% /** * placeholder for the left hand side in a reduce operation. * * For a parser with a rule like this: *
     * rule(A) ::= B. { A = 1; }
     * 
* * The parser will translate to something like: * * * function yy_r0(){$this->_retvalue = 1;} * */ private $_retvalue; /** * Perform a reduce action and the shift that must immediately * follow the reduce. * * For a rule such as: * *
     * A ::= B blah C. { dosomething(); }
     * 
* * This function will first call the action, if any, ("dosomething();" in our * example), and then it will pop three states from the stack, * one for each entry on the right-hand side of the expression * (B, blah, and C in our example rule), and then push the result of the action * back on to the stack with the resulting state reduced to (as described in the .out * file) * @param int Number of the rule by which to reduce */ function yy_reduce($yyruleno) { //int $yygoto; /* The next state */ //int $yyact; /* The next action */ //mixed $yygotominor; /* The LHS of the rule reduced */ //ParseyyStackEntry $yymsp; /* The top of the parser's stack */ //int $yysize; /* Amount to pop the stack */ $yymsp = $this->yystack[$this->yyidx]; if (self::$yyTraceFILE && $yyruleno >= 0 && $yyruleno < count(self::$yyRuleName)) { fprintf(self::$yyTraceFILE, "%sReduce (%d) [%s].\n", self::$yyTracePrompt, $yyruleno, self::$yyRuleName[$yyruleno]); } $this->_retvalue = $yy_lefthand_side = null; if (array_key_exists($yyruleno, self::$yyReduceMap)) { // call the action $this->_retvalue = null; $this->{'yy_r' . self::$yyReduceMap[$yyruleno]}(); $yy_lefthand_side = $this->_retvalue; } $yygoto = self::$yyRuleInfo[$yyruleno]['lhs']; $yysize = self::$yyRuleInfo[$yyruleno]['rhs']; $this->yyidx -= $yysize; for($i = $yysize; $i; $i--) { // pop all of the right-hand side parameters array_pop($this->yystack); } $yyact = $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno, $yygoto); if ($yyact < self::YYNSTATE) { /* If we are not debugging and the reduce action popped at least ** one element off the stack, then we can push the new element back ** onto the stack here, and skip the stack overflow test in yy_shift(). ** That gives a significant speed improvement. */ if (!self::$yyTraceFILE && $yysize) { $this->yyidx++; $x = new ParseyyStackEntry; $x->stateno = $yyact; $x->major = $yygoto; $x->minor = $yy_lefthand_side; $this->yystack[$this->yyidx] = $x; } else { $this->yy_shift($yyact, $yygoto, $yy_lefthand_side); } } elseif ($yyact == self::YYNSTATE + self::YYNRULE + 1) { $this->yy_accept(); } } /** * The following code executes when the parse fails * * Code from %parse_fail is inserted here */ function yy_parse_failed() { if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sFail!\n", self::$yyTracePrompt); } while ($this->yyidx >= 0) { $this->yy_pop_parser_stack(); } /* Here code is inserted which will be executed whenever the ** parser fails */ %% } /** * The following code executes when a syntax error first occurs. * * %syntax_error code is inserted here * @param int The major type of the error token * @param mixed The minor type of the error token */ function yy_syntax_error($yymajor, $TOKEN) { %% } /** * The following is executed when the parser accepts * * %parse_accept code is inserted here */ function yy_accept() { if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sAccept!\n", self::$yyTracePrompt); } while ($this->yyidx >= 0) { $stack = $this->yy_pop_parser_stack(); } /* Here code is inserted which will be executed whenever the ** parser accepts */ %% } /** * The main parser program. * * The first argument is the major token number. The second is * the token value string as scanned from the input. * * @param int the token number * @param mixed the token value * @param mixed any extra arguments that should be passed to handlers */ function doParse($yymajor, $yytokenvalue) { // $yyact; /* The parser action. */ // $yyendofinput; /* True if we are at the end of input */ $yyerrorhit = 0; /* True if yymajor has invoked an error */ /* (re)initialize the parser, if necessary */ if ($this->yyidx === null || $this->yyidx < 0) { /* if ($yymajor == 0) return; // not sure why this was here... */ $this->yyidx = 0; $this->yyerrcnt = -1; $x = new ParseyyStackEntry; $x->stateno = 0; $x->major = 0; $this->yystack = array(); array_push($this->yystack, $x); } $yyendofinput = ($yymajor==0); if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sInput %s\n", self::$yyTracePrompt, self::$yyTokenName[$yymajor]); } do { $yyact = $this->yy_find_shift_action($yymajor); if ($yymajor < self::YYERRORSYMBOL && !$this->yy_is_expected_token($yymajor)) { // force a syntax error $yyact = self::YY_ERROR_ACTION; } if ($yyact < self::YYNSTATE) { $this->yy_shift($yyact, $yymajor, $yytokenvalue); $this->yyerrcnt--; if ($yyendofinput && $this->yyidx >= 0) { $yymajor = 0; } else { $yymajor = self::YYNOCODE; } } elseif ($yyact < self::YYNSTATE + self::YYNRULE) { $this->yy_reduce($yyact - self::YYNSTATE); } elseif ($yyact == self::YY_ERROR_ACTION) { if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sSyntax Error!\n", self::$yyTracePrompt); } if (self::YYERRORSYMBOL) { /* A syntax error has occurred. ** The response to an error depends upon whether or not the ** grammar defines an error token "ERROR". ** ** This is what we do if the grammar does define ERROR: ** ** * Call the %syntax_error function. ** ** * Begin popping the stack until we enter a state where ** it is legal to shift the error symbol, then shift ** the error symbol. ** ** * Set the error count to three. ** ** * Begin accepting and shifting new tokens. No new error ** processing will occur until three tokens have been ** shifted successfully. ** */ if ($this->yyerrcnt < 0) { $this->yy_syntax_error($yymajor, $yytokenvalue); } $yymx = $this->yystack[$this->yyidx]->major; if ($yymx == self::YYERRORSYMBOL || $yyerrorhit ){ if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sDiscard input token %s\n", self::$yyTracePrompt, self::$yyTokenName[$yymajor]); } $this->yy_destructor($yymajor, $yytokenvalue); $yymajor = self::YYNOCODE; } else { while ($this->yyidx >= 0 && $yymx != self::YYERRORSYMBOL && ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE ){ $this->yy_pop_parser_stack(); } if ($this->yyidx < 0 || $yymajor==0) { $this->yy_destructor($yymajor, $yytokenvalue); $this->yy_parse_failed(); $yymajor = self::YYNOCODE; } elseif ($yymx != self::YYERRORSYMBOL) { $u2 = 0; $this->yy_shift($yyact, self::YYERRORSYMBOL, $u2); } } $this->yyerrcnt = 3; $yyerrorhit = 1; } else { /* YYERRORSYMBOL is not defined */ /* This is what we do if the grammar does not define ERROR: ** ** * Report an error message, and throw away the input token. ** ** * If the input token is $, then fail the parse. ** ** As before, subsequent error messages are suppressed until ** three input tokens have been successfully shifted. */ if ($this->yyerrcnt <= 0) { $this->yy_syntax_error($yymajor, $yytokenvalue); } $this->yyerrcnt = 3; $this->yy_destructor($yymajor, $yytokenvalue); if ($yyendofinput) { $this->yy_parse_failed(); } $yymajor = self::YYNOCODE; } } else { $this->yy_accept(); $yymajor = self::YYNOCODE; } } while ($yymajor != self::YYNOCODE && $this->yyidx >= 0); } } smarty3-3.1.13/development/lexer/Create_Template_Parser.php0000644000175000017500000000232611643336356022376 0ustar mikemikeldel."','".$this->rdel."'),$contents); file_put_contents('smarty_internal_templatelexer.php', $contents); copy('smarty_internal_templatelexer.php','../../distribution/libs/sysplugins/smarty_internal_templatelexer.php'); // Create Parser passthru("$smarty_dev_php_cli_bin ./ParserGenerator/cli.php smarty_internal_templateparser.y"); $contents = file_get_contents('smarty_internal_templateparser.php'); $contents = '"); copy('smarty_internal_templateparser.php','../../distribution/libs/sysplugins/smarty_internal_templateparser.php'); ?>smarty3-3.1.13/development/lexer/smarty_internal_configfilelexer.php0000644000175000017500000005617011674655710024474 0ustar mikemikedata = $data . "\n"; //now all lines are \n-terminated $this->counter = 0; $this->line = 1; $this->smarty = $smarty; $this->mbstring_overload = ini_get('mbstring.func_overload') & 2; } public static function &instance($new_instance = null) { static $instance = null; if (isset($new_instance) && is_object($new_instance)) $instance = $new_instance; return $instance; } private $_yy_state = 1; private $_yy_stack = array(); function yylex() { return $this->{'yylex' . $this->_yy_state}(); } function yypushstate($state) { array_push($this->_yy_stack, $this->_yy_state); $this->_yy_state = $state; } function yypopstate() { $this->_yy_state = array_pop($this->_yy_stack); } function yybegin($state) { $this->_yy_state = $state; } function yylex1() { $tokenMap = array ( 1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0, 8 => 0, ); if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) { return false; // end of input } $yy_global_pattern = "/\G(#|;)|\G(\\[)|\G(\\])|\G(=)|\G([ \t\r]+)|\G(\n)|\G([0-9]*[a-zA-Z_]\\w*)|\G([\S\s])/iS"; do { if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns if (!count($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, $this->counter, 5) . '... state START'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number if ($tokenMap[$this->token]) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, $this->token + 1, $tokenMap[$this->token]); } else { $yysubmatches = array(); } $this->value = current($yymatches); // token value $r = $this->{'yy_r1_' . $this->token}($yysubmatches); if ($r === null) { $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value)); $this->line += substr_count($this->value, "\n"); // accept this token return true; } elseif ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value)); $this->line += substr_count($this->value, "\n"); if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) { return false; // end of input } // skip this token continue; } } else { throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]); } break; } while (true); } // end function const START = 1; function yy_r1_1($yy_subpatterns) { $this->token = Smarty_Internal_Configfileparser::TPC_COMMENTSTART; $this->yypushstate(self::COMMENT); } function yy_r1_2($yy_subpatterns) { $this->token = Smarty_Internal_Configfileparser::TPC_OPENB; $this->yypushstate(self::SECTION); } function yy_r1_3($yy_subpatterns) { $this->token = Smarty_Internal_Configfileparser::TPC_CLOSEB; } function yy_r1_4($yy_subpatterns) { $this->token = Smarty_Internal_Configfileparser::TPC_EQUAL; $this->yypushstate(self::VALUE); } function yy_r1_5($yy_subpatterns) { return false; } function yy_r1_6($yy_subpatterns) { $this->token = Smarty_Internal_Configfileparser::TPC_NEWLINE; } function yy_r1_7($yy_subpatterns) { $this->token = Smarty_Internal_Configfileparser::TPC_ID; } function yy_r1_8($yy_subpatterns) { $this->token = Smarty_Internal_Configfileparser::TPC_OTHER; } function yylex2() { $tokenMap = array ( 1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0, 8 => 0, 9 => 0, ); if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) { return false; // end of input } $yy_global_pattern = "/\G([ \t\r]+)|\G(\\d+\\.\\d+(?=[ \t\r]*[\n#;]))|\G(\\d+(?=[ \t\r]*[\n#;]))|\G(\"\"\")|\G('[^'\\\\]*(?:\\\\.[^'\\\\]*)*'(?=[ \t\r]*[\n#;]))|\G(\"[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*\"(?=[ \t\r]*[\n#;]))|\G([a-zA-Z]+(?=[ \t\r]*[\n#;]))|\G([^\n]+?(?=[ \t\r]*\n))|\G(\n)/iS"; do { if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns if (!count($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, $this->counter, 5) . '... state VALUE'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number if ($tokenMap[$this->token]) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, $this->token + 1, $tokenMap[$this->token]); } else { $yysubmatches = array(); } $this->value = current($yymatches); // token value $r = $this->{'yy_r2_' . $this->token}($yysubmatches); if ($r === null) { $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value)); $this->line += substr_count($this->value, "\n"); // accept this token return true; } elseif ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value)); $this->line += substr_count($this->value, "\n"); if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) { return false; // end of input } // skip this token continue; } } else { throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]); } break; } while (true); } // end function const VALUE = 2; function yy_r2_1($yy_subpatterns) { return false; } function yy_r2_2($yy_subpatterns) { $this->token = Smarty_Internal_Configfileparser::TPC_FLOAT; $this->yypopstate(); } function yy_r2_3($yy_subpatterns) { $this->token = Smarty_Internal_Configfileparser::TPC_INT; $this->yypopstate(); } function yy_r2_4($yy_subpatterns) { $this->token = Smarty_Internal_Configfileparser::TPC_TRIPPLE_QUOTES; $this->yypushstate(self::TRIPPLE); } function yy_r2_5($yy_subpatterns) { $this->token = Smarty_Internal_Configfileparser::TPC_SINGLE_QUOTED_STRING; $this->yypopstate(); } function yy_r2_6($yy_subpatterns) { $this->token = Smarty_Internal_Configfileparser::TPC_DOUBLE_QUOTED_STRING; $this->yypopstate(); } function yy_r2_7($yy_subpatterns) { if (!$this->smarty->config_booleanize || !in_array(strtolower($this->value), Array("true", "false", "on", "off", "yes", "no")) ) { $this->yypopstate(); $this->yypushstate(self::NAKED_STRING_VALUE); return true; //reprocess in new state } else { $this->token = Smarty_Internal_Configfileparser::TPC_BOOL; $this->yypopstate(); } } function yy_r2_8($yy_subpatterns) { $this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING; $this->yypopstate(); } function yy_r2_9($yy_subpatterns) { $this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING; $this->value = ""; $this->yypopstate(); } function yylex3() { $tokenMap = array ( 1 => 0, ); if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) { return false; // end of input } $yy_global_pattern = "/\G([^\n]+?(?=[ \t\r]*\n))/iS"; do { if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns if (!count($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, $this->counter, 5) . '... state NAKED_STRING_VALUE'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number if ($tokenMap[$this->token]) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, $this->token + 1, $tokenMap[$this->token]); } else { $yysubmatches = array(); } $this->value = current($yymatches); // token value $r = $this->{'yy_r3_' . $this->token}($yysubmatches); if ($r === null) { $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value)); $this->line += substr_count($this->value, "\n"); // accept this token return true; } elseif ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value)); $this->line += substr_count($this->value, "\n"); if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) { return false; // end of input } // skip this token continue; } } else { throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]); } break; } while (true); } // end function const NAKED_STRING_VALUE = 3; function yy_r3_1($yy_subpatterns) { $this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING; $this->yypopstate(); } function yylex4() { $tokenMap = array ( 1 => 0, 2 => 0, 3 => 0, ); if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) { return false; // end of input } $yy_global_pattern = "/\G([ \t\r]+)|\G([^\n]+?(?=[ \t\r]*\n))|\G(\n)/iS"; do { if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns if (!count($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, $this->counter, 5) . '... state COMMENT'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number if ($tokenMap[$this->token]) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, $this->token + 1, $tokenMap[$this->token]); } else { $yysubmatches = array(); } $this->value = current($yymatches); // token value $r = $this->{'yy_r4_' . $this->token}($yysubmatches); if ($r === null) { $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value)); $this->line += substr_count($this->value, "\n"); // accept this token return true; } elseif ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value)); $this->line += substr_count($this->value, "\n"); if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) { return false; // end of input } // skip this token continue; } } else { throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]); } break; } while (true); } // end function const COMMENT = 4; function yy_r4_1($yy_subpatterns) { return false; } function yy_r4_2($yy_subpatterns) { $this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING; } function yy_r4_3($yy_subpatterns) { $this->token = Smarty_Internal_Configfileparser::TPC_NEWLINE; $this->yypopstate(); } function yylex5() { $tokenMap = array ( 1 => 0, 2 => 0, ); if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) { return false; // end of input } $yy_global_pattern = "/\G(\\.)|\G(.*?(?=[\.=[\]\r\n]))/iS"; do { if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns if (!count($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, $this->counter, 5) . '... state SECTION'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number if ($tokenMap[$this->token]) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, $this->token + 1, $tokenMap[$this->token]); } else { $yysubmatches = array(); } $this->value = current($yymatches); // token value $r = $this->{'yy_r5_' . $this->token}($yysubmatches); if ($r === null) { $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value)); $this->line += substr_count($this->value, "\n"); // accept this token return true; } elseif ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value)); $this->line += substr_count($this->value, "\n"); if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) { return false; // end of input } // skip this token continue; } } else { throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]); } break; } while (true); } // end function const SECTION = 5; function yy_r5_1($yy_subpatterns) { $this->token = Smarty_Internal_Configfileparser::TPC_DOT; } function yy_r5_2($yy_subpatterns) { $this->token = Smarty_Internal_Configfileparser::TPC_SECTION; $this->yypopstate(); } function yylex6() { $tokenMap = array ( 1 => 0, 2 => 0, ); if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) { return false; // end of input } $yy_global_pattern = "/\G(\"\"\"(?=[ \t\r]*[\n#;]))|\G([\S\s])/iS"; do { if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns if (!count($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, $this->counter, 5) . '... state TRIPPLE'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number if ($tokenMap[$this->token]) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, $this->token + 1, $tokenMap[$this->token]); } else { $yysubmatches = array(); } $this->value = current($yymatches); // token value $r = $this->{'yy_r6_' . $this->token}($yysubmatches); if ($r === null) { $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value)); $this->line += substr_count($this->value, "\n"); // accept this token return true; } elseif ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value)); $this->line += substr_count($this->value, "\n"); if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) { return false; // end of input } // skip this token continue; } } else { throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]); } break; } while (true); } // end function const TRIPPLE = 6; function yy_r6_1($yy_subpatterns) { $this->token = Smarty_Internal_Configfileparser::TPC_TRIPPLE_QUOTES_END; $this->yypopstate(); $this->yypushstate(self::START); } function yy_r6_2($yy_subpatterns) { if ($this->mbstring_overload) { $to = mb_strlen($this->data,'latin1'); } else { $to = strlen($this->data); } preg_match("/\"\"\"[ \t\r]*[\n#;]/",$this->data,$match,PREG_OFFSET_CAPTURE,$this->counter); if (isset($match[0][1])) { $to = $match[0][1]; } else { $this->compiler->trigger_template_error ("missing or misspelled literal closing tag"); } if ($this->mbstring_overload) { $this->value = mb_substr($this->data,$this->counter,$to-$this->counter,'latin1'); } else { $this->value = substr($this->data,$this->counter,$to-$this->counter); } $this->token = Smarty_Internal_Configfileparser::TPC_TRIPPLE_TEXT; } } ?>smarty3-3.1.13/development/lexer/Create_Config_Parser.php0000644000175000017500000000207211643336356022026 0ustar mikemike"); copy('smarty_internal_configfileparser.php','../../distribution/libs/sysplugins/smarty_internal_configfileparser.php'); ?> smarty3-3.1.13/development/lexer/smarty_internal_configfilelexer.plex0000644000175000017500000001217011674655710024645 0ustar mikemikedata = $data . "\n"; //now all lines are \n-terminated $this->counter = 0; $this->line = 1; $this->smarty = $smarty; $this->mbstring_overload = ini_get('mbstring.func_overload') & 2; } public static function &instance($new_instance = null) { static $instance = null; if (isset($new_instance) && is_object($new_instance)) $instance = $new_instance; return $instance; } /*!lex2php %input $this->data %counter $this->counter %token $this->token %value $this->value %line $this->line commentstart = /#|;/ openB = /\[/ closeB = /\]/ section = /.*?(?=[\.=\[\]\r\n])/ equal = /=/ whitespace = /[ \t\r]+/ dot = /\./ id = /[0-9]*[a-zA-Z_]\w*/ newline = /\n/ single_quoted_string = /'[^'\\]*(?:\\.[^'\\]*)*'(?=[ \t\r]*[\n#;])/ double_quoted_string = /"[^"\\]*(?:\\.[^"\\]*)*"(?=[ \t\r]*[\n#;])/ tripple_quotes = /"""/ tripple_quotes_end = /"""(?=[ \t\r]*[\n#;])/ text = /[\S\s]/ float = /\d+\.\d+(?=[ \t\r]*[\n#;])/ int = /\d+(?=[ \t\r]*[\n#;])/ maybe_bool = /[a-zA-Z]+(?=[ \t\r]*[\n#;])/ naked_string = /[^\n]+?(?=[ \t\r]*\n)/ */ /*!lex2php %statename START commentstart { $this->token = Smarty_Internal_Configfileparser::TPC_COMMENTSTART; $this->yypushstate(self::COMMENT); } openB { $this->token = Smarty_Internal_Configfileparser::TPC_OPENB; $this->yypushstate(self::SECTION); } closeB { $this->token = Smarty_Internal_Configfileparser::TPC_CLOSEB; } equal { $this->token = Smarty_Internal_Configfileparser::TPC_EQUAL; $this->yypushstate(self::VALUE); } whitespace { return false; } newline { $this->token = Smarty_Internal_Configfileparser::TPC_NEWLINE; } id { $this->token = Smarty_Internal_Configfileparser::TPC_ID; } text { $this->token = Smarty_Internal_Configfileparser::TPC_OTHER; } */ /*!lex2php %statename VALUE whitespace { return false; } float { $this->token = Smarty_Internal_Configfileparser::TPC_FLOAT; $this->yypopstate(); } int { $this->token = Smarty_Internal_Configfileparser::TPC_INT; $this->yypopstate(); } tripple_quotes { $this->token = Smarty_Internal_Configfileparser::TPC_TRIPPLE_QUOTES; $this->yypushstate(self::TRIPPLE); } single_quoted_string { $this->token = Smarty_Internal_Configfileparser::TPC_SINGLE_QUOTED_STRING; $this->yypopstate(); } double_quoted_string { $this->token = Smarty_Internal_Configfileparser::TPC_DOUBLE_QUOTED_STRING; $this->yypopstate(); } maybe_bool { if (!$this->smarty->config_booleanize || !in_array(strtolower($this->value), Array("true", "false", "on", "off", "yes", "no")) ) { $this->yypopstate(); $this->yypushstate(self::NAKED_STRING_VALUE); return true; //reprocess in new state } else { $this->token = Smarty_Internal_Configfileparser::TPC_BOOL; $this->yypopstate(); } } naked_string { $this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING; $this->yypopstate(); } newline { $this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING; $this->value = ""; $this->yypopstate(); } */ /*!lex2php %statename NAKED_STRING_VALUE naked_string { $this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING; $this->yypopstate(); } */ /*!lex2php %statename COMMENT whitespace { return false; } naked_string { $this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING; } newline { $this->token = Smarty_Internal_Configfileparser::TPC_NEWLINE; $this->yypopstate(); } */ /*!lex2php %statename SECTION dot { $this->token = Smarty_Internal_Configfileparser::TPC_DOT; } section { $this->token = Smarty_Internal_Configfileparser::TPC_SECTION; $this->yypopstate(); } */ /*!lex2php %statename TRIPPLE tripple_quotes_end { $this->token = Smarty_Internal_Configfileparser::TPC_TRIPPLE_QUOTES_END; $this->yypopstate(); $this->yypushstate(self::START); } text { if ($this->mbstring_overload) { $to = mb_strlen($this->data,'latin1'); } else { $to = strlen($this->data); } preg_match("/\"\"\"[ \t\r]*[\n#;]/",$this->data,$match,PREG_OFFSET_CAPTURE,$this->counter); if (isset($match[0][1])) { $to = $match[0][1]; } else { $this->compiler->trigger_template_error ("missing or misspelled literal closing tag"); } if ($this->mbstring_overload) { $this->value = mb_substr($this->data,$this->counter,$to-$this->counter,'latin1'); } else { $this->value = substr($this->data,$this->counter,$to-$this->counter); } $this->token = Smarty_Internal_Configfileparser::TPC_TRIPPLE_TEXT; } */ } ?>smarty3-3.1.13/development/lexer/smarty_internal_configfileparser.y0000644000175000017500000001245711673404507024325 0ustar mikemike/** * Smarty Internal Plugin Configfileparser * * This is the config file parser * * * @package Smarty * @subpackage Config * @author Uwe Tews */ %name TPC_ %declare_class {class Smarty_Internal_Configfileparser} %include_class { // states whether the parse was successful or not public $successful = true; public $retvalue = 0; private $lex; private $internalError = false; function __construct($lex, $compiler) { // set instance object self::instance($this); $this->lex = $lex; $this->smarty = $compiler->smarty; $this->compiler = $compiler; } public static function &instance($new_instance = null) { static $instance = null; if (isset($new_instance) && is_object($new_instance)) $instance = $new_instance; return $instance; } private function parse_bool($str) { if (in_array(strtolower($str) ,array('on','yes','true'))) { $res = true; } else { $res = false; } return $res; } private static $escapes_single = Array('\\' => '\\', '\'' => '\''); private static function parse_single_quoted_string($qstr) { $escaped_string = substr($qstr, 1, strlen($qstr)-2); //remove outer quotes $ss = preg_split('/(\\\\.)/', $escaped_string, -1, PREG_SPLIT_DELIM_CAPTURE); $str = ""; foreach ($ss as $s) { if (strlen($s) === 2 && $s[0] === '\\') { if (isset(self::$escapes_single[$s[1]])) { $s = self::$escapes_single[$s[1]]; } } $str .= $s; } return $str; } private static function parse_double_quoted_string($qstr) { $inner_str = substr($qstr, 1, strlen($qstr)-2); return stripcslashes($inner_str); } private static function parse_tripple_double_quoted_string($qstr) { return stripcslashes($qstr); } private function set_var(Array $var, Array &$target_array) { $key = $var["key"]; $value = $var["value"]; if ($this->smarty->config_overwrite || !isset($target_array['vars'][$key])) { $target_array['vars'][$key] = $value; } else { settype($target_array['vars'][$key], 'array'); $target_array['vars'][$key][] = $value; } } private function add_global_vars(Array $vars) { if (!isset($this->compiler->config_data['vars'])) { $this->compiler->config_data['vars'] = Array(); } foreach ($vars as $var) { $this->set_var($var, $this->compiler->config_data); } } private function add_section_vars($section_name, Array $vars) { if (!isset($this->compiler->config_data['sections'][$section_name]['vars'])) { $this->compiler->config_data['sections'][$section_name]['vars'] = Array(); } foreach ($vars as $var) { $this->set_var($var, $this->compiler->config_data['sections'][$section_name]); } } } %token_prefix TPC_ %parse_accept { $this->successful = !$this->internalError; $this->internalError = false; $this->retvalue = $this->_retvalue; //echo $this->retvalue."\n\n"; } %syntax_error { $this->internalError = true; $this->yymajor = $yymajor; $this->compiler->trigger_config_file_error(); } %stack_overflow { $this->internalError = true; $this->compiler->trigger_config_file_error("Stack overflow in configfile parser"); } // Complete config file start(res) ::= global_vars sections. { res = null; } // Global vars global_vars(res) ::= var_list(vl). { $this->add_global_vars(vl); res = null; } // Sections sections(res) ::= sections section. { res = null; } sections(res) ::= . { res = null; } section(res) ::= OPENB SECTION(i) CLOSEB newline var_list(vars). { $this->add_section_vars(i, vars); res = null; } section(res) ::= OPENB DOT SECTION(i) CLOSEB newline var_list(vars). { if ($this->smarty->config_read_hidden) { $this->add_section_vars(i, vars); } res = null; } // Var list var_list(res) ::= var_list(vl) newline. { res = vl; } var_list(res) ::= var_list(vl) var(v). { res = array_merge(vl, Array(v)); } var_list(res) ::= . { res = Array(); } // Var var(res) ::= ID(id) EQUAL value(v). { res = Array("key" => id, "value" => v); } value(res) ::= FLOAT(i). { res = (float) i; } value(res) ::= INT(i). { res = (int) i; } value(res) ::= BOOL(i). { res = $this->parse_bool(i); } value(res) ::= SINGLE_QUOTED_STRING(i). { res = self::parse_single_quoted_string(i); } value(res) ::= DOUBLE_QUOTED_STRING(i). { res = self::parse_double_quoted_string(i); } value(res) ::= TRIPPLE_QUOTES(i) TRIPPLE_TEXT(c) TRIPPLE_QUOTES_END(ii). { res = self::parse_tripple_double_quoted_string(c); } value(res) ::= TRIPPLE_QUOTES(i) TRIPPLE_QUOTES_END(ii). { res = ''; } value(res) ::= NAKED_STRING(i). { res = i; } // NOTE: this is not a valid rule // It is added hier to produce a usefull error message on a missing '='; value(res) ::= OTHER(i). { res = i; } // Newline and comments newline(res) ::= NEWLINE. { res = null; } newline(res) ::= COMMENTSTART NEWLINE. { res = null; } newline(res) ::= COMMENTSTART NAKED_STRING NEWLINE. { res = null; } smarty3-3.1.13/development/lexer/ParserGenerator.php0000644000175000017500000006304011434504200021106 0ustar mikemike * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the distribution. * * Neither the name of the PHP_ParserGenerator nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * @category php * @package PHP_ParserGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @version CVS: $Id: ParserGenerator.php,v 1.2 2006/12/16 04:01:58 cellog Exp $ * @since File available since Release 0.1.0 */ /**#@+ * Basic components of the parser generator */ require_once './ParserGenerator/Action.php'; require_once './ParserGenerator/ActionTable.php'; require_once './ParserGenerator/Config.php'; require_once './ParserGenerator/Data.php'; require_once './ParserGenerator/Symbol.php'; require_once './ParserGenerator/Rule.php'; require_once './ParserGenerator/Parser.php'; require_once './ParserGenerator/PropagationLink.php'; require_once './ParserGenerator/State.php'; /**#@-*/ /** * The basic home class for the parser generator * * @package PHP_ParserGenerator * @author Gregory Beaver * @copyright 2006 Gregory Beaver * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @version 0.1.5 * @since Class available since Release 0.1.0 * @example Lempar.php * @example examples/Parser.y Sample parser file format (PHP_LexerGenerator's parser) * @example examples/Parser.php Sample parser file format PHP code (PHP_LexerGenerator's parser) */ class PHP_ParserGenerator { /** * Set this to 1 to turn on debugging of Lemon's parsing of * grammar files. */ const DEBUG = 0; const MAXRHS = 1000; const OPT_FLAG = 1, OPT_INT = 2, OPT_DBL = 3, OPT_STR = 4, OPT_FFLAG = 5, OPT_FINT = 6, OPT_FDBL = 7, OPT_FSTR = 8; public $azDefine = array(); private static $options = array( 'b' => array( 'type' => self::OPT_FLAG, 'arg' => 'basisflag', 'message' => 'Print only the basis in report.' ), 'c' => array( 'type' => self::OPT_FLAG, 'arg' => 'compress', 'message' => 'Don\'t compress the action table.' ), 'D' => array( 'type' => self::OPT_FSTR, 'arg' => 'handle_D_option', 'message' => 'Define an %ifdef macro.' ), 'g' => array( 'type' => self::OPT_FLAG, 'arg' => 'rpflag', 'message' => 'Print grammar without actions.' ), 'm' => array( 'type' => self::OPT_FLAG, 'arg' => 'mhflag', 'message' => 'Output a makeheaders compatible file' ), 'q' => array( 'type' => self::OPT_FLAG, 'arg' => 'quiet', 'message' => '(Quiet) Don\'t print the report file.' ), 's' => array( 'type' => self::OPT_FLAG, 'arg' => 'statistics', 'message' => 'Print parser stats to standard output.' ), 'x' => array( 'type' => self::OPT_FLAG, 'arg' => 'version', 'message' => 'Print the version number.' ) ); private $basisflag = 0; private $compress = 0; private $rpflag = 0; private $mhflag = 0; private $quiet = 0; private $statistics = 0; private $version = 0; private $size; /** * Process a flag command line argument. * @param int * @param array * @return int */ function handleflags($i, $argv) { if (!isset($argv[1]) || !isset(self::$options[$argv[$i][1]])) { throw new Exception('Command line syntax error: undefined option "' . $argv[$i] . '"'); } $v = self::$options[$argv[$i][1]] == '-'; if (self::$options[$argv[$i][1]]['type'] == self::OPT_FLAG) { $this->{self::$options[$argv[$i][1]]['arg']} = 1; } elseif (self::$options[$argv[$i][1]]['type'] == self::OPT_FFLAG) { $this->{self::$options[$argv[$i][1]]['arg']}($v); } elseif (self::$options[$argv[$i][1]]['type'] == self::OPT_FSTR) { $this->{self::$options[$argv[$i][1]]['arg']}(substr($v, 2)); } else { throw new Exception('Command line syntax error: missing argument on switch: "' . $argv[$i] . '"'); } return 0; } /** * Process a command line switch which has an argument. * @param int * @param array * @param array * @return int */ function handleswitch($i, $argv) { $lv = 0; $dv = 0.0; $sv = $end = $cp = ''; $j = 0; // int $errcnt = 0; $cp = strstr($argv[$i],'='); if (!$cp) { throw new Exception('INTERNAL ERROR: handleswitch passed bad argument, no "=" in arg'); } $argv[$i] = substr($argv[$i], 0, strlen($argv[$i]) - strlen($cp)); if (!isset(self::$options[$argv[$i]])) { throw new Exception('Command line syntax error: undefined option "' . $argv[$i] . $cp . '"'); } $cp = substr($cp, 1); switch (self::$options[$argv[$i]]['type']) { case self::OPT_FLAG: case self::OPT_FFLAG: throw new Exception('Command line syntax error: option requires an argument "' . $argv[$i] . '=' . $cp . '"'); case self::OPT_DBL: case self::OPT_FDBL: $dv = (double) $cp; break; case self::OPT_INT: case self::OPT_FINT: $lv = (int) $cp; break; case self::OPT_STR: case self::OPT_FSTR: $sv = $cp; break; } switch(self::$options[$argv[$i]]['type']) { case self::OPT_FLAG: case self::OPT_FFLAG: break; case self::OPT_DBL: $this->{self::$options[$argv[$i]]['arg']} = $dv; break; case self::OPT_FDBL: $this->{self::$options[$argv[$i]]['arg']}($dv); break; case self::OPT_INT: $this->{self::$options[$argv[$i]]['arg']} = $lv; break; case self::OPT_FINT: $this->{self::$options[$argv[$i]]['arg']}($lv); break; case self::OPT_STR: $this->{self::$options[$argv[$i]]['arg']} = $sv; break; case self::OPT_FSTR: $this->{self::$options[$argv[$i]]['arg']}($sv); break; } return 0; } /** * @param array arguments * @param array valid options * @return int */ function OptInit($a) { $errcnt = 0; $argv = $a; try { if (is_array($argv) && count($argv) && self::$options) { for($i = 1; $i < count($argv); $i++) { if ($argv[$i][0] == '+' || $argv[$i][0] == '-') { $errcnt += $this->handleflags($i, $argv); } elseif (strstr($argv[$i],'=')) { $errcnt += $this->handleswitch($i, $argv); } } } } catch (Exception $e) { OptPrint(); echo $e->getMessage(); exit(1); } return 0; } /** * Return the index of the N-th non-switch argument. Return -1 * if N is out of range. * @param int * @return int */ private function argindex($n, $a) { $dashdash = 0; if (!is_array($a) || !count($a)) { return -1; } for ($i=1; $i < count($a); $i++) { if ($dashdash || !($a[$i][0] == '-' || $a[$i][0] == '+' || strchr($a[$i], '='))) { if ($n == 0) { return $i; } $n--; } if ($_SERVER['argv'][$i] == '--') { $dashdash = 1; } } return -1; } /** * Return the value of the non-option argument as indexed by $i * * @param int * @param array the value of $argv * @return 0|string */ private function OptArg($i, $a) { if (-1 == ($ind = $this->argindex($i, $a))) { return 0; } return $a[$ind]; } /** * @return int number of arguments */ function OptNArgs($a) { $cnt = $dashdash = 0; if (is_array($a) && count($a)) { for($i = 1; $i < count($a); $i++) { if ($dashdash || !($a[$i][0] == '-' || $a[$i][0] == '+' || strchr($a[$i], '='))) { $cnt++; } if ($a[$i] == "--") { $dashdash = 1; } } } return $cnt; } /** * Print out command-line options */ function OptPrint() { $max = 0; foreach (self::$options as $label => $info) { $len = strlen($label) + 1; switch ($info['type']) { case self::OPT_FLAG: case self::OPT_FFLAG: break; case self::OPT_INT: case self::OPT_FINT: $len += 9; /* length of "" */ break; case self::OPT_DBL: case self::OPT_FDBL: $len += 6; /* length of "" */ break; case self::OPT_STR: case self::OPT_FSTR: $len += 8; /* length of "" */ break; } if ($len > $max) { $max = $len; } } foreach (self::$options as $label => $info) { switch ($info['type']) { case self::OPT_FLAG: case self::OPT_FFLAG: echo " -$label"; echo str_repeat(' ', $max - strlen($label)); echo " $info[message]\n"; break; case self::OPT_INT: case self::OPT_FINT: echo " $label=" . str_repeat(' ', $max - strlen($label) - 9); echo " $info[message]\n"; break; case self::OPT_DBL: case self::OPT_FDBL: echo " $label=" . str_repeat(' ', $max - strlen($label) - 6); echo " $info[message]\n"; break; case self::OPT_STR: case self::OPT_FSTR: echo " $label=" . str_repeat(' ', $max - strlen($label) - 8); echo " $info[message]\n"; break; } } } /** * This routine is called with the argument to each -D command-line option. * Add the macro defined to the azDefine array. * @param string */ private function handle_D_option($z) { if ($a = strstr($z, '=')) { $z = substr($a, 1); // strip first = } $this->azDefine[] = $z; } /**************** From the file "main.c" ************************************/ /* ** Main program file for the LEMON parser generator. */ /* The main program. Parse the command line and do it... */ function main() { $lem = new PHP_ParserGenerator_Data; $this->OptInit($_SERVER['argv']); if ($this->version) { echo "Lemon version 1.0/PHP_ParserGenerator port version 0.1.5\n"; exit(0); } if ($this->OptNArgs($_SERVER['argv']) != 1) { echo "Exactly one filename argument is required.\n"; exit(1); } $lem->errorcnt = 0; /* Initialize the machine */ $lem->argv0 = $_SERVER['argv'][0]; $lem->filename = $this->OptArg(0, $_SERVER['argv']); $a = pathinfo($lem->filename); if (isset($a['extension'])) { $ext = '.' . $a['extension']; $lem->filenosuffix = substr($lem->filename, 0, strlen($lem->filename) - strlen($ext)); } else { $lem->filenosuffix = $lem->filename; } $lem->basisflag = $this->basisflag; $lem->has_fallback = 0; $lem->nconflict = 0; $lem->name = $lem->include_code = $lem->include_classcode = $lem->arg = $lem->tokentype = $lem->start = 0; $lem->vartype = 0; $lem->stacksize = 0; $lem->error = $lem->overflow = $lem->failure = $lem->accept = $lem->tokendest = $lem->tokenprefix = $lem->outname = $lem->extracode = 0; $lem->vardest = 0; $lem->tablesize = 0; PHP_ParserGenerator_Symbol::Symbol_new("$"); $lem->errsym = PHP_ParserGenerator_Symbol::Symbol_new("error"); /* Parse the input file */ $parser = new PHP_ParserGenerator_Parser($this); $parser->Parse($lem); if ($lem->errorcnt) { exit($lem->errorcnt); } if ($lem->rule === 0) { printf("Empty grammar.\n"); exit(1); } /* Count and index the symbols of the grammar */ $lem->nsymbol = PHP_ParserGenerator_Symbol::Symbol_count(); PHP_ParserGenerator_Symbol::Symbol_new("{default}"); $lem->symbols = PHP_ParserGenerator_Symbol::Symbol_arrayof(); for ($i = 0; $i <= $lem->nsymbol; $i++) { $lem->symbols[$i]->index = $i; } usort($lem->symbols, array('PHP_ParserGenerator_Symbol', 'sortSymbols')); for ($i = 0; $i <= $lem->nsymbol; $i++) { $lem->symbols[$i]->index = $i; } // find the first lower-case symbol for($i = 1; ord($lem->symbols[$i]->name[0]) < ord ('Z'); $i++); $lem->nterminal = $i; /* Generate a reprint of the grammar, if requested on the command line */ if ($this->rpflag) { $this->Reprint(); } else { /* Initialize the size for all follow and first sets */ $this->SetSize($lem->nterminal); /* Find the precedence for every production rule (that has one) */ $lem->FindRulePrecedences(); /* Compute the lambda-nonterminals and the first-sets for every ** nonterminal */ $lem->FindFirstSets(); /* Compute all LR(0) states. Also record follow-set propagation ** links so that the follow-set can be computed later */ $lem->nstate = 0; $lem->FindStates(); $lem->sorted = PHP_ParserGenerator_State::State_arrayof(); /* Tie up loose ends on the propagation links */ $lem->FindLinks(); /* Compute the follow set of every reducible configuration */ $lem->FindFollowSets(); /* Compute the action tables */ $lem->FindActions(); /* Compress the action tables */ if ($this->compress===0) { $lem->CompressTables(); } /* Reorder and renumber the states so that states with fewer choices ** occur at the end. */ $lem->ResortStates(); /* Generate a report of the parser generated. (the "y.output" file) */ if (!$this->quiet) { $lem->ReportOutput(); } /* Generate the source code for the parser */ $lem->ReportTable($this->mhflag); /* Produce a header file for use by the scanner. (This step is ** omitted if the "-m" option is used because makeheaders will ** generate the file for us.) */ // if (!$this->mhflag) { // $this->ReportHeader(); // } } if ($this->statistics) { printf("Parser statistics: %d terminals, %d nonterminals, %d rules\n", $lem->nterminal, $lem->nsymbol - $lem->nterminal, $lem->nrule); printf(" %d states, %d parser table entries, %d conflicts\n", $lem->nstate, $lem->tablesize, $lem->nconflict); } if ($lem->nconflict) { printf("%d parsing conflicts.\n", $lem->nconflict); } exit($lem->errorcnt + $lem->nconflict); return ($lem->errorcnt + $lem->nconflict); } function SetSize($n) { $this->size = $n + 1; } /** * Merge in a merge sort for a linked list * Inputs: * - a: A sorted, null-terminated linked list. (May be null). * - b: A sorted, null-terminated linked list. (May be null). * - cmp: A pointer to the comparison function. * - offset: Offset in the structure to the "next" field. * * Return Value: * A pointer to the head of a sorted list containing the elements * of both a and b. * * Side effects: * The "next" pointers for elements in the lists a and b are * changed. */ static function merge($a, $b, $cmp, $offset) { if($a === 0) { $head = $b; } elseif ($b === 0) { $head = $a; } else { if (call_user_func($cmp, $a, $b) < 0) { $ptr = $a; $a = $a->$offset; } else { $ptr = $b; $b = $b->$offset; } $head = $ptr; while ($a && $b) { if (call_user_func($cmp, $a, $b) < 0) { $ptr->$offset = $a; $ptr = $a; $a = $a->$offset; } else { $ptr->$offset = $b; $ptr = $b; $b = $b->$offset; } } if ($a !== 0) { $ptr->$offset = $a; } else { $ptr->$offset = $b; } } return $head; } /* ** Inputs: ** list: Pointer to a singly-linked list of structures. ** next: Pointer to pointer to the second element of the list. ** cmp: A comparison function. ** ** Return Value: ** A pointer to the head of a sorted list containing the elements ** orginally in list. ** ** Side effects: ** The "next" pointers for elements in list are changed. */ #define LISTSIZE 30 static function msort($list, $next, $cmp) { if ($list === 0) { return $list; } if ($list->$next === 0) { return $list; } $set = array_fill(0, 30, 0); while ($list) { $ep = $list; $list = $list->$next; $ep->$next = 0; for ($i = 0; $i < 29 && $set[$i] !== 0; $i++) { $ep = self::merge($ep, $set[$i], $cmp, $next); $set[$i] = 0; } $set[$i] = $ep; } $ep = 0; for ($i = 0; $i < 30; $i++) { if ($set[$i] !== 0) { $ep = self::merge($ep, $set[$i], $cmp, $next); } } return $ep; } /* Find a good place to break "msg" so that its length is at least "min" ** but no more than "max". Make the point as close to max as possible. */ static function findbreak($msg, $min, $max) { if ($min >= strlen($msg)) { return strlen($msg); } for ($i = $spot = $min; $i <= $max && $i < strlen($msg); $i++) { $c = $msg[$i]; if ($c == '-' && $i < $max - 1) { $spot = $i + 1; } if ($c == ' ') { $spot = $i; } } return $spot; } static function ErrorMsg($filename, $lineno, $format) { /* Prepare a prefix to be prepended to every output line */ if ($lineno > 0) { $prefix = sprintf("%20s:%d: ", $filename, $lineno); } else { $prefix = sprintf("%20s: ", $filename); } $prefixsize = strlen($prefix); $availablewidth = 79 - $prefixsize; /* Generate the error message */ $ap = func_get_args(); array_shift($ap); // $filename array_shift($ap); // $lineno array_shift($ap); // $format $errmsg = vsprintf($format, $ap); $linewidth = strlen($errmsg); /* Remove trailing "\n"s from the error message. */ while ($linewidth > 0 && in_array($errmsg[$linewidth-1], array("\n", "\r"), true)) { --$linewidth; $errmsg = substr($errmsg, 0, strlen($errmsg) - 1); } /* Print the error message */ $base = 0; $errmsg = str_replace(array("\r", "\n", "\t"), array(' ', ' ', ' '), $errmsg); while (strlen($errmsg)) { $end = $restart = self::findbreak($errmsg, 0, $availablewidth); if (strlen($errmsg) <= 79 && $end < strlen($errmsg) && $end <= 79) { $end = $restart = strlen($errmsg); } while (isset($errmsg[$restart]) && $errmsg[$restart] == ' ') { $restart++; } printf("%s%.${end}s\n", $prefix, $errmsg); $errmsg = substr($errmsg, $restart); } } /** * Duplicate the input file without comments and without actions * on rules */ function Reprint() { printf("// Reprint of input file \"%s\".\n// Symbols:\n", $this->filename); $maxlen = 10; for ($i = 0; $i < $this->nsymbol; $i++) { $sp = $this->symbols[$i]; $len = strlen($sp->name); if ($len > $maxlen ) { $maxlen = $len; } } $ncolumns = 76 / ($maxlen + 5); if ($ncolumns < 1) { $ncolumns = 1; } $skip = ($this->nsymbol + $ncolumns - 1) / $ncolumns; for ($i = 0; $i < $skip; $i++) { print "//"; for ($j = $i; $j < $this->nsymbol; $j += $skip) { $sp = $this->symbols[$j]; //assert( sp->index==j ); printf(" %3d %-${maxlen}.${maxlen}s", $j, $sp->name); } print "\n"; } for ($rp = $this->rule; $rp; $rp = $rp->next) { printf("%s", $rp->lhs->name); /* if ($rp->lhsalias) { printf("(%s)", $rp->lhsalias); }*/ print " ::="; for ($i = 0; $i < $rp->nrhs; $i++) { $sp = $rp->rhs[$i]; printf(" %s", $sp->name); if ($sp->type == PHP_ParserGenerator_Symbol::MULTITERMINAL) { for ($j = 1; $j < $sp->nsubsym; $j++) { printf("|%s", $sp->subsym[$j]->name); } } /* if ($rp->rhsalias[$i]) { printf("(%s)", $rp->rhsalias[$i]); }*/ } print "."; if ($rp->precsym) { printf(" [%s]", $rp->precsym->name); } /* if ($rp->code) { print "\n " . $rp->code); }*/ print "\n"; } } } //$a = new PHP_ParserGenerator; //$_SERVER['argv'] = array('lemon', '-s', '/development/lemon/PHP_Parser.y'); //$_SERVER['argv'] = array('lemon', '-s', '/development/File_ChessPGN/ChessPGN/Parser.y'); //$a->main(); smarty3-3.1.13/development/lexer/smarty_internal_templatelexer.plex0000644000175000017500000005047012023461723024344 0ustar mikemike '===', 'NONEIDENTITY' => '!==', 'EQUALS' => '==', 'NOTEQUALS' => '!=', 'GREATEREQUAL' => '(>=,ge)', 'LESSEQUAL' => '(<=,le)', 'GREATERTHAN' => '(>,gt)', 'LESSTHAN' => '(<,lt)', 'MOD' => '(%,mod)', 'NOT' => '(!,not)', 'LAND' => '(&&,and)', 'LOR' => '(||,or)', 'LXOR' => 'xor', 'OPENP' => '(', 'CLOSEP' => ')', 'OPENB' => '[', 'CLOSEB' => ']', 'PTR' => '->', 'APTR' => '=>', 'EQUAL' => '=', 'NUMBER' => 'number', 'UNIMATH' => '+" , "-', 'MATH' => '*" , "/" , "%', 'INCDEC' => '++" , "--', 'SPACE' => ' ', 'DOLLAR' => '$', 'SEMICOLON' => ';', 'COLON' => ':', 'DOUBLECOLON' => '::', 'AT' => '@', 'HATCH' => '#', 'QUOTE' => '"', 'BACKTICK' => '`', 'VERT' => '|', 'DOT' => '.', 'COMMA' => '","', 'ANDSYM' => '"&"', 'QMARK' => '"?"', 'ID' => 'identifier', 'TEXT' => 'text', 'FAKEPHPSTARTTAG' => 'Fake PHP start tag', 'PHPSTARTTAG' => 'PHP start tag', 'PHPENDTAG' => 'PHP end tag', 'LITERALSTART' => 'Literal start', 'LITERALEND' => 'Literal end', 'LDELSLASH' => 'closing tag', 'COMMENT' => 'comment', 'AS' => 'as', 'TO' => 'to', ); function __construct($data,$compiler) { // $this->data = preg_replace("/(\r\n|\r|\n)/", "\n", $data); $this->data = $data; $this->counter = 0; $this->line = 1; $this->smarty = $compiler->smarty; $this->compiler = $compiler; $this->ldel = preg_quote($this->smarty->left_delimiter,'/'); $this->ldel_length = strlen($this->smarty->left_delimiter); $this->rdel = preg_quote($this->smarty->right_delimiter,'/'); $this->rdel_length = strlen($this->smarty->right_delimiter); $this->smarty_token_names['LDEL'] = $this->smarty->left_delimiter; $this->smarty_token_names['RDEL'] = $this->smarty->right_delimiter; $this->mbstring_overload = ini_get('mbstring.func_overload') & 2; } /*!lex2php %input $this->data %counter $this->counter %token $this->token %value $this->value %line $this->line linebreak = /[\t ]*[\r\n]+[\t ]*/ text = /[\S\s]/ textdoublequoted = /([^"\\]*?)((?:\\.[^"\\]*?)*?)(?=(SMARTYldel|\$|`\$|"))/ dollarid = /\$[0-9]*[a-zA-Z_]\w*/ all = /[\S\s]+/ emptyjava = /\{\}/ phpstarttag = /<\?(?:php\w+|=|[a-zA-Z]+)?/ phpendtag = /\?>/ aspstarttag = /<%/ aspendtag = /%>/ ldels = /SMARTYldel\s{1,}/ rdels = /\s{1,}SMARTYrdel/ ldelslash = /SMARTYldel\// ldelspaceslash = /SMARTYldel\s{1,}\// ldel = /SMARTYldel/ rdel = /SMARTYrdel/ smartyblockchild = /SMARTYldel[\$]smarty\.block\.childSMARTYrdel/ integer = /\d+/ hex = /0[xX][0-9a-fA-F]+/ math = /\s*(\*|\/|\%)\s*/ comment = /SMARTYldel\*([\S\s]*?)\*SMARTYrdel/ incdec = /\+\+|\-\-/ unimath = /\s*(\+|\-)\s*/ openP = /\s*\(\s*/ closeP = /\s*\)/ openB = /\[\s*/ closeB = /\s*\]/ dollar = /\$/ dot = /\./ comma = /\s*\,\s*/ doublecolon = /\:\:/ colon = /\s*\:\s*/ at = /@/ hatch = /#/ semicolon = /\s*\;/ equal = /\s*=\s*/ space = /\s+/ ptr = /\s*\->\s*/ aptr = /\s*=>\s*/ singlequotestring = /'[^'\\]*(?:\\.[^'\\]*)*'/ backtick = /`/ backtickdollar = /`\$/ vert = /\|/ andsym = /\s*\&\s*/ qmark = /\s*\?\s*/ constant = /([_]+[A-Z0-9][0-9A-Z_]*|[A-Z][0-9A-Z_]*)(?![0-9A-Z_]*[a-z])/ attr = /\s+[0-9]*[a-zA-Z_][a-zA-Z0-9_\-:]*\s*=\s*/ id = /[0-9]*[a-zA-Z_]\w*/ literalstart = /SMARTYldel\s*literal\s*SMARTYrdel/ literalend = /SMARTYldel\s*\/literal\s*SMARTYrdel/ stripstart = /SMARTYldelstripSMARTYrdel/ stripend = /SMARTYldel\/stripSMARTYrdel/ stripspacestart = /SMARTYldel\s{1,}strip\s{1,}SMARTYrdel/ stripspaceend = /SMARTYldel\s{1,}\/strip\s{1,}SMARTYrdel/ equals = /\s*==\s*|\s+eq\s+/ notequals = /\s*!=\s*|\s*<>\s*|\s+(ne|neq)\s+/ greaterthan = /\s*>\s*|\s+gt\s+/ lessthan = /\s*<\s*|\s+lt\s+/ greaterequal = /\s*>=\s*|\s+(ge|gte)\s+/ lessequal = /\s*<=\s*|\s+(le|lte)\s+/ mod = /\s+mod\s+/ identity = /\s*===\s*/ noneidentity = /\s*!==\s*/ isoddby = /\s+is\s+odd\s+by\s+/ isnotoddby = /\s+is\s+not\s+odd\s+by\s+/ isodd = /\s+is\s+odd/ isnotodd = /\s+is\s+not\s+odd/ isevenby = /\s+is\s+even\s+by\s+/ isnotevenby = /\s+is\s+not\s+even\s+by\s+/ iseven = /\s+is\s+even/ isnoteven = /\s+is\s+not\s+even/ isdivby = /\s+is\s+div\s+by\s+/ isnotdivby = /\s+is\s+not\s+div\s+by\s+/ isin = /\s+is\s+in\s+/ as = /\s+as\s+/ to = /\s+to\s+/ step = /\s+step\s+/ ldelif = /SMARTYldel\s*(if|elseif|else if|while)\s+/ ldelfor = /SMARTYldel\s*for\s+/ ldelforeach = /SMARTYldel\s*foreach(?![^\s])/ ldelsetfilter = /SMARTYldel\s*setfilter\s+/ instanceof = /\s+instanceof\s+/ not = /!\s*|not\s+/ land = /\s*\&\&\s*|\s*and\s+/ lor = /\s*\|\|\s*|\s*or\s+/ lxor = /\s*xor\s+/ typecast = /\((int(eger)?|bool(ean)?|float|double|real|string|binary|array|object)\)\s*/ double_quote = /"/ single_quote = /'/ */ /*!lex2php %statename TEXT smartyblockchild { $this->token = Smarty_Internal_Templateparser::TP_SMARTYBLOCKCHILD; } emptyjava { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } comment { $this->token = Smarty_Internal_Templateparser::TP_COMMENT; } stripstart { $this->token = Smarty_Internal_Templateparser::TP_STRIPON; } stripspacestart { if ($this->smarty->auto_literal) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_STRIPON; } } stripend { $this->token = Smarty_Internal_Templateparser::TP_STRIPOFF; } stripspaceend { if ($this->smarty->auto_literal) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_STRIPOFF; } } literalstart { $this->token = Smarty_Internal_Templateparser::TP_LITERALSTART; $this->yypushstate(self::LITERAL); } ldelspaceslash { if ($this->smarty->auto_literal) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } ldelif { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELIF; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } ldelfor { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELFOR; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } ldelforeach { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELFOREACH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } ldelsetfilter { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELSETFILTER; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } ldels { if ($this->smarty->auto_literal) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDEL; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } ldelslash { $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } ldel { $this->token = Smarty_Internal_Templateparser::TP_LDEL; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } phpstarttag { if (in_array($this->value, Array('token = Smarty_Internal_Templateparser::TP_PHPSTARTTAG; } elseif ($this->value == 'token = Smarty_Internal_Templateparser::TP_XMLTAG; } else { $this->token = Smarty_Internal_Templateparser::TP_FAKEPHPSTARTTAG; $this->value = substr($this->value, 0, 2); } } phpendtag { $this->token = Smarty_Internal_Templateparser::TP_PHPENDTAG; } rdel { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } aspstarttag { $this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG; } aspendtag { $this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG; } text { if ($this->mbstring_overload) { $to = mb_strlen($this->data,'latin1'); } else { $to = strlen($this->data); } preg_match("/{$this->ldel}|<\?|\?>|<%|%>/",$this->data,$match,PREG_OFFSET_CAPTURE,$this->counter); if (isset($match[0][1])) { $to = $match[0][1]; } if ($this->mbstring_overload) { $this->value = mb_substr($this->data,$this->counter,$to-$this->counter,'latin1'); } else { $this->value = substr($this->data,$this->counter,$to-$this->counter); } $this->token = Smarty_Internal_Templateparser::TP_TEXT; } */ /*!lex2php %statename SMARTY singlequotestring { $this->token = Smarty_Internal_Templateparser::TP_SINGLEQUOTESTRING; } ldelspaceslash { if ($this->smarty->auto_literal) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } ldelif { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELIF; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } ldelfor { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELFOR; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } ldelforeach { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELFOREACH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } ldels { if ($this->smarty->auto_literal) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDEL; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } rdels { $this->token = Smarty_Internal_Templateparser::TP_RDEL; $this->yypopstate(); } ldelslash { $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } ldel { $this->token = Smarty_Internal_Templateparser::TP_LDEL; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } rdel { $this->token = Smarty_Internal_Templateparser::TP_RDEL; $this->yypopstate(); } isin { $this->token = Smarty_Internal_Templateparser::TP_ISIN; } as { $this->token = Smarty_Internal_Templateparser::TP_AS; } to { $this->token = Smarty_Internal_Templateparser::TP_TO; } step { $this->token = Smarty_Internal_Templateparser::TP_STEP; } instanceof { $this->token = Smarty_Internal_Templateparser::TP_INSTANCEOF; } identity{ $this->token = Smarty_Internal_Templateparser::TP_IDENTITY; } noneidentity{ $this->token = Smarty_Internal_Templateparser::TP_NONEIDENTITY; } equals{ $this->token = Smarty_Internal_Templateparser::TP_EQUALS; } notequals{ $this->token = Smarty_Internal_Templateparser::TP_NOTEQUALS; } greaterequal{ $this->token = Smarty_Internal_Templateparser::TP_GREATEREQUAL; } lessequal{ $this->token = Smarty_Internal_Templateparser::TP_LESSEQUAL; } greaterthan{ $this->token = Smarty_Internal_Templateparser::TP_GREATERTHAN; } lessthan{ $this->token = Smarty_Internal_Templateparser::TP_LESSTHAN; } mod{ $this->token = Smarty_Internal_Templateparser::TP_MOD; } not{ $this->token = Smarty_Internal_Templateparser::TP_NOT; } land { $this->token = Smarty_Internal_Templateparser::TP_LAND; } lor { $this->token = Smarty_Internal_Templateparser::TP_LOR; } lxor { $this->token = Smarty_Internal_Templateparser::TP_LXOR; } isoddby { $this->token = Smarty_Internal_Templateparser::TP_ISODDBY; } isnotoddby { $this->token = Smarty_Internal_Templateparser::TP_ISNOTODDBY; } isodd { $this->token = Smarty_Internal_Templateparser::TP_ISODD; } isnotodd { $this->token = Smarty_Internal_Templateparser::TP_ISNOTODD; } isevenby { $this->token = Smarty_Internal_Templateparser::TP_ISEVENBY; } isnotevenby { $this->token = Smarty_Internal_Templateparser::TP_ISNOTEVENBY; } iseven{ $this->token = Smarty_Internal_Templateparser::TP_ISEVEN; } isnoteven { $this->token = Smarty_Internal_Templateparser::TP_ISNOTEVEN; } isdivby { $this->token = Smarty_Internal_Templateparser::TP_ISDIVBY; } isnotdivby { $this->token = Smarty_Internal_Templateparser::TP_ISNOTDIVBY; } typecast { $this->token = Smarty_Internal_Templateparser::TP_TYPECAST; } openP { $this->token = Smarty_Internal_Templateparser::TP_OPENP; } closeP { $this->token = Smarty_Internal_Templateparser::TP_CLOSEP; } openB { $this->token = Smarty_Internal_Templateparser::TP_OPENB; } closeB { $this->token = Smarty_Internal_Templateparser::TP_CLOSEB; } ptr { $this->token = Smarty_Internal_Templateparser::TP_PTR; } aptr { $this->token = Smarty_Internal_Templateparser::TP_APTR; } equal { $this->token = Smarty_Internal_Templateparser::TP_EQUAL; } incdec { $this->token = Smarty_Internal_Templateparser::TP_INCDEC; } unimath { $this->token = Smarty_Internal_Templateparser::TP_UNIMATH; } math { $this->token = Smarty_Internal_Templateparser::TP_MATH; } dollar { $this->token = Smarty_Internal_Templateparser::TP_DOLLAR; } semicolon { $this->token = Smarty_Internal_Templateparser::TP_SEMICOLON; } doublecolon { $this->token = Smarty_Internal_Templateparser::TP_DOUBLECOLON; } colon { $this->token = Smarty_Internal_Templateparser::TP_COLON; } at { $this->token = Smarty_Internal_Templateparser::TP_AT; } hatch { $this->token = Smarty_Internal_Templateparser::TP_HATCH; } double_quote { $this->token = Smarty_Internal_Templateparser::TP_QUOTE; $this->yypushstate(self::DOUBLEQUOTEDSTRING); } backtick { $this->token = Smarty_Internal_Templateparser::TP_BACKTICK; $this->yypopstate(); } vert { $this->token = Smarty_Internal_Templateparser::TP_VERT; } dot { $this->token = Smarty_Internal_Templateparser::TP_DOT; } comma { $this->token = Smarty_Internal_Templateparser::TP_COMMA; } andsym { $this->token = Smarty_Internal_Templateparser::TP_ANDSYM; } qmark { $this->token = Smarty_Internal_Templateparser::TP_QMARK; } hex { $this->token = Smarty_Internal_Templateparser::TP_HEX; } attr { // resolve conflicts with shorttag and right_delimiter starting with '=' if (substr($this->data, $this->counter + strlen($this->value) - 1, $this->rdel_length) == $this->smarty->right_delimiter) { preg_match("/\s+/",$this->value,$match); $this->value = $match[0]; $this->token = Smarty_Internal_Templateparser::TP_SPACE; } else { $this->token = Smarty_Internal_Templateparser::TP_ATTR; } } id { $this->token = Smarty_Internal_Templateparser::TP_ID; } integer { $this->token = Smarty_Internal_Templateparser::TP_INTEGER; } space { $this->token = Smarty_Internal_Templateparser::TP_SPACE; } text { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } */ /*!lex2php %statename LITERAL literalstart { $this->token = Smarty_Internal_Templateparser::TP_LITERALSTART; $this->yypushstate(self::LITERAL); } literalend { $this->token = Smarty_Internal_Templateparser::TP_LITERALEND; $this->yypopstate(); } phpstarttag { if (in_array($this->value, Array('token = Smarty_Internal_Templateparser::TP_PHPSTARTTAG; } else { $this->token = Smarty_Internal_Templateparser::TP_FAKEPHPSTARTTAG; $this->value = substr($this->value, 0, 2); } } phpendtag { $this->token = Smarty_Internal_Templateparser::TP_PHPENDTAG; } aspstarttag { $this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG; } aspendtag { $this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG; } text { if ($this->mbstring_overload) { $to = mb_strlen($this->data,'latin1'); } else { $to = strlen($this->data); } preg_match("/{$this->ldel}\/?literal{$this->rdel}|<\?|<%|\?>|%>/",$this->data,$match,PREG_OFFSET_CAPTURE,$this->counter); if (isset($match[0][1])) { $to = $match[0][1]; } else { $this->compiler->trigger_template_error ("missing or misspelled literal closing tag"); } if ($this->mbstring_overload) { $this->value = mb_substr($this->data,$this->counter,$to-$this->counter,'latin1'); } else { $this->value = substr($this->data,$this->counter,$to-$this->counter); } $this->token = Smarty_Internal_Templateparser::TP_LITERAL; } */ /*!lex2php %statename DOUBLEQUOTEDSTRING ldelspaceslash { if ($this->smarty->auto_literal) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } ldelif { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELIF; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } ldelfor { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELFOR; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } ldelforeach { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELFOREACH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } ldels { if ($this->smarty->auto_literal) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDEL; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } ldelslash { $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } ldel { $this->token = Smarty_Internal_Templateparser::TP_LDEL; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } double_quote { $this->token = Smarty_Internal_Templateparser::TP_QUOTE; $this->yypopstate(); } backtickdollar { $this->token = Smarty_Internal_Templateparser::TP_BACKTICK; $this->value = substr($this->value,0,-1); $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } dollarid { $this->token = Smarty_Internal_Templateparser::TP_DOLLARID; } dollar { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } textdoublequoted { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } text { if ($this->mbstring_overload) { $to = mb_strlen($this->data,'latin1'); } else { $to = strlen($this->data); } if ($this->mbstring_overload) { $this->value = mb_substr($this->data,$this->counter,$to-$this->counter,'latin1'); } else { $this->value = substr($this->data,$this->counter,$to-$this->counter); } $this->token = Smarty_Internal_Templateparser::TP_TEXT; } */ } ?>smarty3-3.1.13/development/lexer/smarty_internal_templatelexer.php0000644000175000017500000011432012023461723024156 0ustar mikemike '===', 'NONEIDENTITY' => '!==', 'EQUALS' => '==', 'NOTEQUALS' => '!=', 'GREATEREQUAL' => '(>=,ge)', 'LESSEQUAL' => '(<=,le)', 'GREATERTHAN' => '(>,gt)', 'LESSTHAN' => '(<,lt)', 'MOD' => '(%,mod)', 'NOT' => '(!,not)', 'LAND' => '(&&,and)', 'LOR' => '(||,or)', 'LXOR' => 'xor', 'OPENP' => '(', 'CLOSEP' => ')', 'OPENB' => '[', 'CLOSEB' => ']', 'PTR' => '->', 'APTR' => '=>', 'EQUAL' => '=', 'NUMBER' => 'number', 'UNIMATH' => '+" , "-', 'MATH' => '*" , "/" , "%', 'INCDEC' => '++" , "--', 'SPACE' => ' ', 'DOLLAR' => '$', 'SEMICOLON' => ';', 'COLON' => ':', 'DOUBLECOLON' => '::', 'AT' => '@', 'HATCH' => '#', 'QUOTE' => '"', 'BACKTICK' => '`', 'VERT' => '|', 'DOT' => '.', 'COMMA' => '","', 'ANDSYM' => '"&"', 'QMARK' => '"?"', 'ID' => 'identifier', 'TEXT' => 'text', 'FAKEPHPSTARTTAG' => 'Fake PHP start tag', 'PHPSTARTTAG' => 'PHP start tag', 'PHPENDTAG' => 'PHP end tag', 'LITERALSTART' => 'Literal start', 'LITERALEND' => 'Literal end', 'LDELSLASH' => 'closing tag', 'COMMENT' => 'comment', 'AS' => 'as', 'TO' => 'to', ); function __construct($data,$compiler) { // $this->data = preg_replace("/(\r\n|\r|\n)/", "\n", $data); $this->data = $data; $this->counter = 0; $this->line = 1; $this->smarty = $compiler->smarty; $this->compiler = $compiler; $this->ldel = preg_quote($this->smarty->left_delimiter,'/'); $this->ldel_length = strlen($this->smarty->left_delimiter); $this->rdel = preg_quote($this->smarty->right_delimiter,'/'); $this->rdel_length = strlen($this->smarty->right_delimiter); $this->smarty_token_names['LDEL'] = $this->smarty->left_delimiter; $this->smarty_token_names['RDEL'] = $this->smarty->right_delimiter; $this->mbstring_overload = ini_get('mbstring.func_overload') & 2; } private $_yy_state = 1; private $_yy_stack = array(); function yylex() { return $this->{'yylex' . $this->_yy_state}(); } function yypushstate($state) { array_push($this->_yy_stack, $this->_yy_state); $this->_yy_state = $state; } function yypopstate() { $this->_yy_state = array_pop($this->_yy_stack); } function yybegin($state) { $this->_yy_state = $state; } function yylex1() { $tokenMap = array ( 1 => 0, 2 => 0, 3 => 1, 5 => 0, 6 => 0, 7 => 0, 8 => 0, 9 => 0, 10 => 0, 11 => 1, 13 => 0, 14 => 0, 15 => 0, 16 => 0, 17 => 0, 18 => 0, 19 => 0, 20 => 0, 21 => 0, 22 => 0, 23 => 0, 24 => 0, ); if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) { return false; // end of input } $yy_global_pattern = "/\G(".$this->ldel."[$]smarty\\.block\\.child".$this->rdel.")|\G(\\{\\})|\G(".$this->ldel."\\*([\S\s]*?)\\*".$this->rdel.")|\G(".$this->ldel."strip".$this->rdel.")|\G(".$this->ldel."\\s{1,}strip\\s{1,}".$this->rdel.")|\G(".$this->ldel."\/strip".$this->rdel.")|\G(".$this->ldel."\\s{1,}\/strip\\s{1,}".$this->rdel.")|\G(".$this->ldel."\\s*literal\\s*".$this->rdel.")|\G(".$this->ldel."\\s{1,}\/)|\G(".$this->ldel."\\s*(if|elseif|else if|while)\\s+)|\G(".$this->ldel."\\s*for\\s+)|\G(".$this->ldel."\\s*foreach(?![^\s]))|\G(".$this->ldel."\\s*setfilter\\s+)|\G(".$this->ldel."\\s{1,})|\G(".$this->ldel."\/)|\G(".$this->ldel.")|\G(<\\?(?:php\\w+|=|[a-zA-Z]+)?)|\G(\\?>)|\G(".$this->rdel.")|\G(<%)|\G(%>)|\G([\S\s])/iS"; do { if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns if (!count($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, $this->counter, 5) . '... state TEXT'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number if ($tokenMap[$this->token]) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, $this->token + 1, $tokenMap[$this->token]); } else { $yysubmatches = array(); } $this->value = current($yymatches); // token value $r = $this->{'yy_r1_' . $this->token}($yysubmatches); if ($r === null) { $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value)); $this->line += substr_count($this->value, "\n"); // accept this token return true; } elseif ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value)); $this->line += substr_count($this->value, "\n"); if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) { return false; // end of input } // skip this token continue; } } else { throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]); } break; } while (true); } // end function const TEXT = 1; function yy_r1_1($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_SMARTYBLOCKCHILD; } function yy_r1_2($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } function yy_r1_3($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_COMMENT; } function yy_r1_5($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_STRIPON; } function yy_r1_6($yy_subpatterns) { if ($this->smarty->auto_literal) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_STRIPON; } } function yy_r1_7($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_STRIPOFF; } function yy_r1_8($yy_subpatterns) { if ($this->smarty->auto_literal) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_STRIPOFF; } } function yy_r1_9($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LITERALSTART; $this->yypushstate(self::LITERAL); } function yy_r1_10($yy_subpatterns) { if ($this->smarty->auto_literal) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r1_11($yy_subpatterns) { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELIF; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r1_13($yy_subpatterns) { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELFOR; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r1_14($yy_subpatterns) { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELFOREACH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r1_15($yy_subpatterns) { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELSETFILTER; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r1_16($yy_subpatterns) { if ($this->smarty->auto_literal) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDEL; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r1_17($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } function yy_r1_18($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LDEL; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } function yy_r1_19($yy_subpatterns) { if (in_array($this->value, Array('token = Smarty_Internal_Templateparser::TP_PHPSTARTTAG; } elseif ($this->value == 'token = Smarty_Internal_Templateparser::TP_XMLTAG; } else { $this->token = Smarty_Internal_Templateparser::TP_FAKEPHPSTARTTAG; $this->value = substr($this->value, 0, 2); } } function yy_r1_20($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_PHPENDTAG; } function yy_r1_21($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } function yy_r1_22($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG; } function yy_r1_23($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG; } function yy_r1_24($yy_subpatterns) { if ($this->mbstring_overload) { $to = mb_strlen($this->data,'latin1'); } else { $to = strlen($this->data); } preg_match("/{$this->ldel}|<\?|\?>|<%|%>/",$this->data,$match,PREG_OFFSET_CAPTURE,$this->counter); if (isset($match[0][1])) { $to = $match[0][1]; } if ($this->mbstring_overload) { $this->value = mb_substr($this->data,$this->counter,$to-$this->counter,'latin1'); } else { $this->value = substr($this->data,$this->counter,$to-$this->counter); } $this->token = Smarty_Internal_Templateparser::TP_TEXT; } function yylex2() { $tokenMap = array ( 1 => 0, 2 => 0, 3 => 1, 5 => 0, 6 => 0, 7 => 0, 8 => 0, 9 => 0, 10 => 0, 11 => 0, 12 => 0, 13 => 0, 14 => 0, 15 => 0, 16 => 0, 17 => 0, 18 => 0, 19 => 0, 20 => 1, 22 => 1, 24 => 1, 26 => 0, 27 => 0, 28 => 0, 29 => 0, 30 => 0, 31 => 0, 32 => 0, 33 => 0, 34 => 0, 35 => 0, 36 => 0, 37 => 0, 38 => 0, 39 => 0, 40 => 0, 41 => 0, 42 => 0, 43 => 3, 47 => 0, 48 => 0, 49 => 0, 50 => 0, 51 => 0, 52 => 0, 53 => 0, 54 => 0, 55 => 1, 57 => 1, 59 => 0, 60 => 0, 61 => 0, 62 => 0, 63 => 0, 64 => 0, 65 => 0, 66 => 0, 67 => 0, 68 => 0, 69 => 0, 70 => 0, 71 => 0, 72 => 0, 73 => 0, 74 => 0, 75 => 0, 76 => 0, 77 => 0, ); if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) { return false; // end of input } $yy_global_pattern = "/\G('[^'\\\\]*(?:\\\\.[^'\\\\]*)*')|\G(".$this->ldel."\\s{1,}\/)|\G(".$this->ldel."\\s*(if|elseif|else if|while)\\s+)|\G(".$this->ldel."\\s*for\\s+)|\G(".$this->ldel."\\s*foreach(?![^\s]))|\G(".$this->ldel."\\s{1,})|\G(\\s{1,}".$this->rdel.")|\G(".$this->ldel."\/)|\G(".$this->ldel.")|\G(".$this->rdel.")|\G(\\s+is\\s+in\\s+)|\G(\\s+as\\s+)|\G(\\s+to\\s+)|\G(\\s+step\\s+)|\G(\\s+instanceof\\s+)|\G(\\s*===\\s*)|\G(\\s*!==\\s*)|\G(\\s*==\\s*|\\s+eq\\s+)|\G(\\s*!=\\s*|\\s*<>\\s*|\\s+(ne|neq)\\s+)|\G(\\s*>=\\s*|\\s+(ge|gte)\\s+)|\G(\\s*<=\\s*|\\s+(le|lte)\\s+)|\G(\\s*>\\s*|\\s+gt\\s+)|\G(\\s*<\\s*|\\s+lt\\s+)|\G(\\s+mod\\s+)|\G(!\\s*|not\\s+)|\G(\\s*&&\\s*|\\s*and\\s+)|\G(\\s*\\|\\|\\s*|\\s*or\\s+)|\G(\\s*xor\\s+)|\G(\\s+is\\s+odd\\s+by\\s+)|\G(\\s+is\\s+not\\s+odd\\s+by\\s+)|\G(\\s+is\\s+odd)|\G(\\s+is\\s+not\\s+odd)|\G(\\s+is\\s+even\\s+by\\s+)|\G(\\s+is\\s+not\\s+even\\s+by\\s+)|\G(\\s+is\\s+even)|\G(\\s+is\\s+not\\s+even)|\G(\\s+is\\s+div\\s+by\\s+)|\G(\\s+is\\s+not\\s+div\\s+by\\s+)|\G(\\((int(eger)?|bool(ean)?|float|double|real|string|binary|array|object)\\)\\s*)|\G(\\s*\\(\\s*)|\G(\\s*\\))|\G(\\[\\s*)|\G(\\s*\\])|\G(\\s*->\\s*)|\G(\\s*=>\\s*)|\G(\\s*=\\s*)|\G(\\+\\+|--)|\G(\\s*(\\+|-)\\s*)|\G(\\s*(\\*|\/|%)\\s*)|\G(\\$)|\G(\\s*;)|\G(::)|\G(\\s*:\\s*)|\G(@)|\G(#)|\G(\")|\G(`)|\G(\\|)|\G(\\.)|\G(\\s*,\\s*)|\G(\\s*&\\s*)|\G(\\s*\\?\\s*)|\G(0[xX][0-9a-fA-F]+)|\G(\\s+[0-9]*[a-zA-Z_][a-zA-Z0-9_\-:]*\\s*=\\s*)|\G([0-9]*[a-zA-Z_]\\w*)|\G(\\d+)|\G(\\s+)|\G([\S\s])/iS"; do { if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns if (!count($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, $this->counter, 5) . '... state SMARTY'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number if ($tokenMap[$this->token]) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, $this->token + 1, $tokenMap[$this->token]); } else { $yysubmatches = array(); } $this->value = current($yymatches); // token value $r = $this->{'yy_r2_' . $this->token}($yysubmatches); if ($r === null) { $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value)); $this->line += substr_count($this->value, "\n"); // accept this token return true; } elseif ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value)); $this->line += substr_count($this->value, "\n"); if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) { return false; // end of input } // skip this token continue; } } else { throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]); } break; } while (true); } // end function const SMARTY = 2; function yy_r2_1($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_SINGLEQUOTESTRING; } function yy_r2_2($yy_subpatterns) { if ($this->smarty->auto_literal) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r2_3($yy_subpatterns) { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELIF; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r2_5($yy_subpatterns) { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELFOR; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r2_6($yy_subpatterns) { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELFOREACH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r2_7($yy_subpatterns) { if ($this->smarty->auto_literal) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDEL; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r2_8($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_RDEL; $this->yypopstate(); } function yy_r2_9($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } function yy_r2_10($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LDEL; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } function yy_r2_11($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_RDEL; $this->yypopstate(); } function yy_r2_12($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ISIN; } function yy_r2_13($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_AS; } function yy_r2_14($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_TO; } function yy_r2_15($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_STEP; } function yy_r2_16($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_INSTANCEOF; } function yy_r2_17($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_IDENTITY; } function yy_r2_18($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_NONEIDENTITY; } function yy_r2_19($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_EQUALS; } function yy_r2_20($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_NOTEQUALS; } function yy_r2_22($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_GREATEREQUAL; } function yy_r2_24($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LESSEQUAL; } function yy_r2_26($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_GREATERTHAN; } function yy_r2_27($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LESSTHAN; } function yy_r2_28($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_MOD; } function yy_r2_29($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_NOT; } function yy_r2_30($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LAND; } function yy_r2_31($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LOR; } function yy_r2_32($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LXOR; } function yy_r2_33($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ISODDBY; } function yy_r2_34($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ISNOTODDBY; } function yy_r2_35($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ISODD; } function yy_r2_36($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ISNOTODD; } function yy_r2_37($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ISEVENBY; } function yy_r2_38($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ISNOTEVENBY; } function yy_r2_39($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ISEVEN; } function yy_r2_40($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ISNOTEVEN; } function yy_r2_41($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ISDIVBY; } function yy_r2_42($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ISNOTDIVBY; } function yy_r2_43($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_TYPECAST; } function yy_r2_47($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_OPENP; } function yy_r2_48($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_CLOSEP; } function yy_r2_49($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_OPENB; } function yy_r2_50($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_CLOSEB; } function yy_r2_51($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_PTR; } function yy_r2_52($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_APTR; } function yy_r2_53($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_EQUAL; } function yy_r2_54($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_INCDEC; } function yy_r2_55($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_UNIMATH; } function yy_r2_57($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_MATH; } function yy_r2_59($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_DOLLAR; } function yy_r2_60($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_SEMICOLON; } function yy_r2_61($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_DOUBLECOLON; } function yy_r2_62($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_COLON; } function yy_r2_63($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_AT; } function yy_r2_64($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_HATCH; } function yy_r2_65($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_QUOTE; $this->yypushstate(self::DOUBLEQUOTEDSTRING); } function yy_r2_66($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_BACKTICK; $this->yypopstate(); } function yy_r2_67($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_VERT; } function yy_r2_68($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_DOT; } function yy_r2_69($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_COMMA; } function yy_r2_70($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ANDSYM; } function yy_r2_71($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_QMARK; } function yy_r2_72($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_HEX; } function yy_r2_73($yy_subpatterns) { // resolve conflicts with shorttag and right_delimiter starting with '=' if (substr($this->data, $this->counter + strlen($this->value) - 1, $this->rdel_length) == $this->smarty->right_delimiter) { preg_match("/\s+/",$this->value,$match); $this->value = $match[0]; $this->token = Smarty_Internal_Templateparser::TP_SPACE; } else { $this->token = Smarty_Internal_Templateparser::TP_ATTR; } } function yy_r2_74($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ID; } function yy_r2_75($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_INTEGER; } function yy_r2_76($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_SPACE; } function yy_r2_77($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } function yylex3() { $tokenMap = array ( 1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0, ); if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) { return false; // end of input } $yy_global_pattern = "/\G(".$this->ldel."\\s*literal\\s*".$this->rdel.")|\G(".$this->ldel."\\s*\/literal\\s*".$this->rdel.")|\G(<\\?(?:php\\w+|=|[a-zA-Z]+)?)|\G(\\?>)|\G(<%)|\G(%>)|\G([\S\s])/iS"; do { if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns if (!count($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, $this->counter, 5) . '... state LITERAL'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number if ($tokenMap[$this->token]) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, $this->token + 1, $tokenMap[$this->token]); } else { $yysubmatches = array(); } $this->value = current($yymatches); // token value $r = $this->{'yy_r3_' . $this->token}($yysubmatches); if ($r === null) { $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value)); $this->line += substr_count($this->value, "\n"); // accept this token return true; } elseif ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value)); $this->line += substr_count($this->value, "\n"); if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) { return false; // end of input } // skip this token continue; } } else { throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]); } break; } while (true); } // end function const LITERAL = 3; function yy_r3_1($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LITERALSTART; $this->yypushstate(self::LITERAL); } function yy_r3_2($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LITERALEND; $this->yypopstate(); } function yy_r3_3($yy_subpatterns) { if (in_array($this->value, Array('token = Smarty_Internal_Templateparser::TP_PHPSTARTTAG; } else { $this->token = Smarty_Internal_Templateparser::TP_FAKEPHPSTARTTAG; $this->value = substr($this->value, 0, 2); } } function yy_r3_4($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_PHPENDTAG; } function yy_r3_5($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG; } function yy_r3_6($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG; } function yy_r3_7($yy_subpatterns) { if ($this->mbstring_overload) { $to = mb_strlen($this->data,'latin1'); } else { $to = strlen($this->data); } preg_match("/{$this->ldel}\/?literal{$this->rdel}|<\?|<%|\?>|%>/",$this->data,$match,PREG_OFFSET_CAPTURE,$this->counter); if (isset($match[0][1])) { $to = $match[0][1]; } else { $this->compiler->trigger_template_error ("missing or misspelled literal closing tag"); } if ($this->mbstring_overload) { $this->value = mb_substr($this->data,$this->counter,$to-$this->counter,'latin1'); } else { $this->value = substr($this->data,$this->counter,$to-$this->counter); } $this->token = Smarty_Internal_Templateparser::TP_LITERAL; } function yylex4() { $tokenMap = array ( 1 => 0, 2 => 1, 4 => 0, 5 => 0, 6 => 0, 7 => 0, 8 => 0, 9 => 0, 10 => 0, 11 => 0, 12 => 0, 13 => 3, 17 => 0, ); if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) { return false; // end of input } $yy_global_pattern = "/\G(".$this->ldel."\\s{1,}\/)|\G(".$this->ldel."\\s*(if|elseif|else if|while)\\s+)|\G(".$this->ldel."\\s*for\\s+)|\G(".$this->ldel."\\s*foreach(?![^\s]))|\G(".$this->ldel."\\s{1,})|\G(".$this->ldel."\/)|\G(".$this->ldel.")|\G(\")|\G(`\\$)|\G(\\$[0-9]*[a-zA-Z_]\\w*)|\G(\\$)|\G(([^\"\\\\]*?)((?:\\\\.[^\"\\\\]*?)*?)(?=(".$this->ldel."|\\$|`\\$|\")))|\G([\S\s])/iS"; do { if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) { $yysubmatches = $yymatches; $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns if (!count($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, $this->counter, 5) . '... state DOUBLEQUOTEDSTRING'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number if ($tokenMap[$this->token]) { // extract sub-patterns for passing to lex function $yysubmatches = array_slice($yysubmatches, $this->token + 1, $tokenMap[$this->token]); } else { $yysubmatches = array(); } $this->value = current($yymatches); // token value $r = $this->{'yy_r4_' . $this->token}($yysubmatches); if ($r === null) { $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value)); $this->line += substr_count($this->value, "\n"); // accept this token return true; } elseif ($r === true) { // we have changed state // process this token in the new state return $this->yylex(); } elseif ($r === false) { $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value)); $this->line += substr_count($this->value, "\n"); if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) { return false; // end of input } // skip this token continue; } } else { throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]); } break; } while (true); } // end function const DOUBLEQUOTEDSTRING = 4; function yy_r4_1($yy_subpatterns) { if ($this->smarty->auto_literal) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r4_2($yy_subpatterns) { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELIF; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r4_4($yy_subpatterns) { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELFOR; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r4_5($yy_subpatterns) { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDELFOREACH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r4_6($yy_subpatterns) { if ($this->smarty->auto_literal) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { $this->token = Smarty_Internal_Templateparser::TP_LDEL; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } } function yy_r4_7($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } function yy_r4_8($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LDEL; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } function yy_r4_9($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_QUOTE; $this->yypopstate(); } function yy_r4_10($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_BACKTICK; $this->value = substr($this->value,0,-1); $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } function yy_r4_11($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_DOLLARID; } function yy_r4_12($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } function yy_r4_13($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } function yy_r4_17($yy_subpatterns) { if ($this->mbstring_overload) { $to = mb_strlen($this->data,'latin1'); } else { $to = strlen($this->data); } if ($this->mbstring_overload) { $this->value = mb_substr($this->data,$this->counter,$to-$this->counter,'latin1'); } else { $this->value = substr($this->data,$this->counter,$to-$this->counter); } $this->token = Smarty_Internal_Templateparser::TP_TEXT; } } smarty3-3.1.13/development/lexer/smarty_internal_configfileparser.php0000644000175000017500000010100211673404507024625 0ustar mikemikestring = $s->string; $this->metadata = $s->metadata; } else { $this->string = (string) $s; if ($m instanceof TPC_yyToken) { $this->metadata = $m->metadata; } elseif (is_array($m)) { $this->metadata = $m; } } } function __toString() { return $this->_string; } function offsetExists($offset) { return isset($this->metadata[$offset]); } function offsetGet($offset) { return $this->metadata[$offset]; } function offsetSet($offset, $value) { if ($offset === null) { if (isset($value[0])) { $x = ($value instanceof TPC_yyToken) ? $value->metadata : $value; $this->metadata = array_merge($this->metadata, $x); return; } $offset = count($this->metadata); } if ($value === null) { return; } if ($value instanceof TPC_yyToken) { if ($value->metadata) { $this->metadata[$offset] = $value->metadata; } } elseif ($value) { $this->metadata[$offset] = $value; } } function offsetUnset($offset) { unset($this->metadata[$offset]); } } class TPC_yyStackEntry { public $stateno; /* The state-number */ public $major; /* The major token value. This is the code ** number for the token at this stack level */ public $minor; /* The user-supplied minor token value. This ** is the value of the token */ }; #line 12 "smarty_internal_configfileparser.y" class Smarty_Internal_Configfileparser#line 79 "smarty_internal_configfileparser.php" { #line 14 "smarty_internal_configfileparser.y" // states whether the parse was successful or not public $successful = true; public $retvalue = 0; private $lex; private $internalError = false; function __construct($lex, $compiler) { // set instance object self::instance($this); $this->lex = $lex; $this->smarty = $compiler->smarty; $this->compiler = $compiler; } public static function &instance($new_instance = null) { static $instance = null; if (isset($new_instance) && is_object($new_instance)) $instance = $new_instance; return $instance; } private function parse_bool($str) { if (in_array(strtolower($str) ,array('on','yes','true'))) { $res = true; } else { $res = false; } return $res; } private static $escapes_single = Array('\\' => '\\', '\'' => '\''); private static function parse_single_quoted_string($qstr) { $escaped_string = substr($qstr, 1, strlen($qstr)-2); //remove outer quotes $ss = preg_split('/(\\\\.)/', $escaped_string, -1, PREG_SPLIT_DELIM_CAPTURE); $str = ""; foreach ($ss as $s) { if (strlen($s) === 2 && $s[0] === '\\') { if (isset(self::$escapes_single[$s[1]])) { $s = self::$escapes_single[$s[1]]; } } $str .= $s; } return $str; } private static function parse_double_quoted_string($qstr) { $inner_str = substr($qstr, 1, strlen($qstr)-2); return stripcslashes($inner_str); } private static function parse_tripple_double_quoted_string($qstr) { return stripcslashes($qstr); } private function set_var(Array $var, Array &$target_array) { $key = $var["key"]; $value = $var["value"]; if ($this->smarty->config_overwrite || !isset($target_array['vars'][$key])) { $target_array['vars'][$key] = $value; } else { settype($target_array['vars'][$key], 'array'); $target_array['vars'][$key][] = $value; } } private function add_global_vars(Array $vars) { if (!isset($this->compiler->config_data['vars'])) { $this->compiler->config_data['vars'] = Array(); } foreach ($vars as $var) { $this->set_var($var, $this->compiler->config_data); } } private function add_section_vars($section_name, Array $vars) { if (!isset($this->compiler->config_data['sections'][$section_name]['vars'])) { $this->compiler->config_data['sections'][$section_name]['vars'] = Array(); } foreach ($vars as $var) { $this->set_var($var, $this->compiler->config_data['sections'][$section_name]); } } #line 173 "smarty_internal_configfileparser.php" const TPC_OPENB = 1; const TPC_SECTION = 2; const TPC_CLOSEB = 3; const TPC_DOT = 4; const TPC_ID = 5; const TPC_EQUAL = 6; const TPC_FLOAT = 7; const TPC_INT = 8; const TPC_BOOL = 9; const TPC_SINGLE_QUOTED_STRING = 10; const TPC_DOUBLE_QUOTED_STRING = 11; const TPC_TRIPPLE_QUOTES = 12; const TPC_TRIPPLE_TEXT = 13; const TPC_TRIPPLE_QUOTES_END = 14; const TPC_NAKED_STRING = 15; const TPC_OTHER = 16; const TPC_NEWLINE = 17; const TPC_COMMENTSTART = 18; const YY_NO_ACTION = 60; const YY_ACCEPT_ACTION = 59; const YY_ERROR_ACTION = 58; const YY_SZ_ACTTAB = 38; static public $yy_action = array( /* 0 */ 29, 30, 34, 33, 24, 13, 19, 25, 35, 21, /* 10 */ 59, 8, 3, 1, 20, 12, 14, 31, 20, 12, /* 20 */ 15, 17, 23, 18, 27, 26, 4, 5, 6, 32, /* 30 */ 2, 11, 28, 22, 16, 9, 7, 10, ); static public $yy_lookahead = array( /* 0 */ 7, 8, 9, 10, 11, 12, 5, 27, 15, 16, /* 10 */ 20, 21, 23, 23, 17, 18, 13, 14, 17, 18, /* 20 */ 15, 2, 17, 4, 25, 26, 6, 3, 3, 14, /* 30 */ 23, 1, 24, 17, 2, 25, 22, 25, ); const YY_SHIFT_USE_DFLT = -8; const YY_SHIFT_MAX = 19; static public $yy_shift_ofst = array( /* 0 */ -8, 1, 1, 1, -7, -3, -3, 30, -8, -8, /* 10 */ -8, 19, 5, 3, 15, 16, 24, 25, 32, 20, ); const YY_REDUCE_USE_DFLT = -21; const YY_REDUCE_MAX = 10; static public $yy_reduce_ofst = array( /* 0 */ -10, -1, -1, -1, -20, 10, 12, 8, 14, 7, /* 10 */ -11, ); static public $yyExpectedTokens = array( /* 0 */ array(), /* 1 */ array(5, 17, 18, ), /* 2 */ array(5, 17, 18, ), /* 3 */ array(5, 17, 18, ), /* 4 */ array(7, 8, 9, 10, 11, 12, 15, 16, ), /* 5 */ array(17, 18, ), /* 6 */ array(17, 18, ), /* 7 */ array(1, ), /* 8 */ array(), /* 9 */ array(), /* 10 */ array(), /* 11 */ array(2, 4, ), /* 12 */ array(15, 17, ), /* 13 */ array(13, 14, ), /* 14 */ array(14, ), /* 15 */ array(17, ), /* 16 */ array(3, ), /* 17 */ array(3, ), /* 18 */ array(2, ), /* 19 */ array(6, ), /* 20 */ array(), /* 21 */ array(), /* 22 */ array(), /* 23 */ array(), /* 24 */ array(), /* 25 */ array(), /* 26 */ array(), /* 27 */ array(), /* 28 */ array(), /* 29 */ array(), /* 30 */ array(), /* 31 */ array(), /* 32 */ array(), /* 33 */ array(), /* 34 */ array(), /* 35 */ array(), ); static public $yy_default = array( /* 0 */ 44, 37, 41, 40, 58, 58, 58, 36, 39, 44, /* 10 */ 44, 58, 58, 58, 58, 58, 58, 58, 58, 58, /* 20 */ 55, 54, 57, 56, 50, 45, 43, 42, 38, 46, /* 30 */ 47, 52, 51, 49, 48, 53, ); const YYNOCODE = 29; const YYSTACKDEPTH = 100; const YYNSTATE = 36; const YYNRULE = 22; const YYERRORSYMBOL = 19; const YYERRSYMDT = 'yy0'; const YYFALLBACK = 0; static public $yyFallback = array( ); static function Trace($TraceFILE, $zTracePrompt) { if (!$TraceFILE) { $zTracePrompt = 0; } elseif (!$zTracePrompt) { $TraceFILE = 0; } self::$yyTraceFILE = $TraceFILE; self::$yyTracePrompt = $zTracePrompt; } static function PrintTrace() { self::$yyTraceFILE = fopen('php://output', 'w'); self::$yyTracePrompt = '
'; } static public $yyTraceFILE; static public $yyTracePrompt; public $yyidx; /* Index of top element in stack */ public $yyerrcnt; /* Shifts left before out of the error */ public $yystack = array(); /* The parser's stack */ public $yyTokenName = array( '$', 'OPENB', 'SECTION', 'CLOSEB', 'DOT', 'ID', 'EQUAL', 'FLOAT', 'INT', 'BOOL', 'SINGLE_QUOTED_STRING', 'DOUBLE_QUOTED_STRING', 'TRIPPLE_QUOTES', 'TRIPPLE_TEXT', 'TRIPPLE_QUOTES_END', 'NAKED_STRING', 'OTHER', 'NEWLINE', 'COMMENTSTART', 'error', 'start', 'global_vars', 'sections', 'var_list', 'section', 'newline', 'var', 'value', ); static public $yyRuleName = array( /* 0 */ "start ::= global_vars sections", /* 1 */ "global_vars ::= var_list", /* 2 */ "sections ::= sections section", /* 3 */ "sections ::=", /* 4 */ "section ::= OPENB SECTION CLOSEB newline var_list", /* 5 */ "section ::= OPENB DOT SECTION CLOSEB newline var_list", /* 6 */ "var_list ::= var_list newline", /* 7 */ "var_list ::= var_list var", /* 8 */ "var_list ::=", /* 9 */ "var ::= ID EQUAL value", /* 10 */ "value ::= FLOAT", /* 11 */ "value ::= INT", /* 12 */ "value ::= BOOL", /* 13 */ "value ::= SINGLE_QUOTED_STRING", /* 14 */ "value ::= DOUBLE_QUOTED_STRING", /* 15 */ "value ::= TRIPPLE_QUOTES TRIPPLE_TEXT TRIPPLE_QUOTES_END", /* 16 */ "value ::= TRIPPLE_QUOTES TRIPPLE_QUOTES_END", /* 17 */ "value ::= NAKED_STRING", /* 18 */ "value ::= OTHER", /* 19 */ "newline ::= NEWLINE", /* 20 */ "newline ::= COMMENTSTART NEWLINE", /* 21 */ "newline ::= COMMENTSTART NAKED_STRING NEWLINE", ); function tokenName($tokenType) { if ($tokenType === 0) { return 'End of Input'; } if ($tokenType > 0 && $tokenType < count($this->yyTokenName)) { return $this->yyTokenName[$tokenType]; } else { return "Unknown"; } } static function yy_destructor($yymajor, $yypminor) { switch ($yymajor) { default: break; /* If no destructor action specified: do nothing */ } } function yy_pop_parser_stack() { if (!count($this->yystack)) { return; } $yytos = array_pop($this->yystack); if (self::$yyTraceFILE && $this->yyidx >= 0) { fwrite(self::$yyTraceFILE, self::$yyTracePrompt . 'Popping ' . $this->yyTokenName[$yytos->major] . "\n"); } $yymajor = $yytos->major; self::yy_destructor($yymajor, $yytos->minor); $this->yyidx--; return $yymajor; } function __destruct() { while ($this->yystack !== Array()) { $this->yy_pop_parser_stack(); } if (is_resource(self::$yyTraceFILE)) { fclose(self::$yyTraceFILE); } } function yy_get_expected_tokens($token) { $state = $this->yystack[$this->yyidx]->stateno; $expected = self::$yyExpectedTokens[$state]; if (in_array($token, self::$yyExpectedTokens[$state], true)) { return $expected; } $stack = $this->yystack; $yyidx = $this->yyidx; do { $yyact = $this->yy_find_shift_action($token); if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) { // reduce action $done = 0; do { if ($done++ == 100) { $this->yyidx = $yyidx; $this->yystack = $stack; // too much recursion prevents proper detection // so give up return array_unique($expected); } $yyruleno = $yyact - self::YYNSTATE; $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs']; $nextstate = $this->yy_find_reduce_action( $this->yystack[$this->yyidx]->stateno, self::$yyRuleInfo[$yyruleno]['lhs']); if (isset(self::$yyExpectedTokens[$nextstate])) { $expected = array_merge($expected, self::$yyExpectedTokens[$nextstate]); if (in_array($token, self::$yyExpectedTokens[$nextstate], true)) { $this->yyidx = $yyidx; $this->yystack = $stack; return array_unique($expected); } } if ($nextstate < self::YYNSTATE) { // we need to shift a non-terminal $this->yyidx++; $x = new TPC_yyStackEntry; $x->stateno = $nextstate; $x->major = self::$yyRuleInfo[$yyruleno]['lhs']; $this->yystack[$this->yyidx] = $x; continue 2; } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { $this->yyidx = $yyidx; $this->yystack = $stack; // the last token was just ignored, we can't accept // by ignoring input, this is in essence ignoring a // syntax error! return array_unique($expected); } elseif ($nextstate === self::YY_NO_ACTION) { $this->yyidx = $yyidx; $this->yystack = $stack; // input accepted, but not shifted (I guess) return $expected; } else { $yyact = $nextstate; } } while (true); } break; } while (true); $this->yyidx = $yyidx; $this->yystack = $stack; return array_unique($expected); } function yy_is_expected_token($token) { if ($token === 0) { return true; // 0 is not part of this } $state = $this->yystack[$this->yyidx]->stateno; if (in_array($token, self::$yyExpectedTokens[$state], true)) { return true; } $stack = $this->yystack; $yyidx = $this->yyidx; do { $yyact = $this->yy_find_shift_action($token); if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) { // reduce action $done = 0; do { if ($done++ == 100) { $this->yyidx = $yyidx; $this->yystack = $stack; // too much recursion prevents proper detection // so give up return true; } $yyruleno = $yyact - self::YYNSTATE; $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs']; $nextstate = $this->yy_find_reduce_action( $this->yystack[$this->yyidx]->stateno, self::$yyRuleInfo[$yyruleno]['lhs']); if (isset(self::$yyExpectedTokens[$nextstate]) && in_array($token, self::$yyExpectedTokens[$nextstate], true)) { $this->yyidx = $yyidx; $this->yystack = $stack; return true; } if ($nextstate < self::YYNSTATE) { // we need to shift a non-terminal $this->yyidx++; $x = new TPC_yyStackEntry; $x->stateno = $nextstate; $x->major = self::$yyRuleInfo[$yyruleno]['lhs']; $this->yystack[$this->yyidx] = $x; continue 2; } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { $this->yyidx = $yyidx; $this->yystack = $stack; if (!$token) { // end of input: this is valid return true; } // the last token was just ignored, we can't accept // by ignoring input, this is in essence ignoring a // syntax error! return false; } elseif ($nextstate === self::YY_NO_ACTION) { $this->yyidx = $yyidx; $this->yystack = $stack; // input accepted, but not shifted (I guess) return true; } else { $yyact = $nextstate; } } while (true); } break; } while (true); $this->yyidx = $yyidx; $this->yystack = $stack; return true; } function yy_find_shift_action($iLookAhead) { $stateno = $this->yystack[$this->yyidx]->stateno; /* if ($this->yyidx < 0) return self::YY_NO_ACTION; */ if (!isset(self::$yy_shift_ofst[$stateno])) { // no shift actions return self::$yy_default[$stateno]; } $i = self::$yy_shift_ofst[$stateno]; if ($i === self::YY_SHIFT_USE_DFLT) { return self::$yy_default[$stateno]; } if ($iLookAhead == self::YYNOCODE) { return self::YY_NO_ACTION; } $i += $iLookAhead; if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[$i] != $iLookAhead) { if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback) && ($iFallback = self::$yyFallback[$iLookAhead]) != 0) { if (self::$yyTraceFILE) { fwrite(self::$yyTraceFILE, self::$yyTracePrompt . "FALLBACK " . $this->yyTokenName[$iLookAhead] . " => " . $this->yyTokenName[$iFallback] . "\n"); } return $this->yy_find_shift_action($iFallback); } return self::$yy_default[$stateno]; } else { return self::$yy_action[$i]; } } function yy_find_reduce_action($stateno, $iLookAhead) { /* $stateno = $this->yystack[$this->yyidx]->stateno; */ if (!isset(self::$yy_reduce_ofst[$stateno])) { return self::$yy_default[$stateno]; } $i = self::$yy_reduce_ofst[$stateno]; if ($i == self::YY_REDUCE_USE_DFLT) { return self::$yy_default[$stateno]; } if ($iLookAhead == self::YYNOCODE) { return self::YY_NO_ACTION; } $i += $iLookAhead; if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[$i] != $iLookAhead) { return self::$yy_default[$stateno]; } else { return self::$yy_action[$i]; } } function yy_shift($yyNewState, $yyMajor, $yypMinor) { $this->yyidx++; if ($this->yyidx >= self::YYSTACKDEPTH) { $this->yyidx--; if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sStack Overflow!\n", self::$yyTracePrompt); } while ($this->yyidx >= 0) { $this->yy_pop_parser_stack(); } #line 125 "smarty_internal_configfileparser.y" $this->internalError = true; $this->compiler->trigger_config_file_error("Stack overflow in configfile parser"); #line 593 "smarty_internal_configfileparser.php" return; } $yytos = new TPC_yyStackEntry; $yytos->stateno = $yyNewState; $yytos->major = $yyMajor; $yytos->minor = $yypMinor; array_push($this->yystack, $yytos); if (self::$yyTraceFILE && $this->yyidx > 0) { fprintf(self::$yyTraceFILE, "%sShift %d\n", self::$yyTracePrompt, $yyNewState); fprintf(self::$yyTraceFILE, "%sStack:", self::$yyTracePrompt); for($i = 1; $i <= $this->yyidx; $i++) { fprintf(self::$yyTraceFILE, " %s", $this->yyTokenName[$this->yystack[$i]->major]); } fwrite(self::$yyTraceFILE,"\n"); } } static public $yyRuleInfo = array( array( 'lhs' => 20, 'rhs' => 2 ), array( 'lhs' => 21, 'rhs' => 1 ), array( 'lhs' => 22, 'rhs' => 2 ), array( 'lhs' => 22, 'rhs' => 0 ), array( 'lhs' => 24, 'rhs' => 5 ), array( 'lhs' => 24, 'rhs' => 6 ), array( 'lhs' => 23, 'rhs' => 2 ), array( 'lhs' => 23, 'rhs' => 2 ), array( 'lhs' => 23, 'rhs' => 0 ), array( 'lhs' => 26, 'rhs' => 3 ), array( 'lhs' => 27, 'rhs' => 1 ), array( 'lhs' => 27, 'rhs' => 1 ), array( 'lhs' => 27, 'rhs' => 1 ), array( 'lhs' => 27, 'rhs' => 1 ), array( 'lhs' => 27, 'rhs' => 1 ), array( 'lhs' => 27, 'rhs' => 3 ), array( 'lhs' => 27, 'rhs' => 2 ), array( 'lhs' => 27, 'rhs' => 1 ), array( 'lhs' => 27, 'rhs' => 1 ), array( 'lhs' => 25, 'rhs' => 1 ), array( 'lhs' => 25, 'rhs' => 2 ), array( 'lhs' => 25, 'rhs' => 3 ), ); static public $yyReduceMap = array( 0 => 0, 2 => 0, 3 => 0, 19 => 0, 20 => 0, 21 => 0, 1 => 1, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 14 => 14, 15 => 15, 16 => 16, 17 => 17, 18 => 17, ); #line 131 "smarty_internal_configfileparser.y" function yy_r0(){ $this->_retvalue = null; } #line 666 "smarty_internal_configfileparser.php" #line 136 "smarty_internal_configfileparser.y" function yy_r1(){ $this->add_global_vars($this->yystack[$this->yyidx + 0]->minor); $this->_retvalue = null; } #line 671 "smarty_internal_configfileparser.php" #line 149 "smarty_internal_configfileparser.y" function yy_r4(){ $this->add_section_vars($this->yystack[$this->yyidx + -3]->minor, $this->yystack[$this->yyidx + 0]->minor); $this->_retvalue = null; } #line 677 "smarty_internal_configfileparser.php" #line 154 "smarty_internal_configfileparser.y" function yy_r5(){ if ($this->smarty->config_read_hidden) { $this->add_section_vars($this->yystack[$this->yyidx + -3]->minor, $this->yystack[$this->yyidx + 0]->minor); } $this->_retvalue = null; } #line 685 "smarty_internal_configfileparser.php" #line 162 "smarty_internal_configfileparser.y" function yy_r6(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; } #line 690 "smarty_internal_configfileparser.php" #line 166 "smarty_internal_configfileparser.y" function yy_r7(){ $this->_retvalue = array_merge($this->yystack[$this->yyidx + -1]->minor, Array($this->yystack[$this->yyidx + 0]->minor)); } #line 695 "smarty_internal_configfileparser.php" #line 170 "smarty_internal_configfileparser.y" function yy_r8(){ $this->_retvalue = Array(); } #line 700 "smarty_internal_configfileparser.php" #line 176 "smarty_internal_configfileparser.y" function yy_r9(){ $this->_retvalue = Array("key" => $this->yystack[$this->yyidx + -2]->minor, "value" => $this->yystack[$this->yyidx + 0]->minor); } #line 705 "smarty_internal_configfileparser.php" #line 181 "smarty_internal_configfileparser.y" function yy_r10(){ $this->_retvalue = (float) $this->yystack[$this->yyidx + 0]->minor; } #line 710 "smarty_internal_configfileparser.php" #line 185 "smarty_internal_configfileparser.y" function yy_r11(){ $this->_retvalue = (int) $this->yystack[$this->yyidx + 0]->minor; } #line 715 "smarty_internal_configfileparser.php" #line 189 "smarty_internal_configfileparser.y" function yy_r12(){ $this->_retvalue = $this->parse_bool($this->yystack[$this->yyidx + 0]->minor); } #line 720 "smarty_internal_configfileparser.php" #line 193 "smarty_internal_configfileparser.y" function yy_r13(){ $this->_retvalue = self::parse_single_quoted_string($this->yystack[$this->yyidx + 0]->minor); } #line 725 "smarty_internal_configfileparser.php" #line 197 "smarty_internal_configfileparser.y" function yy_r14(){ $this->_retvalue = self::parse_double_quoted_string($this->yystack[$this->yyidx + 0]->minor); } #line 730 "smarty_internal_configfileparser.php" #line 201 "smarty_internal_configfileparser.y" function yy_r15(){ $this->_retvalue = self::parse_tripple_double_quoted_string($this->yystack[$this->yyidx + -1]->minor); } #line 735 "smarty_internal_configfileparser.php" #line 205 "smarty_internal_configfileparser.y" function yy_r16(){ $this->_retvalue = ''; } #line 740 "smarty_internal_configfileparser.php" #line 209 "smarty_internal_configfileparser.y" function yy_r17(){ $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; } #line 745 "smarty_internal_configfileparser.php" private $_retvalue; function yy_reduce($yyruleno) { $yymsp = $this->yystack[$this->yyidx]; if (self::$yyTraceFILE && $yyruleno >= 0 && $yyruleno < count(self::$yyRuleName)) { fprintf(self::$yyTraceFILE, "%sReduce (%d) [%s].\n", self::$yyTracePrompt, $yyruleno, self::$yyRuleName[$yyruleno]); } $this->_retvalue = $yy_lefthand_side = null; if (array_key_exists($yyruleno, self::$yyReduceMap)) { // call the action $this->_retvalue = null; $this->{'yy_r' . self::$yyReduceMap[$yyruleno]}(); $yy_lefthand_side = $this->_retvalue; } $yygoto = self::$yyRuleInfo[$yyruleno]['lhs']; $yysize = self::$yyRuleInfo[$yyruleno]['rhs']; $this->yyidx -= $yysize; for($i = $yysize; $i; $i--) { // pop all of the right-hand side parameters array_pop($this->yystack); } $yyact = $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno, $yygoto); if ($yyact < self::YYNSTATE) { if (!self::$yyTraceFILE && $yysize) { $this->yyidx++; $x = new TPC_yyStackEntry; $x->stateno = $yyact; $x->major = $yygoto; $x->minor = $yy_lefthand_side; $this->yystack[$this->yyidx] = $x; } else { $this->yy_shift($yyact, $yygoto, $yy_lefthand_side); } } elseif ($yyact == self::YYNSTATE + self::YYNRULE + 1) { $this->yy_accept(); } } function yy_parse_failed() { if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sFail!\n", self::$yyTracePrompt); } while ($this->yyidx >= 0) { $this->yy_pop_parser_stack(); } } function yy_syntax_error($yymajor, $TOKEN) { #line 118 "smarty_internal_configfileparser.y" $this->internalError = true; $this->yymajor = $yymajor; $this->compiler->trigger_config_file_error(); #line 808 "smarty_internal_configfileparser.php" } function yy_accept() { if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sAccept!\n", self::$yyTracePrompt); } while ($this->yyidx >= 0) { $stack = $this->yy_pop_parser_stack(); } #line 110 "smarty_internal_configfileparser.y" $this->successful = !$this->internalError; $this->internalError = false; $this->retvalue = $this->_retvalue; //echo $this->retvalue."\n\n"; #line 826 "smarty_internal_configfileparser.php" } function doParse($yymajor, $yytokenvalue) { $yyerrorhit = 0; /* True if yymajor has invoked an error */ if ($this->yyidx === null || $this->yyidx < 0) { $this->yyidx = 0; $this->yyerrcnt = -1; $x = new TPC_yyStackEntry; $x->stateno = 0; $x->major = 0; $this->yystack = array(); array_push($this->yystack, $x); } $yyendofinput = ($yymajor==0); if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sInput %s\n", self::$yyTracePrompt, $this->yyTokenName[$yymajor]); } do { $yyact = $this->yy_find_shift_action($yymajor); if ($yymajor < self::YYERRORSYMBOL && !$this->yy_is_expected_token($yymajor)) { // force a syntax error $yyact = self::YY_ERROR_ACTION; } if ($yyact < self::YYNSTATE) { $this->yy_shift($yyact, $yymajor, $yytokenvalue); $this->yyerrcnt--; if ($yyendofinput && $this->yyidx >= 0) { $yymajor = 0; } else { $yymajor = self::YYNOCODE; } } elseif ($yyact < self::YYNSTATE + self::YYNRULE) { $this->yy_reduce($yyact - self::YYNSTATE); } elseif ($yyact == self::YY_ERROR_ACTION) { if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sSyntax Error!\n", self::$yyTracePrompt); } if (self::YYERRORSYMBOL) { if ($this->yyerrcnt < 0) { $this->yy_syntax_error($yymajor, $yytokenvalue); } $yymx = $this->yystack[$this->yyidx]->major; if ($yymx == self::YYERRORSYMBOL || $yyerrorhit ){ if (self::$yyTraceFILE) { fprintf(self::$yyTraceFILE, "%sDiscard input token %s\n", self::$yyTracePrompt, $this->yyTokenName[$yymajor]); } $this->yy_destructor($yymajor, $yytokenvalue); $yymajor = self::YYNOCODE; } else { while ($this->yyidx >= 0 && $yymx != self::YYERRORSYMBOL && ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE ){ $this->yy_pop_parser_stack(); } if ($this->yyidx < 0 || $yymajor==0) { $this->yy_destructor($yymajor, $yytokenvalue); $this->yy_parse_failed(); $yymajor = self::YYNOCODE; } elseif ($yymx != self::YYERRORSYMBOL) { $u2 = 0; $this->yy_shift($yyact, self::YYERRORSYMBOL, $u2); } } $this->yyerrcnt = 3; $yyerrorhit = 1; } else { if ($this->yyerrcnt <= 0) { $this->yy_syntax_error($yymajor, $yytokenvalue); } $this->yyerrcnt = 3; $this->yy_destructor($yymajor, $yytokenvalue); if ($yyendofinput) { $this->yy_parse_failed(); } $yymajor = self::YYNOCODE; } } else { $this->yy_accept(); $yymajor = self::YYNOCODE; } } while ($yymajor != self::YYNOCODE && $this->yyidx >= 0); } } ?>smarty3-3.1.13/development/dev_settings.php0000644000175000017500000000034211315675047017376 0ustar mikemike smarty3-3.1.13/development/Makefile0000644000175000017500000000034411315675047015631 0ustar mikemikeall: config-compiler template-compiler unit-test config-compiler: cd lexer; php Create_Config_Parser.php template-compiler: cd lexer; php Create_Template_Parser.php unit-test: cd PHPunit; phpunit smartytests.php smarty3-3.1.13/development/Smarty3Doc/0000755000175000017500000000000012141655572016157 5ustar mikemikesmarty3-3.1.13/development/Smarty3Doc/elementindex_Example-application.html0000644000175000017500000000304211634664106025500 0ustar mikemike

[Example-application] element index

Package indexes

All elements
i
i
index.php
index.php in index.php
i
smarty3-3.1.13/development/Smarty3Doc/elementindex.html0000644000175000017500000204705411637420324021534 0ustar mikemike

Full index

Package indexes


a b c d e f g h i l m n o p r s t u v w y _
a
$allowed_modifiers
This is an array of allowed modifier plugins.
$allowed_tags
Smarty_Security::$allowed_tags in smarty_security.php
This is an array of allowed tags.
$allow_constants
Smarty_Security::$allow_constants in smarty_security.php
+ flag if constants can be accessed from template
$allow_php_templates
Smarty::$allow_php_templates in Smarty.class.php
controls if the php template file resource is allowed
$allow_relative_path
Smarty_Internal_Template::$allow_relative_path in smarty_internal_template.php
internal flag to allow relative path in child template blocks
$allow_super_globals
+ flag if super globals can be accessed from template
$autoload_filters
Smarty::$autoload_filters in Smarty.class.php
autoload filter
$auto_literal
Smarty::$auto_literal in Smarty.class.php
auto literal on delimiters with whitspace
acquireLock
Smarty_CacheResource::acquireLock() in smarty_cacheresource.php
acquireLock
Smarty_Internal_CacheResource_File::acquireLock() in smarty_internal_cacheresource_file.php
Lock cache for this template
acquireLock
Smarty_CacheResource_KeyValueStore::acquireLock() in smarty_cacheresource_keyvaluestore.php
Lock cache for this template
addAutoloadFilters
Smarty::addAutoloadFilters() in Smarty.class.php
Add autoload filters
addConfigDir
Smarty::addConfigDir() in Smarty.class.php
Add config directory(s)
addDefaultModifiers
Smarty::addDefaultModifiers() in Smarty.class.php
Add default modifiers
addMetaTimestamp
Smarty_CacheResource_KeyValueStore::addMetaTimestamp() in smarty_cacheresource_keyvaluestore.php
Add current microtime to the beginning of $cache_content
addPluginsDir
Smarty::addPluginsDir() in Smarty.class.php
Adds directory of plugin files
addTemplateDir
Smarty::addTemplateDir() in Smarty.class.php
Add template directory(s)
append
Smarty_Internal_Data::append() in smarty_internal_data.php
appends values to template variables
appendByRef
Smarty_Internal_Data::appendByRef() in smarty_internal_data.php
appends values to template variables by reference
append_by_ref
SmartyBC::append_by_ref() in SmartyBC.class.php
wrapper for append_by_ref
assign
Smarty_Internal_Data::assign() in smarty_internal_data.php
assigns a Smarty variable
assignByRef
Smarty_Internal_Data::assignByRef() in smarty_internal_data.php
assigns values to template variables by reference
assignGlobal
Smarty_Internal_Data::assignGlobal() in smarty_internal_data.php
assigns a global Smarty variable
assign_by_ref
SmartyBC::assign_by_ref() in SmartyBC.class.php
wrapper for assign_by_ref
b
$block_data
Smarty_Internal_Template::$block_data in smarty_internal_template.php
blocks for template inheritance
buildFilepath
Smarty_Resource::buildFilepath() in smarty_resource.php
build template filepath by traversing the template_dir array
block.textformat.php
block.textformat.php in block.textformat.php
c
$cache_dir
Smarty::$cache_dir in Smarty.class.php
cache directory
$cache_id
Smarty_Template_Cached::$cache_id in smarty_cacheresource.php
Template Cache Id (Smarty_Internal_Template::$cache_id)
$cache_id
Smarty::$cache_id in Smarty.class.php
Set this if you want different sets of cache files for the same templates.
$cache_id
Smarty_Internal_Template::$cache_id in smarty_internal_template.php
cache_id
$cache_lifetime
Smarty::$cache_lifetime in Smarty.class.php
cache lifetime in seconds
$cache_lifetime
Smarty_Internal_Template::$cache_lifetime in smarty_internal_template.php
cache lifetime in seconds
$cache_locking
Smarty::$cache_locking in Smarty.class.php
Controls whether cache resources should emply locking mechanism
$cache_modified_check
Smarty::$cache_modified_check in Smarty.class.php
check If-Modified-Since headers
$caching
Smarty_Internal_Template::$caching in smarty_internal_template.php
caching enabled
$caching
Smarty::$caching in Smarty.class.php
caching enabled
$caching_type
Smarty::$caching_type in Smarty.class.php
caching type
$compileds
Smarty_Resource::$compileds in smarty_resource.php
cache for Smarty_Template_Compiled instances
$compiler_class
Name of the Class to compile this resource's contents with
$compiler_class
Smarty_Resource::$compiler_class in smarty_resource.php
Name of the Class to compile this resource's contents with
$compile_check
Smarty::$compile_check in Smarty.class.php
check template for modifications?
$compile_dir
Smarty::$compile_dir in Smarty.class.php
compile directory
$compile_id
Smarty_Internal_Template::$compile_id in smarty_internal_template.php
$compile_id
$compile_id
Smarty_Template_Cached::$compile_id in smarty_cacheresource.php
Template Compile Id (Smarty_Internal_Template::$compile_id)
$compile_id
Smarty::$compile_id in Smarty.class.php
Set this if you want different sets of compiled files for the same templates.
$compile_locking
Smarty::$compile_locking in Smarty.class.php
locking concurrent compiles
$components
The Components an extended template is made of
$config
Smarty_Internal_Config_File_Compiler::$config in smarty_internal_config_file_compiler.php
Smarty object
$config_booleanize
Smarty::$config_booleanize in Smarty.class.php
Controls whether config values of on/true/yes and off/false/no get converted to boolean.
$config_data
Smarty_Internal_Config_File_Compiler::$config_data in smarty_internal_config_file_compiler.php
Compiled config data sections and variables
$config_dir
Smarty::$config_dir in Smarty.class.php
config directory
$config_overwrite
Smarty::$config_overwrite in Smarty.class.php
Controls whether variables with the same name overwrite each other.
$config_read_hidden
Smarty::$config_read_hidden in Smarty.class.php
Controls whether hidden config sections/vars are read from the file.
$config_vars
Smarty_Internal_Data::$config_vars in smarty_internal_data.php
configuration settings
$content
Smarty_Template_Cached::$content in smarty_cacheresource.php
Source Content
$contents
Smarty_CacheResource_KeyValueStore::$contents in smarty_cacheresource_keyvaluestore.php
cache for contents
$counter
Smarty_Internal_Configfilelexer::$counter in smarty_internal_configfilelexer.php
$counter
Smarty_Internal_Templatelexer::$counter in smarty_internal_templatelexer.php
CACHING_LIFETIME_CURRENT
constant definitions
CACHING_LIFETIME_SAVED
Smarty::CACHING_LIFETIME_SAVED in Smarty.class.php
constant definitions
CACHING_NOCACHE_CODE
Smarty_Internal_Compile_Include::CACHING_NOCACHE_CODE in smarty_internal_compile_include.php
caching mode to create nocache code but no cache file
CACHING_OFF
Smarty::CACHING_OFF in Smarty.class.php
define caching modes
call
Smarty_Internal_Function_Call_Handler::call() in smarty_internal_function_call_handler.php
This function handles calls to template functions defined by {function} It does create a PHP function at the first call
callTagCompiler
Smarty_Internal_TemplateCompilerBase::callTagCompiler() in smarty_internal_templatecompilerbase.php
lazy loads internal compile plugin for tag and calls the compile methode
clear
Smarty_Internal_CacheResource_File::clear() in smarty_internal_cacheresource_file.php
Empty cache for a specific template
clear
Smarty_CacheResource_KeyValueStore::clear() in smarty_cacheresource_keyvaluestore.php
Empty cache for a specific template
clear
Smarty_CacheResource::clear() in smarty_cacheresource.php
Empty cache for a specific template
clear
Smarty_CacheResource_Custom::clear() in smarty_cacheresource_custom.php
Empty cache for a specific template
clearAll
Smarty_CacheResource_KeyValueStore::clearAll() in smarty_cacheresource_keyvaluestore.php
Empty cache
clearAll
Smarty_Internal_CacheResource_File::clearAll() in smarty_internal_cacheresource_file.php
Empty cache
clearAll
Smarty_CacheResource::clearAll() in smarty_cacheresource.php
Empty cache
clearAll
Smarty_CacheResource_Custom::clearAll() in smarty_cacheresource_custom.php
Empty cache
clearAllAssign
Smarty_Internal_Data::clearAllAssign() in smarty_internal_data.php
clear all the assigned template variables.
clearAllCache
Smarty::clearAllCache() in Smarty.class.php
Empty cache folder
clearAssign
Smarty_Internal_Data::clearAssign() in smarty_internal_data.php
clear the given assigned template variable.
clearCache
Smarty::clearCache() in Smarty.class.php
Empty cache for a specific template
clearCompiledTemplate
Delete compiled template file
clearCompiledTemplate
Delete compiled template file
clearConfig
Smarty_Internal_Data::clearConfig() in smarty_internal_data.php
Deassigns a single or all config variables
clear_all_assign
SmartyBC::clear_all_assign() in SmartyBC.class.php
clear all the assigned template variables.
clear_all_cache
SmartyBC::clear_all_cache() in SmartyBC.class.php
clear the entire contents of cache (all templates)
clear_assign
SmartyBC::clear_assign() in SmartyBC.class.php
clear the given assigned template variable.
clear_cache
SmartyBC::clear_cache() in SmartyBC.class.php
clear cached content for the given template and cache id
clear_compiled_tpl
SmartyBC::clear_compiled_tpl() in SmartyBC.class.php
clears compiled version of specified template resource, or all compiled template files if one is not specified.
clear_config
SmartyBC::clear_config() in SmartyBC.class.php
clear configuration values
closeTag
Smarty_Internal_CompileBase::closeTag() in smarty_internal_compilebase.php
Pop closing tag
COMMENT
Smarty_Internal_Configfilelexer::COMMENT in smarty_internal_configfilelexer.php
compile
Smarty_Internal_Compile_Private_Object_Function::compile() in smarty_internal_compile_private_object_function.php
Compiles code for the execution of function plugin
compile
Smarty_Internal_Compile_Private_Print_Expression::compile() in smarty_internal_compile_private_print_expression.php
Compiles code for gererting output from any expression
compile
Smarty_Internal_Compile_Private_Registered_Block::compile() in smarty_internal_compile_private_registered_block.php
Compiles code for the execution of a block function
compile
Smarty_Internal_Compile_Private_Object_Block_Function::compile() in smarty_internal_compile_private_object_block_function.php
Compiles code for the execution of block plugin
compile
Smarty_Internal_Compile_Nocache::compile() in smarty_internal_compile_nocache.php
Compiles code for the {nocache} tag
compile
Smarty_Internal_Compile_Nocacheclose::compile() in smarty_internal_compile_nocache.php
Compiles code for the {/nocache} tag
compile
Smarty_Internal_Compile_Private_Block_Plugin::compile() in smarty_internal_compile_private_block_plugin.php
Compiles code for the execution of block plugin
compile
Smarty_Internal_Compile_Private_Function_Plugin::compile() in smarty_internal_compile_private_function_plugin.php
Compiles code for the execution of function plugin
compile
Smarty_Internal_Compile_Private_Modifier::compile() in smarty_internal_compile_private_modifier.php
Compiles code for modifier execution
compile
Smarty_Internal_Compile_Private_Registered_Function::compile() in smarty_internal_compile_private_registered_function.php
Compiles code for the execution of a registered function
compile
Smarty_Internal_Compile_Private_Special_Variable::compile() in smarty_internal_compile_private_special_variable.php
Compiles code for the speical $smarty variables
compile
Smarty_Internal_Compile_While::compile() in smarty_internal_compile_while.php
Compiles code for the {while} tag
compile
Smarty_Internal_Compile_Whileclose::compile() in smarty_internal_compile_while.php
Compiles code for the {/while} tag
compile
Smarty_Internal_Nocache_Insert::compile() in smarty_internal_nocache_insert.php
Compiles code for the {insert} tag into cache file
compile
Smarty_Internal_Compile_Setfilterclose::compile() in smarty_internal_compile_setfilter.php
Compiles code for the {/setfilter} tag
compile
Smarty_Internal_Compile_Setfilter::compile() in smarty_internal_compile_setfilter.php
Compiles code for setfilter tag
compile
Smarty_Internal_Compile_Section::compile() in smarty_internal_compile_section.php
Compiles code for the {section} tag
compile
Smarty_Internal_Compile_Sectionclose::compile() in smarty_internal_compile_section.php
Compiles code for the {/section} tag
compile
Smarty_Internal_Compile_Sectionelse::compile() in smarty_internal_compile_section.php
Compiles code for the {sectionelse} tag
compile
Smarty_Internal_Compile_Rdelim::compile() in smarty_internal_compile_rdelim.php
Compiles code for the {rdelim} tag
compile
Smarty_Internal_Compile_Forelse::compile() in smarty_internal_compile_for.php
Compiles code for the {forelse} tag
compile
Smarty_Internal_Compile_Config_Load::compile() in smarty_internal_compile_config_load.php
Compiles code for the {config_load} tag
compile
Smarty_Internal_Compile_CaptureClose::compile() in smarty_internal_compile_capture.php
Compiles code for the {/capture} tag
compile
Smarty_Internal_Compile_Continue::compile() in smarty_internal_compile_continue.php
Compiles code for the {continue} tag
compile
Smarty_Internal_Compile_Debug::compile() in smarty_internal_compile_debug.php
Compiles code for the {debug} tag
compile
Smarty_Internal_Compile_Extends::compile() in smarty_internal_compile_extends.php
Compiles code for the {extends} tag
compile
Smarty_Internal_Compile_Eval::compile() in smarty_internal_compile_eval.php
Compiles code for the {eval} tag
compile
Smarty_Internal_Compile_Capture::compile() in smarty_internal_compile_capture.php
Compiles code for the {capture} tag
compile
Smarty_Internal_Compile_Call::compile() in smarty_internal_compile_call.php
Compiles the calls of user defined tags defined by {function}
compile
Smarty_Internal_Compile_Assign::compile() in smarty_internal_compile_assign.php
Compiles code for the {assign} tag
compile
Smarty_Internal_Compile_Append::compile() in smarty_internal_compile_append.php
Compiles code for the {append} tag
compile
Smarty_Internal_Compile_Block::compile() in smarty_internal_compile_block.php
Compiles code for the {block} tag
compile
Smarty_Internal_Compile_Blockclose::compile() in smarty_internal_compile_block.php
Compiles code for the {/block} tag
compile
Smarty_Internal_Compile_Ldelim::compile() in smarty_internal_compile_ldelim.php
Compiles code for the {ldelim} tag
compile
Smarty_Internal_Compile_For::compile() in smarty_internal_compile_for.php
Compiles code for the {for} tag
compile
Smarty_Internal_Compile_Break::compile() in smarty_internal_compile_break.php
Compiles code for the {break} tag
compile
Smarty_Internal_Compile_Ifclose::compile() in smarty_internal_compile_if.php
Compiles code for the {/if} tag
compile
Smarty_Internal_Compile_If::compile() in smarty_internal_compile_if.php
Compiles code for the {if} tag
compile
Smarty_Internal_Compile_Include::compile() in smarty_internal_compile_include.php
Compiles code for the {include} tag
compile
Smarty_Internal_Compile_Include_Php::compile() in smarty_internal_compile_include_php.php
Compiles code for the {include_php} tag
compile
Smarty_Internal_Compile_Forclose::compile() in smarty_internal_compile_for.php
Compiles code for the {/for} tag
compile
Smarty_Internal_Compile_Insert::compile() in smarty_internal_compile_insert.php
Compiles code for the {insert} tag
compile
Smarty_Internal_Compile_Else::compile() in smarty_internal_compile_if.php
Compiles code for the {else} tag
compile
Smarty_Internal_Compile_Elseif::compile() in smarty_internal_compile_if.php
Compiles code for the {elseif} tag
compile
Smarty_Internal_Compile_Foreachclose::compile() in smarty_internal_compile_foreach.php
Compiles code for the {/foreach} tag
compile
Smarty_Internal_Compile_Function::compile() in smarty_internal_compile_function.php
Compiles code for the {function} tag
compile
Smarty_Internal_Compile_Functionclose::compile() in smarty_internal_compile_function.php
Compiles code for the {/function} tag
compile
Smarty_Internal_Compile_Foreach::compile() in smarty_internal_compile_foreach.php
Compiles code for the {foreach} tag
compile
Smarty_Internal_Compile_Foreachelse::compile() in smarty_internal_compile_foreach.php
Compiles code for the {foreachelse} tag
compileAllConfig
Smarty_Internal_Utility::compileAllConfig() in smarty_internal_utility.php
Compile all config files
compileAllConfig
Smarty::compileAllConfig() in Smarty.class.php
Compile all config files
compileAllTemplates
Smarty::compileAllTemplates() in Smarty.class.php
Compile all template files
compileAllTemplates
Smarty_Internal_Utility::compileAllTemplates() in smarty_internal_utility.php
Compile all template files
COMPILECHECK_CACHEMISS
Smarty::COMPILECHECK_CACHEMISS in Smarty.class.php
constant definitions
COMPILECHECK_OFF
Smarty::COMPILECHECK_OFF in Smarty.class.php
define compile check modes
COMPILECHECK_ON
Smarty::COMPILECHECK_ON in Smarty.class.php
constant definitions
compileChildBlock
Smarty_Internal_Compile_Block::compileChildBlock() in smarty_internal_compile_block.php
Compile saved child block source
compileSource
Smarty_Internal_Config_File_Compiler::compileSource() in smarty_internal_config_file_compiler.php
Method to compile a Smarty template.
compileTag
Smarty_Internal_TemplateCompilerBase::compileTag() in smarty_internal_templatecompilerbase.php
Compile Tag
compileTemplate
Smarty_Internal_TemplateCompilerBase::compileTemplate() in smarty_internal_templatecompilerbase.php
Method to compile a Smarty template
compileTemplateSource
Compiles the template
compileVariable
Smarty_Internal_Templateparser::compileVariable() in smarty_internal_templateparser.php
config
Smarty_Resource::config() in smarty_resource.php
initialize Config Source Object for given resource
configLoad
Smarty_Internal_Data::configLoad() in smarty_internal_data.php
load a config file, optionally load just selected sections
config_load
SmartyBC::config_load() in SmartyBC.class.php
load configuration values
createData
Smarty_Internal_TemplateBase::createData() in smarty_internal_templatebase.php
creates a data object
createLocalArrayVariable
Template code runtime function to create a local Smarty variable for array assignments
createTemplate
Smarty::createTemplate() in Smarty.class.php
creates a template object
createTemplateCodeFrame
Create code frame for compiled and cached templates
cacheresource.apc.php
cacheresource.apc.php in cacheresource.apc.php
cacheresource.memcache.php
cacheresource.memcache.php in cacheresource.memcache.php
cacheresource.mysql.php
cacheresource.mysql.php in cacheresource.mysql.php
d
$data
Smarty_Internal_Configfilelexer::$data in smarty_internal_configfilelexer.php
$data
Smarty_Internal_Templatelexer::$data in smarty_internal_templatelexer.php
$db
Smarty_Resource_Mysql::$db in resource.mysql.php
$db
Smarty_CacheResource_Mysql::$db in cacheresource.mysql.php
$db
Smarty_Resource_Mysqls::$db in resource.mysqls.php
$debugging
Smarty::$debugging in Smarty.class.php
debug mode
$debugging_ctrl
Smarty::$debugging_ctrl in Smarty.class.php
This determines if debugging is enable-able from the browser.
$debug_tpl
Smarty::$debug_tpl in Smarty.class.php
Path of debug template.
$default_config_handler_func
default config handler
$default_config_type
Smarty::$default_config_type in Smarty.class.php
config type
$default_handler_plugins
Smarty_Internal_TemplateCompilerBase::$default_handler_plugins in smarty_internal_templatecompilerbase.php
plugins loaded by default plugin handler
$default_modifiers
Smarty::$default_modifiers in Smarty.class.php
default modifier
$default_modifier_list
Smarty_Internal_TemplateCompilerBase::$default_modifier_list in smarty_internal_templatecompilerbase.php
saved preprocessed modifier list
$default_plugin_handler_func
default plugin handler
$default_resource_type
Smarty::$default_resource_type in Smarty.class.php
resource type used if none given
$default_template_handler_func
default template handler
$direct_access_security
Should compiled-templates be prevented from being called directly?
$disabled_modifiers
This is an array of disabled modifier plugins.
$disabled_tags
Smarty_Security::$disabled_tags in smarty_security.php
This is an array of disabled tags.
decodeProperties
Smarty_Internal_Template::decodeProperties() in smarty_internal_template.php
This function is executed automatically when a compiled or cached template file is included
delete
Smarty_CacheResource_Custom::delete() in smarty_cacheresource_custom.php
Delete content from cache
delete
Smarty_CacheResource_Mysql::delete() in cacheresource.mysql.php
Delete content from cache
delete
Smarty_CacheResource_Memcache::delete() in cacheresource.memcache.php
Remove values from cache
delete
Smarty_CacheResource_Apc::delete() in cacheresource.apc.php
Remove values from cache
delete
Smarty_CacheResource_KeyValueStore::delete() in smarty_cacheresource_keyvaluestore.php
Remove values from cache
disableSecurity
Smarty::disableSecurity() in Smarty.class.php
Disable security
display
Smarty_Internal_TemplateBase::display() in smarty_internal_templatebase.php
displays a Smarty template
display_debug
Smarty_Internal_Debug::display_debug() in smarty_internal_debug.php
Opens a window for the Smarty Debugging Consol and display the data
doCompile
Smarty_Internal_SmartyTemplateCompiler::doCompile() in smarty_internal_smartytemplatecompiler.php
Methode to compile a Smarty template
doParse
Smarty_Internal_Templateparser::doParse() in smarty_internal_templateparser.php
doParse
Smarty_Internal_Configfileparser::doParse() in smarty_internal_configfileparser.php
DOUBLEQUOTEDSTRING
Smarty_Internal_Templatelexer::DOUBLEQUOTEDSTRING in smarty_internal_templatelexer.php
DS
DS in Smarty.class.php
define shorthand directory separator constant
e
$error_reporting
Smarty::$error_reporting in Smarty.class.php
When set, smarty uses this value as error_reporting-level.
$error_unassigned
Smarty::$error_unassigned in Smarty.class.php
display error on not assigned variables
$escape_html
Smarty::$escape_html in Smarty.class.php
autoescape variable output
$exists
Smarty_Template_Cached::$exists in smarty_cacheresource.php
Source Existance
$exists
Smarty_Template_Compiled::$exists in smarty_resource.php
Compiled Existance
enableSecurity
Smarty::enableSecurity() in Smarty.class.php
Loads security class and enables security
end_cache
Smarty_Internal_Debug::end_cache() in smarty_internal_debug.php
End logging of cache time
end_compile
Smarty_Internal_Debug::end_compile() in smarty_internal_debug.php
End logging of compile time
end_render
Smarty_Internal_Debug::end_render() in smarty_internal_debug.php
End logging of compile time
Err1
Smarty_Internal_Templateparser::Err1 in smarty_internal_templateparser.php
Err2
Smarty_Internal_Templateparser::Err2 in smarty_internal_templateparser.php
Err3
Smarty_Internal_Templateparser::Err3 in smarty_internal_templateparser.php
escape_end_tag
Smarty_Internal_Templateparser::escape_end_tag() in smarty_internal_templateparser.php
escape_start_tag
Smarty_Internal_Templateparser::escape_start_tag() in smarty_internal_templateparser.php
f
$fetch
Smarty_Resource_Mysql::$fetch in resource.mysql.php
$fetch
Smarty_Resource_Mysqls::$fetch in resource.mysqls.php
$fetch
Smarty_CacheResource_Mysql::$fetch in cacheresource.mysql.php
$fetchTimestamp
$filepath
Compiled Filepath
$filepath
Smarty_Template_Source::$filepath in smarty_resource.php
Source Filepath
$filepath
Smarty_Template_Cached::$filepath in smarty_cacheresource.php
Source Filepath
$forceNocache
Smarty_Internal_TemplateCompilerBase::$forceNocache in smarty_internal_templatecompilerbase.php
force compilation of complete template as nocache
$force_cache
Smarty::$force_cache in Smarty.class.php
force cache file creation
$force_compile
Smarty::$force_compile in Smarty.class.php
force template compiling?
fetch
Smarty_Resource_Mysqls::fetch() in resource.mysqls.php
Fetch a template and its modification time from database
fetch
Smarty_Resource_Mysql::fetch() in resource.mysql.php
Fetch a template and its modification time from database
fetch
Smarty_CacheResource_KeyValueStore::fetch() in smarty_cacheresource_keyvaluestore.php
Fetch and prepare a cache object.
fetch
Smarty_CacheResource_Mysql::fetch() in cacheresource.mysql.php
fetch cached content and its modification time from data source
fetch
Smarty_Resource_Custom::fetch() in smarty_resource_custom.php
fetch template and its modification time from data source
fetch
Smarty_Internal_TemplateBase::fetch() in smarty_internal_templatebase.php
fetches a rendered Smarty template
fetch
Smarty_CacheResource_Custom::fetch() in smarty_cacheresource_custom.php
fetch cached content and its modification time from data source
fetchTimestamp
Smarty_CacheResource_Custom::fetchTimestamp() in smarty_cacheresource_custom.php
Fetch cached content's modification timestamp from data source
fetchTimestamp
Smarty_Resource_Custom::fetchTimestamp() in smarty_resource_custom.php
Fetch template's modification timestamp from data source
fetchTimestamp
Fetch a template's modification time from database
fetchTimestamp
Fetch cached content's modification timestamp from data source
fileExists
Smarty_Resource::fileExists() in smarty_resource.php
test is file exists and save timestamp
FILTER_OUTPUT
Smarty::FILTER_OUTPUT in Smarty.class.php
constant definitions
FILTER_POST
Smarty::FILTER_POST in Smarty.class.php
filter types
FILTER_PRE
Smarty::FILTER_PRE in Smarty.class.php
constant definitions
FILTER_VARIABLE
Smarty::FILTER_VARIABLE in Smarty.class.php
constant definitions
function.counter.php
function.counter.php in function.counter.php
function.cycle.php
function.cycle.php in function.cycle.php
function.fetch.php
function.fetch.php in function.fetch.php
function.html_checkboxes.php
function.html_checkboxes.php in function.html_checkboxes.php
function.html_image.php
function.html_image.php in function.html_image.php
function.html_options.php
function.html_options.php in function.html_options.php
function.html_radios.php
function.html_radios.php in function.html_radios.php
function.html_select_date.php
function.html_select_date.php in function.html_select_date.php
function.html_select_time.php
function.html_select_time.php in function.html_select_time.php
function.html_table.php
function.html_table.php in function.html_table.php
function.mailto.php
function.mailto.php in function.mailto.php
function.math.php
function.math.php in function.math.php
g
$get_used_tags
Smarty::$get_used_tags in Smarty.class.php
Internal flag for getTags()
$global_tpl_vars
Smarty::$global_tpl_vars in Smarty.class.php
assigned global tpl vars
getAttributes
Smarty_Internal_CompileBase::getAttributes() in smarty_internal_compilebase.php
This function checks if the attributes passed are valid
getAutoloadFilters
Smarty::getAutoloadFilters() in Smarty.class.php
Get autoload filters
getBasename
Smarty_Internal_Resource_Eval::getBasename() in smarty_internal_resource_eval.php
Determine basename for compiled filename
getBasename
Smarty_Resource::getBasename() in smarty_resource.php
Determine basename for compiled filename
getBasename
Smarty_Resource_Custom::getBasename() in smarty_resource_custom.php
Determine basename for compiled filename
getBasename
Smarty_Internal_Resource_File::getBasename() in smarty_internal_resource_file.php
Determine basename for compiled filename
getBasename
Smarty_Internal_Resource_Extends::getBasename() in smarty_internal_resource_extends.php
Determine basename for compiled filename
getBasename
Smarty_Internal_Resource_String::getBasename() in smarty_internal_resource_string.php
Determine basename for compiled filename
getBasename
Smarty_Internal_Resource_Registered::getBasename() in smarty_internal_resource_registered.php
Determine basename for compiled filename
getCachedContent
Smarty_CacheResource::getCachedContent() in smarty_cacheresource.php
Return cached content
getCacheDir
Smarty::getCacheDir() in Smarty.class.php
Get cache directory
getCompiled
get a Compiled Object of this source
getCompileDir
Smarty::getCompileDir() in Smarty.class.php
Get compiled directory
getConfigDir
Smarty::getConfigDir() in Smarty.class.php
Get config directory
getConfigVariable
Smarty_Internal_Data::getConfigVariable() in smarty_internal_data.php
gets a config variable
getConfigVars
Smarty_Internal_Data::getConfigVars() in smarty_internal_data.php
Returns a single or all config variables
getContent
Smarty_Internal_Resource_Eval::getContent() in smarty_internal_resource_eval.php
Load template's source from $resource_name into current template object
getContent
Smarty_Internal_Resource_Registered::getContent() in smarty_internal_resource_registered.php
Load template's source by invoking the registered callback into current template object
getContent
Smarty_Internal_Resource_Extends::getContent() in smarty_internal_resource_extends.php
Load template's source from files into current template object
getContent
Smarty_Internal_Resource_File::getContent() in smarty_internal_resource_file.php
Load template's source from file into current template object
getContent
Smarty_Internal_Resource_PHP::getContent() in smarty_internal_resource_php.php
Load template's source from file into current template object
getContent
Smarty_Resource::getContent() in smarty_resource.php
Load template's source into current template object
getContent
Smarty_Internal_Resource_String::getContent() in smarty_internal_resource_string.php
Load template's source from $resource_name into current template object
getContent
Smarty_Resource_Custom::getContent() in smarty_resource_custom.php
Load template's source into current template object
getContent
Smarty_Internal_Resource_Stream::getContent() in smarty_internal_resource_stream.php
Load template's source from stream into current template object
getDebugTemplate
Smarty::getDebugTemplate() in Smarty.class.php
return name of debugging template
getDefaultModifiers
Smarty::getDefaultModifiers() in Smarty.class.php
Get default modifiers
getGlobal
Smarty::getGlobal() in Smarty.class.php
Returns a single or all global variables
getIncludePath
Smarty_Internal_Get_Include_Path::getIncludePath() in smarty_internal_get_include_path.php
Return full file path from PHP include_path
getLatestInvalidationTimestamp
Determine the latest timestamp known to the invalidation chain
getMetaTimestamp
Smarty_CacheResource_KeyValueStore::getMetaTimestamp() in smarty_cacheresource_keyvaluestore.php
Extract the timestamp the $content was cached
getPlugin
Smarty_Internal_TemplateCompilerBase::getPlugin() in smarty_internal_templatecompilerbase.php
Check for plugins and return function name
getPluginFromDefaultHandler
Check for plugins by default plugin handler
getPluginsDir
Smarty::getPluginsDir() in Smarty.class.php
Get plugin directories
getRegisteredObject
Smarty_Internal_TemplateBase::getRegisteredObject() in smarty_internal_templatebase.php
return a reference to a registered object
getScope
Smarty_Internal_Template::getScope() in smarty_internal_template.php
Template code runtime function to get pointer to template variable array of requested scope
getScopePointer
Smarty_Internal_Template::getScopePointer() in smarty_internal_template.php
Get parent or root of template parent chain
getStreamVariable
Smarty_Internal_Data::getStreamVariable() in smarty_internal_data.php
gets a stream variable
getSubTemplate
Smarty_Internal_Template::getSubTemplate() in smarty_internal_template.php
Template code runtime function to get subtemplate content
getTags
Smarty_Internal_Utility::getTags() in smarty_internal_utility.php
Return array of tag/attributes of all tags used by an template
getTags
Smarty::getTags() in Smarty.class.php
Return array of tag/attributes of all tags used by an template
getTemplateDir
Smarty::getTemplateDir() in Smarty.class.php
Get template directories
getTemplateTimestamp
Smarty_Internal_Resource_Registered::getTemplateTimestamp() in smarty_internal_resource_registered.php
Get timestamp (epoch) the template source was modified
getTemplateUid
Smarty_CacheResource_KeyValueStore::getTemplateUid() in smarty_cacheresource_keyvaluestore.php
Get template's unique ID
getTemplateVars
Smarty_Internal_Data::getTemplateVars() in smarty_internal_data.php
Returns a single or all template variables
getVariable
Smarty_Internal_Data::getVariable() in smarty_internal_data.php
gets the object of a Smarty variable
get_config_vars
SmartyBC::get_config_vars() in SmartyBC.class.php
Returns an array containing config variables
get_debug_vars
Smarty_Internal_Debug::get_debug_vars() in smarty_internal_debug.php
Recursively gets variables from all template/data scopes
get_registered_object
SmartyBC::get_registered_object() in SmartyBC.class.php
return a reference to a registered object
get_template_vars
SmartyBC::get_template_vars() in SmartyBC.class.php
Returns an array containing template variables
h
$handler
Smarty_Template_Source::$handler in smarty_resource.php
Resource Handler
$handler
Smarty_Template_Cached::$handler in smarty_cacheresource.php
CacheResource Handler
$has_nocache_code
Smarty_Internal_Template::$has_nocache_code in smarty_internal_template.php
flag if template does contain nocache code sections
hasLock
Smarty_CacheResource_KeyValueStore::hasLock() in smarty_cacheresource_keyvaluestore.php
Check is cache is locked for this template
hasLock
Smarty_CacheResource::hasLock() in smarty_cacheresource.php
hasLock
Smarty_Internal_CacheResource_File::hasLock() in smarty_internal_cacheresource_file.php
Check is cache is locked for this template
i
$inheritance
Smarty_Internal_TemplateCompilerBase::$inheritance in smarty_internal_templatecompilerbase.php
flag when compiling {block}
$isCompiled
Template was compiled
$is_locked
Smarty_Template_Cached::$is_locked in smarty_cacheresource.php
flag that cache is locked by this instance
index.php
index.php in index.php
instance
Smarty_Internal_Configfileparser::instance() in smarty_internal_configfileparser.php
instance
Smarty_Internal_Configfilelexer::instance() in smarty_internal_configfilelexer.php
invalidate
Smarty_CacheResource_KeyValueStore::invalidate() in smarty_cacheresource_keyvaluestore.php
Invalidate CacheID
invalidLoadedCache
Smarty_CacheResource::invalidLoadedCache() in smarty_cacheresource.php
Invalid Loaded Cache Files
isCached
Smarty_Internal_TemplateBase::isCached() in smarty_internal_templatebase.php
test if cache is valid
isTrustedModifier
Check if modifier plugin is trusted.
isTrustedPHPDir
Smarty_Security::isTrustedPHPDir() in smarty_security.php
Check if directory of file resource is trusted.
isTrustedPhpFunction
Check if PHP function is trusted.
isTrustedPhpModifier
Check if PHP modifier is trusted.
isTrustedResourceDir
Check if directory of file resource is trusted.
isTrustedStaticClass
Check if static class is trusted.
isTrustedStream
Smarty_Security::isTrustedStream() in smarty_security.php
Check if stream is trusted.
isTrustedTag
Smarty_Security::isTrustedTag() in smarty_security.php
Check if tag is trusted.
is_cached
SmartyBC::is_cached() in SmartyBC.class.php
test to see if valid cache exists for this template
l
$left_delimiter
Smarty::$left_delimiter in Smarty.class.php
template left-delimiter
$lex
Smarty_Internal_Config_File_Compiler::$lex in smarty_internal_config_file_compiler.php
Lexer object
$lex
Smarty_Internal_SmartyTemplateCompiler::$lex in smarty_internal_smartytemplatecompiler.php
Lexer object
$lexer_class
Smarty_Internal_SmartyTemplateCompiler::$lexer_class in smarty_internal_smartytemplatecompiler.php
Lexer class name
$line
Smarty_Internal_Templatelexer::$line in smarty_internal_templatelexer.php
$line
Smarty_Internal_Configfilelexer::$line in smarty_internal_configfilelexer.php
$loaded
Smarty_Template_Compiled::$loaded in smarty_resource.php
Compiled Content Loaded
$local_var
Smarty_Internal_SmartyTemplateCompiler::$local_var in smarty_internal_smartytemplatecompiler.php
array of vars which can be compiled in local scope
$locking_timeout
Smarty::$locking_timeout in Smarty.class.php
seconds to wait for acquiring a lock before ignoring the write lock
$lock_id
Smarty_Template_Cached::$lock_id in smarty_cacheresource.php
Id for cache locking
listInvalidationKeys
Smarty_CacheResource_KeyValueStore::listInvalidationKeys() in smarty_cacheresource_keyvaluestore.php
Translate a CacheID into the list of applicable InvalidationKeys.
LITERAL
Smarty_Internal_Templatelexer::LITERAL in smarty_internal_templatelexer.php
load
Smarty_Resource::load() in smarty_resource.php
Load Resource Handler
load
Smarty_CacheResource::load() in smarty_cacheresource.php
Load Cache Resource Handler
loadFilter
Smarty_Internal_TemplateBase::loadFilter() in smarty_internal_templatebase.php
load a filter of specified type and name
loadPlugin
Smarty::loadPlugin() in Smarty.class.php
Takes unknown classes and loads plugin files for them class name format: Smarty_PluginType_PluginName plugin filename format: plugintype.pluginname.php
load_filter
SmartyBC::load_filter() in SmartyBC.class.php
load a filter of specified type and name
locked
Smarty_CacheResource::locked() in smarty_cacheresource.php
m
$major
TPC_yyStackEntry::$major in smarty_internal_configfileparser.php
$major
TP_yyStackEntry::$major in smarty_internal_templateparser.php
$memcache
Smarty_CacheResource_Memcache::$memcache in cacheresource.memcache.php
memcache instance
$merged_templates
Smarty_Internal_TemplateCompilerBase::$merged_templates in smarty_internal_templatecompilerbase.php
merged templates
$merged_templates_func
Smarty::$merged_templates_func in Smarty.class.php
Saved parameter of merged templates during compilation
$merge_compiled_includes
merge compiled includes
$metadata
TP_yyToken::$metadata in smarty_internal_templateparser.php
$metadata
TPC_yyToken::$metadata in smarty_internal_configfileparser.php
$minor
TP_yyStackEntry::$minor in smarty_internal_templateparser.php
$minor
TPC_yyStackEntry::$minor in smarty_internal_configfileparser.php
$modifier_plugins
Smarty_Internal_TemplateCompilerBase::$modifier_plugins in smarty_internal_templatecompilerbase.php
flags for used modifier plugins
$mtime
Smarty_Resource_Mysql::$mtime in resource.mysql.php
$mustCompile
Smarty_Internal_Template::$mustCompile in smarty_internal_template.php
flag if compiled template is invalid and must be (re)compiled
modifier.capitalize.php
modifier.capitalize.php in modifier.capitalize.php
modifier.date_format.php
modifier.date_format.php in modifier.date_format.php
modifier.debug_print_var.php
modifier.debug_print_var.php in modifier.debug_print_var.php
modifier.escape.php
modifier.escape.php in modifier.escape.php
modifier.regex_replace.php
modifier.regex_replace.php in modifier.regex_replace.php
modifier.replace.php
modifier.replace.php in modifier.replace.php
modifier.spacify.php
modifier.spacify.php in modifier.spacify.php
modifier.truncate.php
modifier.truncate.php in modifier.truncate.php
modifiercompiler.cat.php
modifiercompiler.cat.php in modifiercompiler.cat.php
modifiercompiler.count_characters.php
modifiercompiler.count_characters.php in modifiercompiler.count_characters.php
modifiercompiler.count_paragraphs.php
modifiercompiler.count_paragraphs.php in modifiercompiler.count_paragraphs.php
modifiercompiler.count_sentences.php
modifiercompiler.count_sentences.php in modifiercompiler.count_sentences.php
modifiercompiler.count_words.php
modifiercompiler.count_words.php in modifiercompiler.count_words.php
modifiercompiler.default.php
modifiercompiler.default.php in modifiercompiler.default.php
modifiercompiler.escape.php
modifiercompiler.escape.php in modifiercompiler.escape.php
modifiercompiler.from_charset.php
modifiercompiler.from_charset.php in modifiercompiler.from_charset.php
modifiercompiler.indent.php
modifiercompiler.indent.php in modifiercompiler.indent.php
modifiercompiler.lower.php
modifiercompiler.lower.php in modifiercompiler.lower.php
modifiercompiler.noprint.php
modifiercompiler.noprint.php in modifiercompiler.noprint.php
modifiercompiler.string_format.php
modifiercompiler.string_format.php in modifiercompiler.string_format.php
modifiercompiler.strip.php
modifiercompiler.strip.php in modifiercompiler.strip.php
modifiercompiler.strip_tags.php
modifiercompiler.strip_tags.php in modifiercompiler.strip_tags.php
modifiercompiler.to_charset.php
modifiercompiler.to_charset.php in modifiercompiler.to_charset.php
modifiercompiler.unescape.php
modifiercompiler.unescape.php in modifiercompiler.unescape.php
modifiercompiler.upper.php
modifiercompiler.upper.php in modifiercompiler.upper.php
modifiercompiler.wordwrap.php
modifiercompiler.wordwrap.php in modifiercompiler.wordwrap.php
mustCompile
Smarty_Internal_Template::mustCompile() in smarty_internal_template.php
Returns if the current template must be compiled by the Smarty compiler
muteExpectedErrors
Smarty::muteExpectedErrors() in Smarty.class.php
Enable error handler to mute expected messages
mutingErrorHandler
Smarty::mutingErrorHandler() in Smarty.class.php
Error Handler to mute expected messages
n
$name
Smarty_Template_Source::$name in smarty_resource.php
Resource Name
$nocache
Smarty_Variable::$nocache in smarty_internal_data.php
if true any output of this variable will be not cached
$node
Smarty_Internal_Configfilelexer::$node in smarty_internal_configfilelexer.php
$node
Smarty_Internal_Templatelexer::$node in smarty_internal_templatelexer.php
NAKED_STRING_VALUE
Smarty_Internal_Configfilelexer::NAKED_STRING_VALUE in smarty_internal_configfilelexer.php
o
$optional_attributes
Smarty_Internal_Compile_Private_Function_Plugin::$optional_attributes in smarty_internal_compile_private_function_plugin.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Private_Block_Plugin::$optional_attributes in smarty_internal_compile_private_block_plugin.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Include_Php::$optional_attributes in smarty_internal_compile_include_php.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Include::$optional_attributes in smarty_internal_compile_include.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Private_Object_Block_Function::$optional_attributes in smarty_internal_compile_private_object_block_function.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Private_Object_Function::$optional_attributes in smarty_internal_compile_private_object_function.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Section::$optional_attributes in smarty_internal_compile_section.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Private_Registered_Function::$optional_attributes in smarty_internal_compile_private_registered_function.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Private_Registered_Block::$optional_attributes in smarty_internal_compile_private_registered_block.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Private_Print_Expression::$optional_attributes in smarty_internal_compile_private_print_expression.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Function::$optional_attributes in smarty_internal_compile_function.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Insert::$optional_attributes in smarty_internal_compile_insert.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Capture::$optional_attributes in smarty_internal_compile_capture.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Call::$optional_attributes in smarty_internal_compile_call.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Break::$optional_attributes in smarty_internal_compile_break.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Config_Load::$optional_attributes in smarty_internal_compile_config_load.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Foreach::$optional_attributes in smarty_internal_compile_foreach.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Eval::$optional_attributes in smarty_internal_compile_eval.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_CompileBase::$optional_attributes in smarty_internal_compilebase.php
Array of names of optional attribute required by tag use array('_any') if there is no restriction of attributes names
$optional_attributes
Smarty_Internal_Compile_Continue::$optional_attributes in smarty_internal_compile_continue.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Block::$optional_attributes in smarty_internal_compile_block.php
Attribute definition: Overwrites base class.
$option_flags
Smarty_Internal_CompileBase::$option_flags in smarty_internal_compilebase.php
Array of names of valid option flags
$option_flags
Smarty_Internal_Compile_Private_Print_Expression::$option_flags in smarty_internal_compile_private_print_expression.php
Attribute definition: Overwrites base class.
$option_flags
Smarty_Internal_Compile_Include::$option_flags in smarty_internal_compile_include.php
Attribute definition: Overwrites base class.
outputfilter.trimwhitespace.php
outputfilter.trimwhitespace.php in outputfilter.trimwhitespace.php
offsetExists
TP_yyToken::offsetExists() in smarty_internal_templateparser.php
offsetExists
TPC_yyToken::offsetExists() in smarty_internal_configfileparser.php
offsetGet
TPC_yyToken::offsetGet() in smarty_internal_configfileparser.php
offsetGet
TP_yyToken::offsetGet() in smarty_internal_templateparser.php
offsetSet
TP_yyToken::offsetSet() in smarty_internal_templateparser.php
offsetSet
TPC_yyToken::offsetSet() in smarty_internal_configfileparser.php
offsetUnset
TPC_yyToken::offsetUnset() in smarty_internal_configfileparser.php
offsetUnset
TP_yyToken::offsetUnset() in smarty_internal_templateparser.php
openTag
Smarty_Internal_CompileBase::openTag() in smarty_internal_compilebase.php
Push opening tag name on stack
p
$parent
Smarty_Internal_Data::$parent in smarty_internal_data.php
parent template (if any)
$parser
Smarty_Internal_SmartyTemplateCompiler::$parser in smarty_internal_smartytemplatecompiler.php
Parser object
$parser
Smarty_Internal_Config_File_Compiler::$parser in smarty_internal_config_file_compiler.php
Parser object
$parser_class
Smarty_Internal_SmartyTemplateCompiler::$parser_class in smarty_internal_smartytemplatecompiler.php
Parser class name
$php_functions
Smarty_Security::$php_functions in smarty_security.php
This is an array of trusted PHP functions.
$php_handling
Smarty::$php_handling in Smarty.class.php
controls handling of PHP-blocks
$php_handling
Smarty_Security::$php_handling in smarty_security.php
This determines how Smarty handles "<?php ... ?>" tags in templates.
$php_modifiers
Smarty_Security::$php_modifiers in smarty_security.php
This is an array of trusted PHP modifers.
$plugins_dir
Smarty::$plugins_dir in Smarty.class.php
plugins directory
$plugin_search_order
Smarty::$plugin_search_order in Smarty.class.php
plugin search order
$processed
Smarty_Template_Cached::$processed in smarty_cacheresource.php
Cache was processed
$properties
Smarty::$properties in Smarty.class.php
internal config properties
$properties
Smarty_Internal_Template::$properties in smarty_internal_template.php
special compiled and cached template properties
PHP_ALLOW
Smarty::PHP_ALLOW in Smarty.class.php
constant definitions
PHP_PASSTHRU
Smarty::PHP_PASSTHRU in Smarty.class.php
modes for handling of "<?php ... ?>" tags in templates.
PHP_QUOTE
Smarty::PHP_QUOTE in Smarty.class.php
constant definitions
PHP_REMOVE
Smarty::PHP_REMOVE in Smarty.class.php
constant definitions
PLUGIN_BLOCK
Smarty::PLUGIN_BLOCK in Smarty.class.php
constant definitions
PLUGIN_COMPILER
Smarty::PLUGIN_COMPILER in Smarty.class.php
constant definitions
PLUGIN_FUNCTION
Smarty::PLUGIN_FUNCTION in Smarty.class.php
plugin types
PLUGIN_MODIFIER
Smarty::PLUGIN_MODIFIER in Smarty.class.php
constant definitions
PLUGIN_MODIFIERCOMPILER
constant definitions
populate
Smarty_Internal_Resource_Stream::populate() in smarty_internal_resource_stream.php
populate Source Object with meta data from Resource
populate
Smarty_Internal_Resource_Registered::populate() in smarty_internal_resource_registered.php
populate Source Object with meta data from Resource
populate
Smarty_Internal_Resource_Eval::populate() in smarty_internal_resource_eval.php
populate Source Object with meta data from Resource
populate
Smarty_Internal_Resource_Extends::populate() in smarty_internal_resource_extends.php
populate Source Object with meta data from Resource
populate
Smarty_Internal_Resource_File::populate() in smarty_internal_resource_file.php
populate Source Object with meta data from Resource
populate
Smarty_Internal_Resource_PHP::populate() in smarty_internal_resource_php.php
populate Source Object with meta data from Resource
populate
Smarty_Internal_Resource_String::populate() in smarty_internal_resource_string.php
populate Source Object with meta data from Resource
populate
Smarty_CacheResource_Custom::populate() in smarty_cacheresource_custom.php
populate Cached Object with meta data from Resource
populate
Smarty_Resource::populate() in smarty_resource.php
populate Source Object with meta data from Resource
populate
Smarty_CacheResource::populate() in smarty_cacheresource.php
populate Cached Object with meta data from Resource
populate
Smarty_Resource_Extendsall::populate() in resource.extendsall.php
populate Source Object with meta data from Resource
populate
Smarty_Resource_Custom::populate() in smarty_resource_custom.php
populate Source Object with meta data from Resource
populate
Smarty_CacheResource_KeyValueStore::populate() in smarty_cacheresource_keyvaluestore.php
populate Cached Object with meta data from Resource
populate
Smarty_Internal_CacheResource_File::populate() in smarty_internal_cacheresource_file.php
populate Cached Object with meta data from Resource
populateCompiledFilepath
populate Compiled Object with compiled filepath
populateCompiledFilepath
populate compiled object with compiled filepath
populateCompiledFilepath
populate Compiled Object with compiled filepath
populateTimestamp
populate Source Object with timestamp and exists from Resource
populateTimestamp
Smarty_Internal_Resource_Registered::populateTimestamp() in smarty_internal_resource_registered.php
populate Source Object with timestamp and exists from Resource
populateTimestamp
Smarty_Internal_CacheResource_File::populateTimestamp() in smarty_internal_cacheresource_file.php
populate Cached Object with timestamp and exists from Resource
populateTimestamp
Smarty_CacheResource_KeyValueStore::populateTimestamp() in smarty_cacheresource_keyvaluestore.php
populate Cached Object with timestamp and exists from Resource
populateTimestamp
Smarty_Internal_Resource_PHP::populateTimestamp() in smarty_internal_resource_php.php
populate Source Object with timestamp and exists from Resource
populateTimestamp
Smarty_CacheResource_Custom::populateTimestamp() in smarty_cacheresource_custom.php
populate Cached Object with timestamp and exists from Resource
populateTimestamp
Smarty_Internal_Resource_Extends::populateTimestamp() in smarty_internal_resource_extends.php
populate Source Object with timestamp and exists from Resource
populateTimestamp
Smarty_Internal_Resource_File::populateTimestamp() in smarty_internal_resource_file.php
populate Source Object with timestamp and exists from Resource
populateTimestamp
Smarty_CacheResource::populateTimestamp() in smarty_cacheresource.php
populate Cached Object with timestamp and exists from Resource
PrintTrace
Smarty_Internal_Templateparser::PrintTrace() in smarty_internal_templateparser.php
PrintTrace
Smarty_Internal_Configfileparser::PrintTrace() in smarty_internal_configfileparser.php
process
Smarty_CacheResource::process() in smarty_cacheresource.php
Read the cached template and process header
process
Smarty_CacheResource_Custom::process() in smarty_cacheresource_custom.php
Read the cached template and process the header
process
Smarty_Internal_CacheResource_File::process() in smarty_internal_cacheresource_file.php
Read the cached template and process its header
process
Smarty_CacheResource_KeyValueStore::process() in smarty_cacheresource_keyvaluestore.php
Read the cached template and process the header
processNocacheCode
Smarty_Internal_TemplateCompilerBase::processNocacheCode() in smarty_internal_templatecompilerbase.php
Inject inline code for nocache template sections
purge
Smarty_CacheResource_Memcache::purge() in cacheresource.memcache.php
Remove *all* values from cache
purge
Smarty_CacheResource_Apc::purge() in cacheresource.apc.php
Remove *all* values from cache
purge
Smarty_CacheResource_KeyValueStore::purge() in smarty_cacheresource_keyvaluestore.php
Remove *all* values from cache
r
$recompiled
Source must be recompiled on every occasion
$registered_cache_resources
registered cache resources
$registered_classes
Smarty::$registered_classes in Smarty.class.php
registered classes
$registered_filters
Smarty::$registered_filters in Smarty.class.php
registered filters
$registered_objects
Smarty::$registered_objects in Smarty.class.php
registered objects
$registered_plugins
Smarty::$registered_plugins in Smarty.class.php
registered plugins
$registered_resources
Smarty::$registered_resources in Smarty.class.php
registered resources
$required_attributes
Smarty_Internal_Compile_Extends::$required_attributes in smarty_internal_compile_extends.php
Attribute definition: Overwrites base class.
$required_attributes
Smarty_Internal_Compile_Foreach::$required_attributes in smarty_internal_compile_foreach.php
Attribute definition: Overwrites base class.
$required_attributes
Smarty_Internal_Compile_Eval::$required_attributes in smarty_internal_compile_eval.php
Attribute definition: Overwrites base class.
$required_attributes
Smarty_Internal_Compile_Config_Load::$required_attributes in smarty_internal_compile_config_load.php
Attribute definition: Overwrites base class.
$required_attributes
Smarty_Internal_Compile_Block::$required_attributes in smarty_internal_compile_block.php
Attribute definition: Overwrites base class.
$required_attributes
Smarty_Internal_Compile_Function::$required_attributes in smarty_internal_compile_function.php
Attribute definition: Overwrites base class.
$required_attributes
Smarty_Internal_Compile_Include::$required_attributes in smarty_internal_compile_include.php
Attribute definition: Overwrites base class.
$required_attributes
Smarty_Internal_Compile_Section::$required_attributes in smarty_internal_compile_section.php
Attribute definition: Overwrites base class.
$required_attributes
Smarty_Internal_CompileBase::$required_attributes in smarty_internal_compilebase.php
Array of names of required attribute required by tag
$required_attributes
Smarty_Internal_Compile_Insert::$required_attributes in smarty_internal_compile_insert.php
Attribute definition: Overwrites base class.
$required_attributes
Smarty_Internal_Compile_Include_Php::$required_attributes in smarty_internal_compile_include_php.php
Attribute definition: Overwrites base class.
$required_attributes
Smarty_Internal_Compile_Private_Function_Plugin::$required_attributes in smarty_internal_compile_private_function_plugin.php
Attribute definition: Overwrites base class.
$required_attributes
Smarty_Internal_Compile_Call::$required_attributes in smarty_internal_compile_call.php
Attribute definition: Overwrites base class.
$required_plugins
Smarty_Internal_Template::$required_plugins in smarty_internal_template.php
required plugins
$resource
Smarty_Template_Source::$resource in smarty_resource.php
Template Resource (Smarty_Internal_Template::$template_resource)
$resources
Smarty_Resource::$resources in smarty_resource.php
cache for Smarty_Resource instances
$resources
Smarty_CacheResource::$resources in smarty_cacheresource.php
cache for Smarty_CacheResource instances
$retvalue
Smarty_Internal_Configfileparser::$retvalue in smarty_internal_configfileparser.php
$retvalue
Smarty_Internal_Templateparser::$retvalue in smarty_internal_templateparser.php
$right_delimiter
Smarty::$right_delimiter in Smarty.class.php
template right-delimiter
resource.extendsall.php
resource.extendsall.php in resource.extendsall.php
resource.mysql.php
resource.mysql.php in resource.mysql.php
resource.mysqls.php
resource.mysqls.php in resource.mysqls.php
read
Smarty_CacheResource_KeyValueStore::read() in smarty_cacheresource_keyvaluestore.php
Read values for a set of keys from cache
read
Smarty_CacheResource_Memcache::read() in cacheresource.memcache.php
Read values for a set of keys from cache
read
Smarty_CacheResource_Apc::read() in cacheresource.apc.php
Read values for a set of keys from cache
registerCacheResource
Smarty_Internal_TemplateBase::registerCacheResource() in smarty_internal_templatebase.php
Registers a cache resource to cache a template's output
registerClass
Smarty_Internal_TemplateBase::registerClass() in smarty_internal_templatebase.php
Registers static classes to be used in templates
registerDefaultConfigHandler
Registers a default template handler
registerDefaultPluginHandler
Registers a default plugin handler
registerDefaultTemplateHandler
Registers a default template handler
registerFilter
Smarty_Internal_TemplateBase::registerFilter() in smarty_internal_templatebase.php
Registers a filter function
registerObject
Smarty_Internal_TemplateBase::registerObject() in smarty_internal_templatebase.php
Registers object to be used in templates
registerPlugin
Smarty_Internal_TemplateBase::registerPlugin() in smarty_internal_templatebase.php
Registers plugin to be used in templates
registerResource
Smarty_Internal_TemplateBase::registerResource() in smarty_internal_templatebase.php
Registers a resource to fetch a template
register_block
SmartyBC::register_block() in SmartyBC.class.php
Registers block function to be used in templates
register_compiler_function
Registers compiler function
register_function
SmartyBC::register_function() in SmartyBC.class.php
Registers custom function to be used in templates
register_modifier
SmartyBC::register_modifier() in SmartyBC.class.php
Registers modifier to be used in templates
register_object
SmartyBC::register_object() in SmartyBC.class.php
Registers object to be used in templates
register_outputfilter
SmartyBC::register_outputfilter() in SmartyBC.class.php
Registers an output filter function to apply to a template output
register_postfilter
SmartyBC::register_postfilter() in SmartyBC.class.php
Registers a postfilter function to apply to a compiled template after compilation
register_prefilter
SmartyBC::register_prefilter() in SmartyBC.class.php
Registers a prefilter function to apply to a template before compiling
register_resource
SmartyBC::register_resource() in SmartyBC.class.php
Registers a resource to fetch a template
releaseLock
Smarty_Internal_CacheResource_File::releaseLock() in smarty_internal_cacheresource_file.php
Unlock cache for this template
releaseLock
Smarty_CacheResource::releaseLock() in smarty_cacheresource.php
releaseLock
Smarty_CacheResource_KeyValueStore::releaseLock() in smarty_cacheresource_keyvaluestore.php
Unlock cache for this template
renderUncompiled
Smarty_Internal_Resource_PHP::renderUncompiled() in smarty_internal_resource_php.php
Render and output the template (without using the compiler)
renderUncompiled
render the uncompiled source
renderUncompiled
Smarty_Resource_Uncompiled::renderUncompiled() in smarty_resource_uncompiled.php
Render and output the template (without using the compiler)
runFilter
Smarty_Internal_Filter_Handler::runFilter() in smarty_internal_filter_handler.php
Run filters over content
s
$save
Smarty_CacheResource_Mysql::$save in cacheresource.mysql.php
$scope
Smarty_Variable::$scope in smarty_internal_data.php
the scope the variable will have (local,parent or root)
$secure_dir
Smarty_Security::$secure_dir in smarty_security.php
This is the list of template directories that are considered secure.
$security_class
Smarty::$security_class in Smarty.class.php
class name
$security_policy
Smarty::$security_policy in Smarty.class.php
implementation of security class
$shorttag_order
Smarty_Internal_Compile_Call::$shorttag_order in smarty_internal_compile_call.php
Attribute definition: Overwrites base class.
$shorttag_order
Smarty_Internal_Compile_Capture::$shorttag_order in smarty_internal_compile_capture.php
Attribute definition: Overwrites base class.
$shorttag_order
Smarty_Internal_CompileBase::$shorttag_order in smarty_internal_compilebase.php
Shorttag attribute order defined by its names
$shorttag_order
Smarty_Internal_Compile_Config_Load::$shorttag_order in smarty_internal_compile_config_load.php
Attribute definition: Overwrites base class.
$shorttag_order
Smarty_Internal_Compile_Block::$shorttag_order in smarty_internal_compile_block.php
Attribute definition: Overwrites base class.
$shorttag_order
Smarty_Internal_Compile_Break::$shorttag_order in smarty_internal_compile_break.php
Attribute definition: Overwrites base class.
$shorttag_order
Smarty_Internal_Compile_Extends::$shorttag_order in smarty_internal_compile_extends.php
Attribute definition: Overwrites base class.
$shorttag_order
Smarty_Internal_Compile_Insert::$shorttag_order in smarty_internal_compile_insert.php
Attribute definition: Overwrites base class.
$shorttag_order
Smarty_Internal_Compile_Section::$shorttag_order in smarty_internal_compile_section.php
Attribute definition: Overwrites base class.
$shorttag_order
Smarty_Internal_Compile_Include_Php::$shorttag_order in smarty_internal_compile_include_php.php
Attribute definition: Overwrites base class.
$shorttag_order
Smarty_Internal_Compile_Include::$shorttag_order in smarty_internal_compile_include.php
Attribute definition: Overwrites base class.
$shorttag_order
Smarty_Internal_Compile_Eval::$shorttag_order in smarty_internal_compile_eval.php
Attribute definition: Overwrites base class.
$shorttag_order
Smarty_Internal_Compile_Function::$shorttag_order in smarty_internal_compile_function.php
Attribute definition: Overwrites base class.
$shorttag_order
Smarty_Internal_Compile_Continue::$shorttag_order in smarty_internal_compile_continue.php
Attribute definition: Overwrites base class.
$shorttag_order
Smarty_Internal_Compile_Foreach::$shorttag_order in smarty_internal_compile_foreach.php
Attribute definition: Overwrites base class.
$short_open_tag
Smarty_Internal_Resource_PHP::$short_open_tag in smarty_internal_resource_php.php
container for short_open_tag directive's value before executing PHP templates
$smarty
Smarty_Internal_Config_File_Compiler::$smarty in smarty_internal_config_file_compiler.php
Smarty object
$smarty
Smarty_Data::$smarty in smarty_internal_data.php
Smarty object
$smarty
Smarty_Internal_SmartyTemplateCompiler::$smarty in smarty_internal_smartytemplatecompiler.php
Smarty object
$smarty
Smarty_Template_Source::$smarty in smarty_resource.php
Smarty instance
$smarty
Smarty::$smarty in Smarty.class.php
self pointer to Smarty object
$smarty
Smarty_Internal_Template::$smarty in smarty_internal_template.php
Global smarty instance
$smarty_debug_id
Smarty::$smarty_debug_id in Smarty.class.php
Name of debugging URL-param.
$smarty_token_names
Smarty_Internal_Configfilelexer::$smarty_token_names in smarty_internal_configfilelexer.php
$smarty_token_names
Smarty_Internal_Templatelexer::$smarty_token_names in smarty_internal_templatelexer.php
$source
Smarty_Template_Compiled::$source in smarty_resource.php
Source Object
$source
Smarty_Template_Cached::$source in smarty_cacheresource.php
Source Object
$sources
Smarty_Resource::$sources in smarty_resource.php
cache for Smarty_Template_Source instances
$start_time
Smarty::$start_time in Smarty.class.php
start time for execution time calculation
$state
Smarty_Internal_Templatelexer::$state in smarty_internal_templatelexer.php
$stateno
TPC_yyStackEntry::$stateno in smarty_internal_configfileparser.php
$stateno
TP_yyStackEntry::$stateno in smarty_internal_templateparser.php
$static_classes
Smarty_Security::$static_classes in smarty_security.php
This is an array of trusted static classes.
$streams
Smarty_Security::$streams in smarty_security.php
This is an array of trusted streams.
$string
TP_yyToken::$string in smarty_internal_templateparser.php
$string
TPC_yyToken::$string in smarty_internal_configfileparser.php
$strip
Smarty_Internal_Templatelexer::$strip in smarty_internal_templatelexer.php
$successful
Smarty_Internal_Templateparser::$successful in smarty_internal_templateparser.php
$successful
Smarty_Internal_Configfileparser::$successful in smarty_internal_configfileparser.php
$suppressHeader
Smarty_Internal_TemplateCompilerBase::$suppressHeader in smarty_internal_templatecompilerbase.php
suppress Smarty header code in compiled template
$suppressMergedTemplates
Smarty_Internal_TemplateCompilerBase::$suppressMergedTemplates in smarty_internal_templatecompilerbase.php
suppress generation of merged template code
$suppressNocacheProcessing
Smarty_Internal_TemplateCompilerBase::$suppressNocacheProcessing in smarty_internal_templatecompilerbase.php
suppress generation of nocache code
$suppressTemplatePropertyHeader
suppress template property header code in compiled template
$sysplugins
Smarty_CacheResource::$sysplugins in smarty_cacheresource.php
resource types provided by the core
$sysplugins
Smarty_Resource::$sysplugins in smarty_resource.php
resource types provided by the core
shared.escape_special_chars.php
shared.escape_special_chars.php in shared.escape_special_chars.php
shared.literal_compiler_param.php
shared.literal_compiler_param.php in shared.literal_compiler_param.php
shared.make_timestamp.php
shared.make_timestamp.php in shared.make_timestamp.php
shared.mb_str_replace.php
shared.mb_str_replace.php in shared.mb_str_replace.php
shared.mb_unicode.php
shared.mb_unicode.php in shared.mb_unicode.php
shared.mb_wordwrap.php
shared.mb_wordwrap.php in shared.mb_wordwrap.php
Smarty.class.php
Smarty.class.php in Smarty.class.php
SmartyBC.class.php
SmartyBC.class.php in SmartyBC.class.php
smarty_cacheresource.php
smarty_cacheresource.php in smarty_cacheresource.php
smarty_cacheresource_custom.php
smarty_cacheresource_custom.php in smarty_cacheresource_custom.php
smarty_cacheresource_keyvaluestore.php
smarty_cacheresource_keyvaluestore.php in smarty_cacheresource_keyvaluestore.php
smarty_config_source.php
smarty_config_source.php in smarty_config_source.php
smarty_internal_cacheresource_file.php
smarty_internal_cacheresource_file.php in smarty_internal_cacheresource_file.php
smarty_internal_compilebase.php
smarty_internal_compilebase.php in smarty_internal_compilebase.php
smarty_internal_compile_append.php
smarty_internal_compile_append.php in smarty_internal_compile_append.php
smarty_internal_compile_assign.php
smarty_internal_compile_assign.php in smarty_internal_compile_assign.php
smarty_internal_compile_block.php
smarty_internal_compile_block.php in smarty_internal_compile_block.php
smarty_internal_compile_break.php
smarty_internal_compile_break.php in smarty_internal_compile_break.php
smarty_internal_compile_call.php
smarty_internal_compile_call.php in smarty_internal_compile_call.php
smarty_internal_compile_capture.php
smarty_internal_compile_capture.php in smarty_internal_compile_capture.php
smarty_internal_compile_config_load.php
smarty_internal_compile_config_load.php in smarty_internal_compile_config_load.php
smarty_internal_compile_continue.php
smarty_internal_compile_continue.php in smarty_internal_compile_continue.php
smarty_internal_compile_debug.php
smarty_internal_compile_debug.php in smarty_internal_compile_debug.php
smarty_internal_compile_eval.php
smarty_internal_compile_eval.php in smarty_internal_compile_eval.php
smarty_internal_compile_extends.php
smarty_internal_compile_extends.php in smarty_internal_compile_extends.php
smarty_internal_compile_for.php
smarty_internal_compile_for.php in smarty_internal_compile_for.php
smarty_internal_compile_foreach.php
smarty_internal_compile_foreach.php in smarty_internal_compile_foreach.php
smarty_internal_compile_function.php
smarty_internal_compile_function.php in smarty_internal_compile_function.php
smarty_internal_compile_if.php
smarty_internal_compile_if.php in smarty_internal_compile_if.php
smarty_internal_compile_include.php
smarty_internal_compile_include.php in smarty_internal_compile_include.php
smarty_internal_compile_include_php.php
smarty_internal_compile_include_php.php in smarty_internal_compile_include_php.php
smarty_internal_compile_insert.php
smarty_internal_compile_insert.php in smarty_internal_compile_insert.php
smarty_internal_compile_ldelim.php
smarty_internal_compile_ldelim.php in smarty_internal_compile_ldelim.php
smarty_internal_compile_nocache.php
smarty_internal_compile_nocache.php in smarty_internal_compile_nocache.php
smarty_internal_compile_private_block_plugin.php
smarty_internal_compile_private_block_plugin.php in smarty_internal_compile_private_block_plugin.php
smarty_internal_compile_private_function_plugin.php
smarty_internal_compile_private_function_plugin.php in smarty_internal_compile_private_function_plugin.php
smarty_internal_compile_private_modifier.php
smarty_internal_compile_private_modifier.php in smarty_internal_compile_private_modifier.php
smarty_internal_compile_private_object_block_function.php
smarty_internal_compile_private_object_block_function.php in smarty_internal_compile_private_object_block_function.php
smarty_internal_compile_private_object_function.php
smarty_internal_compile_private_object_function.php in smarty_internal_compile_private_object_function.php
smarty_internal_compile_private_print_expression.php
smarty_internal_compile_private_print_expression.php in smarty_internal_compile_private_print_expression.php
smarty_internal_compile_private_registered_block.php
smarty_internal_compile_private_registered_block.php in smarty_internal_compile_private_registered_block.php
smarty_internal_compile_private_registered_function.php
smarty_internal_compile_private_registered_function.php in smarty_internal_compile_private_registered_function.php
smarty_internal_compile_private_special_variable.php
smarty_internal_compile_private_special_variable.php in smarty_internal_compile_private_special_variable.php
smarty_internal_compile_rdelim.php
smarty_internal_compile_rdelim.php in smarty_internal_compile_rdelim.php
smarty_internal_compile_section.php
smarty_internal_compile_section.php in smarty_internal_compile_section.php
smarty_internal_compile_setfilter.php
smarty_internal_compile_setfilter.php in smarty_internal_compile_setfilter.php
smarty_internal_compile_while.php
smarty_internal_compile_while.php in smarty_internal_compile_while.php
smarty_internal_config.php
smarty_internal_config.php in smarty_internal_config.php
smarty_internal_configfilelexer.php
smarty_internal_configfilelexer.php in smarty_internal_configfilelexer.php
smarty_internal_configfileparser.php
smarty_internal_configfileparser.php in smarty_internal_configfileparser.php
smarty_internal_config_file_compiler.php
smarty_internal_config_file_compiler.php in smarty_internal_config_file_compiler.php
smarty_internal_data.php
smarty_internal_data.php in smarty_internal_data.php
smarty_internal_debug.php
smarty_internal_debug.php in smarty_internal_debug.php
smarty_internal_filter_handler.php
smarty_internal_filter_handler.php in smarty_internal_filter_handler.php
smarty_internal_function_call_handler.php
smarty_internal_function_call_handler.php in smarty_internal_function_call_handler.php
smarty_internal_get_include_path.php
smarty_internal_get_include_path.php in smarty_internal_get_include_path.php
smarty_internal_nocache_insert.php
smarty_internal_nocache_insert.php in smarty_internal_nocache_insert.php
smarty_internal_parsetree.php
smarty_internal_parsetree.php in smarty_internal_parsetree.php
smarty_internal_resource_eval.php
smarty_internal_resource_eval.php in smarty_internal_resource_eval.php
smarty_internal_resource_extends.php
smarty_internal_resource_extends.php in smarty_internal_resource_extends.php
smarty_internal_resource_file.php
smarty_internal_resource_file.php in smarty_internal_resource_file.php
smarty_internal_resource_php.php
smarty_internal_resource_php.php in smarty_internal_resource_php.php
smarty_internal_resource_registered.php
smarty_internal_resource_registered.php in smarty_internal_resource_registered.php
smarty_internal_resource_stream.php
smarty_internal_resource_stream.php in smarty_internal_resource_stream.php
smarty_internal_resource_string.php
smarty_internal_resource_string.php in smarty_internal_resource_string.php
smarty_internal_smartytemplatecompiler.php
smarty_internal_smartytemplatecompiler.php in smarty_internal_smartytemplatecompiler.php
smarty_internal_template.php
smarty_internal_template.php in smarty_internal_template.php
smarty_internal_templatebase.php
smarty_internal_templatebase.php in smarty_internal_templatebase.php
smarty_internal_templatecompilerbase.php
smarty_internal_templatecompilerbase.php in smarty_internal_templatecompilerbase.php
smarty_internal_templatelexer.php
smarty_internal_templatelexer.php in smarty_internal_templatelexer.php
smarty_internal_templateparser.php
smarty_internal_templateparser.php in smarty_internal_templateparser.php
smarty_internal_utility.php
smarty_internal_utility.php in smarty_internal_utility.php
smarty_internal_write_file.php
smarty_internal_write_file.php in smarty_internal_write_file.php
smarty_resource.php
smarty_resource.php in smarty_resource.php
smarty_resource_custom.php
smarty_resource_custom.php in smarty_resource_custom.php
smarty_resource_recompiled.php
smarty_resource_recompiled.php in smarty_resource_recompiled.php
smarty_resource_uncompiled.php
smarty_resource_uncompiled.php in smarty_resource_uncompiled.php
smarty_security.php
smarty_security.php in smarty_security.php
sanitize
Smarty_CacheResource_KeyValueStore::sanitize() in smarty_cacheresource_keyvaluestore.php
Sanitize CacheID components
save
Smarty_CacheResource_Mysql::save() in cacheresource.mysql.php
Save content to cache
save
Smarty_CacheResource_Custom::save() in smarty_cacheresource_custom.php
Save content to cache
saveBlockData
Smarty_Internal_Compile_Block::saveBlockData() in smarty_internal_compile_block.php
Save or replace child block source by block name during parsing
SCOPE_GLOBAL
Smarty::SCOPE_GLOBAL in Smarty.class.php
constant definitions
SCOPE_LOCAL
Smarty::SCOPE_LOCAL in Smarty.class.php
define variable scopes
SCOPE_PARENT
Smarty::SCOPE_PARENT in Smarty.class.php
constant definitions
SCOPE_ROOT
Smarty::SCOPE_ROOT in Smarty.class.php
constant definitions
SECTION
Smarty_Internal_Configfilelexer::SECTION in smarty_internal_configfilelexer.php
setAutoloadFilters
Smarty::setAutoloadFilters() in Smarty.class.php
Set autoload filters
setCacheDir
Smarty::setCacheDir() in Smarty.class.php
Set cache directory
setCompileDir
Smarty::setCompileDir() in Smarty.class.php
Set compile directory
setConfigDir
Smarty::setConfigDir() in Smarty.class.php
Set config directory
setDebugTemplate
Smarty::setDebugTemplate() in Smarty.class.php
set the debug template
setDefaultModifiers
Smarty::setDefaultModifiers() in Smarty.class.php
Set default modifiers
setPluginsDir
Smarty::setPluginsDir() in Smarty.class.php
Set plugins directory
setTemplateDir
Smarty::setTemplateDir() in Smarty.class.php
Set template directory
setupInlineSubTemplate
Template code runtime function to set up an inline subtemplate
SMARTY
Smarty_Internal_Templatelexer::SMARTY in smarty_internal_templatelexer.php
Smarty
Smarty in Smarty.class.php
This is the main Smarty class
smartyAutoload
smartyAutoload() in Smarty.class.php
Autoloader
SmartyBC
SmartyBC in SmartyBC.class.php
Smarty Backward Compatability Wrapper Class
SmartyCompilerException
SmartyCompilerException in Smarty.class.php
Smarty compiler exception class
SmartyException
SmartyException in Smarty.class.php
Smarty exception class
smarty_block_textformat
smarty_block_textformat() in block.textformat.php
Smarty {textformat}{/textformat} block plugin
Smarty_CacheResource
Smarty_CacheResource in smarty_cacheresource.php
Cache Handler API
Smarty_CacheResource_Apc
Smarty_CacheResource_Apc in cacheresource.apc.php
APC CacheResource
Smarty_CacheResource_Custom
Smarty_CacheResource_Custom in smarty_cacheresource_custom.php
Cache Handler API
Smarty_CacheResource_KeyValueStore
Smarty_CacheResource_KeyValueStore in smarty_cacheresource_keyvaluestore.php
Smarty Cache Handler Base for Key/Value Storage Implementations
Smarty_CacheResource_Memcache
Smarty_CacheResource_Memcache in cacheresource.memcache.php
Memcache CacheResource
Smarty_CacheResource_Mysql
Smarty_CacheResource_Mysql in cacheresource.mysql.php
MySQL CacheResource
Smarty_Config_Source
Smarty_Config_Source in smarty_config_source.php
Smarty Resource Data Object
Smarty_Data
Smarty_Data in smarty_internal_data.php
class for the Smarty data object
SMARTY_DIR
SMARTY_DIR in Smarty.class.php
set SMARTY_DIR to absolute path to Smarty library files.
smarty_function_counter
smarty_function_counter() in function.counter.php
Smarty {counter} function plugin
smarty_function_cycle
smarty_function_cycle() in function.cycle.php
Smarty {cycle} function plugin
smarty_function_escape_special_chars
smarty_function_escape_special_chars() in shared.escape_special_chars.php
escape_special_chars common function
smarty_function_fetch
smarty_function_fetch() in function.fetch.php
Smarty {fetch} plugin
smarty_function_html_checkboxes
smarty_function_html_checkboxes() in function.html_checkboxes.php
Smarty {html_checkboxes} function plugin
smarty_function_html_checkboxes_output
smarty_function_html_checkboxes_output() in function.html_checkboxes.php
smarty_function_html_image
smarty_function_html_image() in function.html_image.php
Smarty {html_image} function plugin
smarty_function_html_options
smarty_function_html_options() in function.html_options.php
Smarty {html_options} function plugin
smarty_function_html_options_optgroup
smarty_function_html_options_optgroup() in function.html_options.php
smarty_function_html_options_optoutput
smarty_function_html_options_optoutput() in function.html_options.php
smarty_function_html_radios
smarty_function_html_radios() in function.html_radios.php
Smarty {html_radios} function plugin
smarty_function_html_radios_output
smarty_function_html_radios_output() in function.html_radios.php
smarty_function_html_select_date
smarty_function_html_select_date() in function.html_select_date.php
Smarty {html_select_date} plugin
smarty_function_html_select_time
smarty_function_html_select_time() in function.html_select_time.php
Smarty {html_select_time} function plugin
smarty_function_html_table
smarty_function_html_table() in function.html_table.php
Smarty {html_table} function plugin
smarty_function_html_table_cycle
smarty_function_html_table_cycle() in function.html_table.php
smarty_function_mailto
smarty_function_mailto() in function.mailto.php
Smarty {mailto} function plugin
smarty_function_math
smarty_function_math() in function.math.php
Smarty {math} function plugin
Smarty_Internal_CacheResource_File
Smarty_Internal_CacheResource_File in smarty_internal_cacheresource_file.php
This class does contain all necessary methods for the HTML cache on file system
Smarty_Internal_CompileBase
Smarty_Internal_CompileBase in smarty_internal_compilebase.php
This class does extend all internal compile plugins
Smarty_Internal_Compile_Append
Smarty_Internal_Compile_Append in smarty_internal_compile_append.php
Smarty Internal Plugin Compile Append Class
Smarty_Internal_Compile_Assign
Smarty_Internal_Compile_Assign in smarty_internal_compile_assign.php
Smarty Internal Plugin Compile Assign Class
Smarty_Internal_Compile_Block
Smarty_Internal_Compile_Block in smarty_internal_compile_block.php
Smarty Internal Plugin Compile Block Class
Smarty_Internal_Compile_Blockclose
Smarty_Internal_Compile_Blockclose in smarty_internal_compile_block.php
Smarty Internal Plugin Compile BlockClose Class
Smarty_Internal_Compile_Break
Smarty_Internal_Compile_Break in smarty_internal_compile_break.php
Smarty Internal Plugin Compile Break Class
Smarty_Internal_Compile_Call
Smarty_Internal_Compile_Call in smarty_internal_compile_call.php
Smarty Internal Plugin Compile Function_Call Class
Smarty_Internal_Compile_Capture
Smarty_Internal_Compile_Capture in smarty_internal_compile_capture.php
Smarty Internal Plugin Compile Capture Class
Smarty_Internal_Compile_CaptureClose
Smarty_Internal_Compile_CaptureClose in smarty_internal_compile_capture.php
Smarty Internal Plugin Compile Captureclose Class
Smarty_Internal_Compile_Config_Load
Smarty_Internal_Compile_Config_Load in smarty_internal_compile_config_load.php
Smarty Internal Plugin Compile Config Load Class
Smarty_Internal_Compile_Continue
Smarty_Internal_Compile_Continue in smarty_internal_compile_continue.php
Smarty Internal Plugin Compile Continue Class
Smarty_Internal_Compile_Debug
Smarty_Internal_Compile_Debug in smarty_internal_compile_debug.php
Smarty Internal Plugin Compile Debug Class
Smarty_Internal_Compile_Else
Smarty_Internal_Compile_Else in smarty_internal_compile_if.php
Smarty Internal Plugin Compile Else Class
Smarty_Internal_Compile_Elseif
Smarty_Internal_Compile_Elseif in smarty_internal_compile_if.php
Smarty Internal Plugin Compile ElseIf Class
Smarty_Internal_Compile_Eval
Smarty_Internal_Compile_Eval in smarty_internal_compile_eval.php
Smarty Internal Plugin Compile Eval Class
Smarty_Internal_Compile_Extends
Smarty_Internal_Compile_Extends in smarty_internal_compile_extends.php
Smarty Internal Plugin Compile extend Class
Smarty_Internal_Compile_For
Smarty_Internal_Compile_For in smarty_internal_compile_for.php
Smarty Internal Plugin Compile For Class
Smarty_Internal_Compile_Forclose
Smarty_Internal_Compile_Forclose in smarty_internal_compile_for.php
Smarty Internal Plugin Compile Forclose Class
Smarty_Internal_Compile_Foreach
Smarty_Internal_Compile_Foreach in smarty_internal_compile_foreach.php
Smarty Internal Plugin Compile Foreach Class
Smarty_Internal_Compile_Foreachclose
Smarty_Internal_Compile_Foreachclose in smarty_internal_compile_foreach.php
Smarty Internal Plugin Compile Foreachclose Class
Smarty_Internal_Compile_Foreachelse
Smarty_Internal_Compile_Foreachelse in smarty_internal_compile_foreach.php
Smarty Internal Plugin Compile Foreachelse Class
Smarty_Internal_Compile_Forelse
Smarty_Internal_Compile_Forelse in smarty_internal_compile_for.php
Smarty Internal Plugin Compile Forelse Class
Smarty_Internal_Compile_Function
Smarty_Internal_Compile_Function in smarty_internal_compile_function.php
Smarty Internal Plugin Compile Function Class
Smarty_Internal_Compile_Functionclose
Smarty_Internal_Compile_Functionclose in smarty_internal_compile_function.php
Smarty Internal Plugin Compile Functionclose Class
Smarty_Internal_Compile_If
Smarty_Internal_Compile_If in smarty_internal_compile_if.php
Smarty Internal Plugin Compile If Class
Smarty_Internal_Compile_Ifclose
Smarty_Internal_Compile_Ifclose in smarty_internal_compile_if.php
Smarty Internal Plugin Compile Ifclose Class
Smarty_Internal_Compile_Include
Smarty_Internal_Compile_Include in smarty_internal_compile_include.php
Smarty Internal Plugin Compile Include Class
Smarty_Internal_Compile_Include_Php
Smarty_Internal_Compile_Include_Php in smarty_internal_compile_include_php.php
Smarty Internal Plugin Compile Insert Class
Smarty_Internal_Compile_Insert
Smarty_Internal_Compile_Insert in smarty_internal_compile_insert.php
Smarty Internal Plugin Compile Insert Class
Smarty_Internal_Compile_Ldelim
Smarty_Internal_Compile_Ldelim in smarty_internal_compile_ldelim.php
Smarty Internal Plugin Compile Ldelim Class
Smarty_Internal_Compile_Nocache
Smarty_Internal_Compile_Nocache in smarty_internal_compile_nocache.php
Smarty Internal Plugin Compile Nocache Classv
Smarty_Internal_Compile_Nocacheclose
Smarty_Internal_Compile_Nocacheclose in smarty_internal_compile_nocache.php
Smarty Internal Plugin Compile Nocacheclose Class
Smarty_Internal_Compile_Private_Block_Plugin
Smarty_Internal_Compile_Private_Block_Plugin in smarty_internal_compile_private_block_plugin.php
Smarty Internal Plugin Compile Block Plugin Class
Smarty_Internal_Compile_Private_Function_Plugin
Smarty_Internal_Compile_Private_Function_Plugin in smarty_internal_compile_private_function_plugin.php
Smarty Internal Plugin Compile Function Plugin Class
Smarty_Internal_Compile_Private_Modifier
Smarty_Internal_Compile_Private_Modifier in smarty_internal_compile_private_modifier.php
Smarty Internal Plugin Compile Modifier Class
Smarty_Internal_Compile_Private_Object_Block_Function
Smarty_Internal_Compile_Private_Object_Block_Function in smarty_internal_compile_private_object_block_function.php
Smarty Internal Plugin Compile Object Block Function Class
Smarty_Internal_Compile_Private_Object_Function
Smarty_Internal_Compile_Private_Object_Function in smarty_internal_compile_private_object_function.php
Smarty Internal Plugin Compile Object Function Class
Smarty_Internal_Compile_Private_Print_Expression
Smarty_Internal_Compile_Private_Print_Expression in smarty_internal_compile_private_print_expression.php
Smarty Internal Plugin Compile Print Expression Class
Smarty_Internal_Compile_Private_Registered_Block
Smarty_Internal_Compile_Private_Registered_Block in smarty_internal_compile_private_registered_block.php
Smarty Internal Plugin Compile Registered Block Class
Smarty_Internal_Compile_Private_Registered_Function
Smarty_Internal_Compile_Private_Registered_Function in smarty_internal_compile_private_registered_function.php
Smarty Internal Plugin Compile Registered Function Class
Smarty_Internal_Compile_Private_Special_Variable
Smarty_Internal_Compile_Private_Special_Variable in smarty_internal_compile_private_special_variable.php
Smarty Internal Plugin Compile special Smarty Variable Class
Smarty_Internal_Compile_Rdelim
Smarty_Internal_Compile_Rdelim in smarty_internal_compile_rdelim.php
Smarty Internal Plugin Compile Rdelim Class
Smarty_Internal_Compile_Section
Smarty_Internal_Compile_Section in smarty_internal_compile_section.php
Smarty Internal Plugin Compile Section Class
Smarty_Internal_Compile_Sectionclose
Smarty_Internal_Compile_Sectionclose in smarty_internal_compile_section.php
Smarty Internal Plugin Compile Sectionclose Class
Smarty_Internal_Compile_Sectionelse
Smarty_Internal_Compile_Sectionelse in smarty_internal_compile_section.php
Smarty Internal Plugin Compile Sectionelse Class
Smarty_Internal_Compile_Setfilter
Smarty_Internal_Compile_Setfilter in smarty_internal_compile_setfilter.php
Smarty Internal Plugin Compile Setfilter Class
Smarty_Internal_Compile_Setfilterclose
Smarty_Internal_Compile_Setfilterclose in smarty_internal_compile_setfilter.php
Smarty Internal Plugin Compile Setfilterclose Class
Smarty_Internal_Compile_While
Smarty_Internal_Compile_While in smarty_internal_compile_while.php
Smarty Internal Plugin Compile While Class
Smarty_Internal_Compile_Whileclose
Smarty_Internal_Compile_Whileclose in smarty_internal_compile_while.php
Smarty Internal Plugin Compile Whileclose Class
Smarty_Internal_Configfilelexer
Smarty_Internal_Configfilelexer in smarty_internal_configfilelexer.php
Smarty Internal Plugin Configfilelexer
Smarty_Internal_Configfileparser
Smarty_Internal_Configfileparser in smarty_internal_configfileparser.php
Smarty_Internal_Config_File_Compiler
Smarty_Internal_Config_File_Compiler in smarty_internal_config_file_compiler.php
Main config file compiler class
Smarty_Internal_Data
Smarty_Internal_Data in smarty_internal_data.php
Base class with template and variable methodes
Smarty_Internal_Debug
Smarty_Internal_Debug in smarty_internal_debug.php
Smarty Internal Plugin Debug Class
Smarty_Internal_Filter_Handler
Smarty_Internal_Filter_Handler in smarty_internal_filter_handler.php
Class for filter processing
Smarty_Internal_Function_Call_Handler
Smarty_Internal_Function_Call_Handler in smarty_internal_function_call_handler.php
This class does call function defined with the {function} tag
Smarty_Internal_Get_Include_Path
Smarty_Internal_Get_Include_Path in smarty_internal_get_include_path.php
Smarty Internal Read Include Path Class
Smarty_Internal_Nocache_Insert
Smarty_Internal_Nocache_Insert in smarty_internal_nocache_insert.php
Smarty Internal Plugin Compile Insert Class
Smarty_Internal_Resource_Eval
Smarty_Internal_Resource_Eval in smarty_internal_resource_eval.php
Smarty Internal Plugin Resource Eval
Smarty_Internal_Resource_Extends
Smarty_Internal_Resource_Extends in smarty_internal_resource_extends.php
Smarty Internal Plugin Resource Extends
Smarty_Internal_Resource_File
Smarty_Internal_Resource_File in smarty_internal_resource_file.php
Smarty Internal Plugin Resource File
Smarty_Internal_Resource_PHP
Smarty_Internal_Resource_PHP in smarty_internal_resource_php.php
Smarty Internal Plugin Resource PHP
Smarty_Internal_Resource_Registered
Smarty_Internal_Resource_Registered in smarty_internal_resource_registered.php
Smarty Internal Plugin Resource Registered
Smarty_Internal_Resource_Stream
Smarty_Internal_Resource_Stream in smarty_internal_resource_stream.php
Smarty Internal Plugin Resource Stream
Smarty_Internal_Resource_String
Smarty_Internal_Resource_String in smarty_internal_resource_string.php
Smarty Internal Plugin Resource String
Smarty_Internal_SmartyTemplateCompiler
Smarty_Internal_SmartyTemplateCompiler in smarty_internal_smartytemplatecompiler.php
Class SmartyTemplateCompiler
Smarty_Internal_Template
Smarty_Internal_Template in smarty_internal_template.php
Main class with template data structures and methods
Smarty_Internal_TemplateBase
Smarty_Internal_TemplateBase in smarty_internal_templatebase.php
Class with shared template methodes
Smarty_Internal_TemplateCompilerBase
Smarty_Internal_TemplateCompilerBase in smarty_internal_templatecompilerbase.php
Main abstract compiler class
Smarty_Internal_Templatelexer
Smarty_Internal_Templatelexer in smarty_internal_templatelexer.php
Smarty Internal Plugin Templatelexer
Smarty_Internal_Templateparser
Smarty_Internal_Templateparser in smarty_internal_templateparser.php
Smarty_Internal_Utility
Smarty_Internal_Utility in smarty_internal_utility.php
Utility class
Smarty_Internal_Write_File
Smarty_Internal_Write_File in smarty_internal_write_file.php
Smarty Internal Write File Class
smarty_literal_compiler_param
smarty_literal_compiler_param() in shared.literal_compiler_param.php
evaluate compiler parameter
smarty_make_timestamp
smarty_make_timestamp() in shared.make_timestamp.php
Function: smarty_make_timestamp
Purpose: used by other smarty functions to make a timestamp from a string.
SMARTY_MBSTRING
SMARTY_MBSTRING in Smarty.class.php
smarty_mb_from_unicode
smarty_mb_from_unicode() in shared.mb_unicode.php
convert unicodes to the character of given encoding
smarty_mb_str_replace
smarty_mb_str_replace() in shared.mb_str_replace.php
Multibyte string replace
smarty_mb_to_unicode
smarty_mb_to_unicode() in shared.mb_unicode.php
convert characters to their decimal unicode equivalents
smarty_mb_wordwrap
smarty_mb_wordwrap() in shared.mb_wordwrap.php
Wrap a string to a given number of characters
smarty_modifiercompiler_cat
smarty_modifiercompiler_cat() in modifiercompiler.cat.php
Smarty cat modifier plugin
smarty_modifiercompiler_count_characters
smarty_modifiercompiler_count_characters() in modifiercompiler.count_characters.php
Smarty count_characters modifier plugin
smarty_modifiercompiler_count_paragraphs
smarty_modifiercompiler_count_paragraphs() in modifiercompiler.count_paragraphs.php
Smarty count_paragraphs modifier plugin
smarty_modifiercompiler_count_sentences
smarty_modifiercompiler_count_sentences() in modifiercompiler.count_sentences.php
Smarty count_sentences modifier plugin
smarty_modifiercompiler_count_words
smarty_modifiercompiler_count_words() in modifiercompiler.count_words.php
Smarty count_words modifier plugin
smarty_modifiercompiler_default
smarty_modifiercompiler_default() in modifiercompiler.default.php
Smarty default modifier plugin
smarty_modifiercompiler_escape
smarty_modifiercompiler_escape() in modifiercompiler.escape.php
Smarty escape modifier plugin
smarty_modifiercompiler_from_charset
smarty_modifiercompiler_from_charset() in modifiercompiler.from_charset.php
Smarty from_charset modifier plugin
smarty_modifiercompiler_indent
smarty_modifiercompiler_indent() in modifiercompiler.indent.php
Smarty indent modifier plugin
smarty_modifiercompiler_lower
smarty_modifiercompiler_lower() in modifiercompiler.lower.php
Smarty lower modifier plugin
smarty_modifiercompiler_noprint
smarty_modifiercompiler_noprint() in modifiercompiler.noprint.php
Smarty noprint modifier plugin
smarty_modifiercompiler_string_format
smarty_modifiercompiler_string_format() in modifiercompiler.string_format.php
Smarty string_format modifier plugin
smarty_modifiercompiler_strip
smarty_modifiercompiler_strip() in modifiercompiler.strip.php
Smarty strip modifier plugin
smarty_modifiercompiler_strip_tags
smarty_modifiercompiler_strip_tags() in modifiercompiler.strip_tags.php
Smarty strip_tags modifier plugin
smarty_modifiercompiler_to_charset
smarty_modifiercompiler_to_charset() in modifiercompiler.to_charset.php
Smarty to_charset modifier plugin
smarty_modifiercompiler_unescape
smarty_modifiercompiler_unescape() in modifiercompiler.unescape.php
Smarty unescape modifier plugin
smarty_modifiercompiler_upper
smarty_modifiercompiler_upper() in modifiercompiler.upper.php
Smarty upper modifier plugin
smarty_modifiercompiler_wordwrap
smarty_modifiercompiler_wordwrap() in modifiercompiler.wordwrap.php
Smarty wordwrap modifier plugin
smarty_modifier_capitalize
smarty_modifier_capitalize() in modifier.capitalize.php
Smarty capitalize modifier plugin
smarty_modifier_date_format
smarty_modifier_date_format() in modifier.date_format.php
Smarty date_format modifier plugin
smarty_modifier_debug_print_var
smarty_modifier_debug_print_var() in modifier.debug_print_var.php
Smarty debug_print_var modifier plugin
smarty_modifier_escape
smarty_modifier_escape() in modifier.escape.php
Smarty escape modifier plugin
smarty_modifier_regex_replace
smarty_modifier_regex_replace() in modifier.regex_replace.php
Smarty regex_replace modifier plugin
smarty_modifier_replace
smarty_modifier_replace() in modifier.replace.php
Smarty replace modifier plugin
smarty_modifier_spacify
smarty_modifier_spacify() in modifier.spacify.php
Smarty spacify modifier plugin
smarty_modifier_truncate
smarty_modifier_truncate() in modifier.truncate.php
Smarty truncate modifier plugin
smarty_outputfilter_trimwhitespace
smarty_outputfilter_trimwhitespace() in outputfilter.trimwhitespace.php
Smarty trimwhitespace outputfilter plugin
smarty_php_tag
smarty_php_tag() in SmartyBC.class.php
Smarty {php}{/php} block function
SMARTY_PLUGINS_DIR
SMARTY_PLUGINS_DIR in Smarty.class.php
Smarty_Resource
Smarty_Resource in smarty_resource.php
Smarty Resource Plugin
SMARTY_RESOURCE_CHAR_SET
SMARTY_RESOURCE_CHAR_SET in Smarty.class.php
Smarty_Resource_Custom
Smarty_Resource_Custom in smarty_resource_custom.php
Smarty Resource Plugin
SMARTY_RESOURCE_DATE_FORMAT
SMARTY_RESOURCE_DATE_FORMAT in Smarty.class.php
Smarty_Resource_Extendsall
Smarty_Resource_Extendsall in resource.extendsall.php
Extends All Resource
Smarty_Resource_Mysql
Smarty_Resource_Mysql in resource.mysql.php
MySQL Resource
Smarty_Resource_Mysqls
Smarty_Resource_Mysqls in resource.mysqls.php
MySQL Resource
Smarty_Resource_Recompiled
Smarty_Resource_Recompiled in smarty_resource_recompiled.php
Smarty Resource Plugin
Smarty_Resource_Uncompiled
Smarty_Resource_Uncompiled in smarty_resource_uncompiled.php
Smarty Resource Plugin
Smarty_Security
Smarty_Security in smarty_security.php
This class does contain the security settings
SMARTY_SPL_AUTOLOAD
SMARTY_SPL_AUTOLOAD in Smarty.class.php
register the class autoloader
SMARTY_SYSPLUGINS_DIR
SMARTY_SYSPLUGINS_DIR in Smarty.class.php
set SMARTY_SYSPLUGINS_DIR to absolute path to Smarty internal plugins.
Smarty_Template_Cached
Smarty_Template_Cached in smarty_cacheresource.php
Smarty Resource Data Object
Smarty_Template_Compiled
Smarty_Template_Compiled in smarty_resource.php
Smarty Resource Data Object
Smarty_Template_Source
Smarty_Template_Source in smarty_resource.php
Smarty Resource Data Object
Smarty_Variable
Smarty_Variable in smarty_internal_data.php
class for the Smarty variable object
smarty_variablefilter_htmlspecialchars
smarty_variablefilter_htmlspecialchars() in variablefilter.htmlspecialchars.php
Smarty htmlspecialchars variablefilter plugin
SMARTY_VERSION
Smarty::SMARTY_VERSION in Smarty.class.php
smarty version
source
Smarty_Resource::source() in smarty_resource.php
initialize Source Object for given resource
START
Smarty_Internal_Configfilelexer::START in smarty_internal_configfilelexer.php
start_cache
Smarty_Internal_Debug::start_cache() in smarty_internal_debug.php
Start logging of cache time
start_compile
Smarty_Internal_Debug::start_compile() in smarty_internal_debug.php
Start logging of compile time
start_render
Smarty_Internal_Debug::start_render() in smarty_internal_debug.php
Start logging of render time
t
$taglineno
Smarty_Internal_Templatelexer::$taglineno in smarty_internal_templatelexer.php
$template
Smarty_Internal_TemplateCompilerBase::$template in smarty_internal_templatecompilerbase.php
current template
$template_class
Smarty_Internal_Data::$template_class in smarty_internal_data.php
name of class used for templates
$template_data
Smarty_Internal_Debug::$template_data in smarty_internal_debug.php
template data
$template_dir
Smarty::$template_dir in Smarty.class.php
template directory
$template_functions
Smarty::$template_functions in Smarty.class.php
global template functions
$template_lexer_class
Name of the Class to tokenize this resource's contents with
$template_lexer_class
Name of the Class to tokenize this resource's contents with
$template_objects
Smarty::$template_objects in Smarty.class.php
cached template objects
$template_parser_class
Name of the Class to parse this resource's contents with
$template_parser_class
Name of the Class to parse this resource's contents with
$template_resource
Smarty_Internal_Template::$template_resource in smarty_internal_template.php
Template resource
$timestamp
Compiled Timestamp
$timestamp
Smarty_Template_Cached::$timestamp in smarty_cacheresource.php
Source Timestamp
$timestamps
Smarty_CacheResource_KeyValueStore::$timestamps in smarty_cacheresource_keyvaluestore.php
cache for timestamps
$token
Smarty_Internal_Configfilelexer::$token in smarty_internal_configfilelexer.php
$token
Smarty_Internal_Templatelexer::$token in smarty_internal_templatelexer.php
$tpl_vars
Smarty_Internal_Data::$tpl_vars in smarty_internal_data.php
template variables
$trusted_dir
Smarty_Security::$trusted_dir in smarty_security.php
This is an array of directories where trusted php scripts reside.
$type
Smarty_Template_Source::$type in smarty_resource.php
Resource Type
templateExists
Smarty::templateExists() in Smarty.class.php
Check if a template resource exists
template_exists
SmartyBC::template_exists() in SmartyBC.class.php
Checks whether requested template exists.
testInstall
Smarty::testInstall() in Smarty.class.php
Run installation test
testInstall
Smarty_Internal_Utility::testInstall() in smarty_internal_utility.php
diagnose Smarty setup
TEXT
Smarty_Internal_Templatelexer::TEXT in smarty_internal_templatelexer.php
tokenName
Smarty_Internal_Configfileparser::tokenName() in smarty_internal_configfileparser.php
tokenName
Smarty_Internal_Templateparser::tokenName() in smarty_internal_templateparser.php
TPC_BOOL
Smarty_Internal_Configfileparser::TPC_BOOL in smarty_internal_configfileparser.php
TPC_CLOSEB
Smarty_Internal_Configfileparser::TPC_CLOSEB in smarty_internal_configfileparser.php
TPC_COMMENTSTART
Smarty_Internal_Configfileparser::TPC_COMMENTSTART in smarty_internal_configfileparser.php
TPC_DOT
Smarty_Internal_Configfileparser::TPC_DOT in smarty_internal_configfileparser.php
TPC_DOUBLE_QUOTED_STRING
Smarty_Internal_Configfileparser::TPC_DOUBLE_QUOTED_STRING in smarty_internal_configfileparser.php
TPC_EQUAL
Smarty_Internal_Configfileparser::TPC_EQUAL in smarty_internal_configfileparser.php
TPC_FLOAT
Smarty_Internal_Configfileparser::TPC_FLOAT in smarty_internal_configfileparser.php
TPC_ID
Smarty_Internal_Configfileparser::TPC_ID in smarty_internal_configfileparser.php
TPC_INT
Smarty_Internal_Configfileparser::TPC_INT in smarty_internal_configfileparser.php
TPC_NAKED_STRING
Smarty_Internal_Configfileparser::TPC_NAKED_STRING in smarty_internal_configfileparser.php
TPC_NEWLINE
Smarty_Internal_Configfileparser::TPC_NEWLINE in smarty_internal_configfileparser.php
TPC_OPENB
Smarty_Internal_Configfileparser::TPC_OPENB in smarty_internal_configfileparser.php
TPC_SECTION
Smarty_Internal_Configfileparser::TPC_SECTION in smarty_internal_configfileparser.php
TPC_SINGLE_QUOTED_STRING
Smarty_Internal_Configfileparser::TPC_SINGLE_QUOTED_STRING in smarty_internal_configfileparser.php
TPC_TRIPPLE_DOUBLE_QUOTED_STRING
TPC_yyStackEntry
TPC_yyStackEntry in smarty_internal_configfileparser.php
TPC_yyToken
TPC_yyToken in smarty_internal_configfileparser.php
Smarty Internal Plugin Configfileparser
TP_ANDSYM
Smarty_Internal_Templateparser::TP_ANDSYM in smarty_internal_templateparser.php
TP_APTR
Smarty_Internal_Templateparser::TP_APTR in smarty_internal_templateparser.php
TP_AS
Smarty_Internal_Templateparser::TP_AS in smarty_internal_templateparser.php
TP_ASPENDTAG
Smarty_Internal_Templateparser::TP_ASPENDTAG in smarty_internal_templateparser.php
TP_ASPSTARTTAG
Smarty_Internal_Templateparser::TP_ASPSTARTTAG in smarty_internal_templateparser.php
TP_AT
Smarty_Internal_Templateparser::TP_AT in smarty_internal_templateparser.php
TP_BACKTICK
Smarty_Internal_Templateparser::TP_BACKTICK in smarty_internal_templateparser.php
TP_CLOSEB
Smarty_Internal_Templateparser::TP_CLOSEB in smarty_internal_templateparser.php
TP_CLOSEP
Smarty_Internal_Templateparser::TP_CLOSEP in smarty_internal_templateparser.php
TP_COLON
Smarty_Internal_Templateparser::TP_COLON in smarty_internal_templateparser.php
TP_COMMA
Smarty_Internal_Templateparser::TP_COMMA in smarty_internal_templateparser.php
TP_COMMENT
Smarty_Internal_Templateparser::TP_COMMENT in smarty_internal_templateparser.php
TP_DOLLAR
Smarty_Internal_Templateparser::TP_DOLLAR in smarty_internal_templateparser.php
TP_DOLLARID
Smarty_Internal_Templateparser::TP_DOLLARID in smarty_internal_templateparser.php
TP_DOT
Smarty_Internal_Templateparser::TP_DOT in smarty_internal_templateparser.php
TP_DOUBLECOLON
Smarty_Internal_Templateparser::TP_DOUBLECOLON in smarty_internal_templateparser.php
TP_EQUAL
Smarty_Internal_Templateparser::TP_EQUAL in smarty_internal_templateparser.php
TP_EQUALS
Smarty_Internal_Templateparser::TP_EQUALS in smarty_internal_templateparser.php
TP_FAKEPHPSTARTTAG
Smarty_Internal_Templateparser::TP_FAKEPHPSTARTTAG in smarty_internal_templateparser.php
TP_GREATEREQUAL
Smarty_Internal_Templateparser::TP_GREATEREQUAL in smarty_internal_templateparser.php
TP_GREATERTHAN
Smarty_Internal_Templateparser::TP_GREATERTHAN in smarty_internal_templateparser.php
TP_HATCH
Smarty_Internal_Templateparser::TP_HATCH in smarty_internal_templateparser.php
TP_HEX
Smarty_Internal_Templateparser::TP_HEX in smarty_internal_templateparser.php
TP_ID
Smarty_Internal_Templateparser::TP_ID in smarty_internal_templateparser.php
TP_IDENTITY
Smarty_Internal_Templateparser::TP_IDENTITY in smarty_internal_templateparser.php
TP_INCDEC
Smarty_Internal_Templateparser::TP_INCDEC in smarty_internal_templateparser.php
TP_INSTANCEOF
Smarty_Internal_Templateparser::TP_INSTANCEOF in smarty_internal_templateparser.php
TP_INTEGER
Smarty_Internal_Templateparser::TP_INTEGER in smarty_internal_templateparser.php
TP_ISDIVBY
Smarty_Internal_Templateparser::TP_ISDIVBY in smarty_internal_templateparser.php
TP_ISEVEN
Smarty_Internal_Templateparser::TP_ISEVEN in smarty_internal_templateparser.php
TP_ISEVENBY
Smarty_Internal_Templateparser::TP_ISEVENBY in smarty_internal_templateparser.php
TP_ISIN
Smarty_Internal_Templateparser::TP_ISIN in smarty_internal_templateparser.php
TP_ISNOTDIVBY
Smarty_Internal_Templateparser::TP_ISNOTDIVBY in smarty_internal_templateparser.php
TP_ISNOTEVEN
Smarty_Internal_Templateparser::TP_ISNOTEVEN in smarty_internal_templateparser.php
TP_ISNOTEVENBY
Smarty_Internal_Templateparser::TP_ISNOTEVENBY in smarty_internal_templateparser.php
TP_ISNOTODD
Smarty_Internal_Templateparser::TP_ISNOTODD in smarty_internal_templateparser.php
TP_ISNOTODDBY
Smarty_Internal_Templateparser::TP_ISNOTODDBY in smarty_internal_templateparser.php
TP_ISODD
Smarty_Internal_Templateparser::TP_ISODD in smarty_internal_templateparser.php
TP_ISODDBY
Smarty_Internal_Templateparser::TP_ISODDBY in smarty_internal_templateparser.php
TP_LAND
Smarty_Internal_Templateparser::TP_LAND in smarty_internal_templateparser.php
TP_LDEL
Smarty_Internal_Templateparser::TP_LDEL in smarty_internal_templateparser.php
TP_LDELFOR
Smarty_Internal_Templateparser::TP_LDELFOR in smarty_internal_templateparser.php
TP_LDELFOREACH
Smarty_Internal_Templateparser::TP_LDELFOREACH in smarty_internal_templateparser.php
TP_LDELIF
Smarty_Internal_Templateparser::TP_LDELIF in smarty_internal_templateparser.php
TP_LDELSETFILTER
Smarty_Internal_Templateparser::TP_LDELSETFILTER in smarty_internal_templateparser.php
TP_LDELSLASH
Smarty_Internal_Templateparser::TP_LDELSLASH in smarty_internal_templateparser.php
TP_LESSEQUAL
Smarty_Internal_Templateparser::TP_LESSEQUAL in smarty_internal_templateparser.php
TP_LESSTHAN
Smarty_Internal_Templateparser::TP_LESSTHAN in smarty_internal_templateparser.php
TP_LINEBREAK
Smarty_Internal_Templateparser::TP_LINEBREAK in smarty_internal_templateparser.php
TP_LITERAL
Smarty_Internal_Templateparser::TP_LITERAL in smarty_internal_templateparser.php
TP_LITERALEND
Smarty_Internal_Templateparser::TP_LITERALEND in smarty_internal_templateparser.php
TP_LITERALSTART
Smarty_Internal_Templateparser::TP_LITERALSTART in smarty_internal_templateparser.php
TP_LOR
Smarty_Internal_Templateparser::TP_LOR in smarty_internal_templateparser.php
TP_LXOR
Smarty_Internal_Templateparser::TP_LXOR in smarty_internal_templateparser.php
TP_MATH
Smarty_Internal_Templateparser::TP_MATH in smarty_internal_templateparser.php
TP_MOD
Smarty_Internal_Templateparser::TP_MOD in smarty_internal_templateparser.php
TP_NONEIDENTITY
Smarty_Internal_Templateparser::TP_NONEIDENTITY in smarty_internal_templateparser.php
TP_NOT
Smarty_Internal_Templateparser::TP_NOT in smarty_internal_templateparser.php
TP_NOTEQUALS
Smarty_Internal_Templateparser::TP_NOTEQUALS in smarty_internal_templateparser.php
TP_OPENB
Smarty_Internal_Templateparser::TP_OPENB in smarty_internal_templateparser.php
TP_OPENP
Smarty_Internal_Templateparser::TP_OPENP in smarty_internal_templateparser.php
TP_OTHER
Smarty_Internal_Templateparser::TP_OTHER in smarty_internal_templateparser.php
TP_PHPENDTAG
Smarty_Internal_Templateparser::TP_PHPENDTAG in smarty_internal_templateparser.php
TP_PHPSTARTTAG
Smarty_Internal_Templateparser::TP_PHPSTARTTAG in smarty_internal_templateparser.php
TP_PTR
Smarty_Internal_Templateparser::TP_PTR in smarty_internal_templateparser.php
TP_QMARK
Smarty_Internal_Templateparser::TP_QMARK in smarty_internal_templateparser.php
TP_QUOTE
Smarty_Internal_Templateparser::TP_QUOTE in smarty_internal_templateparser.php
TP_RDEL
Smarty_Internal_Templateparser::TP_RDEL in smarty_internal_templateparser.php
TP_SEMICOLON
Smarty_Internal_Templateparser::TP_SEMICOLON in smarty_internal_templateparser.php
TP_SINGLEQUOTESTRING
Smarty_Internal_Templateparser::TP_SINGLEQUOTESTRING in smarty_internal_templateparser.php
TP_SMARTYBLOCKCHILD
Smarty_Internal_Templateparser::TP_SMARTYBLOCKCHILD in smarty_internal_templateparser.php
TP_SPACE
Smarty_Internal_Templateparser::TP_SPACE in smarty_internal_templateparser.php
TP_STEP
Smarty_Internal_Templateparser::TP_STEP in smarty_internal_templateparser.php
TP_TO
Smarty_Internal_Templateparser::TP_TO in smarty_internal_templateparser.php
TP_TYPECAST
Smarty_Internal_Templateparser::TP_TYPECAST in smarty_internal_templateparser.php
TP_UNIMATH
Smarty_Internal_Templateparser::TP_UNIMATH in smarty_internal_templateparser.php
TP_VERT
Smarty_Internal_Templateparser::TP_VERT in smarty_internal_templateparser.php
TP_XMLTAG
Smarty_Internal_Templateparser::TP_XMLTAG in smarty_internal_templateparser.php
TP_yyStackEntry
TP_yyStackEntry in smarty_internal_templateparser.php
TP_yyToken
TP_yyToken in smarty_internal_templateparser.php
Smarty Internal Plugin Templateparser
Trace
Smarty_Internal_Configfileparser::Trace() in smarty_internal_configfileparser.php
Trace
Smarty_Internal_Templateparser::Trace() in smarty_internal_templateparser.php
trigger_config_file_error
Smarty_Internal_Config_File_Compiler::trigger_config_file_error() in smarty_internal_config_file_compiler.php
display compiler error messages without dying
trigger_error
SmartyBC::trigger_error() in SmartyBC.class.php
trigger Smarty error
trigger_template_error
Smarty_Internal_TemplateCompilerBase::trigger_template_error() in smarty_internal_templatecompilerbase.php
display compiler error messages without dying
u
$uid
Smarty_Template_Source::$uid in smarty_resource.php
Unique Template ID
$uncompiled
Source is bypassing compiler
$used_tags
Smarty_Internal_Template::$used_tags in smarty_internal_template.php
optional log of tag/attributes
$use_include_path
Smarty::$use_include_path in Smarty.class.php
look up relative filepaths in include_path
$use_sub_dirs
Smarty::$use_sub_dirs in Smarty.class.php
use sub dirs for compiled/cached files?
Undefined_Smarty_Variable
Undefined_Smarty_Variable in smarty_internal_data.php
class for undefined variable object
unmuteExpectedErrors
Smarty::unmuteExpectedErrors() in Smarty.class.php
Disable error handler muting expected messages
unregisterCacheResource
Unregisters a cache resource
unregisterFilter
Smarty_Internal_TemplateBase::unregisterFilter() in smarty_internal_templatebase.php
Unregisters a filter function
unregisterObject
Smarty_Internal_TemplateBase::unregisterObject() in smarty_internal_templatebase.php
unregister an object
unregisterPlugin
Smarty_Internal_TemplateBase::unregisterPlugin() in smarty_internal_templatebase.php
Unregister Plugin
unregisterResource
Smarty_Internal_TemplateBase::unregisterResource() in smarty_internal_templatebase.php
Unregisters a resource
unregister_block
SmartyBC::unregister_block() in SmartyBC.class.php
Unregisters block function
unregister_compiler_function
Unregisters compiler function
unregister_function
SmartyBC::unregister_function() in SmartyBC.class.php
Unregisters custom function
unregister_modifier
SmartyBC::unregister_modifier() in SmartyBC.class.php
Unregisters modifier
unregister_object
SmartyBC::unregister_object() in SmartyBC.class.php
Unregisters object
unregister_outputfilter
Unregisters an outputfilter function
unregister_postfilter
SmartyBC::unregister_postfilter() in SmartyBC.class.php
Unregisters a postfilter function
unregister_prefilter
SmartyBC::unregister_prefilter() in SmartyBC.class.php
Unregisters a prefilter function
unregister_resource
SmartyBC::unregister_resource() in SmartyBC.class.php
Unregisters a resource
v
$valid
Smarty_Template_Cached::$valid in smarty_cacheresource.php
Cache Is Valid
$value
Smarty_Internal_Templatelexer::$value in smarty_internal_templatelexer.php
$value
Smarty_Variable::$value in smarty_internal_data.php
template variable
$value
Smarty_Internal_Configfilelexer::$value in smarty_internal_configfilelexer.php
$variable_filters
Smarty_Internal_Template::$variable_filters in smarty_internal_template.php
variable filters
variablefilter.htmlspecialchars.php
variablefilter.htmlspecialchars.php in variablefilter.htmlspecialchars.php
VALUE
Smarty_Internal_Configfilelexer::VALUE in smarty_internal_configfilelexer.php
w
$write_compiled_code
Smarty_Internal_TemplateCompilerBase::$write_compiled_code in smarty_internal_templatecompilerbase.php
flag if compiled template file shall we written
write
Smarty_CacheResource_Apc::write() in cacheresource.apc.php
Save values for a set of keys to cache
write
Smarty_Template_Cached::write() in smarty_cacheresource.php
Write this cache object to handler
write
Smarty_CacheResource_KeyValueStore::write() in smarty_cacheresource_keyvaluestore.php
Save values for a set of keys to cache
write
Smarty_CacheResource_Memcache::write() in cacheresource.memcache.php
Save values for a set of keys to cache
writeCachedContent
Smarty_Internal_Template::writeCachedContent() in smarty_internal_template.php
Writes the cached template output
writeCachedContent
Smarty_CacheResource_Custom::writeCachedContent() in smarty_cacheresource_custom.php
Write the rendered template output to cache
writeCachedContent
Smarty_Internal_CacheResource_File::writeCachedContent() in smarty_internal_cacheresource_file.php
Write the rendered template output to cache
writeCachedContent
Smarty_CacheResource_KeyValueStore::writeCachedContent() in smarty_cacheresource_keyvaluestore.php
Write the rendered template output to cache
writeCachedContent
Smarty_CacheResource::writeCachedContent() in smarty_cacheresource.php
Write the rendered template output to cache
writeFile
Smarty_Internal_Write_File::writeFile() in smarty_internal_write_file.php
Writes file in a safe way to disk
y
$yyerrcnt
Smarty_Internal_Configfileparser::$yyerrcnt in smarty_internal_configfileparser.php
$yyerrcnt
Smarty_Internal_Templateparser::$yyerrcnt in smarty_internal_templateparser.php
$yyExpectedTokens
Smarty_Internal_Templateparser::$yyExpectedTokens in smarty_internal_templateparser.php
$yyExpectedTokens
Smarty_Internal_Configfileparser::$yyExpectedTokens in smarty_internal_configfileparser.php
$yyFallback
Smarty_Internal_Templateparser::$yyFallback in smarty_internal_templateparser.php
$yyFallback
Smarty_Internal_Configfileparser::$yyFallback in smarty_internal_configfileparser.php
$yyidx
Smarty_Internal_Templateparser::$yyidx in smarty_internal_templateparser.php
$yyidx
Smarty_Internal_Configfileparser::$yyidx in smarty_internal_configfileparser.php
$yyReduceMap
Smarty_Internal_Configfileparser::$yyReduceMap in smarty_internal_configfileparser.php
$yyReduceMap
Smarty_Internal_Templateparser::$yyReduceMap in smarty_internal_templateparser.php
$yyRuleInfo
Smarty_Internal_Configfileparser::$yyRuleInfo in smarty_internal_configfileparser.php
$yyRuleInfo
Smarty_Internal_Templateparser::$yyRuleInfo in smarty_internal_templateparser.php
$yyRuleName
Smarty_Internal_Templateparser::$yyRuleName in smarty_internal_templateparser.php
$yyRuleName
Smarty_Internal_Configfileparser::$yyRuleName in smarty_internal_configfileparser.php
$yystack
Smarty_Internal_Templateparser::$yystack in smarty_internal_templateparser.php
$yystack
Smarty_Internal_Configfileparser::$yystack in smarty_internal_configfileparser.php
$yyTokenName
Smarty_Internal_Configfileparser::$yyTokenName in smarty_internal_configfileparser.php
$yyTokenName
Smarty_Internal_Templateparser::$yyTokenName in smarty_internal_templateparser.php
$yyTraceFILE
Smarty_Internal_Configfileparser::$yyTraceFILE in smarty_internal_configfileparser.php
$yyTraceFILE
Smarty_Internal_Templateparser::$yyTraceFILE in smarty_internal_templateparser.php
$yyTracePrompt
Smarty_Internal_Templateparser::$yyTracePrompt in smarty_internal_templateparser.php
$yyTracePrompt
Smarty_Internal_Configfileparser::$yyTracePrompt in smarty_internal_configfileparser.php
$yy_action
Smarty_Internal_Configfileparser::$yy_action in smarty_internal_configfileparser.php
$yy_action
Smarty_Internal_Templateparser::$yy_action in smarty_internal_templateparser.php
$yy_default
Smarty_Internal_Configfileparser::$yy_default in smarty_internal_configfileparser.php
$yy_default
Smarty_Internal_Templateparser::$yy_default in smarty_internal_templateparser.php
$yy_lookahead
Smarty_Internal_Configfileparser::$yy_lookahead in smarty_internal_configfileparser.php
$yy_lookahead
Smarty_Internal_Templateparser::$yy_lookahead in smarty_internal_templateparser.php
$yy_reduce_ofst
Smarty_Internal_Configfileparser::$yy_reduce_ofst in smarty_internal_configfileparser.php
$yy_reduce_ofst
Smarty_Internal_Templateparser::$yy_reduce_ofst in smarty_internal_templateparser.php
$yy_shift_ofst
Smarty_Internal_Templateparser::$yy_shift_ofst in smarty_internal_templateparser.php
$yy_shift_ofst
Smarty_Internal_Configfileparser::$yy_shift_ofst in smarty_internal_configfileparser.php
yybegin
Smarty_Internal_Templatelexer::yybegin() in smarty_internal_templatelexer.php
yybegin
Smarty_Internal_Configfilelexer::yybegin() in smarty_internal_configfilelexer.php
YYERRORSYMBOL
Smarty_Internal_Configfileparser::YYERRORSYMBOL in smarty_internal_configfileparser.php
YYERRORSYMBOL
Smarty_Internal_Templateparser::YYERRORSYMBOL in smarty_internal_templateparser.php
YYERRSYMDT
Smarty_Internal_Configfileparser::YYERRSYMDT in smarty_internal_configfileparser.php
YYERRSYMDT
Smarty_Internal_Templateparser::YYERRSYMDT in smarty_internal_templateparser.php
YYFALLBACK
Smarty_Internal_Configfileparser::YYFALLBACK in smarty_internal_configfileparser.php
YYFALLBACK
Smarty_Internal_Templateparser::YYFALLBACK in smarty_internal_templateparser.php
yylex
Smarty_Internal_Configfilelexer::yylex() in smarty_internal_configfilelexer.php
yylex
Smarty_Internal_Templatelexer::yylex() in smarty_internal_templatelexer.php
yylex1
Smarty_Internal_Templatelexer::yylex1() in smarty_internal_templatelexer.php
yylex1
Smarty_Internal_Configfilelexer::yylex1() in smarty_internal_configfilelexer.php
yylex2
Smarty_Internal_Templatelexer::yylex2() in smarty_internal_templatelexer.php
yylex2
Smarty_Internal_Configfilelexer::yylex2() in smarty_internal_configfilelexer.php
yylex3
Smarty_Internal_Templatelexer::yylex3() in smarty_internal_templatelexer.php
yylex3
Smarty_Internal_Configfilelexer::yylex3() in smarty_internal_configfilelexer.php
yylex4
Smarty_Internal_Templatelexer::yylex4() in smarty_internal_templatelexer.php
yylex4
Smarty_Internal_Configfilelexer::yylex4() in smarty_internal_configfilelexer.php
yylex5
Smarty_Internal_Configfilelexer::yylex5() in smarty_internal_configfilelexer.php
YYNOCODE
Smarty_Internal_Configfileparser::YYNOCODE in smarty_internal_configfileparser.php
YYNOCODE
Smarty_Internal_Templateparser::YYNOCODE in smarty_internal_templateparser.php
YYNRULE
Smarty_Internal_Templateparser::YYNRULE in smarty_internal_templateparser.php
YYNRULE
Smarty_Internal_Configfileparser::YYNRULE in smarty_internal_configfileparser.php
YYNSTATE
Smarty_Internal_Configfileparser::YYNSTATE in smarty_internal_configfileparser.php
YYNSTATE
Smarty_Internal_Templateparser::YYNSTATE in smarty_internal_templateparser.php
yypopstate
Smarty_Internal_Configfilelexer::yypopstate() in smarty_internal_configfilelexer.php
yypopstate
Smarty_Internal_Templatelexer::yypopstate() in smarty_internal_templatelexer.php
yypushstate
Smarty_Internal_Configfilelexer::yypushstate() in smarty_internal_configfilelexer.php
yypushstate
Smarty_Internal_Templatelexer::yypushstate() in smarty_internal_templatelexer.php
YYSTACKDEPTH
Smarty_Internal_Templateparser::YYSTACKDEPTH in smarty_internal_templateparser.php
YYSTACKDEPTH
Smarty_Internal_Configfileparser::YYSTACKDEPTH in smarty_internal_configfileparser.php
yy_accept
Smarty_Internal_Configfileparser::yy_accept() in smarty_internal_configfileparser.php
yy_accept
Smarty_Internal_Templateparser::yy_accept() in smarty_internal_templateparser.php
YY_ACCEPT_ACTION
Smarty_Internal_Templateparser::YY_ACCEPT_ACTION in smarty_internal_templateparser.php
YY_ACCEPT_ACTION
Smarty_Internal_Configfileparser::YY_ACCEPT_ACTION in smarty_internal_configfileparser.php
yy_destructor
Smarty_Internal_Templateparser::yy_destructor() in smarty_internal_templateparser.php
yy_destructor
Smarty_Internal_Configfileparser::yy_destructor() in smarty_internal_configfileparser.php
YY_ERROR_ACTION
Smarty_Internal_Configfileparser::YY_ERROR_ACTION in smarty_internal_configfileparser.php
YY_ERROR_ACTION
Smarty_Internal_Templateparser::YY_ERROR_ACTION in smarty_internal_templateparser.php
yy_find_reduce_action
Smarty_Internal_Templateparser::yy_find_reduce_action() in smarty_internal_templateparser.php
yy_find_reduce_action
Smarty_Internal_Configfileparser::yy_find_reduce_action() in smarty_internal_configfileparser.php
yy_find_shift_action
Smarty_Internal_Configfileparser::yy_find_shift_action() in smarty_internal_configfileparser.php
yy_find_shift_action
Smarty_Internal_Templateparser::yy_find_shift_action() in smarty_internal_templateparser.php
yy_get_expected_tokens
Smarty_Internal_Configfileparser::yy_get_expected_tokens() in smarty_internal_configfileparser.php
yy_get_expected_tokens
Smarty_Internal_Templateparser::yy_get_expected_tokens() in smarty_internal_templateparser.php
yy_is_expected_token
Smarty_Internal_Templateparser::yy_is_expected_token() in smarty_internal_templateparser.php
yy_is_expected_token
Smarty_Internal_Configfileparser::yy_is_expected_token() in smarty_internal_configfileparser.php
YY_NO_ACTION
Smarty_Internal_Configfileparser::YY_NO_ACTION in smarty_internal_configfileparser.php
YY_NO_ACTION
Smarty_Internal_Templateparser::YY_NO_ACTION in smarty_internal_templateparser.php
yy_parse_failed
Smarty_Internal_Templateparser::yy_parse_failed() in smarty_internal_templateparser.php
yy_parse_failed
Smarty_Internal_Configfileparser::yy_parse_failed() in smarty_internal_configfileparser.php
yy_pop_parser_stack
Smarty_Internal_Templateparser::yy_pop_parser_stack() in smarty_internal_templateparser.php
yy_pop_parser_stack
Smarty_Internal_Configfileparser::yy_pop_parser_stack() in smarty_internal_configfileparser.php
yy_r0
Smarty_Internal_Templateparser::yy_r0() in smarty_internal_templateparser.php
yy_r0
Smarty_Internal_Configfileparser::yy_r0() in smarty_internal_configfileparser.php
yy_r1
Smarty_Internal_Templateparser::yy_r1() in smarty_internal_templateparser.php
yy_r1
Smarty_Internal_Configfileparser::yy_r1() in smarty_internal_configfileparser.php
yy_r1_1
Smarty_Internal_Configfilelexer::yy_r1_1() in smarty_internal_configfilelexer.php
yy_r1_1
Smarty_Internal_Templatelexer::yy_r1_1() in smarty_internal_templatelexer.php
yy_r1_2
Smarty_Internal_Configfilelexer::yy_r1_2() in smarty_internal_configfilelexer.php
yy_r1_2
Smarty_Internal_Templatelexer::yy_r1_2() in smarty_internal_templatelexer.php
yy_r1_3
Smarty_Internal_Configfilelexer::yy_r1_3() in smarty_internal_configfilelexer.php
yy_r1_3
Smarty_Internal_Templatelexer::yy_r1_3() in smarty_internal_templatelexer.php
yy_r1_4
Smarty_Internal_Configfilelexer::yy_r1_4() in smarty_internal_configfilelexer.php
yy_r1_5
Smarty_Internal_Configfilelexer::yy_r1_5() in smarty_internal_configfilelexer.php
yy_r1_5
Smarty_Internal_Templatelexer::yy_r1_5() in smarty_internal_templatelexer.php
yy_r1_6
Smarty_Internal_Configfilelexer::yy_r1_6() in smarty_internal_configfilelexer.php
yy_r1_6
Smarty_Internal_Templatelexer::yy_r1_6() in smarty_internal_templatelexer.php
yy_r1_7
Smarty_Internal_Configfilelexer::yy_r1_7() in smarty_internal_configfilelexer.php
yy_r1_7
Smarty_Internal_Templatelexer::yy_r1_7() in smarty_internal_templatelexer.php
yy_r1_8
Smarty_Internal_Templatelexer::yy_r1_8() in smarty_internal_templatelexer.php
yy_r1_9
Smarty_Internal_Templatelexer::yy_r1_9() in smarty_internal_templatelexer.php
yy_r1_10
Smarty_Internal_Templatelexer::yy_r1_10() in smarty_internal_templatelexer.php
yy_r1_11
Smarty_Internal_Templatelexer::yy_r1_11() in smarty_internal_templatelexer.php
yy_r1_12
Smarty_Internal_Templatelexer::yy_r1_12() in smarty_internal_templatelexer.php
yy_r1_14
Smarty_Internal_Templatelexer::yy_r1_14() in smarty_internal_templatelexer.php
yy_r1_15
Smarty_Internal_Templatelexer::yy_r1_15() in smarty_internal_templatelexer.php
yy_r1_16
Smarty_Internal_Templatelexer::yy_r1_16() in smarty_internal_templatelexer.php
yy_r1_17
Smarty_Internal_Templatelexer::yy_r1_17() in smarty_internal_templatelexer.php
yy_r1_18
Smarty_Internal_Templatelexer::yy_r1_18() in smarty_internal_templatelexer.php
yy_r1_19
Smarty_Internal_Templatelexer::yy_r1_19() in smarty_internal_templatelexer.php
yy_r1_20
Smarty_Internal_Templatelexer::yy_r1_20() in smarty_internal_templatelexer.php
yy_r1_21
Smarty_Internal_Templatelexer::yy_r1_21() in smarty_internal_templatelexer.php
yy_r1_22
Smarty_Internal_Templatelexer::yy_r1_22() in smarty_internal_templatelexer.php
yy_r1_23
Smarty_Internal_Templatelexer::yy_r1_23() in smarty_internal_templatelexer.php
yy_r1_24
Smarty_Internal_Templatelexer::yy_r1_24() in smarty_internal_templatelexer.php
yy_r1_27
Smarty_Internal_Templatelexer::yy_r1_27() in smarty_internal_templatelexer.php
yy_r1_28
Smarty_Internal_Templatelexer::yy_r1_28() in smarty_internal_templatelexer.php
yy_r2_1
Smarty_Internal_Configfilelexer::yy_r2_1() in smarty_internal_configfilelexer.php
yy_r2_1
Smarty_Internal_Templatelexer::yy_r2_1() in smarty_internal_templatelexer.php
yy_r2_2
Smarty_Internal_Configfilelexer::yy_r2_2() in smarty_internal_configfilelexer.php
yy_r2_2
Smarty_Internal_Templatelexer::yy_r2_2() in smarty_internal_templatelexer.php
yy_r2_3
Smarty_Internal_Configfilelexer::yy_r2_3() in smarty_internal_configfilelexer.php
yy_r2_3
Smarty_Internal_Templatelexer::yy_r2_3() in smarty_internal_templatelexer.php
yy_r2_4
Smarty_Internal_Configfilelexer::yy_r2_4() in smarty_internal_configfilelexer.php
yy_r2_5
Smarty_Internal_Configfilelexer::yy_r2_5() in smarty_internal_configfilelexer.php
yy_r2_5
Smarty_Internal_Templatelexer::yy_r2_5() in smarty_internal_templatelexer.php
yy_r2_6
Smarty_Internal_Configfilelexer::yy_r2_6() in smarty_internal_configfilelexer.php
yy_r2_6
Smarty_Internal_Templatelexer::yy_r2_6() in smarty_internal_templatelexer.php
yy_r2_7
Smarty_Internal_Templatelexer::yy_r2_7() in smarty_internal_templatelexer.php
yy_r2_8
Smarty_Internal_Templatelexer::yy_r2_8() in smarty_internal_templatelexer.php
yy_r2_8
Smarty_Internal_Configfilelexer::yy_r2_8() in smarty_internal_configfilelexer.php
yy_r2_9
Smarty_Internal_Templatelexer::yy_r2_9() in smarty_internal_templatelexer.php
yy_r2_9
Smarty_Internal_Configfilelexer::yy_r2_9() in smarty_internal_configfilelexer.php
yy_r2_10
Smarty_Internal_Templatelexer::yy_r2_10() in smarty_internal_templatelexer.php
yy_r2_10
Smarty_Internal_Configfilelexer::yy_r2_10() in smarty_internal_configfilelexer.php
yy_r2_11
Smarty_Internal_Templatelexer::yy_r2_11() in smarty_internal_templatelexer.php
yy_r2_12
Smarty_Internal_Templatelexer::yy_r2_12() in smarty_internal_templatelexer.php
yy_r2_13
Smarty_Internal_Templatelexer::yy_r2_13() in smarty_internal_templatelexer.php
yy_r2_14
Smarty_Internal_Templatelexer::yy_r2_14() in smarty_internal_templatelexer.php
yy_r2_15
Smarty_Internal_Templatelexer::yy_r2_15() in smarty_internal_templatelexer.php
yy_r2_16
Smarty_Internal_Templatelexer::yy_r2_16() in smarty_internal_templatelexer.php
yy_r2_17
Smarty_Internal_Templatelexer::yy_r2_17() in smarty_internal_templatelexer.php
yy_r2_18
Smarty_Internal_Templatelexer::yy_r2_18() in smarty_internal_templatelexer.php
yy_r2_19
Smarty_Internal_Templatelexer::yy_r2_19() in smarty_internal_templatelexer.php
yy_r2_20
Smarty_Internal_Templatelexer::yy_r2_20() in smarty_internal_templatelexer.php
yy_r2_22
Smarty_Internal_Templatelexer::yy_r2_22() in smarty_internal_templatelexer.php
yy_r2_24
Smarty_Internal_Templatelexer::yy_r2_24() in smarty_internal_templatelexer.php
yy_r2_26
Smarty_Internal_Templatelexer::yy_r2_26() in smarty_internal_templatelexer.php
yy_r2_27
Smarty_Internal_Templatelexer::yy_r2_27() in smarty_internal_templatelexer.php
yy_r2_28
Smarty_Internal_Templatelexer::yy_r2_28() in smarty_internal_templatelexer.php
yy_r2_29
Smarty_Internal_Templatelexer::yy_r2_29() in smarty_internal_templatelexer.php
yy_r2_30
Smarty_Internal_Templatelexer::yy_r2_30() in smarty_internal_templatelexer.php
yy_r2_31
Smarty_Internal_Templatelexer::yy_r2_31() in smarty_internal_templatelexer.php
yy_r2_32
Smarty_Internal_Templatelexer::yy_r2_32() in smarty_internal_templatelexer.php
yy_r2_33
Smarty_Internal_Templatelexer::yy_r2_33() in smarty_internal_templatelexer.php
yy_r2_34
Smarty_Internal_Templatelexer::yy_r2_34() in smarty_internal_templatelexer.php
yy_r2_35
Smarty_Internal_Templatelexer::yy_r2_35() in smarty_internal_templatelexer.php
yy_r2_36
Smarty_Internal_Templatelexer::yy_r2_36() in smarty_internal_templatelexer.php
yy_r2_37
Smarty_Internal_Templatelexer::yy_r2_37() in smarty_internal_templatelexer.php
yy_r2_38
Smarty_Internal_Templatelexer::yy_r2_38() in smarty_internal_templatelexer.php
yy_r2_39
Smarty_Internal_Templatelexer::yy_r2_39() in smarty_internal_templatelexer.php
yy_r2_40
Smarty_Internal_Templatelexer::yy_r2_40() in smarty_internal_templatelexer.php
yy_r2_41
Smarty_Internal_Templatelexer::yy_r2_41() in smarty_internal_templatelexer.php
yy_r2_42
Smarty_Internal_Templatelexer::yy_r2_42() in smarty_internal_templatelexer.php
yy_r2_43
Smarty_Internal_Templatelexer::yy_r2_43() in smarty_internal_templatelexer.php
yy_r2_47
Smarty_Internal_Templatelexer::yy_r2_47() in smarty_internal_templatelexer.php
yy_r2_48
Smarty_Internal_Templatelexer::yy_r2_48() in smarty_internal_templatelexer.php
yy_r2_49
Smarty_Internal_Templatelexer::yy_r2_49() in smarty_internal_templatelexer.php
yy_r2_50
Smarty_Internal_Templatelexer::yy_r2_50() in smarty_internal_templatelexer.php
yy_r2_51
Smarty_Internal_Templatelexer::yy_r2_51() in smarty_internal_templatelexer.php
yy_r2_52
Smarty_Internal_Templatelexer::yy_r2_52() in smarty_internal_templatelexer.php
yy_r2_53
Smarty_Internal_Templatelexer::yy_r2_53() in smarty_internal_templatelexer.php
yy_r2_54
Smarty_Internal_Templatelexer::yy_r2_54() in smarty_internal_templatelexer.php
yy_r2_55
Smarty_Internal_Templatelexer::yy_r2_55() in smarty_internal_templatelexer.php
yy_r2_57
Smarty_Internal_Templatelexer::yy_r2_57() in smarty_internal_templatelexer.php
yy_r2_59
Smarty_Internal_Templatelexer::yy_r2_59() in smarty_internal_templatelexer.php
yy_r2_60
Smarty_Internal_Templatelexer::yy_r2_60() in smarty_internal_templatelexer.php
yy_r2_61
Smarty_Internal_Templatelexer::yy_r2_61() in smarty_internal_templatelexer.php
yy_r2_62
Smarty_Internal_Templatelexer::yy_r2_62() in smarty_internal_templatelexer.php
yy_r2_63
Smarty_Internal_Templatelexer::yy_r2_63() in smarty_internal_templatelexer.php
yy_r2_64
Smarty_Internal_Templatelexer::yy_r2_64() in smarty_internal_templatelexer.php
yy_r2_65
Smarty_Internal_Templatelexer::yy_r2_65() in smarty_internal_templatelexer.php
yy_r2_66
Smarty_Internal_Templatelexer::yy_r2_66() in smarty_internal_templatelexer.php
yy_r2_67
Smarty_Internal_Templatelexer::yy_r2_67() in smarty_internal_templatelexer.php
yy_r2_68
Smarty_Internal_Templatelexer::yy_r2_68() in smarty_internal_templatelexer.php
yy_r2_69
Smarty_Internal_Templatelexer::yy_r2_69() in smarty_internal_templatelexer.php
yy_r2_70
Smarty_Internal_Templatelexer::yy_r2_70() in smarty_internal_templatelexer.php
yy_r2_71
Smarty_Internal_Templatelexer::yy_r2_71() in smarty_internal_templatelexer.php
yy_r2_72
Smarty_Internal_Templatelexer::yy_r2_72() in smarty_internal_templatelexer.php
yy_r2_73
Smarty_Internal_Templatelexer::yy_r2_73() in smarty_internal_templatelexer.php
yy_r2_74
Smarty_Internal_Templatelexer::yy_r2_74() in smarty_internal_templatelexer.php
yy_r2_75
Smarty_Internal_Templatelexer::yy_r2_75() in smarty_internal_templatelexer.php
yy_r2_76
Smarty_Internal_Templatelexer::yy_r2_76() in smarty_internal_templatelexer.php
yy_r3_1
Smarty_Internal_Configfilelexer::yy_r3_1() in smarty_internal_configfilelexer.php
yy_r3_1
Smarty_Internal_Templatelexer::yy_r3_1() in smarty_internal_templatelexer.php
yy_r3_2
Smarty_Internal_Templatelexer::yy_r3_2() in smarty_internal_templatelexer.php
yy_r3_3
Smarty_Internal_Templatelexer::yy_r3_3() in smarty_internal_templatelexer.php
yy_r3_4
Smarty_Internal_Templatelexer::yy_r3_4() in smarty_internal_templatelexer.php
yy_r3_5
Smarty_Internal_Templatelexer::yy_r3_5() in smarty_internal_templatelexer.php
yy_r3_6
Smarty_Internal_Templatelexer::yy_r3_6() in smarty_internal_templatelexer.php
yy_r3_7
Smarty_Internal_Templatelexer::yy_r3_7() in smarty_internal_templatelexer.php
yy_r3_8
Smarty_Internal_Templatelexer::yy_r3_8() in smarty_internal_templatelexer.php
yy_r3_11
Smarty_Internal_Templatelexer::yy_r3_11() in smarty_internal_templatelexer.php
yy_r4
Smarty_Internal_Templateparser::yy_r4() in smarty_internal_templateparser.php
yy_r4
Smarty_Internal_Configfileparser::yy_r4() in smarty_internal_configfileparser.php
yy_r4_1
Smarty_Internal_Templatelexer::yy_r4_1() in smarty_internal_templatelexer.php
yy_r4_1
Smarty_Internal_Configfilelexer::yy_r4_1() in smarty_internal_configfilelexer.php
yy_r4_2
Smarty_Internal_Templatelexer::yy_r4_2() in smarty_internal_templatelexer.php
yy_r4_2
Smarty_Internal_Configfilelexer::yy_r4_2() in smarty_internal_configfilelexer.php
yy_r4_3
Smarty_Internal_Configfilelexer::yy_r4_3() in smarty_internal_configfilelexer.php
yy_r4_4
Smarty_Internal_Templatelexer::yy_r4_4() in smarty_internal_templatelexer.php
yy_r4_5
Smarty_Internal_Templatelexer::yy_r4_5() in smarty_internal_templatelexer.php
yy_r4_6
Smarty_Internal_Templatelexer::yy_r4_6() in smarty_internal_templatelexer.php
yy_r4_7
Smarty_Internal_Templatelexer::yy_r4_7() in smarty_internal_templatelexer.php
yy_r4_8
Smarty_Internal_Templatelexer::yy_r4_8() in smarty_internal_templatelexer.php
yy_r4_9
Smarty_Internal_Templatelexer::yy_r4_9() in smarty_internal_templatelexer.php
yy_r4_10
Smarty_Internal_Templatelexer::yy_r4_10() in smarty_internal_templatelexer.php
yy_r4_11
Smarty_Internal_Templatelexer::yy_r4_11() in smarty_internal_templatelexer.php
yy_r4_12
Smarty_Internal_Templatelexer::yy_r4_12() in smarty_internal_templatelexer.php
yy_r4_13
Smarty_Internal_Templatelexer::yy_r4_13() in smarty_internal_templatelexer.php
yy_r4_17
Smarty_Internal_Templatelexer::yy_r4_17() in smarty_internal_templatelexer.php
yy_r4_18
Smarty_Internal_Templatelexer::yy_r4_18() in smarty_internal_templatelexer.php
yy_r5
Smarty_Internal_Configfileparser::yy_r5() in smarty_internal_configfileparser.php
yy_r5
Smarty_Internal_Templateparser::yy_r5() in smarty_internal_templateparser.php
yy_r5_1
Smarty_Internal_Configfilelexer::yy_r5_1() in smarty_internal_configfilelexer.php
yy_r5_2
Smarty_Internal_Configfilelexer::yy_r5_2() in smarty_internal_configfilelexer.php
yy_r6
Smarty_Internal_Configfileparser::yy_r6() in smarty_internal_configfileparser.php
yy_r6
Smarty_Internal_Templateparser::yy_r6() in smarty_internal_templateparser.php
yy_r7
Smarty_Internal_Configfileparser::yy_r7() in smarty_internal_configfileparser.php
yy_r7
Smarty_Internal_Templateparser::yy_r7() in smarty_internal_templateparser.php
yy_r8
Smarty_Internal_Configfileparser::yy_r8() in smarty_internal_configfileparser.php
yy_r8
Smarty_Internal_Templateparser::yy_r8() in smarty_internal_templateparser.php
yy_r9
Smarty_Internal_Configfileparser::yy_r9() in smarty_internal_configfileparser.php
yy_r9
Smarty_Internal_Templateparser::yy_r9() in smarty_internal_templateparser.php
yy_r10
Smarty_Internal_Templateparser::yy_r10() in smarty_internal_templateparser.php
yy_r10
Smarty_Internal_Configfileparser::yy_r10() in smarty_internal_configfileparser.php
yy_r11
Smarty_Internal_Templateparser::yy_r11() in smarty_internal_templateparser.php
yy_r11
Smarty_Internal_Configfileparser::yy_r11() in smarty_internal_configfileparser.php
yy_r12
Smarty_Internal_Configfileparser::yy_r12() in smarty_internal_configfileparser.php
yy_r12
Smarty_Internal_Templateparser::yy_r12() in smarty_internal_templateparser.php
yy_r13
Smarty_Internal_Configfileparser::yy_r13() in smarty_internal_configfileparser.php
yy_r13
Smarty_Internal_Templateparser::yy_r13() in smarty_internal_templateparser.php
yy_r14
Smarty_Internal_Templateparser::yy_r14() in smarty_internal_templateparser.php
yy_r14
Smarty_Internal_Configfileparser::yy_r14() in smarty_internal_configfileparser.php
yy_r15
Smarty_Internal_Templateparser::yy_r15() in smarty_internal_templateparser.php
yy_r15
Smarty_Internal_Configfileparser::yy_r15() in smarty_internal_configfileparser.php
yy_r16
Smarty_Internal_Templateparser::yy_r16() in smarty_internal_templateparser.php
yy_r16
Smarty_Internal_Configfileparser::yy_r16() in smarty_internal_configfileparser.php
yy_r17
Smarty_Internal_Templateparser::yy_r17() in smarty_internal_templateparser.php
yy_r19
Smarty_Internal_Templateparser::yy_r19() in smarty_internal_templateparser.php
yy_r21
Smarty_Internal_Templateparser::yy_r21() in smarty_internal_templateparser.php
yy_r23
Smarty_Internal_Templateparser::yy_r23() in smarty_internal_templateparser.php
yy_r24
Smarty_Internal_Templateparser::yy_r24() in smarty_internal_templateparser.php
yy_r25
Smarty_Internal_Templateparser::yy_r25() in smarty_internal_templateparser.php
yy_r26
Smarty_Internal_Templateparser::yy_r26() in smarty_internal_templateparser.php
yy_r27
Smarty_Internal_Templateparser::yy_r27() in smarty_internal_templateparser.php
yy_r28
Smarty_Internal_Templateparser::yy_r28() in smarty_internal_templateparser.php
yy_r29
Smarty_Internal_Templateparser::yy_r29() in smarty_internal_templateparser.php
yy_r31
Smarty_Internal_Templateparser::yy_r31() in smarty_internal_templateparser.php
yy_r33
Smarty_Internal_Templateparser::yy_r33() in smarty_internal_templateparser.php
yy_r34
Smarty_Internal_Templateparser::yy_r34() in smarty_internal_templateparser.php
yy_r35
Smarty_Internal_Templateparser::yy_r35() in smarty_internal_templateparser.php
yy_r36
Smarty_Internal_Templateparser::yy_r36() in smarty_internal_templateparser.php
yy_r37
Smarty_Internal_Templateparser::yy_r37() in smarty_internal_templateparser.php
yy_r38
Smarty_Internal_Templateparser::yy_r38() in smarty_internal_templateparser.php
yy_r39
Smarty_Internal_Templateparser::yy_r39() in smarty_internal_templateparser.php
yy_r40
Smarty_Internal_Templateparser::yy_r40() in smarty_internal_templateparser.php
yy_r41
Smarty_Internal_Templateparser::yy_r41() in smarty_internal_templateparser.php
yy_r42
Smarty_Internal_Templateparser::yy_r42() in smarty_internal_templateparser.php
yy_r44
Smarty_Internal_Templateparser::yy_r44() in smarty_internal_templateparser.php
yy_r45
Smarty_Internal_Templateparser::yy_r45() in smarty_internal_templateparser.php
yy_r47
Smarty_Internal_Templateparser::yy_r47() in smarty_internal_templateparser.php
yy_r48
Smarty_Internal_Templateparser::yy_r48() in smarty_internal_templateparser.php
yy_r49
Smarty_Internal_Templateparser::yy_r49() in smarty_internal_templateparser.php
yy_r50
Smarty_Internal_Templateparser::yy_r50() in smarty_internal_templateparser.php
yy_r51
Smarty_Internal_Templateparser::yy_r51() in smarty_internal_templateparser.php
yy_r52
Smarty_Internal_Templateparser::yy_r52() in smarty_internal_templateparser.php
yy_r53
Smarty_Internal_Templateparser::yy_r53() in smarty_internal_templateparser.php
yy_r54
Smarty_Internal_Templateparser::yy_r54() in smarty_internal_templateparser.php
yy_r55
Smarty_Internal_Templateparser::yy_r55() in smarty_internal_templateparser.php
yy_r56
Smarty_Internal_Templateparser::yy_r56() in smarty_internal_templateparser.php
yy_r57
Smarty_Internal_Templateparser::yy_r57() in smarty_internal_templateparser.php
yy_r58
Smarty_Internal_Templateparser::yy_r58() in smarty_internal_templateparser.php
yy_r59
Smarty_Internal_Templateparser::yy_r59() in smarty_internal_templateparser.php
yy_r60
Smarty_Internal_Templateparser::yy_r60() in smarty_internal_templateparser.php
yy_r61
Smarty_Internal_Templateparser::yy_r61() in smarty_internal_templateparser.php
yy_r62
Smarty_Internal_Templateparser::yy_r62() in smarty_internal_templateparser.php
yy_r63
Smarty_Internal_Templateparser::yy_r63() in smarty_internal_templateparser.php
yy_r64
Smarty_Internal_Templateparser::yy_r64() in smarty_internal_templateparser.php
yy_r65
Smarty_Internal_Templateparser::yy_r65() in smarty_internal_templateparser.php
yy_r67
Smarty_Internal_Templateparser::yy_r67() in smarty_internal_templateparser.php
yy_r72
Smarty_Internal_Templateparser::yy_r72() in smarty_internal_templateparser.php
yy_r73
Smarty_Internal_Templateparser::yy_r73() in smarty_internal_templateparser.php
yy_r78
Smarty_Internal_Templateparser::yy_r78() in smarty_internal_templateparser.php
yy_r79
Smarty_Internal_Templateparser::yy_r79() in smarty_internal_templateparser.php
yy_r83
Smarty_Internal_Templateparser::yy_r83() in smarty_internal_templateparser.php
yy_r84
Smarty_Internal_Templateparser::yy_r84() in smarty_internal_templateparser.php
yy_r85
Smarty_Internal_Templateparser::yy_r85() in smarty_internal_templateparser.php
yy_r86
Smarty_Internal_Templateparser::yy_r86() in smarty_internal_templateparser.php
yy_r88
Smarty_Internal_Templateparser::yy_r88() in smarty_internal_templateparser.php
yy_r89
Smarty_Internal_Templateparser::yy_r89() in smarty_internal_templateparser.php
yy_r90
Smarty_Internal_Templateparser::yy_r90() in smarty_internal_templateparser.php
yy_r91
Smarty_Internal_Templateparser::yy_r91() in smarty_internal_templateparser.php
yy_r92
Smarty_Internal_Templateparser::yy_r92() in smarty_internal_templateparser.php
yy_r93
Smarty_Internal_Templateparser::yy_r93() in smarty_internal_templateparser.php
yy_r99
Smarty_Internal_Templateparser::yy_r99() in smarty_internal_templateparser.php
yy_r100
Smarty_Internal_Templateparser::yy_r100() in smarty_internal_templateparser.php
yy_r101
Smarty_Internal_Templateparser::yy_r101() in smarty_internal_templateparser.php
yy_r104
Smarty_Internal_Templateparser::yy_r104() in smarty_internal_templateparser.php
yy_r109
Smarty_Internal_Templateparser::yy_r109() in smarty_internal_templateparser.php
yy_r110
Smarty_Internal_Templateparser::yy_r110() in smarty_internal_templateparser.php
yy_r111
Smarty_Internal_Templateparser::yy_r111() in smarty_internal_templateparser.php
yy_r112
Smarty_Internal_Templateparser::yy_r112() in smarty_internal_templateparser.php
yy_r114
Smarty_Internal_Templateparser::yy_r114() in smarty_internal_templateparser.php
yy_r117
Smarty_Internal_Templateparser::yy_r117() in smarty_internal_templateparser.php
yy_r118
Smarty_Internal_Templateparser::yy_r118() in smarty_internal_templateparser.php
yy_r119
Smarty_Internal_Templateparser::yy_r119() in smarty_internal_templateparser.php
yy_r121
Smarty_Internal_Templateparser::yy_r121() in smarty_internal_templateparser.php
yy_r122
Smarty_Internal_Templateparser::yy_r122() in smarty_internal_templateparser.php
yy_r124
Smarty_Internal_Templateparser::yy_r124() in smarty_internal_templateparser.php
yy_r125
Smarty_Internal_Templateparser::yy_r125() in smarty_internal_templateparser.php
yy_r126
Smarty_Internal_Templateparser::yy_r126() in smarty_internal_templateparser.php
yy_r128
Smarty_Internal_Templateparser::yy_r128() in smarty_internal_templateparser.php
yy_r129
Smarty_Internal_Templateparser::yy_r129() in smarty_internal_templateparser.php
yy_r130
Smarty_Internal_Templateparser::yy_r130() in smarty_internal_templateparser.php
yy_r131
Smarty_Internal_Templateparser::yy_r131() in smarty_internal_templateparser.php
yy_r132
Smarty_Internal_Templateparser::yy_r132() in smarty_internal_templateparser.php
yy_r133
Smarty_Internal_Templateparser::yy_r133() in smarty_internal_templateparser.php
yy_r134
Smarty_Internal_Templateparser::yy_r134() in smarty_internal_templateparser.php
yy_r135
Smarty_Internal_Templateparser::yy_r135() in smarty_internal_templateparser.php
yy_r137
Smarty_Internal_Templateparser::yy_r137() in smarty_internal_templateparser.php
yy_r139
Smarty_Internal_Templateparser::yy_r139() in smarty_internal_templateparser.php
yy_r140
Smarty_Internal_Templateparser::yy_r140() in smarty_internal_templateparser.php
yy_r141
Smarty_Internal_Templateparser::yy_r141() in smarty_internal_templateparser.php
yy_r142
Smarty_Internal_Templateparser::yy_r142() in smarty_internal_templateparser.php
yy_r143
Smarty_Internal_Templateparser::yy_r143() in smarty_internal_templateparser.php
yy_r144
Smarty_Internal_Templateparser::yy_r144() in smarty_internal_templateparser.php
yy_r145
Smarty_Internal_Templateparser::yy_r145() in smarty_internal_templateparser.php
yy_r146
Smarty_Internal_Templateparser::yy_r146() in smarty_internal_templateparser.php
yy_r147
Smarty_Internal_Templateparser::yy_r147() in smarty_internal_templateparser.php
yy_r148
Smarty_Internal_Templateparser::yy_r148() in smarty_internal_templateparser.php
yy_r149
Smarty_Internal_Templateparser::yy_r149() in smarty_internal_templateparser.php
yy_r150
Smarty_Internal_Templateparser::yy_r150() in smarty_internal_templateparser.php
yy_r151
Smarty_Internal_Templateparser::yy_r151() in smarty_internal_templateparser.php
yy_r152
Smarty_Internal_Templateparser::yy_r152() in smarty_internal_templateparser.php
yy_r153
Smarty_Internal_Templateparser::yy_r153() in smarty_internal_templateparser.php
yy_r156
Smarty_Internal_Templateparser::yy_r156() in smarty_internal_templateparser.php
yy_r157
Smarty_Internal_Templateparser::yy_r157() in smarty_internal_templateparser.php
yy_r159
Smarty_Internal_Templateparser::yy_r159() in smarty_internal_templateparser.php
yy_r160
Smarty_Internal_Templateparser::yy_r160() in smarty_internal_templateparser.php
yy_r167
Smarty_Internal_Templateparser::yy_r167() in smarty_internal_templateparser.php
yy_r168
Smarty_Internal_Templateparser::yy_r168() in smarty_internal_templateparser.php
yy_r169
Smarty_Internal_Templateparser::yy_r169() in smarty_internal_templateparser.php
yy_r170
Smarty_Internal_Templateparser::yy_r170() in smarty_internal_templateparser.php
yy_r171
Smarty_Internal_Templateparser::yy_r171() in smarty_internal_templateparser.php
yy_r172
Smarty_Internal_Templateparser::yy_r172() in smarty_internal_templateparser.php
yy_r173
Smarty_Internal_Templateparser::yy_r173() in smarty_internal_templateparser.php
yy_r174
Smarty_Internal_Templateparser::yy_r174() in smarty_internal_templateparser.php
yy_r175
Smarty_Internal_Templateparser::yy_r175() in smarty_internal_templateparser.php
yy_r176
Smarty_Internal_Templateparser::yy_r176() in smarty_internal_templateparser.php
yy_r177
Smarty_Internal_Templateparser::yy_r177() in smarty_internal_templateparser.php
yy_r178
Smarty_Internal_Templateparser::yy_r178() in smarty_internal_templateparser.php
yy_r179
Smarty_Internal_Templateparser::yy_r179() in smarty_internal_templateparser.php
yy_r180
Smarty_Internal_Templateparser::yy_r180() in smarty_internal_templateparser.php
yy_r181
Smarty_Internal_Templateparser::yy_r181() in smarty_internal_templateparser.php
yy_r183
Smarty_Internal_Templateparser::yy_r183() in smarty_internal_templateparser.php
yy_r185
Smarty_Internal_Templateparser::yy_r185() in smarty_internal_templateparser.php
yy_r186
Smarty_Internal_Templateparser::yy_r186() in smarty_internal_templateparser.php
yy_r188
Smarty_Internal_Templateparser::yy_r188() in smarty_internal_templateparser.php
yy_r189
Smarty_Internal_Templateparser::yy_r189() in smarty_internal_templateparser.php
yy_r190
Smarty_Internal_Templateparser::yy_r190() in smarty_internal_templateparser.php
yy_r191
Smarty_Internal_Templateparser::yy_r191() in smarty_internal_templateparser.php
yy_r192
Smarty_Internal_Templateparser::yy_r192() in smarty_internal_templateparser.php
yy_r194
Smarty_Internal_Templateparser::yy_r194() in smarty_internal_templateparser.php
yy_r196
Smarty_Internal_Templateparser::yy_r196() in smarty_internal_templateparser.php
yy_r197
Smarty_Internal_Templateparser::yy_r197() in smarty_internal_templateparser.php
yy_r198
Smarty_Internal_Templateparser::yy_r198() in smarty_internal_templateparser.php
yy_reduce
Smarty_Internal_Configfileparser::yy_reduce() in smarty_internal_configfileparser.php
yy_reduce
Smarty_Internal_Templateparser::yy_reduce() in smarty_internal_templateparser.php
YY_REDUCE_MAX
Smarty_Internal_Templateparser::YY_REDUCE_MAX in smarty_internal_templateparser.php
YY_REDUCE_MAX
Smarty_Internal_Configfileparser::YY_REDUCE_MAX in smarty_internal_configfileparser.php
YY_REDUCE_USE_DFLT
Smarty_Internal_Configfileparser::YY_REDUCE_USE_DFLT in smarty_internal_configfileparser.php
YY_REDUCE_USE_DFLT
Smarty_Internal_Templateparser::YY_REDUCE_USE_DFLT in smarty_internal_templateparser.php
yy_shift
Smarty_Internal_Configfileparser::yy_shift() in smarty_internal_configfileparser.php
yy_shift
Smarty_Internal_Templateparser::yy_shift() in smarty_internal_templateparser.php
YY_SHIFT_MAX
Smarty_Internal_Templateparser::YY_SHIFT_MAX in smarty_internal_templateparser.php
YY_SHIFT_MAX
Smarty_Internal_Configfileparser::YY_SHIFT_MAX in smarty_internal_configfileparser.php
YY_SHIFT_USE_DFLT
Smarty_Internal_Templateparser::YY_SHIFT_USE_DFLT in smarty_internal_templateparser.php
YY_SHIFT_USE_DFLT
Smarty_Internal_Configfileparser::YY_SHIFT_USE_DFLT in smarty_internal_configfileparser.php
yy_syntax_error
Smarty_Internal_Templateparser::yy_syntax_error() in smarty_internal_templateparser.php
yy_syntax_error
Smarty_Internal_Configfileparser::yy_syntax_error() in smarty_internal_configfileparser.php
YY_SZ_ACTTAB
Smarty_Internal_Templateparser::YY_SZ_ACTTAB in smarty_internal_templateparser.php
YY_SZ_ACTTAB
Smarty_Internal_Configfileparser::YY_SZ_ACTTAB in smarty_internal_configfileparser.php
_
$_config_dir
Smarty_Security::$_config_dir in smarty_security.php
$_current_file
Smarty::$_current_file in Smarty.class.php
required by the compiler for BC
$_dir_perms
Smarty::$_dir_perms in Smarty.class.php
default dir permissions
$_file_perms
Smarty::$_file_perms in Smarty.class.php
default file permissions
$_muted_directories
Smarty::$_muted_directories in Smarty.class.php
contains directories outside of SMARTY_DIR that are to be muted by muteExpectedErrors()
$_parserdebug
Smarty::$_parserdebug in Smarty.class.php
internal flag to enable parser debugging
$_php_resource_dir
$_previous_error_handler
error handler returned by set_error_hanlder() in Smarty::muteExpectedErrors()
$_properties
Metadata properties
$_resource_dir
Smarty_Security::$_resource_dir in smarty_security.php
$_secure_dir
Smarty_Security::$_secure_dir in smarty_security.php
$_smarty_vars
Smarty::$_smarty_vars in Smarty.class.php
global internal smarty vars
$_tag_objects
Smarty_Internal_TemplateCompilerBase::$_tag_objects in smarty_internal_templatecompilerbase.php
compile tag objects
$_tag_stack
Smarty::$_tag_stack in Smarty.class.php
block tag hierarchy
$_tag_stack
Smarty_Internal_TemplateCompilerBase::$_tag_stack in smarty_internal_templatecompilerbase.php
tag stack
$_template_dir
Smarty_Security::$_template_dir in smarty_security.php
$_trusted_dir
Smarty_Security::$_trusted_dir in smarty_security.php
$_version
SmartyBC::$_version in SmartyBC.class.php
Smarty 2 BC
_count
Smarty_Internal_Template::_count() in smarty_internal_template.php
[util function] counts an array, arrayaccess/traversable or PDOStatement object
_get_filter_name
Smarty_Internal_TemplateBase::_get_filter_name() in smarty_internal_templatebase.php
Return internal filter name
__call
Smarty_Internal_TemplateBase::__call() in smarty_internal_templatebase.php
Handle unknown class methods
__clone
Smarty::__clone() in Smarty.class.php
magic>> set selfpointer on cloned object
__construct
Smarty_Internal_Resource_PHP::__construct() in smarty_internal_resource_php.php
Create a new PHP Resource
__construct
Smarty_Security::__construct() in smarty_security.php
__construct
Smarty_Internal_Template::__construct() in smarty_internal_template.php
Create template data object
__construct
Smarty_Internal_SmartyTemplateCompiler::__construct() in smarty_internal_smartytemplatecompiler.php
Initialize compiler
__construct
create Source Object container
__construct
create Compiled Object container
__construct
Smarty_Internal_Templatelexer::__construct() in smarty_internal_templatelexer.php
__construct
Smarty_Internal_TemplateCompilerBase::__construct() in smarty_internal_templatecompilerbase.php
Initialize compiler
__construct
TP_yyToken::__construct() in smarty_internal_templateparser.php
__construct
Smarty_Internal_Templateparser::__construct() in smarty_internal_templateparser.php
__construct
Smarty_Variable::__construct() in smarty_internal_data.php
create Smarty variable object
__construct
TPC_yyToken::__construct() in smarty_internal_configfileparser.php
__construct
SmartyBC::__construct() in SmartyBC.class.php
Initialize new SmartyBC object
__construct
Smarty_Internal_Configfileparser::__construct() in smarty_internal_configfileparser.php
__construct
Smarty_Internal_Configfilelexer::__construct() in smarty_internal_configfilelexer.php
__construct
Smarty_Template_Cached::__construct() in smarty_cacheresource.php
create Cached Object container
__construct
Smarty_Config_Source::__construct() in smarty_config_source.php
create Config Object container
__construct
__construct
Smarty::__construct() in Smarty.class.php
Initialize new Smarty object
__construct
__construct
__construct
Smarty_CacheResource_Memcache::__construct() in cacheresource.memcache.php
__construct
Smarty_Data::__construct() in smarty_internal_data.php
create Smarty data object
__construct
__construct
Smarty_Internal_Config_File_Compiler::__construct() in smarty_internal_config_file_compiler.php
Initialize compiler
__destruct
Smarty_Internal_Template::__destruct() in smarty_internal_template.php
Template data object destrutor
__destruct
Smarty_Internal_Configfileparser::__destruct() in smarty_internal_configfileparser.php
__destruct
Smarty_Internal_Templateparser::__destruct() in smarty_internal_templateparser.php
__destruct
Smarty::__destruct() in Smarty.class.php
Class destructor
__get
Smarty_Template_Source::__get() in smarty_resource.php
magic>> Generic getter.
__get
Smarty::__get() in Smarty.class.php
magic>> Generic getter.
__get
Smarty_Config_Source::__get() in smarty_config_source.php
magic>> Generic getter.
__get
Undefined_Smarty_Variable::__get() in smarty_internal_data.php
Returns FALSE for 'nocache' and NULL otherwise.
__get
Smarty_Internal_Template::__get() in smarty_internal_template.php
get Smarty property in template context
__set
Smarty::__set() in Smarty.class.php
magic>> Generic setter.
__set
Smarty_Internal_Template::__set() in smarty_internal_template.php
set Smarty property in template context
__set
Smarty_Config_Source::__set() in smarty_config_source.php
magic>> Generic setter.
__set
Smarty_Template_Source::__set() in smarty_resource.php
magic>> Generic Setter.
__toString
Undefined_Smarty_Variable::__toString() in smarty_internal_data.php
Always returns an empty string.
__toString
Smarty_Variable::__toString() in smarty_internal_data.php
magic>> String conversion
__toString
TP_yyToken::__toString() in smarty_internal_templateparser.php
__toString
TPC_yyToken::__toString() in smarty_internal_configfileparser.php
a b c d e f g h i l m n o p r s t u v w y _
smarty3-3.1.13/development/Smarty3Doc/index.html0000644000175000017500000000165411637420324020154 0ustar mikemike Smarty 3.1.2 <H2>Frame Alert</H2> <P>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.</P> smarty3-3.1.13/development/Smarty3Doc/li_Smarty.html0000644000175000017500000013644211634664106021021 0ustar mikemike
Smarty
Description
Class trees
Index of elements
Classes
SmartyCompilerException
SmartyException
Functions
smartyAutoload
Files
Smarty.class.php
smarty_cacheresource.php
Cacher
Classes
Smarty_CacheResource
Smarty_CacheResource_Custom
Smarty_CacheResource_KeyValueStore
Smarty_Internal_CacheResource_File
Files
smarty_cacheresource_custom.php
smarty_cacheresource_keyvaluestore.php
smarty_internal_cacheresource_file.php
Compiler
Classes
Smarty_Internal_CompileBase
Smarty_Internal_Compile_Append
Smarty_Internal_Compile_Assign
Smarty_Internal_Compile_Block
Smarty_Internal_Compile_Blockclose
Smarty_Internal_Compile_Break
Smarty_Internal_Compile_Call
Smarty_Internal_Compile_Capture
Smarty_Internal_Compile_CaptureClose
Smarty_Internal_Compile_Config_Load
Smarty_Internal_Compile_Continue
Smarty_Internal_Compile_Debug
Smarty_Internal_Compile_Else
Smarty_Internal_Compile_Elseif
Smarty_Internal_Compile_Eval
Smarty_Internal_Compile_Extends
Smarty_Internal_Compile_For
Smarty_Internal_Compile_Forclose
Smarty_Internal_Compile_Foreach
Smarty_Internal_Compile_Foreachclose
Smarty_Internal_Compile_Foreachelse
Smarty_Internal_Compile_Forelse
Smarty_Internal_Compile_Function
Smarty_Internal_Compile_Functionclose
Smarty_Internal_Compile_If
Smarty_Internal_Compile_Ifclose
Smarty_Internal_Compile_Include
Smarty_Internal_Compile_Include_Php
Smarty_Internal_Compile_Insert
Smarty_Internal_Compile_Ldelim
Smarty_Internal_Compile_Nocache
Smarty_Internal_Compile_Nocacheclose
Smarty_Internal_Compile_Private_Block_Plugin
Smarty_Internal_Compile_Private_Function_Plugin
Smarty_Internal_Compile_Private_Modifier
Smarty_Internal_Compile_Private_Object_Block_Function
Smarty_Internal_Compile_Private_Object_Function
Smarty_Internal_Compile_Private_Print_Expression
Smarty_Internal_Compile_Private_Registered_Block
Smarty_Internal_Compile_Private_Registered_Function
Smarty_Internal_Compile_Private_Special_Variable
Smarty_Internal_Compile_Rdelim
Smarty_Internal_Compile_Section
Smarty_Internal_Compile_Sectionclose
Smarty_Internal_Compile_Sectionelse
Smarty_Internal_Compile_Setfilter
Smarty_Internal_Compile_Setfilterclose
Smarty_Internal_Compile_While
Smarty_Internal_Compile_Whileclose
Smarty_Internal_Configfileparser
Smarty_Internal_Nocache_Insert
Smarty_Internal_SmartyTemplateCompiler
Smarty_Internal_TemplateCompilerBase
Smarty_Internal_Templatelexer
Smarty_Internal_Templateparser
TPC_yyStackEntry
TPC_yyToken
TP_yyStackEntry
TP_yyToken
Files
smarty_internal_compilebase.php
smarty_internal_compile_append.php
smarty_internal_compile_assign.php
smarty_internal_compile_block.php
smarty_internal_compile_break.php
smarty_internal_compile_call.php
smarty_internal_compile_capture.php
smarty_internal_compile_config_load.php
smarty_internal_compile_continue.php
smarty_internal_compile_debug.php
smarty_internal_compile_eval.php
smarty_internal_compile_extends.php
smarty_internal_compile_for.php
smarty_internal_compile_foreach.php
smarty_internal_compile_function.php
smarty_internal_compile_if.php
smarty_internal_compile_include.php
smarty_internal_compile_include_php.php
smarty_internal_compile_insert.php
smarty_internal_compile_ldelim.php
smarty_internal_compile_nocache.php
smarty_internal_compile_private_block_plugin.php
smarty_internal_compile_private_function_plugin.php
smarty_internal_compile_private_modifier.php
smarty_internal_compile_private_object_block_function.php
smarty_internal_compile_private_object_function.php
smarty_internal_compile_private_print_expression.php
smarty_internal_compile_private_registered_block.php
smarty_internal_compile_private_registered_function.php
smarty_internal_compile_private_special_variable.php
smarty_internal_compile_rdelim.php
smarty_internal_compile_section.php
smarty_internal_compile_setfilter.php
smarty_internal_compile_while.php
smarty_internal_configfileparser.php
smarty_internal_nocache_insert.php
smarty_internal_parsetree.php
smarty_internal_smartytemplatecompiler.php
smarty_internal_templatecompilerbase.php
smarty_internal_templatelexer.php
smarty_internal_templateparser.php
Config
Classes
Smarty_Internal_Configfilelexer
Smarty_Internal_Config_File_Compiler
Files
smarty_internal_config.php
smarty_internal_configfilelexer.php
smarty_internal_config_file_compiler.php
Debug
Classes
Smarty_Internal_Debug
Functions
smarty_modifier_debug_print_var
Files
modifier.debug_print_var.php
smarty_internal_debug.php
PluginsBlock
Functions
smarty_block_textformat
Files
block.textformat.php
PluginsFilter
Functions
smarty_outputfilter_trimwhitespace
smarty_variablefilter_htmlspecialchars
Files
outputfilter.trimwhitespace.php
variablefilter.htmlspecialchars.php
PluginsFunction
Functions
smarty_function_counter
smarty_function_cycle
smarty_function_fetch
smarty_function_html_checkboxes
smarty_function_html_checkboxes_output
smarty_function_html_image
smarty_function_html_options
smarty_function_html_options_optgroup
smarty_function_html_options_optoutput
smarty_function_html_radios
smarty_function_html_radios_output
smarty_function_html_select_date
smarty_function_html_select_time
smarty_function_html_table
smarty_function_html_table_cycle
smarty_function_mailto
smarty_function_math
Files
function.counter.php
function.cycle.php
function.fetch.php
function.html_checkboxes.php
function.html_image.php
function.html_options.php
function.html_radios.php
function.html_select_date.php
function.html_select_time.php
function.html_table.php
function.mailto.php
function.math.php
PluginsInternal
Classes
Smarty_Internal_Filter_Handler
Smarty_Internal_Function_Call_Handler
Smarty_Internal_Get_Include_Path
Smarty_Internal_Write_File
Files
smarty_internal_filter_handler.php
smarty_internal_function_call_handler.php
smarty_internal_get_include_path.php
smarty_internal_write_file.php
PluginsModifier
Functions
smarty_modifier_capitalize
smarty_modifier_date_format
smarty_modifier_escape
smarty_modifier_regex_replace
smarty_modifier_replace
smarty_modifier_spacify
smarty_modifier_truncate
Files
modifier.capitalize.php
modifier.date_format.php
modifier.escape.php
modifier.regex_replace.php
modifier.replace.php
modifier.spacify.php
modifier.truncate.php
PluginsModifierCompiler
Functions
smarty_modifiercompiler_cat
smarty_modifiercompiler_count_characters
smarty_modifiercompiler_count_paragraphs
smarty_modifiercompiler_count_sentences
smarty_modifiercompiler_count_words
smarty_modifiercompiler_default
smarty_modifiercompiler_escape
smarty_modifiercompiler_from_charset
smarty_modifiercompiler_indent
smarty_modifiercompiler_lower
smarty_modifiercompiler_noprint
smarty_modifiercompiler_string_format
smarty_modifiercompiler_strip
smarty_modifiercompiler_strip_tags
smarty_modifiercompiler_to_charset
smarty_modifiercompiler_unescape
smarty_modifiercompiler_upper
smarty_modifiercompiler_wordwrap
Files
modifiercompiler.cat.php
modifiercompiler.count_characters.php
modifiercompiler.count_paragraphs.php
modifiercompiler.count_sentences.php
modifiercompiler.count_words.php
modifiercompiler.default.php
modifiercompiler.escape.php
modifiercompiler.from_charset.php
modifiercompiler.indent.php
modifiercompiler.lower.php
modifiercompiler.noprint.php
modifiercompiler.string_format.php
modifiercompiler.strip.php
modifiercompiler.strip_tags.php
modifiercompiler.to_charset.php
modifiercompiler.unescape.php
modifiercompiler.upper.php
modifiercompiler.wordwrap.php
PluginsShared
Functions
smarty_function_escape_special_chars
smarty_literal_compiler_param
smarty_make_timestamp
smarty_mb_from_unicode
smarty_mb_str_replace
smarty_mb_to_unicode
smarty_mb_wordwrap
Files
shared.escape_special_chars.php
shared.literal_compiler_param.php
shared.make_timestamp.php
shared.mb_str_replace.php
shared.mb_unicode.php
shared.mb_wordwrap.php
Security
Classes
Smarty_Internal_Utility
Smarty_Security
Files
smarty_internal_utility.php
smarty_security.php
Template
Classes
Smarty
SmartyBC
Smarty_Data
Smarty_Internal_Data
Smarty_Internal_Template
Smarty_Internal_TemplateBase
Smarty_Variable
Undefined_Smarty_Variable
Functions
smarty_php_tag
Files
SmartyBC.class.php
smarty_internal_data.php
smarty_internal_template.php
smarty_internal_templatebase.php
TemplateResources
Classes
Smarty_Config_Source
Smarty_Internal_Resource_Eval
Smarty_Internal_Resource_Extends
Smarty_Internal_Resource_File
Smarty_Internal_Resource_PHP
Smarty_Internal_Resource_Registered
Smarty_Internal_Resource_Stream
Smarty_Internal_Resource_String
Smarty_Resource
Smarty_Resource_Custom
Smarty_Resource_Recompiled
Smarty_Resource_Uncompiled
Smarty_Template_Cached
Smarty_Template_Compiled
Smarty_Template_Source
Files
smarty_config_source.php
smarty_internal_resource_eval.php
smarty_internal_resource_extends.php
smarty_internal_resource_file.php
smarty_internal_resource_php.php
smarty_internal_resource_registered.php
smarty_internal_resource_stream.php
smarty_internal_resource_string.php
smarty_resource.php
smarty_resource_custom.php
smarty_resource_recompiled.php
smarty_resource_uncompiled.php

phpDocumentor v 1.4.1

smarty3-3.1.13/development/Smarty3Doc/elementindex_Resource-examples.html0000644000175000017500000002157211634664106025217 0ustar mikemike

[Resource-examples] element index

Package indexes

All elements
d f m p r s _
_
__construct
__construct
d
$db
Smarty_Resource_Mysqls::$db in resource.mysqls.php
$db
Smarty_Resource_Mysql::$db in resource.mysql.php
f
$fetch
Smarty_Resource_Mysqls::$fetch in resource.mysqls.php
$fetch
Smarty_Resource_Mysql::$fetch in resource.mysql.php
fetch
Smarty_Resource_Mysql::fetch() in resource.mysql.php
Fetch a template and its modification time from database
fetch
Smarty_Resource_Mysqls::fetch() in resource.mysqls.php
Fetch a template and its modification time from database
fetchTimestamp
Fetch a template's modification time from database
m
$mtime
Smarty_Resource_Mysql::$mtime in resource.mysql.php
p
populate
Smarty_Resource_Extendsall::populate() in resource.extendsall.php
populate Source Object with meta data from Resource
r
resource.extendsall.php
resource.extendsall.php in resource.extendsall.php
resource.mysql.php
resource.mysql.php in resource.mysql.php
resource.mysqls.php
resource.mysqls.php in resource.mysqls.php
s
Smarty_Resource_Extendsall
Smarty_Resource_Extendsall in resource.extendsall.php
Extends All Resource
Smarty_Resource_Mysql
Smarty_Resource_Mysql in resource.mysql.php
MySQL Resource
Smarty_Resource_Mysqls
Smarty_Resource_Mysqls in resource.mysqls.php
MySQL Resource
d f m p r s _
smarty3-3.1.13/development/Smarty3Doc/media/0000755000175000017500000000000012141655571017235 5ustar mikemikesmarty3-3.1.13/development/Smarty3Doc/media/banner.css0000644000175000017500000000061111467352725021217 0ustar mikemikebody { background-color: #CCCCFF; margin: 0px; padding: 0px; } /* Banner (top bar) classes */ .banner { } .banner-menu { clear: both; padding: .5em; border-top: 2px solid #6666AA; } .banner-title { text-align: right; font-size: 20pt; font-weight: bold; margin: .2em; } .package-selector { background-color: #AAAADD; border: 1px solid black; color: yellow; } smarty3-3.1.13/development/Smarty3Doc/media/stylesheet.css0000644000175000017500000001243711467352725022154 0ustar mikemikea { color: #336699; text-decoration: none; } a:hover { color: #6699CC; text-decoration: underline; } a:active { color: #6699CC; text-decoration: underline; } body { background : #FFFFFF; } body, table { font-family: Georgia, Times New Roman, Times, serif; font-size: 10pt } p, li { line-height: 140% } a img { border: 0px; } dd { margin-left: 0px; padding-left: 1em; } /* Page layout/boxes */ .info-box {} .info-box-title { margin: 1em 0em 0em 0em; padding: .25em; font-weight: normal; font-size: 14pt; border: 2px solid #999999; background-color: #CCCCFF } .info-box-body { border: 1px solid #999999; padding: .5em; } .nav-bar { font-size: 8pt; white-space: nowrap; text-align: right; padding: .2em; margin: 0em 0em 1em 0em; } .oddrow { background-color: #F8F8F8; border: 1px solid #AAAAAA; padding: .5em; margin-bottom: 1em} .evenrow { border: 1px solid #AAAAAA; padding: .5em; margin-bottom: 1em} .page-body { max-width: 800px; margin: auto; } .tree dl { margin: 0px } /* Index formatting classes */ .index-item-body { margin-top: .5em; margin-bottom: .5em} .index-item-description { margin-top: .25em } .index-item-details { font-weight: normal; font-style: italic; font-size: 8pt } .index-letter-section { background-color: #EEEEEE; border: 1px dotted #999999; padding: .5em; margin-bottom: 1em} .index-letter-title { font-size: 12pt; font-weight: bold } .index-letter-menu { text-align: center; margin: 1em } .index-letter { font-size: 12pt } /* Docbook classes */ .description {} .short-description { font-weight: bold; color: #666666; } .tags { padding-left: 0em; margin-left: 3em; color: #666666; list-style-type: square; } .parameters { padding-left: 0em; margin-left: 3em; font-style: italic; list-style-type: square; } .redefinitions { font-size: 8pt; padding-left: 0em; margin-left: 2em; } .package { } .package-title { font-weight: bold; font-size: 14pt; border-bottom: 1px solid black } .package-details { font-size: 85%; } .sub-package { font-weight: bold; font-size: 120% } .tutorial { border-width: thin; border-color: #0066ff } .tutorial-nav-box { width: 100%; border: 1px solid #999999; background-color: #F8F8F8; } .nav-button-disabled { color: #999999; } .nav-button:active, .nav-button:focus, .nav-button:hover { background-color: #DDDDDD; outline: 1px solid #999999; text-decoration: none } .folder-title { font-style: italic } /* Generic formatting */ .field { font-weight: bold; } .detail { font-size: 8pt; } .notes { font-style: italic; font-size: 8pt; } .separator { background-color: #999999; height: 2px; } .warning { color: #FF6600; } .disabled { font-style: italic; color: #999999; } /* Code elements */ .line-number { } .class-table { width: 100%; } .class-table-header { border-bottom: 1px dotted #666666; text-align: left} .class-name { color: #000000; font-weight: bold; } .method-summary { padding-left: 1em; font-size: 8pt } .method-header { } .method-definition { margin-bottom: .3em } .method-title { font-weight: bold; } .method-name { font-weight: bold; } .method-signature { font-size: 85%; color: #666666; margin: .5em 0em } .method-result { font-style: italic; } .var-summary { padding-left: 1em; font-size: 8pt; } .var-header { } .var-title { margin-bottom: .3em } .var-type { font-style: italic; } .var-name { font-weight: bold; } .var-default {} .var-description { font-weight: normal; color: #000000; } .include-title { } .include-type { font-style: italic; } .include-name { font-weight: bold; } .const-title { } .const-name { font-weight: bold; } /* Syntax highlighting */ .src-code { border: 1px solid #336699; padding: 1em; background-color: #EEEEEE; } .src-line { font-family: 'Courier New', Courier, monospace; font-weight: normal; } .src-comm { color: green; } .src-id { } .src-inc { color: #0000FF; } .src-key { color: #0000FF; } .src-num { color: #CC0000; } .src-str { color: #66cccc; } .src-sym { font-weight: bold; } .src-var { } .src-php { font-weight: bold; } .src-doc { color: #009999 } .src-doc-close-template { color: #0000FF } .src-doc-coretag { color: #0099FF; font-weight: bold } .src-doc-inlinetag { color: #0099FF } .src-doc-internal { color: #6699cc } .src-doc-tag { color: #0080CC } .src-doc-template { color: #0000FF } .src-doc-type { font-style: italic } .src-doc-var { font-style: italic } .tute-tag { color: #009999 } .tute-attribute-name { color: #0000FF } .tute-attribute-value { color: #0099FF } .tute-entity { font-weight: bold; } .tute-comment { font-style: italic } .tute-inline-tag { color: #636311; font-weight: bold } /* tutorial */ .authors { } .author { font-style: italic; font-weight: bold } .author-blurb { margin: .5em 0em .5em 2em; font-size: 85%; font-weight: normal; font-style: normal } .example { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em; } *[class="example"] { line-height : 0.5em } .listing { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em; white-space: nowrap; } *[class="listing"] { line-height : 0.5em } .release-info { font-size: 85%; font-style: italic; margin: 1em 0em } .ref-title-box { } .ref-title { } .ref-purpose { font-style: italic; color: #666666 } .ref-synopsis { } .title { font-weight: bold; margin: 1em 0em 0em 0em; padding: .25em; border: 2px solid #999999; background-color: #CCCCFF } .cmd-synopsis { margin: 1em 0em } .cmd-title { font-weight: bold } .toc { margin-left: 2em; padding-left: 0em } smarty3-3.1.13/development/Smarty3Doc/classtrees_Resource-examples.html0000644000175000017500000000302011637420324024665 0ustar mikemike

Root class Smarty_Resource_Extendsall

Root class Smarty_Resource_Mysql

Root class Smarty_Resource_Mysqls

Documentation generated on Sat, 24 Sep 2011 20:23:04 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/ric_README.html0000644000175000017500000005443111637420324020640 0ustar mikemike

README

Smarty 3.x

Author: Monte Ohrt <monte at ohrt dot com >
Author: Uwe Tews

AN INTRODUCTION TO SMARTY 3

NOTICE FOR 3.1 release:

Please see the SMARTY_3.1_NOTES.txt file that comes with the distribution.

NOTICE for 3.0.5 release:

Smarty now follows the PHP error_reporting level by default. If PHP does not mask E_NOTICE and you try to access an unset template variable, you will now get an E_NOTICE warning. To revert to the old behavior:

$smarty->error_reporting = E_ALL & ~E_NOTICE;

NOTICE for 3.0 release:

IMPORTANT: Some API adjustments have been made between the RC4 and 3.0 release.
We felt it is better to make these now instead of after a 3.0 release, then have to
immediately deprecate APIs in 3.1. Online documentation has been updated
to reflect these changes. Specifically:

---- API CHANGES RC4 -> 3.0 ----

$smarty->register->*
$smarty->unregister->*
$smarty->utility->*
$samrty->cache->*

Have all been changed to local method calls such as:

$smarty->clearAllCache()
$smarty->registerFoo()
$smarty->unregisterFoo()
$smarty->testInstall()
etc.

Registration of function, block, compiler, and modifier plugins have been
consolidated under two API calls:

$smarty->registerPlugin(...)
$smarty->unregisterPlugin(...)

Registration of pre, post, output and variable filters have been
consolidated under two API calls:

$smarty->registerFilter(...)
$smarty->unregisterFilter(...)

Please refer to the online documentation for all specific changes:

http://www.smarty.net/documentation

----

The Smarty 3 API has been refactored to a syntax geared
for consistency and modularity. The Smarty 2 API syntax is still supported, but
will throw a deprecation notice. You can disable the notices, but it is highly
recommended to adjust your syntax to Smarty 3, as the Smarty 2 syntax must run
through an extra rerouting wrapper.

Basically, all Smarty methods now follow the "fooBarBaz" camel case syntax. Also,
all Smarty properties now have getters and setters. So for example, the property
$smarty->cache_dir can be set with $smarty->setCacheDir('foo/') and can be
retrieved with $smarty->getCacheDir().

Some of the Smarty 3 APIs have been revoked such as the "is*" methods that were
just duplicate functions of the now available "get*" methods.

Here is a rundown of the Smarty 3 API:

$smarty->fetch($template, $cache_id = null, $compile_id = null, $parent = null)
$smarty->display($template, $cache_id = null, $compile_id = null, $parent = null)
$smarty->isCached($template, $cache_id = null, $compile_id = null)
$smarty->createData($parent = null)
$smarty->createTemplate($template, $cache_id = null, $compile_id = null, $parent = null)
$smarty->enableSecurity()
$smarty->disableSecurity()
$smarty->setTemplateDir($template_dir)
$smarty->addTemplateDir($template_dir)
$smarty->templateExists($resource_name)
$smarty->loadPlugin($plugin_name, $check = true)
$smarty->loadFilter($type, $name)
$smarty->setExceptionHandler($handler)
$smarty->addPluginsDir($plugins_dir)
$smarty->getGlobal($varname = null)
$smarty->getRegisteredObject($name)
$smarty->getDebugTemplate()
$smarty->setDebugTemplate($tpl_name)
$smarty->assign($tpl_var, $value = null, $nocache = false)
$smarty->assignGlobal($varname, $value = null, $nocache = false)
$smarty->assignByRef($tpl_var, &$value, $nocache = false)
$smarty->append($tpl_var, $value = null, $merge = false, $nocache = false)
$smarty->appendByRef($tpl_var, &$value, $merge = false)
$smarty->clearAssign($tpl_var)
$smarty->clearAllAssign()
$smarty->configLoad($config_file, $sections = null)
$smarty->getVariable($variable, $_ptr = null, $search_parents = true, $error_enable = true)
$smarty->getConfigVariable($variable)
$smarty->getStreamVariable($variable)
$smarty->getConfigVars($varname = null)
$smarty->clearConfig($varname = null)
$smarty->getTemplateVars($varname = null, $_ptr = null, $search_parents = true)
$smarty->clearAllCache($exp_time = null, $type = null)
$smarty->clearCache($template_name, $cache_id = null, $compile_id = null, $exp_time = null, $type = null)

$smarty->registerPlugin($type, $tag, $callback, $cacheable = true, $cache_attr = array())

$smarty->registerObject($object_name, $object_impl, $allowed = array(), $smarty_args = true, $block_methods = array())

$smarty->registerFilter($type, $function_name)
$smarty->registerResource($resource_type, $function_names)
$smarty->registerDefaultPluginHandler($function_name)
$smarty->registerDefaultTemplateHandler($function_name)

$smarty->unregisterPlugin($type, $tag)
$smarty->unregisterObject($object_name)
$smarty->unregisterFilter($type, $function_name)
$smarty->unregisterResource($resource_type)

$smarty->compileAllTemplates($extention = '.tpl', $force_compile = false, $time_limit = 0, $max_errors = null)
$smarty->clearCompiledTemplate($resource_name = null, $compile_id = null, $exp_time = null)
$smarty->testInstall()

// then all the getters/setters, available for all properties. Here are a few:

$caching = $smarty->getCaching();      // get $smarty->caching
$smarty->setCaching(true);             // set $smarty->caching
$smarty->setDeprecationNotices(false); // set $smarty->deprecation_notices
$smarty->setCacheId($id);              // set $smarty->cache_id
$debugging = $smarty->getDebugging();  // get $smarty->debugging


FILE STRUCTURE

The Smarty 3 file structure is similar to Smarty 2:

/libs/
  Smarty.class.php
/libs/sysplugins/
  internal.*
/libs/plugins/
  function.mailto.php
  modifier.escape.php
  ...

A lot of Smarty 3 core functionality lies in the sysplugins directory; you do
not need to change any files here. The /libs/plugins/ folder is where Smarty
plugins are located. You can add your own here, or create a separate plugin
directory, just the same as Smarty 2. You will still need to create your own
/cache/, /templates/, /templates_c/, /configs/ folders. Be sure /cache/ and
/templates_c/ are writable.

The typical way to use Smarty 3 should also look familiar:

require('Smarty.class.php');
$smarty = new Smarty;
$smarty->assign('foo','bar');
$smarty->display('index.tpl');


However, Smarty 3 works completely different on the inside. Smarty 3 is mostly
backward compatible with Smarty 2, except for the following items:

*) Smarty 3 is PHP 5 only. It will not work with PHP 4.
*) The {php} tag is disabled by default. Enable with $smarty->allow_php_tag=true.
*) Delimiters surrounded by whitespace are no longer treated as Smarty tags.
   Therefore, { foo } will not compile as a tag, you must use {foo}. This change
   Makes Javascript/CSS easier to work with, eliminating the need for {literal}.
   This can be disabled by setting $smarty->auto_literal = false;
*) The Smarty 3 API is a bit different. Many Smarty 2 API calls are deprecated
   but still work. You will want to update your calls to Smarty 3 for maximum
   efficiency.


There are many things that are new to Smarty 3. Here are the notable items:
   
LEXER/PARSER
============

Smarty 3 now uses a lexing tokenizer for its parser/compiler. Basically, this
means Smarty has some syntax additions that make life easier such as in-template
math, shorter/intuitive function parameter options, infinite function recursion,
more accurate error handling, etc.


WHAT IS NEW IN SMARTY TEMPLATE SYNTAX
=====================================

Smarty 3 allows expressions almost anywhere. Expressions can include PHP
functions as long as they are not disabled by the security policy, object
methods and properties, etc. The {math} plugin is no longer necessary but
is still supported for BC.

Examples:
{$x+$y}                           will output the sum of x and y.
{$foo = strlen($bar)}             function in assignment
{assign var=foo value= $x+$y}     in attributes 
{$foo = myfunct( ($x+$y)*3 )}     as function parameter 
{$foo[$x+3]}                      as array index

Smarty tags can be used as values within other tags.
Example:  {$foo={counter}+3}

Smarty tags can also be used inside double quoted strings.
Example:  {$foo="this is message {counter}"}

You can define arrays within templates.
Examples:
{assign var=foo value=[1,2,3]}
{assign var=foo value=['y'=>'yellow','b'=>'blue']}
Arrays can be nested.
{assign var=foo value=[1,[9,8],3]}

There is a new short syntax supported for assigning variables.
Example: {$foo=$bar+2}

You can assign a value to a specific array element. If the variable exists but
is not an array, it is converted to an array before the new values are assigned.
Examples:
{$foo['bar']=1}
{$foo['bar']['blar']=1}

You can append values to an array. If the variable exists but is not an array,
it is converted to an array before the new values are assigned.
Example: {$foo[]=1}

You can use a PHP-like syntax for accessing array elements, as well as the
original "dot" notation.
Examples:
{$foo[1]}             normal access
{$foo['bar']}
{$foo['bar'][1]}
{$foo[$x+$x]}         index may contain any expression
{$foo[$bar[1]]}       nested index
{$foo[section_name]}  smarty section access, not array access!

The original "dot" notation stays, and with improvements.
Examples:
{$foo.a.b.c}        =>  $foo['a']['b']['c'] 
{$foo.a.$b.c}       =>  $foo['a'][$b]['c']        with variable index
{$foo.a.{$b+4}.c}   =>  $foo['a'][$b+4]['c']       with expression as index
{$foo.a.{$b.c}}     =>  $foo['a'][$b['c']]         with nested index

note that { and } are used to address ambiguties when nesting the dot syntax. 

Variable names themselves can be variable and contain expressions.
Examples:
$foo         normal variable
$foo_{$bar}  variable name containing other variable 
$foo_{$x+$y} variable name containing expressions 
$foo_{$bar}_buh_{$blar}  variable name with multiple segments
{$foo_{$x}}  will output the variable $foo_1 if $x has a value of 1.

Object method chaining is implemented.
Example: {$object->method1($x)->method2($y)}

{for} tag added for looping (replacement for {section} tag):
{for $x=0, $y=count($foo); $x<$y; $x++}  ....  {/for}
Any number of statements can be used separated by comma as the first
inital expression at {for}.

{for $x = $start to $end step $step} ... {/for}is in the SVN now .
You can use also
{for $x = $start to $end} ... {/for}
In this case the step value will be automaticall 1 or -1 depending on the start and end values.
Instead of $start and $end you can use any valid expression.
Inside the loop the following special vars can be accessed:
$x@iteration = number of iteration
$x@total = total number of iterations
$x@first = true on first iteration
$x@last = true on last iteration


The Smarty 2 {section} syntax is still supported.

New shorter {foreach} syntax to loop over an array.
Example: {foreach $myarray as $var}...{/foreach}

Within the foreach loop, properties are access via:

$var@key            foreach $var array key
$var@iteration      foreach current iteration count (1,2,3...)
$var@index          foreach current index count (0,1,2...)
$var@total          foreach $var array total
$var@first          true on first iteration
$var@last           true on last iteration

The Smarty 2 {foreach} tag syntax is still supported.

NOTE: {$bar[foo]} still indicates a variable inside of a {section} named foo. 
If you want to access an array element with index foo, you must use quotes
such as {$bar['foo']}, or use the dot syntax {$bar.foo}.

while block tag is now implemented:
{while $foo}...{/while}
{while $x lt 10}...{/while}

Direct access to PHP functions:
Just as you can use PHP functions as modifiers directly, you can now access
PHP functions directly, provided they are permitted by security settings:
{time()}

There is a new {function}...{/function} block tag to implement a template function.
This enables reuse of code sequences like a plugin function. It can call itself recursively.
Template function must be called with the new {call name=foo...} tag.

Example:

Template file:
{function name=menu level=0}
  <ul class="level{$level}">
  {foreach $data as $entry}
    {if is_array($entry)}
      <li>{$entry@key}</li>
       {call name=menu data=$entry level=$level+1}
    {else}
      <li>{$entry}</li>
    {/if}
  {/foreach}
  </ul>
{/function}

{$menu = ['item1','item2','item3' => ['item3-1','item3-2','item3-3' =>
  ['item3-3-1','item3-3-2']],'item4']}

{call name=menu data=$menu}


Generated output:
    * item1
    * item2
    * item3
          o item3-1
          o item3-2
          o item3-3
                + item3-3-1
                + item3-3-2
    * item4

The function tag itself must have the "name" attribute. This name is the tag
name when calling the function. The function tag may have any number of
additional attributes. These will be default settings for local variables.

New {nocache} block function:
{nocache}...{/nocache} will declare a section of the template to be non-cached
when template caching is enabled.

New nocache attribute:
You can declare variable/function output as non-cached with the nocache attribute.
Examples:

{$foo nocache=true}
{$foo nocache} /* same */

{foo bar="baz" nocache=true}
{foo bar="baz" nocache} /* same */

{time() nocache=true}
{time() nocache} /* same */

Or you can also assign the variable in your script as nocache:
$smarty->assign('foo',$something,true); // third param is nocache setting
{$foo} /* non-cached */

$smarty.current_dir returns the directory name of the current template.

You can use strings directly as templates with the "string" resource type.
Examples:
$smarty->display('string:This is my template, {$foo}!'); // php
{include file="string:This is my template, {$foo}!"} // template



VARIABLE SCOPE / VARIABLE STORAGE
=================================

In Smarty 2, all assigned variables were stored within the Smarty object. 
Therefore, all variables assigned in PHP were accessible by all subsequent 
fetch and display template calls.

In Smarty 3, we have the choice to assign variables to the main Smarty object, 
to user-created data objects, and to user-created template objects. 
These objects can be chained. The object at the end of a chain can access all
variables belonging to that template and all variables within the parent objects.
The Smarty object can only be the root of a chain, but a chain can be isolated
from the Smarty object.

All known Smarty assignment interfaces will work on the data and template objects.

Besides the above mentioned objects, there is also a special storage area for
global variables.

A Smarty data object can be created as follows:
$data = $smarty->createData();    // create root data object
$data->assign('foo','bar');       // assign variables as usual
$data->config_load('my.conf');									 // load config file    

$data= $smarty->createData($smarty);  // create data object having a parent link to
the Smarty object

$data2= $smarty->createData($data);   // create data object having a parent link to
the $data data object

A template object can be created by using the createTemplate method. It has the
same parameter assignments as the fetch() or display() method.
Function definition:
function createTemplate($template, $cache_id = null, $compile_id = null, $parent = null)

The first parameter can be a template name, a smarty object or a data object.

Examples:
$tpl = $smarty->createTemplate('mytpl.tpl'); // create template object not linked to any parent
$tpl->assign('foo','bar');                   // directly assign variables
$tpl->config_load('my.conf');									 // load config file    

$tpl = $smarty->createTemplate('mytpl.tpl',$smarty);  // create template having a parent link to the Smarty object
$tpl = $smarty->createTemplate('mytpl.tpl',$data);    // create template having a parent link to the $data object

The standard fetch() and display() methods will implicitly create a template object.
If the $parent parameter is not specified in these method calls, the template object
is will link back to the Smarty object as it's parent.

If a template is called by an {include...} tag from another template, the
subtemplate links back to the calling template as it's parent. 

All variables assigned locally or from a parent template are accessible. If the
template creates or modifies a variable by using the {assign var=foo...} or
{$foo=...} tags, these new values are only known locally (local scope). When the
template exits, none of the new variables or modifications can be seen in the
parent template(s). This is same behavior as in Smarty 2. 

With Smarty 3, we can assign variables with a scope attribute which allows the
availablility of these new variables or modifications globally (ie in the parent
templates.)

Possible scopes are local, parent, root and global. 
Examples:
{assign var=foo value='bar'}       // no scope is specified, the default 'local'
{$foo='bar'}                       // same, local scope
{assign var=foo value='bar' scope='local'} // same, local scope

{assign var=foo value='bar' scope='parent'} // Values will be available to the parent object 
{$foo='bar' scope='parent'}                 // (normally the calling template)

{assign var=foo value='bar' scope='root'}   // Values will be exported up to the root object, so they can 
{$foo='bar' scope='root'}                   // be seen from all templates using the same root.

{assign var=foo value='bar' scope='global'} // Values will be exported to global variable storage, 
{$foo='bar' scope='global'}                 // they are available to any and all templates.


The scope attribute can also be attached to the {include...} tag. In this case,
the specified scope will be the default scope for all assignments within the
included template.


PLUGINS
=======

Smarty3 are following the same coding rules as in Smarty2. 
The only difference is that the template object is passed as additional third parameter.

smarty_plugintype_name (array $params, object $smarty, object $template)

The Smarty 2 plugins are still compatible as long as they do not make use of specific Smarty2 internals.


TEMPLATE INHERITANCE:
=====================

With template inheritance you can define blocks, which are areas that can be
overriden by child templates, so your templates could look like this: 

parent.tpl:
<html>
  <head>
    <title>{block name='title'}My site name{/block}</title>
  </head>
  <body>
    <h1>{block name='page-title'}Default page title{/block}</h1>
    <div id="content">
      {block name='content'}
        Default content
      {/block}
    </div>
  </body>
</html>

child.tpl:
{extends file='parent.tpl'} 
{block name='title'}
Child title
{/block}

grandchild.tpl:
{extends file='child.tpl'} 
{block name='title'}Home - {$smarty.block.parent}{/block} 
{block name='page-title'}My home{/block}
{block name='content'}
  {foreach $images as $img}
    <img src="{$img.url}" alt="{$img.description}" />
  {/foreach}
{/block}

We redefined all the blocks here, however in the title block we used {$smarty.block.parent},
which tells Smarty to insert the default content from the parent template in its place.
The content block was overriden to display the image files, and page-title has also be 
overriden to display a completely different title. 

If we render grandchild.tpl we will get this: 
<html>
  <head>
    <title>Home - Child title</title>
  </head>
  <body>
    <h1>My home</h1>
    <div id="content">
      <img src="/example.jpg" alt="image" />
      <img src="/example2.jpg" alt="image" />
      <img src="/example3.jpg" alt="image" />
    </div>
  </body>
</html>

NOTE: In the child templates everything outside the {extends} or {block} tag sections
is ignored.

The inheritance tree can be as big as you want (meaning you can extend a file that 
extends another one that extends another one and so on..), but be aware that all files 
have to be checked for modifications at runtime so the more inheritance the more overhead you add.

Instead of defining the parent/child relationships with the {extends} tag in the child template you
can use the resource as follow:

$smarty->display('extends:parent.tpl|child.tpl|grandchild.tpl');

Child {block} tags may optionally have a append or prepend attribute. In this case the parent block content 
is appended or prepended to the child block content.

{block name='title' append} My title {/block}


PHP STREAMS:
============

(see online documentation)

VARIBLE FILTERS:
================

(see online documentation)


STATIC CLASS ACCESS AND NAMESPACE SUPPORT
=========================================

You can register a class with optional namespace for the use in the template like:

$smarty->register->templateClass('foo','name\name2\myclass');

In the template you can use it like this:
{foo::method()}  etc.


=======================

Please look through it and send any questions/suggestions/etc to the forums.

http://www.phpinsider.com/smarty-forum/viewtopic.php?t=14168

Monte and Uwe

Documentation generated on Sat, 24 Sep 2011 20:23:00 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/li_Example-application.html0000644000175000017500000000227211634664106023427 0ustar mikemike
Example-application
Description
Class trees
Index of elements
Classes
Files
index.php

phpDocumentor v 1.4.1

smarty3-3.1.13/development/Smarty3Doc/classtrees_Example-application.html0000644000175000017500000000125311637420324025164 0ustar mikemike

Documentation generated on Sat, 24 Sep 2011 20:23:04 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/classtrees_CacheResource-examples.html0000644000175000017500000000310211637420324025612 0ustar mikemike

Root class Smarty_CacheResource_Apc

Root class Smarty_CacheResource_Memcache

Root class Smarty_CacheResource_Mysql

Documentation generated on Sat, 24 Sep 2011 20:23:04 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Example-application/0000755000175000017500000000000012141655572022053 5ustar mikemikesmarty3-3.1.13/development/Smarty3Doc/Example-application/_demo---index.php.html0000644000175000017500000000345711637420324026054 0ustar mikemike Docs for page index.php

/demo/index.php

Description

Example Application

Includes
require ('../libs/Smarty.class.php') (line 8)

Documentation generated on Sat, 24 Sep 2011 20:23:12 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/elementindex_Smarty.html0000644000175000017500000201227711637420324023072 0ustar mikemike

[Smarty] element index

Package indexes

All elements
a b c d e f g h i l m n o p r s t u v w y _
_
$_tag_objects
Smarty_Internal_TemplateCompilerBase::$_tag_objects in smarty_internal_templatecompilerbase.php
compile tag objects
$_tag_stack
Smarty_Internal_TemplateCompilerBase::$_tag_stack in smarty_internal_templatecompilerbase.php
tag stack
__construct
Smarty_Internal_Templatelexer::__construct() in smarty_internal_templatelexer.php
__construct
Smarty_Internal_Templateparser::__construct() in smarty_internal_templateparser.php
__construct
TP_yyToken::__construct() in smarty_internal_templateparser.php
__construct
TPC_yyToken::__construct() in smarty_internal_configfileparser.php
__construct
Smarty_Internal_TemplateCompilerBase::__construct() in smarty_internal_templatecompilerbase.php
Initialize compiler
__construct
Smarty_Internal_Configfileparser::__construct() in smarty_internal_configfileparser.php
__construct
Smarty_Internal_SmartyTemplateCompiler::__construct() in smarty_internal_smartytemplatecompiler.php
Initialize compiler
__destruct
Smarty_Internal_Configfileparser::__destruct() in smarty_internal_configfileparser.php
__destruct
Smarty_Internal_Templateparser::__destruct() in smarty_internal_templateparser.php
__toString
TP_yyToken::__toString() in smarty_internal_templateparser.php
__toString
TPC_yyToken::__toString() in smarty_internal_configfileparser.php
__construct
Smarty_Internal_Config_File_Compiler::__construct() in smarty_internal_config_file_compiler.php
Initialize compiler
__construct
Smarty_Internal_Configfilelexer::__construct() in smarty_internal_configfilelexer.php
$_config_dir
Smarty_Security::$_config_dir in smarty_security.php
$_php_resource_dir
$_resource_dir
Smarty_Security::$_resource_dir in smarty_security.php
$_secure_dir
Smarty_Security::$_secure_dir in smarty_security.php
$_template_dir
Smarty_Security::$_template_dir in smarty_security.php
$_trusted_dir
Smarty_Security::$_trusted_dir in smarty_security.php
__construct
Smarty_Security::__construct() in smarty_security.php
$_current_file
Smarty::$_current_file in Smarty.class.php
required by the compiler for BC
$_dir_perms
Smarty::$_dir_perms in Smarty.class.php
default dir permissions
$_file_perms
Smarty::$_file_perms in Smarty.class.php
default file permissions
$_muted_directories
Smarty::$_muted_directories in Smarty.class.php
contains directories outside of SMARTY_DIR that are to be muted by muteExpectedErrors()
$_parserdebug
Smarty::$_parserdebug in Smarty.class.php
internal flag to enable parser debugging
$_previous_error_handler
error handler returned by set_error_hanlder() in Smarty::muteExpectedErrors()
$_smarty_vars
Smarty::$_smarty_vars in Smarty.class.php
global internal smarty vars
$_tag_stack
Smarty::$_tag_stack in Smarty.class.php
block tag hierarchy
$_version
SmartyBC::$_version in SmartyBC.class.php
Smarty 2 BC
_count
Smarty_Internal_Template::_count() in smarty_internal_template.php
[util function] counts an array, arrayaccess/traversable or PDOStatement object
_get_filter_name
Smarty_Internal_TemplateBase::_get_filter_name() in smarty_internal_templatebase.php
Return internal filter name
__call
Smarty_Internal_TemplateBase::__call() in smarty_internal_templatebase.php
Handle unknown class methods
__clone
Smarty::__clone() in Smarty.class.php
magic>> set selfpointer on cloned object
__construct
Smarty_Internal_Template::__construct() in smarty_internal_template.php
Create template data object
__construct
Smarty_Data::__construct() in smarty_internal_data.php
create Smarty data object
__construct
Smarty_Variable::__construct() in smarty_internal_data.php
create Smarty variable object
__construct
SmartyBC::__construct() in SmartyBC.class.php
Initialize new SmartyBC object
__construct
Smarty::__construct() in Smarty.class.php
Initialize new Smarty object
__destruct
Smarty_Internal_Template::__destruct() in smarty_internal_template.php
Template data object destrutor
__destruct
Smarty::__destruct() in Smarty.class.php
Class destructor
__get
Smarty::__get() in Smarty.class.php
magic>> Generic getter.
__get
Undefined_Smarty_Variable::__get() in smarty_internal_data.php
Returns FALSE for 'nocache' and NULL otherwise.
__get
Smarty_Internal_Template::__get() in smarty_internal_template.php
get Smarty property in template context
__set
Smarty_Internal_Template::__set() in smarty_internal_template.php
set Smarty property in template context
__set
Smarty::__set() in Smarty.class.php
magic>> Generic setter.
__toString
Smarty_Variable::__toString() in smarty_internal_data.php
magic>> String conversion
__toString
Undefined_Smarty_Variable::__toString() in smarty_internal_data.php
Always returns an empty string.
$_properties
Metadata properties
__construct
create Compiled Object container
__construct
create Source Object container
__construct
Smarty_Template_Cached::__construct() in smarty_cacheresource.php
create Cached Object container
__construct
Smarty_Internal_Resource_PHP::__construct() in smarty_internal_resource_php.php
Create a new PHP Resource
__construct
Smarty_Config_Source::__construct() in smarty_config_source.php
create Config Object container
__get
Smarty_Template_Source::__get() in smarty_resource.php
magic>> Generic getter.
__get
Smarty_Config_Source::__get() in smarty_config_source.php
magic>> Generic getter.
__set
Smarty_Template_Source::__set() in smarty_resource.php
magic>> Generic Setter.
__set
Smarty_Config_Source::__set() in smarty_config_source.php
magic>> Generic setter.
a
acquireLock
Smarty_Internal_CacheResource_File::acquireLock() in smarty_internal_cacheresource_file.php
Lock cache for this template
acquireLock
Smarty_CacheResource_KeyValueStore::acquireLock() in smarty_cacheresource_keyvaluestore.php
Lock cache for this template
acquireLock
Smarty_CacheResource::acquireLock() in smarty_cacheresource.php
addMetaTimestamp
Smarty_CacheResource_KeyValueStore::addMetaTimestamp() in smarty_cacheresource_keyvaluestore.php
Add current microtime to the beginning of $cache_content
$allowed_modifiers
This is an array of allowed modifier plugins.
$allowed_tags
Smarty_Security::$allowed_tags in smarty_security.php
This is an array of allowed tags.
$allow_constants
Smarty_Security::$allow_constants in smarty_security.php
+ flag if constants can be accessed from template
$allow_super_globals
+ flag if super globals can be accessed from template
$allow_php_templates
Smarty::$allow_php_templates in Smarty.class.php
controls if the php template file resource is allowed
$allow_relative_path
Smarty_Internal_Template::$allow_relative_path in smarty_internal_template.php
internal flag to allow relative path in child template blocks
$autoload_filters
Smarty::$autoload_filters in Smarty.class.php
autoload filter
$auto_literal
Smarty::$auto_literal in Smarty.class.php
auto literal on delimiters with whitspace
addAutoloadFilters
Smarty::addAutoloadFilters() in Smarty.class.php
Add autoload filters
addConfigDir
Smarty::addConfigDir() in Smarty.class.php
Add config directory(s)
addDefaultModifiers
Smarty::addDefaultModifiers() in Smarty.class.php
Add default modifiers
addPluginsDir
Smarty::addPluginsDir() in Smarty.class.php
Adds directory of plugin files
addTemplateDir
Smarty::addTemplateDir() in Smarty.class.php
Add template directory(s)
append
Smarty_Internal_Data::append() in smarty_internal_data.php
appends values to template variables
appendByRef
Smarty_Internal_Data::appendByRef() in smarty_internal_data.php
appends values to template variables by reference
append_by_ref
SmartyBC::append_by_ref() in SmartyBC.class.php
wrapper for append_by_ref
assign
Smarty_Internal_Data::assign() in smarty_internal_data.php
assigns a Smarty variable
assignByRef
Smarty_Internal_Data::assignByRef() in smarty_internal_data.php
assigns values to template variables by reference
assignGlobal
Smarty_Internal_Data::assignGlobal() in smarty_internal_data.php
assigns a global Smarty variable
assign_by_ref
SmartyBC::assign_by_ref() in SmartyBC.class.php
wrapper for assign_by_ref
b
block.textformat.php
block.textformat.php in block.textformat.php
$block_data
Smarty_Internal_Template::$block_data in smarty_internal_template.php
blocks for template inheritance
buildFilepath
Smarty_Resource::buildFilepath() in smarty_resource.php
build template filepath by traversing the template_dir array
c
$contents
Smarty_CacheResource_KeyValueStore::$contents in smarty_cacheresource_keyvaluestore.php
cache for contents
clear
Smarty_Internal_CacheResource_File::clear() in smarty_internal_cacheresource_file.php
Empty cache for a specific template
clear
Smarty_CacheResource_KeyValueStore::clear() in smarty_cacheresource_keyvaluestore.php
Empty cache for a specific template
clear
Smarty_CacheResource::clear() in smarty_cacheresource.php
Empty cache for a specific template
clear
Smarty_CacheResource_Custom::clear() in smarty_cacheresource_custom.php
Empty cache for a specific template
clearAll
Smarty_Internal_CacheResource_File::clearAll() in smarty_internal_cacheresource_file.php
Empty cache
clearAll
Smarty_CacheResource_KeyValueStore::clearAll() in smarty_cacheresource_keyvaluestore.php
Empty cache
clearAll
Smarty_CacheResource_Custom::clearAll() in smarty_cacheresource_custom.php
Empty cache
clearAll
Smarty_CacheResource::clearAll() in smarty_cacheresource.php
Empty cache
$counter
Smarty_Internal_Templatelexer::$counter in smarty_internal_templatelexer.php
CACHING_NOCACHE_CODE
Smarty_Internal_Compile_Include::CACHING_NOCACHE_CODE in smarty_internal_compile_include.php
caching mode to create nocache code but no cache file
callTagCompiler
Smarty_Internal_TemplateCompilerBase::callTagCompiler() in smarty_internal_templatecompilerbase.php
lazy loads internal compile plugin for tag and calls the compile methode
closeTag
Smarty_Internal_CompileBase::closeTag() in smarty_internal_compilebase.php
Pop closing tag
compile
Smarty_Internal_Compile_Private_Modifier::compile() in smarty_internal_compile_private_modifier.php
Compiles code for modifier execution
compile
Smarty_Internal_Compile_Private_Function_Plugin::compile() in smarty_internal_compile_private_function_plugin.php
Compiles code for the execution of function plugin
compile
Smarty_Internal_Compile_Private_Object_Function::compile() in smarty_internal_compile_private_object_function.php
Compiles code for the execution of function plugin
compile
Smarty_Internal_Compile_Private_Block_Plugin::compile() in smarty_internal_compile_private_block_plugin.php
Compiles code for the execution of block plugin
compile
Smarty_Internal_Compile_Private_Object_Block_Function::compile() in smarty_internal_compile_private_object_block_function.php
Compiles code for the execution of block plugin
compile
Smarty_Internal_Compile_Nocache::compile() in smarty_internal_compile_nocache.php
Compiles code for the {nocache} tag
compile
Smarty_Internal_Compile_Include_Php::compile() in smarty_internal_compile_include_php.php
Compiles code for the {include_php} tag
compile
Smarty_Internal_Compile_Insert::compile() in smarty_internal_compile_insert.php
Compiles code for the {insert} tag
compile
Smarty_Internal_Compile_Ldelim::compile() in smarty_internal_compile_ldelim.php
Compiles code for the {ldelim} tag
compile
Smarty_Internal_Compile_Private_Print_Expression::compile() in smarty_internal_compile_private_print_expression.php
Compiles code for gererting output from any expression
compile
Smarty_Internal_Compile_Nocacheclose::compile() in smarty_internal_compile_nocache.php
Compiles code for the {/nocache} tag
compile
Smarty_Internal_Compile_Private_Registered_Function::compile() in smarty_internal_compile_private_registered_function.php
Compiles code for the execution of a registered function
compile
Smarty_Internal_Compile_Setfilterclose::compile() in smarty_internal_compile_setfilter.php
Compiles code for the {/setfilter} tag
compile
Smarty_Internal_Compile_While::compile() in smarty_internal_compile_while.php
Compiles code for the {while} tag
compile
Smarty_Internal_Compile_Whileclose::compile() in smarty_internal_compile_while.php
Compiles code for the {/while} tag
compile
Smarty_Internal_Nocache_Insert::compile() in smarty_internal_nocache_insert.php
Compiles code for the {insert} tag into cache file
compile
Smarty_Internal_Compile_Setfilter::compile() in smarty_internal_compile_setfilter.php
Compiles code for setfilter tag
compile
Smarty_Internal_Compile_Sectionelse::compile() in smarty_internal_compile_section.php
Compiles code for the {sectionelse} tag
compile
Smarty_Internal_Compile_Private_Special_Variable::compile() in smarty_internal_compile_private_special_variable.php
Compiles code for the speical $smarty variables
compile
Smarty_Internal_Compile_Rdelim::compile() in smarty_internal_compile_rdelim.php
Compiles code for the {rdelim} tag
compile
Smarty_Internal_Compile_Section::compile() in smarty_internal_compile_section.php
Compiles code for the {section} tag
compile
Smarty_Internal_Compile_Sectionclose::compile() in smarty_internal_compile_section.php
Compiles code for the {/section} tag
compile
Smarty_Internal_Compile_Private_Registered_Block::compile() in smarty_internal_compile_private_registered_block.php
Compiles code for the execution of a block function
compile
Smarty_Internal_Compile_Include::compile() in smarty_internal_compile_include.php
Compiles code for the {include} tag
compile
Smarty_Internal_Compile_CaptureClose::compile() in smarty_internal_compile_capture.php
Compiles code for the {/capture} tag
compile
Smarty_Internal_Compile_Capture::compile() in smarty_internal_compile_capture.php
Compiles code for the {capture} tag
compile
Smarty_Internal_Compile_Config_Load::compile() in smarty_internal_compile_config_load.php
Compiles code for the {config_load} tag
compile
Smarty_Internal_Compile_Continue::compile() in smarty_internal_compile_continue.php
Compiles code for the {continue} tag
compile
Smarty_Internal_Compile_Ifclose::compile() in smarty_internal_compile_if.php
Compiles code for the {/if} tag
compile
Smarty_Internal_Compile_Call::compile() in smarty_internal_compile_call.php
Compiles the calls of user defined tags defined by {function}
compile
Smarty_Internal_Compile_Break::compile() in smarty_internal_compile_break.php
Compiles code for the {break} tag
compile
Smarty_Internal_Compile_Append::compile() in smarty_internal_compile_append.php
Compiles code for the {append} tag
compile
Smarty_Internal_Compile_Assign::compile() in smarty_internal_compile_assign.php
Compiles code for the {assign} tag
compile
Smarty_Internal_Compile_Block::compile() in smarty_internal_compile_block.php
Compiles code for the {block} tag
compile
Smarty_Internal_Compile_Blockclose::compile() in smarty_internal_compile_block.php
Compiles code for the {/block} tag
compile
Smarty_Internal_Compile_Eval::compile() in smarty_internal_compile_eval.php
Compiles code for the {eval} tag
compile
Smarty_Internal_Compile_Debug::compile() in smarty_internal_compile_debug.php
Compiles code for the {debug} tag
compile
Smarty_Internal_Compile_Functionclose::compile() in smarty_internal_compile_function.php
Compiles code for the {/function} tag
compile
Smarty_Internal_Compile_Extends::compile() in smarty_internal_compile_extends.php
Compiles code for the {extends} tag
compile
Smarty_Internal_Compile_Else::compile() in smarty_internal_compile_if.php
Compiles code for the {else} tag
compile
Smarty_Internal_Compile_Elseif::compile() in smarty_internal_compile_if.php
Compiles code for the {elseif} tag
compile
Smarty_Internal_Compile_If::compile() in smarty_internal_compile_if.php
Compiles code for the {if} tag
compile
Smarty_Internal_Compile_Foreachelse::compile() in smarty_internal_compile_foreach.php
Compiles code for the {foreachelse} tag
compile
Smarty_Internal_Compile_Function::compile() in smarty_internal_compile_function.php
Compiles code for the {function} tag
compile
Smarty_Internal_Compile_Foreachclose::compile() in smarty_internal_compile_foreach.php
Compiles code for the {/foreach} tag
compile
Smarty_Internal_Compile_For::compile() in smarty_internal_compile_for.php
Compiles code for the {for} tag
compile
Smarty_Internal_Compile_Forelse::compile() in smarty_internal_compile_for.php
Compiles code for the {forelse} tag
compile
Smarty_Internal_Compile_Forclose::compile() in smarty_internal_compile_for.php
Compiles code for the {/for} tag
compile
Smarty_Internal_Compile_Foreach::compile() in smarty_internal_compile_foreach.php
Compiles code for the {foreach} tag
compileChildBlock
Smarty_Internal_Compile_Block::compileChildBlock() in smarty_internal_compile_block.php
Compile saved child block source
compileTag
Smarty_Internal_TemplateCompilerBase::compileTag() in smarty_internal_templatecompilerbase.php
Compile Tag
compileTemplate
Smarty_Internal_TemplateCompilerBase::compileTemplate() in smarty_internal_templatecompilerbase.php
Method to compile a Smarty template
compileVariable
Smarty_Internal_Templateparser::compileVariable() in smarty_internal_templateparser.php
$config
Smarty_Internal_Config_File_Compiler::$config in smarty_internal_config_file_compiler.php
Smarty object
$config_data
Smarty_Internal_Config_File_Compiler::$config_data in smarty_internal_config_file_compiler.php
Compiled config data sections and variables
$counter
Smarty_Internal_Configfilelexer::$counter in smarty_internal_configfilelexer.php
COMMENT
Smarty_Internal_Configfilelexer::COMMENT in smarty_internal_configfilelexer.php
compileSource
Smarty_Internal_Config_File_Compiler::compileSource() in smarty_internal_config_file_compiler.php
Method to compile a Smarty template.
call
Smarty_Internal_Function_Call_Handler::call() in smarty_internal_function_call_handler.php
This function handles calls to template functions defined by {function} It does create a PHP function at the first call
clearCompiledTemplate
Delete compiled template file
compileAllConfig
Smarty_Internal_Utility::compileAllConfig() in smarty_internal_utility.php
Compile all config files
compileAllTemplates
Smarty_Internal_Utility::compileAllTemplates() in smarty_internal_utility.php
Compile all template files
$cache_dir
Smarty::$cache_dir in Smarty.class.php
cache directory
$cache_id
Smarty_Internal_Template::$cache_id in smarty_internal_template.php
cache_id
$cache_id
Smarty::$cache_id in Smarty.class.php
Set this if you want different sets of cache files for the same templates.
$cache_lifetime
Smarty_Internal_Template::$cache_lifetime in smarty_internal_template.php
cache lifetime in seconds
$cache_lifetime
Smarty::$cache_lifetime in Smarty.class.php
cache lifetime in seconds
$cache_locking
Smarty::$cache_locking in Smarty.class.php
Controls whether cache resources should emply locking mechanism
$cache_modified_check
Smarty::$cache_modified_check in Smarty.class.php
check If-Modified-Since headers
$caching
Smarty_Internal_Template::$caching in smarty_internal_template.php
caching enabled
$caching
Smarty::$caching in Smarty.class.php
caching enabled
$caching_type
Smarty::$caching_type in Smarty.class.php
caching type
$compile_check
Smarty::$compile_check in Smarty.class.php
check template for modifications?
$compile_dir
Smarty::$compile_dir in Smarty.class.php
compile directory
$compile_id
Smarty::$compile_id in Smarty.class.php
Set this if you want different sets of compiled files for the same templates.
$compile_id
Smarty_Internal_Template::$compile_id in smarty_internal_template.php
$compile_id
$compile_locking
Smarty::$compile_locking in Smarty.class.php
locking concurrent compiles
$config_booleanize
Smarty::$config_booleanize in Smarty.class.php
Controls whether config values of on/true/yes and off/false/no get converted to boolean.
$config_dir
Smarty::$config_dir in Smarty.class.php
config directory
$config_overwrite
Smarty::$config_overwrite in Smarty.class.php
Controls whether variables with the same name overwrite each other.
$config_read_hidden
Smarty::$config_read_hidden in Smarty.class.php
Controls whether hidden config sections/vars are read from the file.
$config_vars
Smarty_Internal_Data::$config_vars in smarty_internal_data.php
configuration settings
CACHING_LIFETIME_CURRENT
constant definitions
CACHING_LIFETIME_SAVED
Smarty::CACHING_LIFETIME_SAVED in Smarty.class.php
constant definitions
CACHING_OFF
Smarty::CACHING_OFF in Smarty.class.php
define caching modes
clearAllAssign
Smarty_Internal_Data::clearAllAssign() in smarty_internal_data.php
clear all the assigned template variables.
clearAllCache
Smarty::clearAllCache() in Smarty.class.php
Empty cache folder
clearAssign
Smarty_Internal_Data::clearAssign() in smarty_internal_data.php
clear the given assigned template variable.
clearCache
Smarty::clearCache() in Smarty.class.php
Empty cache for a specific template
clearCompiledTemplate
Delete compiled template file
clearConfig
Smarty_Internal_Data::clearConfig() in smarty_internal_data.php
Deassigns a single or all config variables
clear_all_assign
SmartyBC::clear_all_assign() in SmartyBC.class.php
clear all the assigned template variables.
clear_all_cache
SmartyBC::clear_all_cache() in SmartyBC.class.php
clear the entire contents of cache (all templates)
clear_assign
SmartyBC::clear_assign() in SmartyBC.class.php
clear the given assigned template variable.
clear_cache
SmartyBC::clear_cache() in SmartyBC.class.php
clear cached content for the given template and cache id
clear_compiled_tpl
SmartyBC::clear_compiled_tpl() in SmartyBC.class.php
clears compiled version of specified template resource, or all compiled template files if one is not specified.
clear_config
SmartyBC::clear_config() in SmartyBC.class.php
clear configuration values
compileAllConfig
Smarty::compileAllConfig() in Smarty.class.php
Compile all config files
compileAllTemplates
Smarty::compileAllTemplates() in Smarty.class.php
Compile all template files
COMPILECHECK_CACHEMISS
Smarty::COMPILECHECK_CACHEMISS in Smarty.class.php
constant definitions
COMPILECHECK_OFF
Smarty::COMPILECHECK_OFF in Smarty.class.php
define compile check modes
COMPILECHECK_ON
Smarty::COMPILECHECK_ON in Smarty.class.php
constant definitions
compileTemplateSource
Compiles the template
configLoad
Smarty_Internal_Data::configLoad() in smarty_internal_data.php
load a config file, optionally load just selected sections
config_load
SmartyBC::config_load() in SmartyBC.class.php
load configuration values
createData
Smarty_Internal_TemplateBase::createData() in smarty_internal_templatebase.php
creates a data object
createLocalArrayVariable
Template code runtime function to create a local Smarty variable for array assignments
createTemplate
Smarty::createTemplate() in Smarty.class.php
creates a template object
createTemplateCodeFrame
Create code frame for compiled and cached templates
$cache_id
Smarty_Template_Cached::$cache_id in smarty_cacheresource.php
Template Cache Id (Smarty_Internal_Template::$cache_id)
$compileds
Smarty_Resource::$compileds in smarty_resource.php
cache for Smarty_Template_Compiled instances
$compiler_class
Name of the Class to compile this resource's contents with
$compiler_class
Smarty_Resource::$compiler_class in smarty_resource.php
Name of the Class to compile this resource's contents with
$compile_id
Smarty_Template_Cached::$compile_id in smarty_cacheresource.php
Template Compile Id (Smarty_Internal_Template::$compile_id)
$components
The Components an extended template is made of
$content
Smarty_Template_Cached::$content in smarty_cacheresource.php
Source Content
config
Smarty_Resource::config() in smarty_resource.php
initialize Config Source Object for given resource
d
DS
DS in Smarty.class.php
define shorthand directory separator constant
delete
Smarty_CacheResource_KeyValueStore::delete() in smarty_cacheresource_keyvaluestore.php
Remove values from cache
delete
Smarty_CacheResource_Custom::delete() in smarty_cacheresource_custom.php
Delete content from cache
$data
Smarty_Internal_Templatelexer::$data in smarty_internal_templatelexer.php
$default_handler_plugins
Smarty_Internal_TemplateCompilerBase::$default_handler_plugins in smarty_internal_templatecompilerbase.php
plugins loaded by default plugin handler
$default_modifier_list
Smarty_Internal_TemplateCompilerBase::$default_modifier_list in smarty_internal_templatecompilerbase.php
saved preprocessed modifier list
doCompile
Smarty_Internal_SmartyTemplateCompiler::doCompile() in smarty_internal_smartytemplatecompiler.php
Methode to compile a Smarty template
doParse
Smarty_Internal_Configfileparser::doParse() in smarty_internal_configfileparser.php
doParse
Smarty_Internal_Templateparser::doParse() in smarty_internal_templateparser.php
DOUBLEQUOTEDSTRING
Smarty_Internal_Templatelexer::DOUBLEQUOTEDSTRING in smarty_internal_templatelexer.php
$data
Smarty_Internal_Configfilelexer::$data in smarty_internal_configfilelexer.php
display_debug
Smarty_Internal_Debug::display_debug() in smarty_internal_debug.php
Opens a window for the Smarty Debugging Consol and display the data
$disabled_modifiers
This is an array of disabled modifier plugins.
$disabled_tags
Smarty_Security::$disabled_tags in smarty_security.php
This is an array of disabled tags.
$debugging
Smarty::$debugging in Smarty.class.php
debug mode
$debugging_ctrl
Smarty::$debugging_ctrl in Smarty.class.php
This determines if debugging is enable-able from the browser.
$debug_tpl
Smarty::$debug_tpl in Smarty.class.php
Path of debug template.
$default_config_handler_func
default config handler
$default_config_type
Smarty::$default_config_type in Smarty.class.php
config type
$default_modifiers
Smarty::$default_modifiers in Smarty.class.php
default modifier
$default_plugin_handler_func
default plugin handler
$default_resource_type
Smarty::$default_resource_type in Smarty.class.php
resource type used if none given
$default_template_handler_func
default template handler
$direct_access_security
Should compiled-templates be prevented from being called directly?
decodeProperties
Smarty_Internal_Template::decodeProperties() in smarty_internal_template.php
This function is executed automatically when a compiled or cached template file is included
disableSecurity
Smarty::disableSecurity() in Smarty.class.php
Disable security
display
Smarty_Internal_TemplateBase::display() in smarty_internal_templatebase.php
displays a Smarty template
e
Err1
Smarty_Internal_Templateparser::Err1 in smarty_internal_templateparser.php
Err2
Smarty_Internal_Templateparser::Err2 in smarty_internal_templateparser.php
Err3
Smarty_Internal_Templateparser::Err3 in smarty_internal_templateparser.php
escape_end_tag
Smarty_Internal_Templateparser::escape_end_tag() in smarty_internal_templateparser.php
escape_start_tag
Smarty_Internal_Templateparser::escape_start_tag() in smarty_internal_templateparser.php
end_cache
Smarty_Internal_Debug::end_cache() in smarty_internal_debug.php
End logging of cache time
end_compile
Smarty_Internal_Debug::end_compile() in smarty_internal_debug.php
End logging of compile time
end_render
Smarty_Internal_Debug::end_render() in smarty_internal_debug.php
End logging of compile time
$error_reporting
Smarty::$error_reporting in Smarty.class.php
When set, smarty uses this value as error_reporting-level.
$error_unassigned
Smarty::$error_unassigned in Smarty.class.php
display error on not assigned variables
$escape_html
Smarty::$escape_html in Smarty.class.php
autoescape variable output
enableSecurity
Smarty::enableSecurity() in Smarty.class.php
Loads security class and enables security
$exists
Smarty_Template_Compiled::$exists in smarty_resource.php
Compiled Existance
$exists
Smarty_Template_Cached::$exists in smarty_cacheresource.php
Source Existance
f
fetch
Smarty_CacheResource_Custom::fetch() in smarty_cacheresource_custom.php
fetch cached content and its modification time from data source
fetch
Smarty_CacheResource_KeyValueStore::fetch() in smarty_cacheresource_keyvaluestore.php
Fetch and prepare a cache object.
fetchTimestamp
Smarty_CacheResource_Custom::fetchTimestamp() in smarty_cacheresource_custom.php
Fetch cached content's modification timestamp from data source
$forceNocache
Smarty_Internal_TemplateCompilerBase::$forceNocache in smarty_internal_templatecompilerbase.php
force compilation of complete template as nocache
function.counter.php
function.counter.php in function.counter.php
function.cycle.php
function.cycle.php in function.cycle.php
function.fetch.php
function.fetch.php in function.fetch.php
function.html_checkboxes.php
function.html_checkboxes.php in function.html_checkboxes.php
function.html_image.php
function.html_image.php in function.html_image.php
function.html_options.php
function.html_options.php in function.html_options.php
function.html_radios.php
function.html_radios.php in function.html_radios.php
function.html_select_date.php
function.html_select_date.php in function.html_select_date.php
function.html_select_time.php
function.html_select_time.php in function.html_select_time.php
function.html_table.php
function.html_table.php in function.html_table.php
function.mailto.php
function.mailto.php in function.mailto.php
function.math.php
function.math.php in function.math.php
$force_cache
Smarty::$force_cache in Smarty.class.php
force cache file creation
$force_compile
Smarty::$force_compile in Smarty.class.php
force template compiling?
fetch
Smarty_Internal_TemplateBase::fetch() in smarty_internal_templatebase.php
fetches a rendered Smarty template
FILTER_OUTPUT
Smarty::FILTER_OUTPUT in Smarty.class.php
constant definitions
FILTER_POST
Smarty::FILTER_POST in Smarty.class.php
filter types
FILTER_PRE
Smarty::FILTER_PRE in Smarty.class.php
constant definitions
FILTER_VARIABLE
Smarty::FILTER_VARIABLE in Smarty.class.php
constant definitions
$filepath
Smarty_Template_Source::$filepath in smarty_resource.php
Source Filepath
$filepath
Smarty_Template_Cached::$filepath in smarty_cacheresource.php
Source Filepath
$filepath
Compiled Filepath
fetch
Smarty_Resource_Custom::fetch() in smarty_resource_custom.php
fetch template and its modification time from data source
fetchTimestamp
Smarty_Resource_Custom::fetchTimestamp() in smarty_resource_custom.php
Fetch template's modification timestamp from data source
fileExists
Smarty_Resource::fileExists() in smarty_resource.php
test is file exists and save timestamp
g
getCachedContent
Smarty_CacheResource::getCachedContent() in smarty_cacheresource.php
Return cached content
getLatestInvalidationTimestamp
Determine the latest timestamp known to the invalidation chain
getMetaTimestamp
Smarty_CacheResource_KeyValueStore::getMetaTimestamp() in smarty_cacheresource_keyvaluestore.php
Extract the timestamp the $content was cached
getTemplateUid
Smarty_CacheResource_KeyValueStore::getTemplateUid() in smarty_cacheresource_keyvaluestore.php
Get template's unique ID
getAttributes
Smarty_Internal_CompileBase::getAttributes() in smarty_internal_compilebase.php
This function checks if the attributes passed are valid
getPlugin
Smarty_Internal_TemplateCompilerBase::getPlugin() in smarty_internal_templatecompilerbase.php
Check for plugins and return function name
getPluginFromDefaultHandler
Check for plugins by default plugin handler
get_debug_vars
Smarty_Internal_Debug::get_debug_vars() in smarty_internal_debug.php
Recursively gets variables from all template/data scopes
getIncludePath
Smarty_Internal_Get_Include_Path::getIncludePath() in smarty_internal_get_include_path.php
Return full file path from PHP include_path
getTags
Smarty_Internal_Utility::getTags() in smarty_internal_utility.php
Return array of tag/attributes of all tags used by an template
$get_used_tags
Smarty::$get_used_tags in Smarty.class.php
Internal flag for getTags()
$global_tpl_vars
Smarty::$global_tpl_vars in Smarty.class.php
assigned global tpl vars
getAutoloadFilters
Smarty::getAutoloadFilters() in Smarty.class.php
Get autoload filters
getCacheDir
Smarty::getCacheDir() in Smarty.class.php
Get cache directory
getCompileDir
Smarty::getCompileDir() in Smarty.class.php
Get compiled directory
getConfigDir
Smarty::getConfigDir() in Smarty.class.php
Get config directory
getConfigVariable
Smarty_Internal_Data::getConfigVariable() in smarty_internal_data.php
gets a config variable
getConfigVars
Smarty_Internal_Data::getConfigVars() in smarty_internal_data.php
Returns a single or all config variables
getDebugTemplate
Smarty::getDebugTemplate() in Smarty.class.php
return name of debugging template
getDefaultModifiers
Smarty::getDefaultModifiers() in Smarty.class.php
Get default modifiers
getGlobal
Smarty::getGlobal() in Smarty.class.php
Returns a single or all global variables
getPluginsDir
Smarty::getPluginsDir() in Smarty.class.php
Get plugin directories
getRegisteredObject
Smarty_Internal_TemplateBase::getRegisteredObject() in smarty_internal_templatebase.php
return a reference to a registered object
getScope
Smarty_Internal_Template::getScope() in smarty_internal_template.php
Template code runtime function to get pointer to template variable array of requested scope
getScopePointer
Smarty_Internal_Template::getScopePointer() in smarty_internal_template.php
Get parent or root of template parent chain
getStreamVariable
Smarty_Internal_Data::getStreamVariable() in smarty_internal_data.php
gets a stream variable
getSubTemplate
Smarty_Internal_Template::getSubTemplate() in smarty_internal_template.php
Template code runtime function to get subtemplate content
getTags
Smarty::getTags() in Smarty.class.php
Return array of tag/attributes of all tags used by an template
getTemplateDir
Smarty::getTemplateDir() in Smarty.class.php
Get template directories
getTemplateVars
Smarty_Internal_Data::getTemplateVars() in smarty_internal_data.php
Returns a single or all template variables
getVariable
Smarty_Internal_Data::getVariable() in smarty_internal_data.php
gets the object of a Smarty variable
get_config_vars
SmartyBC::get_config_vars() in SmartyBC.class.php
Returns an array containing config variables
get_registered_object
SmartyBC::get_registered_object() in SmartyBC.class.php
return a reference to a registered object
get_template_vars
SmartyBC::get_template_vars() in SmartyBC.class.php
Returns an array containing template variables
getBasename
Smarty_Internal_Resource_String::getBasename() in smarty_internal_resource_string.php
Determine basename for compiled filename
getBasename
Smarty_Internal_Resource_Eval::getBasename() in smarty_internal_resource_eval.php
Determine basename for compiled filename
getBasename
Smarty_Internal_Resource_File::getBasename() in smarty_internal_resource_file.php
Determine basename for compiled filename
getBasename
Smarty_Resource_Custom::getBasename() in smarty_resource_custom.php
Determine basename for compiled filename
getBasename
Smarty_Resource::getBasename() in smarty_resource.php
Determine basename for compiled filename
getBasename
Smarty_Internal_Resource_Extends::getBasename() in smarty_internal_resource_extends.php
Determine basename for compiled filename
getBasename
Smarty_Internal_Resource_Registered::getBasename() in smarty_internal_resource_registered.php
Determine basename for compiled filename
getCompiled
get a Compiled Object of this source
getContent
Smarty_Internal_Resource_String::getContent() in smarty_internal_resource_string.php
Load template's source from $resource_name into current template object
getContent
Smarty_Resource_Custom::getContent() in smarty_resource_custom.php
Load template's source into current template object
getContent
Smarty_Resource::getContent() in smarty_resource.php
Load template's source into current template object
getContent
Smarty_Internal_Resource_Registered::getContent() in smarty_internal_resource_registered.php
Load template's source by invoking the registered callback into current template object
getContent
Smarty_Internal_Resource_Extends::getContent() in smarty_internal_resource_extends.php
Load template's source from files into current template object
getContent
Smarty_Internal_Resource_Eval::getContent() in smarty_internal_resource_eval.php
Load template's source from $resource_name into current template object
getContent
Smarty_Internal_Resource_File::getContent() in smarty_internal_resource_file.php
Load template's source from file into current template object
getContent
Smarty_Internal_Resource_PHP::getContent() in smarty_internal_resource_php.php
Load template's source from file into current template object
getContent
Smarty_Internal_Resource_Stream::getContent() in smarty_internal_resource_stream.php
Load template's source from stream into current template object
getTemplateTimestamp
Smarty_Internal_Resource_Registered::getTemplateTimestamp() in smarty_internal_resource_registered.php
Get timestamp (epoch) the template source was modified
h
hasLock
Smarty_Internal_CacheResource_File::hasLock() in smarty_internal_cacheresource_file.php
Check is cache is locked for this template
hasLock
Smarty_CacheResource_KeyValueStore::hasLock() in smarty_cacheresource_keyvaluestore.php
Check is cache is locked for this template
hasLock
Smarty_CacheResource::hasLock() in smarty_cacheresource.php
$has_nocache_code
Smarty_Internal_Template::$has_nocache_code in smarty_internal_template.php
flag if template does contain nocache code sections
$handler
Smarty_Template_Source::$handler in smarty_resource.php
Resource Handler
$handler
Smarty_Template_Cached::$handler in smarty_cacheresource.php
CacheResource Handler
i
invalidate
Smarty_CacheResource_KeyValueStore::invalidate() in smarty_cacheresource_keyvaluestore.php
Invalidate CacheID
invalidLoadedCache
Smarty_CacheResource::invalidLoadedCache() in smarty_cacheresource.php
Invalid Loaded Cache Files
$inheritance
Smarty_Internal_TemplateCompilerBase::$inheritance in smarty_internal_templatecompilerbase.php
flag when compiling {block}
instance
Smarty_Internal_Configfileparser::instance() in smarty_internal_configfileparser.php
instance
Smarty_Internal_Configfilelexer::instance() in smarty_internal_configfilelexer.php
isTrustedModifier
Check if modifier plugin is trusted.
isTrustedPHPDir
Smarty_Security::isTrustedPHPDir() in smarty_security.php
Check if directory of file resource is trusted.
isTrustedPhpFunction
Check if PHP function is trusted.
isTrustedPhpModifier
Check if PHP modifier is trusted.
isTrustedResourceDir
Check if directory of file resource is trusted.
isTrustedStaticClass
Check if static class is trusted.
isTrustedStream
Smarty_Security::isTrustedStream() in smarty_security.php
Check if stream is trusted.
isTrustedTag
Smarty_Security::isTrustedTag() in smarty_security.php
Check if tag is trusted.
isCached
Smarty_Internal_TemplateBase::isCached() in smarty_internal_templatebase.php
test if cache is valid
is_cached
SmartyBC::is_cached() in SmartyBC.class.php
test to see if valid cache exists for this template
$isCompiled
Template was compiled
$is_locked
Smarty_Template_Cached::$is_locked in smarty_cacheresource.php
flag that cache is locked by this instance
l
listInvalidationKeys
Smarty_CacheResource_KeyValueStore::listInvalidationKeys() in smarty_cacheresource_keyvaluestore.php
Translate a CacheID into the list of applicable InvalidationKeys.
load
Smarty_CacheResource::load() in smarty_cacheresource.php
Load Cache Resource Handler
locked
Smarty_CacheResource::locked() in smarty_cacheresource.php
$lex
Smarty_Internal_SmartyTemplateCompiler::$lex in smarty_internal_smartytemplatecompiler.php
Lexer object
$lexer_class
Smarty_Internal_SmartyTemplateCompiler::$lexer_class in smarty_internal_smartytemplatecompiler.php
Lexer class name
$line
Smarty_Internal_Templatelexer::$line in smarty_internal_templatelexer.php
$local_var
Smarty_Internal_SmartyTemplateCompiler::$local_var in smarty_internal_smartytemplatecompiler.php
array of vars which can be compiled in local scope
LITERAL
Smarty_Internal_Templatelexer::LITERAL in smarty_internal_templatelexer.php
$lex
Smarty_Internal_Config_File_Compiler::$lex in smarty_internal_config_file_compiler.php
Lexer object
$line
Smarty_Internal_Configfilelexer::$line in smarty_internal_configfilelexer.php
$left_delimiter
Smarty::$left_delimiter in Smarty.class.php
template left-delimiter
$locking_timeout
Smarty::$locking_timeout in Smarty.class.php
seconds to wait for acquiring a lock before ignoring the write lock
loadFilter
Smarty_Internal_TemplateBase::loadFilter() in smarty_internal_templatebase.php
load a filter of specified type and name
loadPlugin
Smarty::loadPlugin() in Smarty.class.php
Takes unknown classes and loads plugin files for them class name format: Smarty_PluginType_PluginName plugin filename format: plugintype.pluginname.php
load_filter
SmartyBC::load_filter() in SmartyBC.class.php
load a filter of specified type and name
$loaded
Smarty_Template_Compiled::$loaded in smarty_resource.php
Compiled Content Loaded
$lock_id
Smarty_Template_Cached::$lock_id in smarty_cacheresource.php
Id for cache locking
load
Smarty_Resource::load() in smarty_resource.php
Load Resource Handler
m
$major
TP_yyStackEntry::$major in smarty_internal_templateparser.php
$major
TPC_yyStackEntry::$major in smarty_internal_configfileparser.php
$merged_templates
Smarty_Internal_TemplateCompilerBase::$merged_templates in smarty_internal_templatecompilerbase.php
merged templates
$metadata
TPC_yyToken::$metadata in smarty_internal_configfileparser.php
$metadata
TP_yyToken::$metadata in smarty_internal_templateparser.php
$minor
TP_yyStackEntry::$minor in smarty_internal_templateparser.php
$minor
TPC_yyStackEntry::$minor in smarty_internal_configfileparser.php
$modifier_plugins
Smarty_Internal_TemplateCompilerBase::$modifier_plugins in smarty_internal_templatecompilerbase.php
flags for used modifier plugins
modifier.debug_print_var.php
modifier.debug_print_var.php in modifier.debug_print_var.php
modifier.capitalize.php
modifier.capitalize.php in modifier.capitalize.php
modifier.date_format.php
modifier.date_format.php in modifier.date_format.php
modifier.escape.php
modifier.escape.php in modifier.escape.php
modifier.regex_replace.php
modifier.regex_replace.php in modifier.regex_replace.php
modifier.replace.php
modifier.replace.php in modifier.replace.php
modifier.spacify.php
modifier.spacify.php in modifier.spacify.php
modifier.truncate.php
modifier.truncate.php in modifier.truncate.php
modifiercompiler.cat.php
modifiercompiler.cat.php in modifiercompiler.cat.php
modifiercompiler.count_characters.php
modifiercompiler.count_characters.php in modifiercompiler.count_characters.php
modifiercompiler.count_paragraphs.php
modifiercompiler.count_paragraphs.php in modifiercompiler.count_paragraphs.php
modifiercompiler.count_sentences.php
modifiercompiler.count_sentences.php in modifiercompiler.count_sentences.php
modifiercompiler.count_words.php
modifiercompiler.count_words.php in modifiercompiler.count_words.php
modifiercompiler.default.php
modifiercompiler.default.php in modifiercompiler.default.php
modifiercompiler.escape.php
modifiercompiler.escape.php in modifiercompiler.escape.php
modifiercompiler.from_charset.php
modifiercompiler.from_charset.php in modifiercompiler.from_charset.php
modifiercompiler.indent.php
modifiercompiler.indent.php in modifiercompiler.indent.php
modifiercompiler.lower.php
modifiercompiler.lower.php in modifiercompiler.lower.php
modifiercompiler.noprint.php
modifiercompiler.noprint.php in modifiercompiler.noprint.php
modifiercompiler.string_format.php
modifiercompiler.string_format.php in modifiercompiler.string_format.php
modifiercompiler.strip.php
modifiercompiler.strip.php in modifiercompiler.strip.php
modifiercompiler.strip_tags.php
modifiercompiler.strip_tags.php in modifiercompiler.strip_tags.php
modifiercompiler.to_charset.php
modifiercompiler.to_charset.php in modifiercompiler.to_charset.php
modifiercompiler.unescape.php
modifiercompiler.unescape.php in modifiercompiler.unescape.php
modifiercompiler.upper.php
modifiercompiler.upper.php in modifiercompiler.upper.php
modifiercompiler.wordwrap.php
modifiercompiler.wordwrap.php in modifiercompiler.wordwrap.php
$merged_templates_func
Smarty::$merged_templates_func in Smarty.class.php
Saved parameter of merged templates during compilation
$merge_compiled_includes
merge compiled includes
$mustCompile
Smarty_Internal_Template::$mustCompile in smarty_internal_template.php
flag if compiled template is invalid and must be (re)compiled
mustCompile
Smarty_Internal_Template::mustCompile() in smarty_internal_template.php
Returns if the current template must be compiled by the Smarty compiler
muteExpectedErrors
Smarty::muteExpectedErrors() in Smarty.class.php
Enable error handler to mute expected messages
mutingErrorHandler
Smarty::mutingErrorHandler() in Smarty.class.php
Error Handler to mute expected messages
n
$node
Smarty_Internal_Templatelexer::$node in smarty_internal_templatelexer.php
$node
Smarty_Internal_Configfilelexer::$node in smarty_internal_configfilelexer.php
NAKED_STRING_VALUE
Smarty_Internal_Configfilelexer::NAKED_STRING_VALUE in smarty_internal_configfilelexer.php
$nocache
Smarty_Variable::$nocache in smarty_internal_data.php
if true any output of this variable will be not cached
$name
Smarty_Template_Source::$name in smarty_resource.php
Resource Name
o
$optional_attributes
Smarty_Internal_Compile_Private_Function_Plugin::$optional_attributes in smarty_internal_compile_private_function_plugin.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_CompileBase::$optional_attributes in smarty_internal_compilebase.php
Array of names of optional attribute required by tag use array('_any') if there is no restriction of attributes names
$optional_attributes
Smarty_Internal_Compile_Insert::$optional_attributes in smarty_internal_compile_insert.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Include_Php::$optional_attributes in smarty_internal_compile_include_php.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Private_Object_Block_Function::$optional_attributes in smarty_internal_compile_private_object_block_function.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Private_Object_Function::$optional_attributes in smarty_internal_compile_private_object_function.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Section::$optional_attributes in smarty_internal_compile_section.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Private_Registered_Function::$optional_attributes in smarty_internal_compile_private_registered_function.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Private_Registered_Block::$optional_attributes in smarty_internal_compile_private_registered_block.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Private_Print_Expression::$optional_attributes in smarty_internal_compile_private_print_expression.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Include::$optional_attributes in smarty_internal_compile_include.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Private_Block_Plugin::$optional_attributes in smarty_internal_compile_private_block_plugin.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Capture::$optional_attributes in smarty_internal_compile_capture.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Call::$optional_attributes in smarty_internal_compile_call.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Break::$optional_attributes in smarty_internal_compile_break.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Function::$optional_attributes in smarty_internal_compile_function.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Config_Load::$optional_attributes in smarty_internal_compile_config_load.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Block::$optional_attributes in smarty_internal_compile_block.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Continue::$optional_attributes in smarty_internal_compile_continue.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Foreach::$optional_attributes in smarty_internal_compile_foreach.php
Attribute definition: Overwrites base class.
$optional_attributes
Smarty_Internal_Compile_Eval::$optional_attributes in smarty_internal_compile_eval.php
Attribute definition: Overwrites base class.
$option_flags
Smarty_Internal_CompileBase::$option_flags in smarty_internal_compilebase.php
Array of names of valid option flags
$option_flags
Smarty_Internal_Compile_Private_Print_Expression::$option_flags in smarty_internal_compile_private_print_expression.php
Attribute definition: Overwrites base class.
$option_flags
Smarty_Internal_Compile_Include::$option_flags in smarty_internal_compile_include.php
Attribute definition: Overwrites base class.
offsetExists
TP_yyToken::offsetExists() in smarty_internal_templateparser.php
offsetExists
TPC_yyToken::offsetExists() in smarty_internal_configfileparser.php
offsetGet
TP_yyToken::offsetGet() in smarty_internal_templateparser.php
offsetGet
TPC_yyToken::offsetGet() in smarty_internal_configfileparser.php
offsetSet
TPC_yyToken::offsetSet() in smarty_internal_configfileparser.php
offsetSet
TP_yyToken::offsetSet() in smarty_internal_templateparser.php
offsetUnset
TPC_yyToken::offsetUnset() in smarty_internal_configfileparser.php
offsetUnset
TP_yyToken::offsetUnset() in smarty_internal_templateparser.php
openTag
Smarty_Internal_CompileBase::openTag() in smarty_internal_compilebase.php
Push opening tag name on stack
outputfilter.trimwhitespace.php
outputfilter.trimwhitespace.php in outputfilter.trimwhitespace.php
p
populate
Smarty_CacheResource::populate() in smarty_cacheresource.php
populate Cached Object with meta data from Resource
populate
Smarty_Internal_CacheResource_File::populate() in smarty_internal_cacheresource_file.php
populate Cached Object with meta data from Resource
populate
Smarty_CacheResource_Custom::populate() in smarty_cacheresource_custom.php
populate Cached Object with meta data from Resource
populate
Smarty_CacheResource_KeyValueStore::populate() in smarty_cacheresource_keyvaluestore.php
populate Cached Object with meta data from Resource
populateTimestamp
Smarty_CacheResource_Custom::populateTimestamp() in smarty_cacheresource_custom.php
populate Cached Object with timestamp and exists from Resource
populateTimestamp
Smarty_CacheResource_KeyValueStore::populateTimestamp() in smarty_cacheresource_keyvaluestore.php
populate Cached Object with timestamp and exists from Resource
populateTimestamp
Smarty_Internal_CacheResource_File::populateTimestamp() in smarty_internal_cacheresource_file.php
populate Cached Object with timestamp and exists from Resource
populateTimestamp
Smarty_CacheResource::populateTimestamp() in smarty_cacheresource.php
populate Cached Object with timestamp and exists from Resource
process
Smarty_Internal_CacheResource_File::process() in smarty_internal_cacheresource_file.php
Read the cached template and process its header
process
Smarty_CacheResource_KeyValueStore::process() in smarty_cacheresource_keyvaluestore.php
Read the cached template and process the header
process
Smarty_CacheResource_Custom::process() in smarty_cacheresource_custom.php
Read the cached template and process the header
process
Smarty_CacheResource::process() in smarty_cacheresource.php
Read the cached template and process header
purge
Smarty_CacheResource_KeyValueStore::purge() in smarty_cacheresource_keyvaluestore.php
Remove *all* values from cache
$parser
Smarty_Internal_SmartyTemplateCompiler::$parser in smarty_internal_smartytemplatecompiler.php
Parser object
$parser_class
Smarty_Internal_SmartyTemplateCompiler::$parser_class in smarty_internal_smartytemplatecompiler.php
Parser class name
PrintTrace
Smarty_Internal_Configfileparser::PrintTrace() in smarty_internal_configfileparser.php
PrintTrace
Smarty_Internal_Templateparser::PrintTrace() in smarty_internal_templateparser.php
processNocacheCode
Smarty_Internal_TemplateCompilerBase::processNocacheCode() in smarty_internal_templatecompilerbase.php
Inject inline code for nocache template sections
$parser
Smarty_Internal_Config_File_Compiler::$parser in smarty_internal_config_file_compiler.php
Parser object
$php_functions
Smarty_Security::$php_functions in smarty_security.php
This is an array of trusted PHP functions.
$php_handling
Smarty_Security::$php_handling in smarty_security.php
This determines how Smarty handles "<?php ... ?>" tags in templates.
$php_modifiers
Smarty_Security::$php_modifiers in smarty_security.php
This is an array of trusted PHP modifers.
$parent
Smarty_Internal_Data::$parent in smarty_internal_data.php
parent template (if any)
$php_handling
Smarty::$php_handling in Smarty.class.php
controls handling of PHP-blocks
$plugins_dir
Smarty::$plugins_dir in Smarty.class.php
plugins directory
$plugin_search_order
Smarty::$plugin_search_order in Smarty.class.php
plugin search order
$properties
Smarty_Internal_Template::$properties in smarty_internal_template.php
special compiled and cached template properties
$properties
Smarty::$properties in Smarty.class.php
internal config properties
PHP_ALLOW
Smarty::PHP_ALLOW in Smarty.class.php
constant definitions
PHP_PASSTHRU
Smarty::PHP_PASSTHRU in Smarty.class.php
modes for handling of "<?php ... ?>" tags in templates.
PHP_QUOTE
Smarty::PHP_QUOTE in Smarty.class.php
constant definitions
PHP_REMOVE
Smarty::PHP_REMOVE in Smarty.class.php
constant definitions
PLUGIN_BLOCK
Smarty::PLUGIN_BLOCK in Smarty.class.php
constant definitions
PLUGIN_COMPILER
Smarty::PLUGIN_COMPILER in Smarty.class.php
constant definitions
PLUGIN_FUNCTION
Smarty::PLUGIN_FUNCTION in Smarty.class.php
plugin types
PLUGIN_MODIFIER
Smarty::PLUGIN_MODIFIER in Smarty.class.php
constant definitions
PLUGIN_MODIFIERCOMPILER
constant definitions
$processed
Smarty_Template_Cached::$processed in smarty_cacheresource.php
Cache was processed
populate
Smarty_Internal_Resource_Stream::populate() in smarty_internal_resource_stream.php
populate Source Object with meta data from Resource
populate
Smarty_Internal_Resource_String::populate() in smarty_internal_resource_string.php
populate Source Object with meta data from Resource
populate
Smarty_Resource::populate() in smarty_resource.php
populate Source Object with meta data from Resource
populate
Smarty_Resource_Custom::populate() in smarty_resource_custom.php
populate Source Object with meta data from Resource
populate
Smarty_Internal_Resource_PHP::populate() in smarty_internal_resource_php.php
populate Source Object with meta data from Resource
populate
Smarty_Internal_Resource_Registered::populate() in smarty_internal_resource_registered.php
populate Source Object with meta data from Resource
populate
Smarty_Internal_Resource_Eval::populate() in smarty_internal_resource_eval.php
populate Source Object with meta data from Resource
populate
Smarty_Internal_Resource_File::populate() in smarty_internal_resource_file.php
populate Source Object with meta data from Resource
populate
Smarty_Internal_Resource_Extends::populate() in smarty_internal_resource_extends.php
populate Source Object with meta data from Resource
populateCompiledFilepath
populate compiled object with compiled filepath
populateCompiledFilepath
populate Compiled Object with compiled filepath
populateCompiledFilepath
populate Compiled Object with compiled filepath
populateTimestamp
Smarty_Internal_Resource_Extends::populateTimestamp() in smarty_internal_resource_extends.php
populate Source Object with timestamp and exists from Resource
populateTimestamp
Smarty_Internal_Resource_PHP::populateTimestamp() in smarty_internal_resource_php.php
populate Source Object with timestamp and exists from Resource
populateTimestamp
Smarty_Internal_Resource_File::populateTimestamp() in smarty_internal_resource_file.php
populate Source Object with timestamp and exists from Resource
populateTimestamp
populate Source Object with timestamp and exists from Resource
populateTimestamp
Smarty_Internal_Resource_Registered::populateTimestamp() in smarty_internal_resource_registered.php
populate Source Object with timestamp and exists from Resource
r
$resources
Smarty_CacheResource::$resources in smarty_cacheresource.php
cache for Smarty_CacheResource instances
read
Smarty_CacheResource_KeyValueStore::read() in smarty_cacheresource_keyvaluestore.php
Read values for a set of keys from cache
releaseLock
Smarty_Internal_CacheResource_File::releaseLock() in smarty_internal_cacheresource_file.php
Unlock cache for this template
releaseLock
Smarty_CacheResource_KeyValueStore::releaseLock() in smarty_cacheresource_keyvaluestore.php
Unlock cache for this template
releaseLock
Smarty_CacheResource::releaseLock() in smarty_cacheresource.php
$required_attributes
Smarty_Internal_Compile_Include_Php::$required_attributes in smarty_internal_compile_include_php.php
Attribute definition: Overwrites base class.
$required_attributes
Smarty_Internal_Compile_Include::$required_attributes in smarty_internal_compile_include.php
Attribute definition: Overwrites base class.
$required_attributes
Smarty_Internal_Compile_Insert::$required_attributes in smarty_internal_compile_insert.php
Attribute definition: Overwrites base class.
$required_attributes
Smarty_Internal_Compile_Private_Function_Plugin::$required_attributes in smarty_internal_compile_private_function_plugin.php
Attribute definition: Overwrites base class.
$required_attributes
Smarty_Internal_Compile_Section::$required_attributes in smarty_internal_compile_section.php
Attribute definition: Overwrites base class.
$required_attributes
Smarty_Internal_CompileBase::$required_attributes in smarty_internal_compilebase.php
Array of names of required attribute required by tag
$required_attributes
Smarty_Internal_Compile_Function::$required_attributes in smarty_internal_compile_function.php
Attribute definition: Overwrites base class.
$required_attributes
Smarty_Internal_Compile_Call::$required_attributes in smarty_internal_compile_call.php
Attribute definition: Overwrites base class.
$required_attributes
Smarty_Internal_Compile_Block::$required_attributes in smarty_internal_compile_block.php
Attribute definition: Overwrites base class.
$required_attributes
Smarty_Internal_Compile_Foreach::$required_attributes in smarty_internal_compile_foreach.php
Attribute definition: Overwrites base class.
$required_attributes
Smarty_Internal_Compile_Config_Load::$required_attributes in smarty_internal_compile_config_load.php
Attribute definition: Overwrites base class.
$required_attributes
Smarty_Internal_Compile_Eval::$required_attributes in smarty_internal_compile_eval.php
Attribute definition: Overwrites base class.
$required_attributes
Smarty_Internal_Compile_Extends::$required_attributes in smarty_internal_compile_extends.php
Attribute definition: Overwrites base class.
$retvalue
Smarty_Internal_Templateparser::$retvalue in smarty_internal_templateparser.php
$retvalue
Smarty_Internal_Configfileparser::$retvalue in smarty_internal_configfileparser.php
runFilter
Smarty_Internal_Filter_Handler::runFilter() in smarty_internal_filter_handler.php
Run filters over content
$registered_cache_resources
registered cache resources
$registered_classes
Smarty::$registered_classes in Smarty.class.php
registered classes
$registered_filters
Smarty::$registered_filters in Smarty.class.php
registered filters
$registered_objects
Smarty::$registered_objects in Smarty.class.php
registered objects
$registered_plugins
Smarty::$registered_plugins in Smarty.class.php
registered plugins
$registered_resources
Smarty::$registered_resources in Smarty.class.php
registered resources
$required_plugins
Smarty_Internal_Template::$required_plugins in smarty_internal_template.php
required plugins
$right_delimiter
Smarty::$right_delimiter in Smarty.class.php
template right-delimiter
registerCacheResource
Smarty_Internal_TemplateBase::registerCacheResource() in smarty_internal_templatebase.php
Registers a cache resource to cache a template's output
registerClass
Smarty_Internal_TemplateBase::registerClass() in smarty_internal_templatebase.php
Registers static classes to be used in templates
registerDefaultConfigHandler
Registers a default template handler
registerDefaultPluginHandler
Registers a default plugin handler
registerDefaultTemplateHandler
Registers a default template handler
registerFilter
Smarty_Internal_TemplateBase::registerFilter() in smarty_internal_templatebase.php
Registers a filter function
registerObject
Smarty_Internal_TemplateBase::registerObject() in smarty_internal_templatebase.php
Registers object to be used in templates
registerPlugin
Smarty_Internal_TemplateBase::registerPlugin() in smarty_internal_templatebase.php
Registers plugin to be used in templates
registerResource
Smarty_Internal_TemplateBase::registerResource() in smarty_internal_templatebase.php
Registers a resource to fetch a template
register_block
SmartyBC::register_block() in SmartyBC.class.php
Registers block function to be used in templates
register_compiler_function
Registers compiler function
register_function
SmartyBC::register_function() in SmartyBC.class.php
Registers custom function to be used in templates
register_modifier
SmartyBC::register_modifier() in SmartyBC.class.php
Registers modifier to be used in templates
register_object
SmartyBC::register_object() in SmartyBC.class.php
Registers object to be used in templates
register_outputfilter
SmartyBC::register_outputfilter() in SmartyBC.class.php
Registers an output filter function to apply to a template output
register_postfilter
SmartyBC::register_postfilter() in SmartyBC.class.php
Registers a postfilter function to apply to a compiled template after compilation
register_prefilter
SmartyBC::register_prefilter() in SmartyBC.class.php
Registers a prefilter function to apply to a template before compiling
register_resource
SmartyBC::register_resource() in SmartyBC.class.php
Registers a resource to fetch a template
$recompiled
Source must be recompiled on every occasion
$resource
Smarty_Template_Source::$resource in smarty_resource.php
Template Resource (Smarty_Internal_Template::$template_resource)
$resources
Smarty_Resource::$resources in smarty_resource.php
cache for Smarty_Resource instances
renderUncompiled
Smarty_Resource_Uncompiled::renderUncompiled() in smarty_resource_uncompiled.php
Render and output the template (without using the compiler)
renderUncompiled
render the uncompiled source
renderUncompiled
Smarty_Internal_Resource_PHP::renderUncompiled() in smarty_internal_resource_php.php
Render and output the template (without using the compiler)
s
Smarty.class.php
Smarty.class.php in Smarty.class.php
smarty_cacheresource.php
smarty_cacheresource.php in smarty_cacheresource.php
smartyAutoload
smartyAutoload() in Smarty.class.php
Autoloader
SmartyCompilerException
SmartyCompilerException in Smarty.class.php
Smarty compiler exception class
SmartyException
SmartyException in Smarty.class.php
Smarty exception class
SMARTY_DIR
SMARTY_DIR in Smarty.class.php
set SMARTY_DIR to absolute path to Smarty library files.
SMARTY_MBSTRING
SMARTY_MBSTRING in Smarty.class.php
SMARTY_PLUGINS_DIR
SMARTY_PLUGINS_DIR in Smarty.class.php
SMARTY_RESOURCE_CHAR_SET
SMARTY_RESOURCE_CHAR_SET in Smarty.class.php
SMARTY_RESOURCE_DATE_FORMAT
SMARTY_RESOURCE_DATE_FORMAT in Smarty.class.php
SMARTY_SPL_AUTOLOAD
SMARTY_SPL_AUTOLOAD in Smarty.class.php
register the class autoloader
SMARTY_SYSPLUGINS_DIR
SMARTY_SYSPLUGINS_DIR in Smarty.class.php
set SMARTY_SYSPLUGINS_DIR to absolute path to Smarty internal plugins.
$sysplugins
Smarty_CacheResource::$sysplugins in smarty_cacheresource.php
resource types provided by the core
smarty_cacheresource_custom.php
smarty_cacheresource_custom.php in smarty_cacheresource_custom.php
smarty_cacheresource_keyvaluestore.php
smarty_cacheresource_keyvaluestore.php in smarty_cacheresource_keyvaluestore.php
smarty_internal_cacheresource_file.php
smarty_internal_cacheresource_file.php in smarty_internal_cacheresource_file.php
sanitize
Smarty_CacheResource_KeyValueStore::sanitize() in smarty_cacheresource_keyvaluestore.php
Sanitize CacheID components
save
Smarty_CacheResource_Custom::save() in smarty_cacheresource_custom.php
Save content to cache
Smarty_CacheResource
Smarty_CacheResource in smarty_cacheresource.php
Cache Handler API
Smarty_CacheResource_Custom
Smarty_CacheResource_Custom in smarty_cacheresource_custom.php
Cache Handler API
Smarty_CacheResource_KeyValueStore
Smarty_CacheResource_KeyValueStore in smarty_cacheresource_keyvaluestore.php
Smarty Cache Handler Base for Key/Value Storage Implementations
Smarty_Internal_CacheResource_File
Smarty_Internal_CacheResource_File in smarty_internal_cacheresource_file.php
This class does contain all necessary methods for the HTML cache on file system
$shorttag_order
Smarty_Internal_Compile_Eval::$shorttag_order in smarty_internal_compile_eval.php
Attribute definition: Overwrites base class.
$shorttag_order
Smarty_Internal_Compile_Block::$shorttag_order in smarty_internal_compile_block.php
Attribute definition: Overwrites base class.
$shorttag_order
Smarty_Internal_Compile_Continue::$shorttag_order in smarty_internal_compile_continue.php
Attribute definition: Overwrites base class.
$shorttag_order
Smarty_Internal_Compile_Config_Load::$shorttag_order in smarty_internal_compile_config_load.php
Attribute definition: Overwrites base class.
$shorttag_order
Smarty_Internal_Compile_Break::$shorttag_order in smarty_internal_compile_break.php
Attribute definition: Overwrites base class.
$shorttag_order
Smarty_Internal_Compile_Capture::$shorttag_order in smarty_internal_compile_capture.php
Attribute definition: Overwrites base class.
$shorttag_order
Smarty_Internal_Compile_Section::$shorttag_order in smarty_internal_compile_section.php
Attribute definition: Overwrites base class.
$shorttag_order
Smarty_Internal_Compile_Extends::$shorttag_order in smarty_internal_compile_extends.php
Attribute definition: Overwrites base class.
$shorttag_order
Smarty_Internal_CompileBase::$shorttag_order in smarty_internal_compilebase.php
Shorttag attribute order defined by its names
$shorttag_order
Smarty_Internal_Compile_Function::$shorttag_order in smarty_internal_compile_function.php
Attribute definition: Overwrites base class.
$shorttag_order
Smarty_Internal_Compile_Include::$shorttag_order in smarty_internal_compile_include.php
Attribute definition: Overwrites base class.
$shorttag_order
Smarty_Internal_Compile_Foreach::$shorttag_order in smarty_internal_compile_foreach.php
Attribute definition: Overwrites base class.
$shorttag_order
Smarty_Internal_Compile_Insert::$shorttag_order in smarty_internal_compile_insert.php
Attribute definition: Overwrites base class.
$shorttag_order
Smarty_Internal_Compile_Include_Php::$shorttag_order in smarty_internal_compile_include_php.php
Attribute definition: Overwrites base class.
$shorttag_order
Smarty_Internal_Compile_Call::$shorttag_order in smarty_internal_compile_call.php
Attribute definition: Overwrites base class.
$smarty
Smarty_Internal_SmartyTemplateCompiler::$smarty in smarty_internal_smartytemplatecompiler.php
Smarty object
$smarty_token_names
Smarty_Internal_Templatelexer::$smarty_token_names in smarty_internal_templatelexer.php
$state
Smarty_Internal_Templatelexer::$state in smarty_internal_templatelexer.php
$stateno
TPC_yyStackEntry::$stateno in smarty_internal_configfileparser.php
$stateno
TP_yyStackEntry::$stateno in smarty_internal_templateparser.php
$string
TPC_yyToken::$string in smarty_internal_configfileparser.php
$string
TP_yyToken::$string in smarty_internal_templateparser.php
$strip
Smarty_Internal_Templatelexer::$strip in smarty_internal_templatelexer.php
$successful
Smarty_Internal_Templateparser::$successful in smarty_internal_templateparser.php
$successful
Smarty_Internal_Configfileparser::$successful in smarty_internal_configfileparser.php
$suppressHeader
Smarty_Internal_TemplateCompilerBase::$suppressHeader in smarty_internal_templatecompilerbase.php
suppress Smarty header code in compiled template
$suppressMergedTemplates
Smarty_Internal_TemplateCompilerBase::$suppressMergedTemplates in smarty_internal_templatecompilerbase.php
suppress generation of merged template code
$suppressNocacheProcessing
Smarty_Internal_TemplateCompilerBase::$suppressNocacheProcessing in smarty_internal_templatecompilerbase.php
suppress generation of nocache code
$suppressTemplatePropertyHeader
suppress template property header code in compiled template
smarty_internal_compilebase.php
smarty_internal_compilebase.php in smarty_internal_compilebase.php
smarty_internal_compile_append.php
smarty_internal_compile_append.php in smarty_internal_compile_append.php
smarty_internal_compile_assign.php
smarty_internal_compile_assign.php in smarty_internal_compile_assign.php
smarty_internal_compile_block.php
smarty_internal_compile_block.php in smarty_internal_compile_block.php
smarty_internal_compile_break.php
smarty_internal_compile_break.php in smarty_internal_compile_break.php
smarty_internal_compile_call.php
smarty_internal_compile_call.php in smarty_internal_compile_call.php
smarty_internal_compile_capture.php
smarty_internal_compile_capture.php in smarty_internal_compile_capture.php
smarty_internal_compile_config_load.php
smarty_internal_compile_config_load.php in smarty_internal_compile_config_load.php
smarty_internal_compile_continue.php
smarty_internal_compile_continue.php in smarty_internal_compile_continue.php
smarty_internal_compile_debug.php
smarty_internal_compile_debug.php in smarty_internal_compile_debug.php
smarty_internal_compile_eval.php
smarty_internal_compile_eval.php in smarty_internal_compile_eval.php
smarty_internal_compile_extends.php
smarty_internal_compile_extends.php in smarty_internal_compile_extends.php
smarty_internal_compile_for.php
smarty_internal_compile_for.php in smarty_internal_compile_for.php
smarty_internal_compile_foreach.php
smarty_internal_compile_foreach.php in smarty_internal_compile_foreach.php
smarty_internal_compile_function.php
smarty_internal_compile_function.php in smarty_internal_compile_function.php
smarty_internal_compile_if.php
smarty_internal_compile_if.php in smarty_internal_compile_if.php
smarty_internal_compile_include.php
smarty_internal_compile_include.php in smarty_internal_compile_include.php
smarty_internal_compile_include_php.php
smarty_internal_compile_include_php.php in smarty_internal_compile_include_php.php
smarty_internal_compile_insert.php
smarty_internal_compile_insert.php in smarty_internal_compile_insert.php
smarty_internal_compile_ldelim.php
smarty_internal_compile_ldelim.php in smarty_internal_compile_ldelim.php
smarty_internal_compile_nocache.php
smarty_internal_compile_nocache.php in smarty_internal_compile_nocache.php
smarty_internal_compile_private_block_plugin.php
smarty_internal_compile_private_block_plugin.php in smarty_internal_compile_private_block_plugin.php
smarty_internal_compile_private_function_plugin.php
smarty_internal_compile_private_function_plugin.php in smarty_internal_compile_private_function_plugin.php
smarty_internal_compile_private_modifier.php
smarty_internal_compile_private_modifier.php in smarty_internal_compile_private_modifier.php
smarty_internal_compile_private_object_block_function.php
smarty_internal_compile_private_object_block_function.php in smarty_internal_compile_private_object_block_function.php
smarty_internal_compile_private_object_function.php
smarty_internal_compile_private_object_function.php in smarty_internal_compile_private_object_function.php
smarty_internal_compile_private_print_expression.php
smarty_internal_compile_private_print_expression.php in smarty_internal_compile_private_print_expression.php
smarty_internal_compile_private_registered_block.php
smarty_internal_compile_private_registered_block.php in smarty_internal_compile_private_registered_block.php
smarty_internal_compile_private_registered_function.php
smarty_internal_compile_private_registered_function.php in smarty_internal_compile_private_registered_function.php
smarty_internal_compile_private_special_variable.php
smarty_internal_compile_private_special_variable.php in smarty_internal_compile_private_special_variable.php
smarty_internal_compile_rdelim.php
smarty_internal_compile_rdelim.php in smarty_internal_compile_rdelim.php
smarty_internal_compile_section.php
smarty_internal_compile_section.php in smarty_internal_compile_section.php
smarty_internal_compile_setfilter.php
smarty_internal_compile_setfilter.php in smarty_internal_compile_setfilter.php
smarty_internal_compile_while.php
smarty_internal_compile_while.php in smarty_internal_compile_while.php
smarty_internal_configfileparser.php
smarty_internal_configfileparser.php in smarty_internal_configfileparser.php
smarty_internal_nocache_insert.php
smarty_internal_nocache_insert.php in smarty_internal_nocache_insert.php
smarty_internal_parsetree.php
smarty_internal_parsetree.php in smarty_internal_parsetree.php
smarty_internal_smartytemplatecompiler.php
smarty_internal_smartytemplatecompiler.php in smarty_internal_smartytemplatecompiler.php
smarty_internal_templatecompilerbase.php
smarty_internal_templatecompilerbase.php in smarty_internal_templatecompilerbase.php
smarty_internal_templatelexer.php
smarty_internal_templatelexer.php in smarty_internal_templatelexer.php
smarty_internal_templateparser.php
smarty_internal_templateparser.php in smarty_internal_templateparser.php
saveBlockData
Smarty_Internal_Compile_Block::saveBlockData() in smarty_internal_compile_block.php
Save or replace child block source by block name during parsing
SMARTY
Smarty_Internal_Templatelexer::SMARTY in smarty_internal_templatelexer.php
Smarty_Internal_CompileBase
Smarty_Internal_CompileBase in smarty_internal_compilebase.php
This class does extend all internal compile plugins
Smarty_Internal_Compile_Append
Smarty_Internal_Compile_Append in smarty_internal_compile_append.php
Smarty Internal Plugin Compile Append Class
Smarty_Internal_Compile_Assign
Smarty_Internal_Compile_Assign in smarty_internal_compile_assign.php
Smarty Internal Plugin Compile Assign Class
Smarty_Internal_Compile_Block
Smarty_Internal_Compile_Block in smarty_internal_compile_block.php
Smarty Internal Plugin Compile Block Class
Smarty_Internal_Compile_Blockclose
Smarty_Internal_Compile_Blockclose in smarty_internal_compile_block.php
Smarty Internal Plugin Compile BlockClose Class
Smarty_Internal_Compile_Break
Smarty_Internal_Compile_Break in smarty_internal_compile_break.php
Smarty Internal Plugin Compile Break Class
Smarty_Internal_Compile_Call
Smarty_Internal_Compile_Call in smarty_internal_compile_call.php
Smarty Internal Plugin Compile Function_Call Class
Smarty_Internal_Compile_Capture
Smarty_Internal_Compile_Capture in smarty_internal_compile_capture.php
Smarty Internal Plugin Compile Capture Class
Smarty_Internal_Compile_CaptureClose
Smarty_Internal_Compile_CaptureClose in smarty_internal_compile_capture.php
Smarty Internal Plugin Compile Captureclose Class
Smarty_Internal_Compile_Config_Load
Smarty_Internal_Compile_Config_Load in smarty_internal_compile_config_load.php
Smarty Internal Plugin Compile Config Load Class
Smarty_Internal_Compile_Continue
Smarty_Internal_Compile_Continue in smarty_internal_compile_continue.php
Smarty Internal Plugin Compile Continue Class
Smarty_Internal_Compile_Debug
Smarty_Internal_Compile_Debug in smarty_internal_compile_debug.php
Smarty Internal Plugin Compile Debug Class
Smarty_Internal_Compile_Else
Smarty_Internal_Compile_Else in smarty_internal_compile_if.php
Smarty Internal Plugin Compile Else Class
Smarty_Internal_Compile_Elseif
Smarty_Internal_Compile_Elseif in smarty_internal_compile_if.php
Smarty Internal Plugin Compile ElseIf Class
Smarty_Internal_Compile_Eval
Smarty_Internal_Compile_Eval in smarty_internal_compile_eval.php
Smarty Internal Plugin Compile Eval Class
Smarty_Internal_Compile_Extends
Smarty_Internal_Compile_Extends in smarty_internal_compile_extends.php
Smarty Internal Plugin Compile extend Class
Smarty_Internal_Compile_For
Smarty_Internal_Compile_For in smarty_internal_compile_for.php
Smarty Internal Plugin Compile For Class
Smarty_Internal_Compile_Forclose
Smarty_Internal_Compile_Forclose in smarty_internal_compile_for.php
Smarty Internal Plugin Compile Forclose Class
Smarty_Internal_Compile_Foreach
Smarty_Internal_Compile_Foreach in smarty_internal_compile_foreach.php
Smarty Internal Plugin Compile Foreach Class
Smarty_Internal_Compile_Foreachclose
Smarty_Internal_Compile_Foreachclose in smarty_internal_compile_foreach.php
Smarty Internal Plugin Compile Foreachclose Class
Smarty_Internal_Compile_Foreachelse
Smarty_Internal_Compile_Foreachelse in smarty_internal_compile_foreach.php
Smarty Internal Plugin Compile Foreachelse Class
Smarty_Internal_Compile_Forelse
Smarty_Internal_Compile_Forelse in smarty_internal_compile_for.php
Smarty Internal Plugin Compile Forelse Class
Smarty_Internal_Compile_Function
Smarty_Internal_Compile_Function in smarty_internal_compile_function.php
Smarty Internal Plugin Compile Function Class
Smarty_Internal_Compile_Functionclose
Smarty_Internal_Compile_Functionclose in smarty_internal_compile_function.php
Smarty Internal Plugin Compile Functionclose Class
Smarty_Internal_Compile_If
Smarty_Internal_Compile_If in smarty_internal_compile_if.php
Smarty Internal Plugin Compile If Class
Smarty_Internal_Compile_Ifclose
Smarty_Internal_Compile_Ifclose in smarty_internal_compile_if.php
Smarty Internal Plugin Compile Ifclose Class
Smarty_Internal_Compile_Include
Smarty_Internal_Compile_Include in smarty_internal_compile_include.php
Smarty Internal Plugin Compile Include Class
Smarty_Internal_Compile_Include_Php
Smarty_Internal_Compile_Include_Php in smarty_internal_compile_include_php.php
Smarty Internal Plugin Compile Insert Class
Smarty_Internal_Compile_Insert
Smarty_Internal_Compile_Insert in smarty_internal_compile_insert.php
Smarty Internal Plugin Compile Insert Class
Smarty_Internal_Compile_Ldelim
Smarty_Internal_Compile_Ldelim in smarty_internal_compile_ldelim.php
Smarty Internal Plugin Compile Ldelim Class
Smarty_Internal_Compile_Nocache
Smarty_Internal_Compile_Nocache in smarty_internal_compile_nocache.php
Smarty Internal Plugin Compile Nocache Classv
Smarty_Internal_Compile_Nocacheclose
Smarty_Internal_Compile_Nocacheclose in smarty_internal_compile_nocache.php
Smarty Internal Plugin Compile Nocacheclose Class
Smarty_Internal_Compile_Private_Block_Plugin
Smarty_Internal_Compile_Private_Block_Plugin in smarty_internal_compile_private_block_plugin.php
Smarty Internal Plugin Compile Block Plugin Class
Smarty_Internal_Compile_Private_Function_Plugin
Smarty_Internal_Compile_Private_Function_Plugin in smarty_internal_compile_private_function_plugin.php
Smarty Internal Plugin Compile Function Plugin Class
Smarty_Internal_Compile_Private_Modifier
Smarty_Internal_Compile_Private_Modifier in smarty_internal_compile_private_modifier.php
Smarty Internal Plugin Compile Modifier Class
Smarty_Internal_Compile_Private_Object_Block_Function
Smarty_Internal_Compile_Private_Object_Block_Function in smarty_internal_compile_private_object_block_function.php
Smarty Internal Plugin Compile Object Block Function Class
Smarty_Internal_Compile_Private_Object_Function
Smarty_Internal_Compile_Private_Object_Function in smarty_internal_compile_private_object_function.php
Smarty Internal Plugin Compile Object Function Class
Smarty_Internal_Compile_Private_Print_Expression
Smarty_Internal_Compile_Private_Print_Expression in smarty_internal_compile_private_print_expression.php
Smarty Internal Plugin Compile Print Expression Class
Smarty_Internal_Compile_Private_Registered_Block
Smarty_Internal_Compile_Private_Registered_Block in smarty_internal_compile_private_registered_block.php
Smarty Internal Plugin Compile Registered Block Class
Smarty_Internal_Compile_Private_Registered_Function
Smarty_Internal_Compile_Private_Registered_Function in smarty_internal_compile_private_registered_function.php
Smarty Internal Plugin Compile Registered Function Class
Smarty_Internal_Compile_Private_Special_Variable
Smarty_Internal_Compile_Private_Special_Variable in smarty_internal_compile_private_special_variable.php
Smarty Internal Plugin Compile special Smarty Variable Class
Smarty_Internal_Compile_Rdelim
Smarty_Internal_Compile_Rdelim in smarty_internal_compile_rdelim.php
Smarty Internal Plugin Compile Rdelim Class
Smarty_Internal_Compile_Section
Smarty_Internal_Compile_Section in smarty_internal_compile_section.php
Smarty Internal Plugin Compile Section Class
Smarty_Internal_Compile_Sectionclose
Smarty_Internal_Compile_Sectionclose in smarty_internal_compile_section.php
Smarty Internal Plugin Compile Sectionclose Class
Smarty_Internal_Compile_Sectionelse
Smarty_Internal_Compile_Sectionelse in smarty_internal_compile_section.php
Smarty Internal Plugin Compile Sectionelse Class
Smarty_Internal_Compile_Setfilter
Smarty_Internal_Compile_Setfilter in smarty_internal_compile_setfilter.php
Smarty Internal Plugin Compile Setfilter Class
Smarty_Internal_Compile_Setfilterclose
Smarty_Internal_Compile_Setfilterclose in smarty_internal_compile_setfilter.php
Smarty Internal Plugin Compile Setfilterclose Class
Smarty_Internal_Compile_While
Smarty_Internal_Compile_While in smarty_internal_compile_while.php
Smarty Internal Plugin Compile While Class
Smarty_Internal_Compile_Whileclose
Smarty_Internal_Compile_Whileclose in smarty_internal_compile_while.php
Smarty Internal Plugin Compile Whileclose Class
Smarty_Internal_Configfileparser
Smarty_Internal_Configfileparser in smarty_internal_configfileparser.php
Smarty_Internal_Nocache_Insert
Smarty_Internal_Nocache_Insert in smarty_internal_nocache_insert.php
Smarty Internal Plugin Compile Insert Class
Smarty_Internal_SmartyTemplateCompiler
Smarty_Internal_SmartyTemplateCompiler in smarty_internal_smartytemplatecompiler.php
Class SmartyTemplateCompiler
Smarty_Internal_TemplateCompilerBase
Smarty_Internal_TemplateCompilerBase in smarty_internal_templatecompilerbase.php
Main abstract compiler class
Smarty_Internal_Templatelexer
Smarty_Internal_Templatelexer in smarty_internal_templatelexer.php
Smarty Internal Plugin Templatelexer
Smarty_Internal_Templateparser
Smarty_Internal_Templateparser in smarty_internal_templateparser.php
$smarty
Smarty_Internal_Config_File_Compiler::$smarty in smarty_internal_config_file_compiler.php
Smarty object
$smarty_token_names
Smarty_Internal_Configfilelexer::$smarty_token_names in smarty_internal_configfilelexer.php
smarty_internal_config.php
smarty_internal_config.php in smarty_internal_config.php
smarty_internal_configfilelexer.php
smarty_internal_configfilelexer.php in smarty_internal_configfilelexer.php
smarty_internal_config_file_compiler.php
smarty_internal_config_file_compiler.php in smarty_internal_config_file_compiler.php
SECTION
Smarty_Internal_Configfilelexer::SECTION in smarty_internal_configfilelexer.php
Smarty_Internal_Configfilelexer
Smarty_Internal_Configfilelexer in smarty_internal_configfilelexer.php
Smarty Internal Plugin Configfilelexer
Smarty_Internal_Config_File_Compiler
Smarty_Internal_Config_File_Compiler in smarty_internal_config_file_compiler.php
Main config file compiler class
START
Smarty_Internal_Configfilelexer::START in smarty_internal_configfilelexer.php
smarty_internal_debug.php
smarty_internal_debug.php in smarty_internal_debug.php
Smarty_Internal_Debug
Smarty_Internal_Debug in smarty_internal_debug.php
Smarty Internal Plugin Debug Class
smarty_modifier_debug_print_var
smarty_modifier_debug_print_var() in modifier.debug_print_var.php
Smarty debug_print_var modifier plugin
start_cache
Smarty_Internal_Debug::start_cache() in smarty_internal_debug.php
Start logging of cache time
start_compile
Smarty_Internal_Debug::start_compile() in smarty_internal_debug.php
Start logging of compile time
start_render
Smarty_Internal_Debug::start_render() in smarty_internal_debug.php
Start logging of render time
smarty_block_textformat
smarty_block_textformat() in block.textformat.php
Smarty {textformat}{/textformat} block plugin
smarty_outputfilter_trimwhitespace
smarty_outputfilter_trimwhitespace() in outputfilter.trimwhitespace.php
Smarty trimwhitespace outputfilter plugin
smarty_variablefilter_htmlspecialchars
smarty_variablefilter_htmlspecialchars() in variablefilter.htmlspecialchars.php
Smarty htmlspecialchars variablefilter plugin
smarty_function_counter
smarty_function_counter() in function.counter.php
Smarty {counter} function plugin
smarty_function_cycle
smarty_function_cycle() in function.cycle.php
Smarty {cycle} function plugin
smarty_function_fetch
smarty_function_fetch() in function.fetch.php
Smarty {fetch} plugin
smarty_function_html_checkboxes
smarty_function_html_checkboxes() in function.html_checkboxes.php
Smarty {html_checkboxes} function plugin
smarty_function_html_checkboxes_output
smarty_function_html_checkboxes_output() in function.html_checkboxes.php
smarty_function_html_image
smarty_function_html_image() in function.html_image.php
Smarty {html_image} function plugin
smarty_function_html_options
smarty_function_html_options() in function.html_options.php
Smarty {html_options} function plugin
smarty_function_html_options_optgroup
smarty_function_html_options_optgroup() in function.html_options.php
smarty_function_html_options_optoutput
smarty_function_html_options_optoutput() in function.html_options.php
smarty_function_html_radios
smarty_function_html_radios() in function.html_radios.php
Smarty {html_radios} function plugin
smarty_function_html_radios_output
smarty_function_html_radios_output() in function.html_radios.php
smarty_function_html_select_date
smarty_function_html_select_date() in function.html_select_date.php
Smarty {html_select_date} plugin
smarty_function_html_select_time
smarty_function_html_select_time() in function.html_select_time.php
Smarty {html_select_time} function plugin
smarty_function_html_table
smarty_function_html_table() in function.html_table.php
Smarty {html_table} function plugin
smarty_function_html_table_cycle
smarty_function_html_table_cycle() in function.html_table.php
smarty_function_mailto
smarty_function_mailto() in function.mailto.php
Smarty {mailto} function plugin
smarty_function_math
smarty_function_math() in function.math.php
Smarty {math} function plugin
smarty_internal_filter_handler.php
smarty_internal_filter_handler.php in smarty_internal_filter_handler.php
smarty_internal_function_call_handler.php
smarty_internal_function_call_handler.php in smarty_internal_function_call_handler.php
smarty_internal_get_include_path.php
smarty_internal_get_include_path.php in smarty_internal_get_include_path.php
smarty_internal_write_file.php
smarty_internal_write_file.php in smarty_internal_write_file.php
Smarty_Internal_Filter_Handler
Smarty_Internal_Filter_Handler in smarty_internal_filter_handler.php
Class for filter processing
Smarty_Internal_Function_Call_Handler
Smarty_Internal_Function_Call_Handler in smarty_internal_function_call_handler.php
This class does call function defined with the {function} tag
Smarty_Internal_Get_Include_Path
Smarty_Internal_Get_Include_Path in smarty_internal_get_include_path.php
Smarty Internal Read Include Path Class
Smarty_Internal_Write_File
Smarty_Internal_Write_File in smarty_internal_write_file.php
Smarty Internal Write File Class
smarty_modifier_capitalize
smarty_modifier_capitalize() in modifier.capitalize.php
Smarty capitalize modifier plugin
smarty_modifier_date_format
smarty_modifier_date_format() in modifier.date_format.php
Smarty date_format modifier plugin
smarty_modifier_escape
smarty_modifier_escape() in modifier.escape.php
Smarty escape modifier plugin
smarty_modifier_regex_replace
smarty_modifier_regex_replace() in modifier.regex_replace.php
Smarty regex_replace modifier plugin
smarty_modifier_replace
smarty_modifier_replace() in modifier.replace.php
Smarty replace modifier plugin
smarty_modifier_spacify
smarty_modifier_spacify() in modifier.spacify.php
Smarty spacify modifier plugin
smarty_modifier_truncate
smarty_modifier_truncate() in modifier.truncate.php
Smarty truncate modifier plugin
smarty_modifiercompiler_cat
smarty_modifiercompiler_cat() in modifiercompiler.cat.php
Smarty cat modifier plugin
smarty_modifiercompiler_count_characters
smarty_modifiercompiler_count_characters() in modifiercompiler.count_characters.php
Smarty count_characters modifier plugin
smarty_modifiercompiler_count_paragraphs
smarty_modifiercompiler_count_paragraphs() in modifiercompiler.count_paragraphs.php
Smarty count_paragraphs modifier plugin
smarty_modifiercompiler_count_sentences
smarty_modifiercompiler_count_sentences() in modifiercompiler.count_sentences.php
Smarty count_sentences modifier plugin
smarty_modifiercompiler_count_words
smarty_modifiercompiler_count_words() in modifiercompiler.count_words.php
Smarty count_words modifier plugin
smarty_modifiercompiler_default
smarty_modifiercompiler_default() in modifiercompiler.default.php
Smarty default modifier plugin
smarty_modifiercompiler_escape
smarty_modifiercompiler_escape() in modifiercompiler.escape.php
Smarty escape modifier plugin
smarty_modifiercompiler_from_charset
smarty_modifiercompiler_from_charset() in modifiercompiler.from_charset.php
Smarty from_charset modifier plugin
smarty_modifiercompiler_indent
smarty_modifiercompiler_indent() in modifiercompiler.indent.php
Smarty indent modifier plugin
smarty_modifiercompiler_lower
smarty_modifiercompiler_lower() in modifiercompiler.lower.php
Smarty lower modifier plugin
smarty_modifiercompiler_noprint
smarty_modifiercompiler_noprint() in modifiercompiler.noprint.php
Smarty noprint modifier plugin
smarty_modifiercompiler_string_format
smarty_modifiercompiler_string_format() in modifiercompiler.string_format.php
Smarty string_format modifier plugin
smarty_modifiercompiler_strip
smarty_modifiercompiler_strip() in modifiercompiler.strip.php
Smarty strip modifier plugin
smarty_modifiercompiler_strip_tags
smarty_modifiercompiler_strip_tags() in modifiercompiler.strip_tags.php
Smarty strip_tags modifier plugin
smarty_modifiercompiler_to_charset
smarty_modifiercompiler_to_charset() in modifiercompiler.to_charset.php
Smarty to_charset modifier plugin
smarty_modifiercompiler_unescape
smarty_modifiercompiler_unescape() in modifiercompiler.unescape.php
Smarty unescape modifier plugin
smarty_modifiercompiler_upper
smarty_modifiercompiler_upper() in modifiercompiler.upper.php
Smarty upper modifier plugin
smarty_modifiercompiler_wordwrap
smarty_modifiercompiler_wordwrap() in modifiercompiler.wordwrap.php
Smarty wordwrap modifier plugin
shared.escape_special_chars.php
shared.escape_special_chars.php in shared.escape_special_chars.php
shared.literal_compiler_param.php
shared.literal_compiler_param.php in shared.literal_compiler_param.php
shared.make_timestamp.php
shared.make_timestamp.php in shared.make_timestamp.php
shared.mb_str_replace.php
shared.mb_str_replace.php in shared.mb_str_replace.php
shared.mb_unicode.php
shared.mb_unicode.php in shared.mb_unicode.php
shared.mb_wordwrap.php
shared.mb_wordwrap.php in shared.mb_wordwrap.php
smarty_function_escape_special_chars
smarty_function_escape_special_chars() in shared.escape_special_chars.php
escape_special_chars common function
smarty_literal_compiler_param
smarty_literal_compiler_param() in shared.literal_compiler_param.php
evaluate compiler parameter
smarty_make_timestamp
smarty_make_timestamp() in shared.make_timestamp.php
Function: smarty_make_timestamp
Purpose: used by other smarty functions to make a timestamp from a string.
smarty_mb_from_unicode
smarty_mb_from_unicode() in shared.mb_unicode.php
convert unicodes to the character of given encoding
smarty_mb_str_replace
smarty_mb_str_replace() in shared.mb_str_replace.php
Multibyte string replace
smarty_mb_to_unicode
smarty_mb_to_unicode() in shared.mb_unicode.php
convert characters to their decimal unicode equivalents
smarty_mb_wordwrap
smarty_mb_wordwrap() in shared.mb_wordwrap.php
Wrap a string to a given number of characters
$secure_dir
Smarty_Security::$secure_dir in smarty_security.php
This is the list of template directories that are considered secure.
$static_classes
Smarty_Security::$static_classes in smarty_security.php
This is an array of trusted static classes.
$streams
Smarty_Security::$streams in smarty_security.php
This is an array of trusted streams.
smarty_internal_utility.php
smarty_internal_utility.php in smarty_internal_utility.php
smarty_security.php
smarty_security.php in smarty_security.php
Smarty_Internal_Utility
Smarty_Internal_Utility in smarty_internal_utility.php
Utility class
Smarty_Security
Smarty_Security in smarty_security.php
This class does contain the security settings
$scope
Smarty_Variable::$scope in smarty_internal_data.php
the scope the variable will have (local,parent or root)
$security_class
Smarty::$security_class in Smarty.class.php
class name
$security_policy
Smarty::$security_policy in Smarty.class.php
implementation of security class
$smarty
Smarty_Data::$smarty in smarty_internal_data.php
Smarty object
$smarty
Smarty::$smarty in Smarty.class.php
self pointer to Smarty object
$smarty
Smarty_Internal_Template::$smarty in smarty_internal_template.php
Global smarty instance
$smarty_debug_id
Smarty::$smarty_debug_id in Smarty.class.php
Name of debugging URL-param.
$start_time
Smarty::$start_time in Smarty.class.php
start time for execution time calculation
SmartyBC.class.php
SmartyBC.class.php in SmartyBC.class.php
smarty_internal_data.php
smarty_internal_data.php in smarty_internal_data.php
smarty_internal_template.php
smarty_internal_template.php in smarty_internal_template.php
smarty_internal_templatebase.php
smarty_internal_templatebase.php in smarty_internal_templatebase.php
SCOPE_GLOBAL
Smarty::SCOPE_GLOBAL in Smarty.class.php
constant definitions
SCOPE_LOCAL
Smarty::SCOPE_LOCAL in Smarty.class.php
define variable scopes
SCOPE_PARENT
Smarty::SCOPE_PARENT in Smarty.class.php
constant definitions
SCOPE_ROOT
Smarty::SCOPE_ROOT in Smarty.class.php
constant definitions
setAutoloadFilters
Smarty::setAutoloadFilters() in Smarty.class.php
Set autoload filters
setCacheDir
Smarty::setCacheDir() in Smarty.class.php
Set cache directory
setCompileDir
Smarty::setCompileDir() in Smarty.class.php
Set compile directory
setConfigDir
Smarty::setConfigDir() in Smarty.class.php
Set config directory
setDebugTemplate
Smarty::setDebugTemplate() in Smarty.class.php
set the debug template
setDefaultModifiers
Smarty::setDefaultModifiers() in Smarty.class.php
Set default modifiers
setPluginsDir
Smarty::setPluginsDir() in Smarty.class.php
Set plugins directory
setTemplateDir
Smarty::setTemplateDir() in Smarty.class.php
Set template directory
setupInlineSubTemplate
Template code runtime function to set up an inline subtemplate
Smarty
Smarty in Smarty.class.php
This is the main Smarty class
SmartyBC
SmartyBC in SmartyBC.class.php
Smarty Backward Compatability Wrapper Class
Smarty_Data
Smarty_Data in smarty_internal_data.php
class for the Smarty data object
Smarty_Internal_Data
Smarty_Internal_Data in smarty_internal_data.php
Base class with template and variable methodes
Smarty_Internal_Template
Smarty_Internal_Template in smarty_internal_template.php
Main class with template data structures and methods
Smarty_Internal_TemplateBase
Smarty_Internal_TemplateBase in smarty_internal_templatebase.php
Class with shared template methodes
smarty_php_tag
smarty_php_tag() in SmartyBC.class.php
Smarty {php}{/php} block function
Smarty_Variable
Smarty_Variable in smarty_internal_data.php
class for the Smarty variable object
SMARTY_VERSION
Smarty::SMARTY_VERSION in Smarty.class.php
smarty version
$short_open_tag
Smarty_Internal_Resource_PHP::$short_open_tag in smarty_internal_resource_php.php
container for short_open_tag directive's value before executing PHP templates
$smarty
Smarty_Template_Source::$smarty in smarty_resource.php
Smarty instance
$source
Smarty_Template_Cached::$source in smarty_cacheresource.php
Source Object
$source
Smarty_Template_Compiled::$source in smarty_resource.php
Source Object
$sources
Smarty_Resource::$sources in smarty_resource.php
cache for Smarty_Template_Source instances
$sysplugins
Smarty_Resource::$sysplugins in smarty_resource.php
resource types provided by the core
smarty_config_source.php
smarty_config_source.php in smarty_config_source.php
smarty_internal_resource_eval.php
smarty_internal_resource_eval.php in smarty_internal_resource_eval.php
smarty_internal_resource_extends.php
smarty_internal_resource_extends.php in smarty_internal_resource_extends.php
smarty_internal_resource_file.php
smarty_internal_resource_file.php in smarty_internal_resource_file.php
smarty_internal_resource_php.php
smarty_internal_resource_php.php in smarty_internal_resource_php.php
smarty_internal_resource_registered.php
smarty_internal_resource_registered.php in smarty_internal_resource_registered.php
smarty_internal_resource_stream.php
smarty_internal_resource_stream.php in smarty_internal_resource_stream.php
smarty_internal_resource_string.php
smarty_internal_resource_string.php in smarty_internal_resource_string.php
smarty_resource.php
smarty_resource.php in smarty_resource.php
smarty_resource_custom.php
smarty_resource_custom.php in smarty_resource_custom.php
smarty_resource_recompiled.php
smarty_resource_recompiled.php in smarty_resource_recompiled.php
smarty_resource_uncompiled.php
smarty_resource_uncompiled.php in smarty_resource_uncompiled.php
Smarty_Config_Source
Smarty_Config_Source in smarty_config_source.php
Smarty Resource Data Object
Smarty_Internal_Resource_Eval
Smarty_Internal_Resource_Eval in smarty_internal_resource_eval.php
Smarty Internal Plugin Resource Eval
Smarty_Internal_Resource_Extends
Smarty_Internal_Resource_Extends in smarty_internal_resource_extends.php
Smarty Internal Plugin Resource Extends
Smarty_Internal_Resource_File
Smarty_Internal_Resource_File in smarty_internal_resource_file.php
Smarty Internal Plugin Resource File
Smarty_Internal_Resource_PHP
Smarty_Internal_Resource_PHP in smarty_internal_resource_php.php
Smarty Internal Plugin Resource PHP
Smarty_Internal_Resource_Registered
Smarty_Internal_Resource_Registered in smarty_internal_resource_registered.php
Smarty Internal Plugin Resource Registered
Smarty_Internal_Resource_Stream
Smarty_Internal_Resource_Stream in smarty_internal_resource_stream.php
Smarty Internal Plugin Resource Stream
Smarty_Internal_Resource_String
Smarty_Internal_Resource_String in smarty_internal_resource_string.php
Smarty Internal Plugin Resource String
Smarty_Resource
Smarty_Resource in smarty_resource.php
Smarty Resource Plugin
Smarty_Resource_Custom
Smarty_Resource_Custom in smarty_resource_custom.php
Smarty Resource Plugin
Smarty_Resource_Recompiled
Smarty_Resource_Recompiled in smarty_resource_recompiled.php
Smarty Resource Plugin
Smarty_Resource_Uncompiled
Smarty_Resource_Uncompiled in smarty_resource_uncompiled.php
Smarty Resource Plugin
Smarty_Template_Cached
Smarty_Template_Cached in smarty_cacheresource.php
Smarty Resource Data Object
Smarty_Template_Compiled
Smarty_Template_Compiled in smarty_resource.php
Smarty Resource Data Object
Smarty_Template_Source
Smarty_Template_Source in smarty_resource.php
Smarty Resource Data Object
source
Smarty_Resource::source() in smarty_resource.php
initialize Source Object for given resource
t
$timestamps
Smarty_CacheResource_KeyValueStore::$timestamps in smarty_cacheresource_keyvaluestore.php
cache for timestamps
$taglineno
Smarty_Internal_Templatelexer::$taglineno in smarty_internal_templatelexer.php
$template
Smarty_Internal_TemplateCompilerBase::$template in smarty_internal_templatecompilerbase.php
current template
$token
Smarty_Internal_Templatelexer::$token in smarty_internal_templatelexer.php
TEXT
Smarty_Internal_Templatelexer::TEXT in smarty_internal_templatelexer.php
tokenName
Smarty_Internal_Configfileparser::tokenName() in smarty_internal_configfileparser.php
tokenName
Smarty_Internal_Templateparser::tokenName() in smarty_internal_templateparser.php
TPC_BOOL
Smarty_Internal_Configfileparser::TPC_BOOL in smarty_internal_configfileparser.php
TPC_CLOSEB
Smarty_Internal_Configfileparser::TPC_CLOSEB in smarty_internal_configfileparser.php
TPC_COMMENTSTART
Smarty_Internal_Configfileparser::TPC_COMMENTSTART in smarty_internal_configfileparser.php
TPC_DOT
Smarty_Internal_Configfileparser::TPC_DOT in smarty_internal_configfileparser.php
TPC_DOUBLE_QUOTED_STRING
Smarty_Internal_Configfileparser::TPC_DOUBLE_QUOTED_STRING in smarty_internal_configfileparser.php
TPC_EQUAL
Smarty_Internal_Configfileparser::TPC_EQUAL in smarty_internal_configfileparser.php
TPC_FLOAT
Smarty_Internal_Configfileparser::TPC_FLOAT in smarty_internal_configfileparser.php
TPC_ID
Smarty_Internal_Configfileparser::TPC_ID in smarty_internal_configfileparser.php
TPC_INT
Smarty_Internal_Configfileparser::TPC_INT in smarty_internal_configfileparser.php
TPC_NAKED_STRING
Smarty_Internal_Configfileparser::TPC_NAKED_STRING in smarty_internal_configfileparser.php
TPC_NEWLINE
Smarty_Internal_Configfileparser::TPC_NEWLINE in smarty_internal_configfileparser.php
TPC_OPENB
Smarty_Internal_Configfileparser::TPC_OPENB in smarty_internal_configfileparser.php
TPC_SECTION
Smarty_Internal_Configfileparser::TPC_SECTION in smarty_internal_configfileparser.php
TPC_SINGLE_QUOTED_STRING
Smarty_Internal_Configfileparser::TPC_SINGLE_QUOTED_STRING in smarty_internal_configfileparser.php
TPC_TRIPPLE_DOUBLE_QUOTED_STRING
TPC_yyStackEntry
TPC_yyStackEntry in smarty_internal_configfileparser.php
TPC_yyToken
TPC_yyToken in smarty_internal_configfileparser.php
Smarty Internal Plugin Configfileparser
TP_ANDSYM
Smarty_Internal_Templateparser::TP_ANDSYM in smarty_internal_templateparser.php
TP_APTR
Smarty_Internal_Templateparser::TP_APTR in smarty_internal_templateparser.php
TP_AS
Smarty_Internal_Templateparser::TP_AS in smarty_internal_templateparser.php
TP_ASPENDTAG
Smarty_Internal_Templateparser::TP_ASPENDTAG in smarty_internal_templateparser.php
TP_ASPSTARTTAG
Smarty_Internal_Templateparser::TP_ASPSTARTTAG in smarty_internal_templateparser.php
TP_AT
Smarty_Internal_Templateparser::TP_AT in smarty_internal_templateparser.php
TP_BACKTICK
Smarty_Internal_Templateparser::TP_BACKTICK in smarty_internal_templateparser.php
TP_CLOSEB
Smarty_Internal_Templateparser::TP_CLOSEB in smarty_internal_templateparser.php
TP_CLOSEP
Smarty_Internal_Templateparser::TP_CLOSEP in smarty_internal_templateparser.php
TP_COLON
Smarty_Internal_Templateparser::TP_COLON in smarty_internal_templateparser.php
TP_COMMA
Smarty_Internal_Templateparser::TP_COMMA in smarty_internal_templateparser.php
TP_COMMENT
Smarty_Internal_Templateparser::TP_COMMENT in smarty_internal_templateparser.php
TP_DOLLAR
Smarty_Internal_Templateparser::TP_DOLLAR in smarty_internal_templateparser.php
TP_DOLLARID
Smarty_Internal_Templateparser::TP_DOLLARID in smarty_internal_templateparser.php
TP_DOT
Smarty_Internal_Templateparser::TP_DOT in smarty_internal_templateparser.php
TP_DOUBLECOLON
Smarty_Internal_Templateparser::TP_DOUBLECOLON in smarty_internal_templateparser.php
TP_EQUAL
Smarty_Internal_Templateparser::TP_EQUAL in smarty_internal_templateparser.php
TP_EQUALS
Smarty_Internal_Templateparser::TP_EQUALS in smarty_internal_templateparser.php
TP_FAKEPHPSTARTTAG
Smarty_Internal_Templateparser::TP_FAKEPHPSTARTTAG in smarty_internal_templateparser.php
TP_GREATEREQUAL
Smarty_Internal_Templateparser::TP_GREATEREQUAL in smarty_internal_templateparser.php
TP_GREATERTHAN
Smarty_Internal_Templateparser::TP_GREATERTHAN in smarty_internal_templateparser.php
TP_HATCH
Smarty_Internal_Templateparser::TP_HATCH in smarty_internal_templateparser.php
TP_HEX
Smarty_Internal_Templateparser::TP_HEX in smarty_internal_templateparser.php
TP_ID
Smarty_Internal_Templateparser::TP_ID in smarty_internal_templateparser.php
TP_IDENTITY
Smarty_Internal_Templateparser::TP_IDENTITY in smarty_internal_templateparser.php
TP_INCDEC
Smarty_Internal_Templateparser::TP_INCDEC in smarty_internal_templateparser.php
TP_INSTANCEOF
Smarty_Internal_Templateparser::TP_INSTANCEOF in smarty_internal_templateparser.php
TP_INTEGER
Smarty_Internal_Templateparser::TP_INTEGER in smarty_internal_templateparser.php
TP_ISDIVBY
Smarty_Internal_Templateparser::TP_ISDIVBY in smarty_internal_templateparser.php
TP_ISEVEN
Smarty_Internal_Templateparser::TP_ISEVEN in smarty_internal_templateparser.php
TP_ISEVENBY
Smarty_Internal_Templateparser::TP_ISEVENBY in smarty_internal_templateparser.php
TP_ISIN
Smarty_Internal_Templateparser::TP_ISIN in smarty_internal_templateparser.php
TP_ISNOTDIVBY
Smarty_Internal_Templateparser::TP_ISNOTDIVBY in smarty_internal_templateparser.php
TP_ISNOTEVEN
Smarty_Internal_Templateparser::TP_ISNOTEVEN in smarty_internal_templateparser.php
TP_ISNOTEVENBY
Smarty_Internal_Templateparser::TP_ISNOTEVENBY in smarty_internal_templateparser.php
TP_ISNOTODD
Smarty_Internal_Templateparser::TP_ISNOTODD in smarty_internal_templateparser.php
TP_ISNOTODDBY
Smarty_Internal_Templateparser::TP_ISNOTODDBY in smarty_internal_templateparser.php
TP_ISODD
Smarty_Internal_Templateparser::TP_ISODD in smarty_internal_templateparser.php
TP_ISODDBY
Smarty_Internal_Templateparser::TP_ISODDBY in smarty_internal_templateparser.php
TP_LAND
Smarty_Internal_Templateparser::TP_LAND in smarty_internal_templateparser.php
TP_LDEL
Smarty_Internal_Templateparser::TP_LDEL in smarty_internal_templateparser.php
TP_LDELFOR
Smarty_Internal_Templateparser::TP_LDELFOR in smarty_internal_templateparser.php
TP_LDELFOREACH
Smarty_Internal_Templateparser::TP_LDELFOREACH in smarty_internal_templateparser.php
TP_LDELIF
Smarty_Internal_Templateparser::TP_LDELIF in smarty_internal_templateparser.php
TP_LDELSETFILTER
Smarty_Internal_Templateparser::TP_LDELSETFILTER in smarty_internal_templateparser.php
TP_LDELSLASH
Smarty_Internal_Templateparser::TP_LDELSLASH in smarty_internal_templateparser.php
TP_LESSEQUAL
Smarty_Internal_Templateparser::TP_LESSEQUAL in smarty_internal_templateparser.php
TP_LESSTHAN
Smarty_Internal_Templateparser::TP_LESSTHAN in smarty_internal_templateparser.php
TP_LINEBREAK
Smarty_Internal_Templateparser::TP_LINEBREAK in smarty_internal_templateparser.php
TP_LITERAL
Smarty_Internal_Templateparser::TP_LITERAL in smarty_internal_templateparser.php
TP_LITERALEND
Smarty_Internal_Templateparser::TP_LITERALEND in smarty_internal_templateparser.php
TP_LITERALSTART
Smarty_Internal_Templateparser::TP_LITERALSTART in smarty_internal_templateparser.php
TP_LOR
Smarty_Internal_Templateparser::TP_LOR in smarty_internal_templateparser.php
TP_LXOR
Smarty_Internal_Templateparser::TP_LXOR in smarty_internal_templateparser.php
TP_MATH
Smarty_Internal_Templateparser::TP_MATH in smarty_internal_templateparser.php
TP_MOD
Smarty_Internal_Templateparser::TP_MOD in smarty_internal_templateparser.php
TP_NONEIDENTITY
Smarty_Internal_Templateparser::TP_NONEIDENTITY in smarty_internal_templateparser.php
TP_NOT
Smarty_Internal_Templateparser::TP_NOT in smarty_internal_templateparser.php
TP_NOTEQUALS
Smarty_Internal_Templateparser::TP_NOTEQUALS in smarty_internal_templateparser.php
TP_OPENB
Smarty_Internal_Templateparser::TP_OPENB in smarty_internal_templateparser.php
TP_OPENP
Smarty_Internal_Templateparser::TP_OPENP in smarty_internal_templateparser.php
TP_OTHER
Smarty_Internal_Templateparser::TP_OTHER in smarty_internal_templateparser.php
TP_PHPENDTAG
Smarty_Internal_Templateparser::TP_PHPENDTAG in smarty_internal_templateparser.php
TP_PHPSTARTTAG
Smarty_Internal_Templateparser::TP_PHPSTARTTAG in smarty_internal_templateparser.php
TP_PTR
Smarty_Internal_Templateparser::TP_PTR in smarty_internal_templateparser.php
TP_QMARK
Smarty_Internal_Templateparser::TP_QMARK in smarty_internal_templateparser.php
TP_QUOTE
Smarty_Internal_Templateparser::TP_QUOTE in smarty_internal_templateparser.php
TP_RDEL
Smarty_Internal_Templateparser::TP_RDEL in smarty_internal_templateparser.php
TP_SEMICOLON
Smarty_Internal_Templateparser::TP_SEMICOLON in smarty_internal_templateparser.php
TP_SINGLEQUOTESTRING
Smarty_Internal_Templateparser::TP_SINGLEQUOTESTRING in smarty_internal_templateparser.php
TP_SMARTYBLOCKCHILD
Smarty_Internal_Templateparser::TP_SMARTYBLOCKCHILD in smarty_internal_templateparser.php
TP_SPACE
Smarty_Internal_Templateparser::TP_SPACE in smarty_internal_templateparser.php
TP_STEP
Smarty_Internal_Templateparser::TP_STEP in smarty_internal_templateparser.php
TP_TO
Smarty_Internal_Templateparser::TP_TO in smarty_internal_templateparser.php
TP_TYPECAST
Smarty_Internal_Templateparser::TP_TYPECAST in smarty_internal_templateparser.php
TP_UNIMATH
Smarty_Internal_Templateparser::TP_UNIMATH in smarty_internal_templateparser.php
TP_VERT
Smarty_Internal_Templateparser::TP_VERT in smarty_internal_templateparser.php
TP_XMLTAG
Smarty_Internal_Templateparser::TP_XMLTAG in smarty_internal_templateparser.php
TP_yyStackEntry
TP_yyStackEntry in smarty_internal_templateparser.php
TP_yyToken
TP_yyToken in smarty_internal_templateparser.php
Smarty Internal Plugin Templateparser
Trace
Smarty_Internal_Templateparser::Trace() in smarty_internal_templateparser.php
Trace
Smarty_Internal_Configfileparser::Trace() in smarty_internal_configfileparser.php
trigger_template_error
Smarty_Internal_TemplateCompilerBase::trigger_template_error() in smarty_internal_templatecompilerbase.php
display compiler error messages without dying
$token
Smarty_Internal_Configfilelexer::$token in smarty_internal_configfilelexer.php
trigger_config_file_error
Smarty_Internal_Config_File_Compiler::trigger_config_file_error() in smarty_internal_config_file_compiler.php
display compiler error messages without dying
$template_data
Smarty_Internal_Debug::$template_data in smarty_internal_debug.php
template data
$trusted_dir
Smarty_Security::$trusted_dir in smarty_security.php
This is an array of directories where trusted php scripts reside.
testInstall
Smarty_Internal_Utility::testInstall() in smarty_internal_utility.php
diagnose Smarty setup
$template_class
Smarty_Internal_Data::$template_class in smarty_internal_data.php
name of class used for templates
$template_dir
Smarty::$template_dir in Smarty.class.php
template directory
$template_functions
Smarty::$template_functions in Smarty.class.php
global template functions
$template_objects
Smarty::$template_objects in Smarty.class.php
cached template objects
$template_resource
Smarty_Internal_Template::$template_resource in smarty_internal_template.php
Template resource
$tpl_vars
Smarty_Internal_Data::$tpl_vars in smarty_internal_data.php
template variables
templateExists
Smarty::templateExists() in Smarty.class.php
Check if a template resource exists
template_exists
SmartyBC::template_exists() in SmartyBC.class.php
Checks whether requested template exists.
testInstall
Smarty::testInstall() in Smarty.class.php
Run installation test
trigger_error
SmartyBC::trigger_error() in SmartyBC.class.php
trigger Smarty error
$template_lexer_class
Name of the Class to tokenize this resource's contents with
$template_lexer_class
Name of the Class to tokenize this resource's contents with
$template_parser_class
Name of the Class to parse this resource's contents with
$template_parser_class
Name of the Class to parse this resource's contents with
$timestamp
Compiled Timestamp
$timestamp
Smarty_Template_Cached::$timestamp in smarty_cacheresource.php
Source Timestamp
$type
Smarty_Template_Source::$type in smarty_resource.php
Resource Type
u
$used_tags
Smarty_Internal_Template::$used_tags in smarty_internal_template.php
optional log of tag/attributes
$use_include_path
Smarty::$use_include_path in Smarty.class.php
look up relative filepaths in include_path
$use_sub_dirs
Smarty::$use_sub_dirs in Smarty.class.php
use sub dirs for compiled/cached files?
Undefined_Smarty_Variable
Undefined_Smarty_Variable in smarty_internal_data.php
class for undefined variable object
unmuteExpectedErrors
Smarty::unmuteExpectedErrors() in Smarty.class.php
Disable error handler muting expected messages
unregisterCacheResource
Unregisters a cache resource
unregisterFilter
Smarty_Internal_TemplateBase::unregisterFilter() in smarty_internal_templatebase.php
Unregisters a filter function
unregisterObject
Smarty_Internal_TemplateBase::unregisterObject() in smarty_internal_templatebase.php
unregister an object
unregisterPlugin
Smarty_Internal_TemplateBase::unregisterPlugin() in smarty_internal_templatebase.php
Unregister Plugin
unregisterResource
Smarty_Internal_TemplateBase::unregisterResource() in smarty_internal_templatebase.php
Unregisters a resource
unregister_block
SmartyBC::unregister_block() in SmartyBC.class.php
Unregisters block function
unregister_compiler_function
Unregisters compiler function
unregister_function
SmartyBC::unregister_function() in SmartyBC.class.php
Unregisters custom function
unregister_modifier
SmartyBC::unregister_modifier() in SmartyBC.class.php
Unregisters modifier
unregister_object
SmartyBC::unregister_object() in SmartyBC.class.php
Unregisters object
unregister_outputfilter
Unregisters an outputfilter function
unregister_postfilter
SmartyBC::unregister_postfilter() in SmartyBC.class.php
Unregisters a postfilter function
unregister_prefilter
SmartyBC::unregister_prefilter() in SmartyBC.class.php
Unregisters a prefilter function
unregister_resource
SmartyBC::unregister_resource() in SmartyBC.class.php
Unregisters a resource
$uid
Smarty_Template_Source::$uid in smarty_resource.php
Unique Template ID
$uncompiled
Source is bypassing compiler
v
$value
Smarty_Internal_Templatelexer::$value in smarty_internal_templatelexer.php
$value
Smarty_Internal_Configfilelexer::$value in smarty_internal_configfilelexer.php
VALUE
Smarty_Internal_Configfilelexer::VALUE in smarty_internal_configfilelexer.php
variablefilter.htmlspecialchars.php
variablefilter.htmlspecialchars.php in variablefilter.htmlspecialchars.php
$value
Smarty_Variable::$value in smarty_internal_data.php
template variable
$variable_filters
Smarty_Internal_Template::$variable_filters in smarty_internal_template.php
variable filters
$valid
Smarty_Template_Cached::$valid in smarty_cacheresource.php
Cache Is Valid
w
write
Smarty_CacheResource_KeyValueStore::write() in smarty_cacheresource_keyvaluestore.php
Save values for a set of keys to cache
writeCachedContent
Smarty_Internal_CacheResource_File::writeCachedContent() in smarty_internal_cacheresource_file.php
Write the rendered template output to cache
writeCachedContent
Smarty_CacheResource_KeyValueStore::writeCachedContent() in smarty_cacheresource_keyvaluestore.php
Write the rendered template output to cache
writeCachedContent
Smarty_CacheResource::writeCachedContent() in smarty_cacheresource.php
Write the rendered template output to cache
writeCachedContent
Smarty_CacheResource_Custom::writeCachedContent() in smarty_cacheresource_custom.php
Write the rendered template output to cache
$write_compiled_code
Smarty_Internal_TemplateCompilerBase::$write_compiled_code in smarty_internal_templatecompilerbase.php
flag if compiled template file shall we written
writeFile
Smarty_Internal_Write_File::writeFile() in smarty_internal_write_file.php
Writes file in a safe way to disk
writeCachedContent
Smarty_Internal_Template::writeCachedContent() in smarty_internal_template.php
Writes the cached template output
write
Smarty_Template_Cached::write() in smarty_cacheresource.php
Write this cache object to handler
y
$yyerrcnt
Smarty_Internal_Configfileparser::$yyerrcnt in smarty_internal_configfileparser.php
$yyerrcnt
Smarty_Internal_Templateparser::$yyerrcnt in smarty_internal_templateparser.php
$yyExpectedTokens
Smarty_Internal_Configfileparser::$yyExpectedTokens in smarty_internal_configfileparser.php
$yyExpectedTokens
Smarty_Internal_Templateparser::$yyExpectedTokens in smarty_internal_templateparser.php
$yyFallback
Smarty_Internal_Configfileparser::$yyFallback in smarty_internal_configfileparser.php
$yyFallback
Smarty_Internal_Templateparser::$yyFallback in smarty_internal_templateparser.php
$yyidx
Smarty_Internal_Templateparser::$yyidx in smarty_internal_templateparser.php
$yyidx
Smarty_Internal_Configfileparser::$yyidx in smarty_internal_configfileparser.php
$yyReduceMap
Smarty_Internal_Configfileparser::$yyReduceMap in smarty_internal_configfileparser.php
$yyReduceMap
Smarty_Internal_Templateparser::$yyReduceMap in smarty_internal_templateparser.php
$yyRuleInfo
Smarty_Internal_Configfileparser::$yyRuleInfo in smarty_internal_configfileparser.php
$yyRuleInfo
Smarty_Internal_Templateparser::$yyRuleInfo in smarty_internal_templateparser.php
$yyRuleName
Smarty_Internal_Configfileparser::$yyRuleName in smarty_internal_configfileparser.php
$yyRuleName
Smarty_Internal_Templateparser::$yyRuleName in smarty_internal_templateparser.php
$yystack
Smarty_Internal_Configfileparser::$yystack in smarty_internal_configfileparser.php
$yystack
Smarty_Internal_Templateparser::$yystack in smarty_internal_templateparser.php
$yyTokenName
Smarty_Internal_Configfileparser::$yyTokenName in smarty_internal_configfileparser.php
$yyTokenName
Smarty_Internal_Templateparser::$yyTokenName in smarty_internal_templateparser.php
$yyTraceFILE
Smarty_Internal_Configfileparser::$yyTraceFILE in smarty_internal_configfileparser.php
$yyTraceFILE
Smarty_Internal_Templateparser::$yyTraceFILE in smarty_internal_templateparser.php
$yyTracePrompt
Smarty_Internal_Configfileparser::$yyTracePrompt in smarty_internal_configfileparser.php
$yyTracePrompt
Smarty_Internal_Templateparser::$yyTracePrompt in smarty_internal_templateparser.php
$yy_action
Smarty_Internal_Configfileparser::$yy_action in smarty_internal_configfileparser.php
$yy_action
Smarty_Internal_Templateparser::$yy_action in smarty_internal_templateparser.php
$yy_default
Smarty_Internal_Templateparser::$yy_default in smarty_internal_templateparser.php
$yy_default
Smarty_Internal_Configfileparser::$yy_default in smarty_internal_configfileparser.php
$yy_lookahead
Smarty_Internal_Templateparser::$yy_lookahead in smarty_internal_templateparser.php
$yy_lookahead
Smarty_Internal_Configfileparser::$yy_lookahead in smarty_internal_configfileparser.php
$yy_reduce_ofst
Smarty_Internal_Configfileparser::$yy_reduce_ofst in smarty_internal_configfileparser.php
$yy_reduce_ofst
Smarty_Internal_Templateparser::$yy_reduce_ofst in smarty_internal_templateparser.php
$yy_shift_ofst
Smarty_Internal_Configfileparser::$yy_shift_ofst in smarty_internal_configfileparser.php
$yy_shift_ofst
Smarty_Internal_Templateparser::$yy_shift_ofst in smarty_internal_templateparser.php
yybegin
Smarty_Internal_Templatelexer::yybegin() in smarty_internal_templatelexer.php
YYERRORSYMBOL
Smarty_Internal_Configfileparser::YYERRORSYMBOL in smarty_internal_configfileparser.php
YYERRORSYMBOL
Smarty_Internal_Templateparser::YYERRORSYMBOL in smarty_internal_templateparser.php
YYERRSYMDT
Smarty_Internal_Configfileparser::YYERRSYMDT in smarty_internal_configfileparser.php
YYERRSYMDT
Smarty_Internal_Templateparser::YYERRSYMDT in smarty_internal_templateparser.php
YYFALLBACK
Smarty_Internal_Configfileparser::YYFALLBACK in smarty_internal_configfileparser.php
YYFALLBACK
Smarty_Internal_Templateparser::YYFALLBACK in smarty_internal_templateparser.php
yylex
Smarty_Internal_Templatelexer::yylex() in smarty_internal_templatelexer.php
yylex1
Smarty_Internal_Templatelexer::yylex1() in smarty_internal_templatelexer.php
yylex2
Smarty_Internal_Templatelexer::yylex2() in smarty_internal_templatelexer.php
yylex3
Smarty_Internal_Templatelexer::yylex3() in smarty_internal_templatelexer.php
yylex4
Smarty_Internal_Templatelexer::yylex4() in smarty_internal_templatelexer.php
YYNOCODE
Smarty_Internal_Templateparser::YYNOCODE in smarty_internal_templateparser.php
YYNOCODE
Smarty_Internal_Configfileparser::YYNOCODE in smarty_internal_configfileparser.php
YYNRULE
Smarty_Internal_Configfileparser::YYNRULE in smarty_internal_configfileparser.php
YYNRULE
Smarty_Internal_Templateparser::YYNRULE in smarty_internal_templateparser.php
YYNSTATE
Smarty_Internal_Templateparser::YYNSTATE in smarty_internal_templateparser.php
YYNSTATE
Smarty_Internal_Configfileparser::YYNSTATE in smarty_internal_configfileparser.php
yypopstate
Smarty_Internal_Templatelexer::yypopstate() in smarty_internal_templatelexer.php
yypushstate
Smarty_Internal_Templatelexer::yypushstate() in smarty_internal_templatelexer.php
YYSTACKDEPTH
Smarty_Internal_Configfileparser::YYSTACKDEPTH in smarty_internal_configfileparser.php
YYSTACKDEPTH
Smarty_Internal_Templateparser::YYSTACKDEPTH in smarty_internal_templateparser.php
yy_accept
Smarty_Internal_Configfileparser::yy_accept() in smarty_internal_configfileparser.php
yy_accept
Smarty_Internal_Templateparser::yy_accept() in smarty_internal_templateparser.php
YY_ACCEPT_ACTION
Smarty_Internal_Configfileparser::YY_ACCEPT_ACTION in smarty_internal_configfileparser.php
YY_ACCEPT_ACTION
Smarty_Internal_Templateparser::YY_ACCEPT_ACTION in smarty_internal_templateparser.php
yy_destructor
Smarty_Internal_Configfileparser::yy_destructor() in smarty_internal_configfileparser.php
yy_destructor
Smarty_Internal_Templateparser::yy_destructor() in smarty_internal_templateparser.php
YY_ERROR_ACTION
Smarty_Internal_Templateparser::YY_ERROR_ACTION in smarty_internal_templateparser.php
YY_ERROR_ACTION
Smarty_Internal_Configfileparser::YY_ERROR_ACTION in smarty_internal_configfileparser.php
yy_find_reduce_action
Smarty_Internal_Configfileparser::yy_find_reduce_action() in smarty_internal_configfileparser.php
yy_find_reduce_action
Smarty_Internal_Templateparser::yy_find_reduce_action() in smarty_internal_templateparser.php
yy_find_shift_action
Smarty_Internal_Configfileparser::yy_find_shift_action() in smarty_internal_configfileparser.php
yy_find_shift_action
Smarty_Internal_Templateparser::yy_find_shift_action() in smarty_internal_templateparser.php
yy_get_expected_tokens
Smarty_Internal_Configfileparser::yy_get_expected_tokens() in smarty_internal_configfileparser.php
yy_get_expected_tokens
Smarty_Internal_Templateparser::yy_get_expected_tokens() in smarty_internal_templateparser.php
yy_is_expected_token
Smarty_Internal_Configfileparser::yy_is_expected_token() in smarty_internal_configfileparser.php
yy_is_expected_token
Smarty_Internal_Templateparser::yy_is_expected_token() in smarty_internal_templateparser.php
YY_NO_ACTION
Smarty_Internal_Configfileparser::YY_NO_ACTION in smarty_internal_configfileparser.php
YY_NO_ACTION
Smarty_Internal_Templateparser::YY_NO_ACTION in smarty_internal_templateparser.php
yy_parse_failed
Smarty_Internal_Templateparser::yy_parse_failed() in smarty_internal_templateparser.php
yy_parse_failed
Smarty_Internal_Configfileparser::yy_parse_failed() in smarty_internal_configfileparser.php
yy_pop_parser_stack
Smarty_Internal_Templateparser::yy_pop_parser_stack() in smarty_internal_templateparser.php
yy_pop_parser_stack
Smarty_Internal_Configfileparser::yy_pop_parser_stack() in smarty_internal_configfileparser.php
yy_r0
Smarty_Internal_Templateparser::yy_r0() in smarty_internal_templateparser.php
yy_r0
Smarty_Internal_Configfileparser::yy_r0() in smarty_internal_configfileparser.php
yy_r1
Smarty_Internal_Templateparser::yy_r1() in smarty_internal_templateparser.php
yy_r1
Smarty_Internal_Configfileparser::yy_r1() in smarty_internal_configfileparser.php
yy_r1_1
Smarty_Internal_Templatelexer::yy_r1_1() in smarty_internal_templatelexer.php
yy_r1_2
Smarty_Internal_Templatelexer::yy_r1_2() in smarty_internal_templatelexer.php
yy_r1_3
Smarty_Internal_Templatelexer::yy_r1_3() in smarty_internal_templatelexer.php
yy_r1_5
Smarty_Internal_Templatelexer::yy_r1_5() in smarty_internal_templatelexer.php
yy_r1_6
Smarty_Internal_Templatelexer::yy_r1_6() in smarty_internal_templatelexer.php
yy_r1_7
Smarty_Internal_Templatelexer::yy_r1_7() in smarty_internal_templatelexer.php
yy_r1_8
Smarty_Internal_Templatelexer::yy_r1_8() in smarty_internal_templatelexer.php
yy_r1_9
Smarty_Internal_Templatelexer::yy_r1_9() in smarty_internal_templatelexer.php
yy_r1_10
Smarty_Internal_Templatelexer::yy_r1_10() in smarty_internal_templatelexer.php
yy_r1_11
Smarty_Internal_Templatelexer::yy_r1_11() in smarty_internal_templatelexer.php
yy_r1_12
Smarty_Internal_Templatelexer::yy_r1_12() in smarty_internal_templatelexer.php
yy_r1_14
Smarty_Internal_Templatelexer::yy_r1_14() in smarty_internal_templatelexer.php
yy_r1_15
Smarty_Internal_Templatelexer::yy_r1_15() in smarty_internal_templatelexer.php
yy_r1_16
Smarty_Internal_Templatelexer::yy_r1_16() in smarty_internal_templatelexer.php
yy_r1_17
Smarty_Internal_Templatelexer::yy_r1_17() in smarty_internal_templatelexer.php
yy_r1_18
Smarty_Internal_Templatelexer::yy_r1_18() in smarty_internal_templatelexer.php
yy_r1_19
Smarty_Internal_Templatelexer::yy_r1_19() in smarty_internal_templatelexer.php
yy_r1_20
Smarty_Internal_Templatelexer::yy_r1_20() in smarty_internal_templatelexer.php
yy_r1_21
Smarty_Internal_Templatelexer::yy_r1_21() in smarty_internal_templatelexer.php
yy_r1_22
Smarty_Internal_Templatelexer::yy_r1_22() in smarty_internal_templatelexer.php
yy_r1_23
Smarty_Internal_Templatelexer::yy_r1_23() in smarty_internal_templatelexer.php
yy_r1_24
Smarty_Internal_Templatelexer::yy_r1_24() in smarty_internal_templatelexer.php
yy_r1_27
Smarty_Internal_Templatelexer::yy_r1_27() in smarty_internal_templatelexer.php
yy_r1_28
Smarty_Internal_Templatelexer::yy_r1_28() in smarty_internal_templatelexer.php
yy_r2_1
Smarty_Internal_Templatelexer::yy_r2_1() in smarty_internal_templatelexer.php
yy_r2_2
Smarty_Internal_Templatelexer::yy_r2_2() in smarty_internal_templatelexer.php
yy_r2_3
Smarty_Internal_Templatelexer::yy_r2_3() in smarty_internal_templatelexer.php
yy_r2_5
Smarty_Internal_Templatelexer::yy_r2_5() in smarty_internal_templatelexer.php
yy_r2_6
Smarty_Internal_Templatelexer::yy_r2_6() in smarty_internal_templatelexer.php
yy_r2_7
Smarty_Internal_Templatelexer::yy_r2_7() in smarty_internal_templatelexer.php
yy_r2_8
Smarty_Internal_Templatelexer::yy_r2_8() in smarty_internal_templatelexer.php
yy_r2_9
Smarty_Internal_Templatelexer::yy_r2_9() in smarty_internal_templatelexer.php
yy_r2_10
Smarty_Internal_Templatelexer::yy_r2_10() in smarty_internal_templatelexer.php
yy_r2_11
Smarty_Internal_Templatelexer::yy_r2_11() in smarty_internal_templatelexer.php
yy_r2_12
Smarty_Internal_Templatelexer::yy_r2_12() in smarty_internal_templatelexer.php
yy_r2_13
Smarty_Internal_Templatelexer::yy_r2_13() in smarty_internal_templatelexer.php
yy_r2_14
Smarty_Internal_Templatelexer::yy_r2_14() in smarty_internal_templatelexer.php
yy_r2_15
Smarty_Internal_Templatelexer::yy_r2_15() in smarty_internal_templatelexer.php
yy_r2_16
Smarty_Internal_Templatelexer::yy_r2_16() in smarty_internal_templatelexer.php
yy_r2_17
Smarty_Internal_Templatelexer::yy_r2_17() in smarty_internal_templatelexer.php
yy_r2_18
Smarty_Internal_Templatelexer::yy_r2_18() in smarty_internal_templatelexer.php
yy_r2_19
Smarty_Internal_Templatelexer::yy_r2_19() in smarty_internal_templatelexer.php
yy_r2_20
Smarty_Internal_Templatelexer::yy_r2_20() in smarty_internal_templatelexer.php
yy_r2_22
Smarty_Internal_Templatelexer::yy_r2_22() in smarty_internal_templatelexer.php
yy_r2_24
Smarty_Internal_Templatelexer::yy_r2_24() in smarty_internal_templatelexer.php
yy_r2_26
Smarty_Internal_Templatelexer::yy_r2_26() in smarty_internal_templatelexer.php
yy_r2_27
Smarty_Internal_Templatelexer::yy_r2_27() in smarty_internal_templatelexer.php
yy_r2_28
Smarty_Internal_Templatelexer::yy_r2_28() in smarty_internal_templatelexer.php
yy_r2_29
Smarty_Internal_Templatelexer::yy_r2_29() in smarty_internal_templatelexer.php
yy_r2_30
Smarty_Internal_Templatelexer::yy_r2_30() in smarty_internal_templatelexer.php
yy_r2_31
Smarty_Internal_Templatelexer::yy_r2_31() in smarty_internal_templatelexer.php
yy_r2_32
Smarty_Internal_Templatelexer::yy_r2_32() in smarty_internal_templatelexer.php
yy_r2_33
Smarty_Internal_Templatelexer::yy_r2_33() in smarty_internal_templatelexer.php
yy_r2_34
Smarty_Internal_Templatelexer::yy_r2_34() in smarty_internal_templatelexer.php
yy_r2_35
Smarty_Internal_Templatelexer::yy_r2_35() in smarty_internal_templatelexer.php
yy_r2_36
Smarty_Internal_Templatelexer::yy_r2_36() in smarty_internal_templatelexer.php
yy_r2_37
Smarty_Internal_Templatelexer::yy_r2_37() in smarty_internal_templatelexer.php
yy_r2_38
Smarty_Internal_Templatelexer::yy_r2_38() in smarty_internal_templatelexer.php
yy_r2_39
Smarty_Internal_Templatelexer::yy_r2_39() in smarty_internal_templatelexer.php
yy_r2_40
Smarty_Internal_Templatelexer::yy_r2_40() in smarty_internal_templatelexer.php
yy_r2_41
Smarty_Internal_Templatelexer::yy_r2_41() in smarty_internal_templatelexer.php
yy_r2_42
Smarty_Internal_Templatelexer::yy_r2_42() in smarty_internal_templatelexer.php
yy_r2_43
Smarty_Internal_Templatelexer::yy_r2_43() in smarty_internal_templatelexer.php
yy_r2_47
Smarty_Internal_Templatelexer::yy_r2_47() in smarty_internal_templatelexer.php
yy_r2_48
Smarty_Internal_Templatelexer::yy_r2_48() in smarty_internal_templatelexer.php
yy_r2_49
Smarty_Internal_Templatelexer::yy_r2_49() in smarty_internal_templatelexer.php
yy_r2_50
Smarty_Internal_Templatelexer::yy_r2_50() in smarty_internal_templatelexer.php
yy_r2_51
Smarty_Internal_Templatelexer::yy_r2_51() in smarty_internal_templatelexer.php
yy_r2_52
Smarty_Internal_Templatelexer::yy_r2_52() in smarty_internal_templatelexer.php
yy_r2_53
Smarty_Internal_Templatelexer::yy_r2_53() in smarty_internal_templatelexer.php
yy_r2_54
Smarty_Internal_Templatelexer::yy_r2_54() in smarty_internal_templatelexer.php
yy_r2_55
Smarty_Internal_Templatelexer::yy_r2_55() in smarty_internal_templatelexer.php
yy_r2_57
Smarty_Internal_Templatelexer::yy_r2_57() in smarty_internal_templatelexer.php
yy_r2_59
Smarty_Internal_Templatelexer::yy_r2_59() in smarty_internal_templatelexer.php
yy_r2_60
Smarty_Internal_Templatelexer::yy_r2_60() in smarty_internal_templatelexer.php
yy_r2_61
Smarty_Internal_Templatelexer::yy_r2_61() in smarty_internal_templatelexer.php
yy_r2_62
Smarty_Internal_Templatelexer::yy_r2_62() in smarty_internal_templatelexer.php
yy_r2_63
Smarty_Internal_Templatelexer::yy_r2_63() in smarty_internal_templatelexer.php
yy_r2_64
Smarty_Internal_Templatelexer::yy_r2_64() in smarty_internal_templatelexer.php
yy_r2_65
Smarty_Internal_Templatelexer::yy_r2_65() in smarty_internal_templatelexer.php
yy_r2_66
Smarty_Internal_Templatelexer::yy_r2_66() in smarty_internal_templatelexer.php
yy_r2_67
Smarty_Internal_Templatelexer::yy_r2_67() in smarty_internal_templatelexer.php
yy_r2_68
Smarty_Internal_Templatelexer::yy_r2_68() in smarty_internal_templatelexer.php
yy_r2_69
Smarty_Internal_Templatelexer::yy_r2_69() in smarty_internal_templatelexer.php
yy_r2_70
Smarty_Internal_Templatelexer::yy_r2_70() in smarty_internal_templatelexer.php
yy_r2_71
Smarty_Internal_Templatelexer::yy_r2_71() in smarty_internal_templatelexer.php
yy_r2_72
Smarty_Internal_Templatelexer::yy_r2_72() in smarty_internal_templatelexer.php
yy_r2_73
Smarty_Internal_Templatelexer::yy_r2_73() in smarty_internal_templatelexer.php
yy_r2_74
Smarty_Internal_Templatelexer::yy_r2_74() in smarty_internal_templatelexer.php
yy_r2_75
Smarty_Internal_Templatelexer::yy_r2_75() in smarty_internal_templatelexer.php
yy_r2_76
Smarty_Internal_Templatelexer::yy_r2_76() in smarty_internal_templatelexer.php
yy_r3_1
Smarty_Internal_Templatelexer::yy_r3_1() in smarty_internal_templatelexer.php
yy_r3_2
Smarty_Internal_Templatelexer::yy_r3_2() in smarty_internal_templatelexer.php
yy_r3_3
Smarty_Internal_Templatelexer::yy_r3_3() in smarty_internal_templatelexer.php
yy_r3_4
Smarty_Internal_Templatelexer::yy_r3_4() in smarty_internal_templatelexer.php
yy_r3_5
Smarty_Internal_Templatelexer::yy_r3_5() in smarty_internal_templatelexer.php
yy_r3_6
Smarty_Internal_Templatelexer::yy_r3_6() in smarty_internal_templatelexer.php
yy_r3_7
Smarty_Internal_Templatelexer::yy_r3_7() in smarty_internal_templatelexer.php
yy_r3_8
Smarty_Internal_Templatelexer::yy_r3_8() in smarty_internal_templatelexer.php
yy_r3_11
Smarty_Internal_Templatelexer::yy_r3_11() in smarty_internal_templatelexer.php
yy_r4
Smarty_Internal_Templateparser::yy_r4() in smarty_internal_templateparser.php
yy_r4
Smarty_Internal_Configfileparser::yy_r4() in smarty_internal_configfileparser.php
yy_r4_1
Smarty_Internal_Templatelexer::yy_r4_1() in smarty_internal_templatelexer.php
yy_r4_2
Smarty_Internal_Templatelexer::yy_r4_2() in smarty_internal_templatelexer.php
yy_r4_4
Smarty_Internal_Templatelexer::yy_r4_4() in smarty_internal_templatelexer.php
yy_r4_5
Smarty_Internal_Templatelexer::yy_r4_5() in smarty_internal_templatelexer.php
yy_r4_6
Smarty_Internal_Templatelexer::yy_r4_6() in smarty_internal_templatelexer.php
yy_r4_7
Smarty_Internal_Templatelexer::yy_r4_7() in smarty_internal_templatelexer.php
yy_r4_8
Smarty_Internal_Templatelexer::yy_r4_8() in smarty_internal_templatelexer.php
yy_r4_9
Smarty_Internal_Templatelexer::yy_r4_9() in smarty_internal_templatelexer.php
yy_r4_10
Smarty_Internal_Templatelexer::yy_r4_10() in smarty_internal_templatelexer.php
yy_r4_11
Smarty_Internal_Templatelexer::yy_r4_11() in smarty_internal_templatelexer.php
yy_r4_12
Smarty_Internal_Templatelexer::yy_r4_12() in smarty_internal_templatelexer.php
yy_r4_13
Smarty_Internal_Templatelexer::yy_r4_13() in smarty_internal_templatelexer.php
yy_r4_17
Smarty_Internal_Templatelexer::yy_r4_17() in smarty_internal_templatelexer.php
yy_r4_18
Smarty_Internal_Templatelexer::yy_r4_18() in smarty_internal_templatelexer.php
yy_r5
Smarty_Internal_Configfileparser::yy_r5() in smarty_internal_configfileparser.php
yy_r5
Smarty_Internal_Templateparser::yy_r5() in smarty_internal_templateparser.php
yy_r6
Smarty_Internal_Configfileparser::yy_r6() in smarty_internal_configfileparser.php
yy_r6
Smarty_Internal_Templateparser::yy_r6() in smarty_internal_templateparser.php
yy_r7
Smarty_Internal_Templateparser::yy_r7() in smarty_internal_templateparser.php
yy_r7
Smarty_Internal_Configfileparser::yy_r7() in smarty_internal_configfileparser.php
yy_r8
Smarty_Internal_Templateparser::yy_r8() in smarty_internal_templateparser.php
yy_r8
Smarty_Internal_Configfileparser::yy_r8() in smarty_internal_configfileparser.php
yy_r9
Smarty_Internal_Configfileparser::yy_r9() in smarty_internal_configfileparser.php
yy_r9
Smarty_Internal_Templateparser::yy_r9() in smarty_internal_templateparser.php
yy_r10
Smarty_Internal_Configfileparser::yy_r10() in smarty_internal_configfileparser.php
yy_r10
Smarty_Internal_Templateparser::yy_r10() in smarty_internal_templateparser.php
yy_r11
Smarty_Internal_Configfileparser::yy_r11() in smarty_internal_configfileparser.php
yy_r11
Smarty_Internal_Templateparser::yy_r11() in smarty_internal_templateparser.php
yy_r12
Smarty_Internal_Templateparser::yy_r12() in smarty_internal_templateparser.php
yy_r12
Smarty_Internal_Configfileparser::yy_r12() in smarty_internal_configfileparser.php
yy_r13
Smarty_Internal_Templateparser::yy_r13() in smarty_internal_templateparser.php
yy_r13
Smarty_Internal_Configfileparser::yy_r13() in smarty_internal_configfileparser.php
yy_r14
Smarty_Internal_Templateparser::yy_r14() in smarty_internal_templateparser.php
yy_r14
Smarty_Internal_Configfileparser::yy_r14() in smarty_internal_configfileparser.php
yy_r15
Smarty_Internal_Configfileparser::yy_r15() in smarty_internal_configfileparser.php
yy_r15
Smarty_Internal_Templateparser::yy_r15() in smarty_internal_templateparser.php
yy_r16
Smarty_Internal_Templateparser::yy_r16() in smarty_internal_templateparser.php
yy_r16
Smarty_Internal_Configfileparser::yy_r16() in smarty_internal_configfileparser.php
yy_r17
Smarty_Internal_Templateparser::yy_r17() in smarty_internal_templateparser.php
yy_r19
Smarty_Internal_Templateparser::yy_r19() in smarty_internal_templateparser.php
yy_r21
Smarty_Internal_Templateparser::yy_r21() in smarty_internal_templateparser.php
yy_r23
Smarty_Internal_Templateparser::yy_r23() in smarty_internal_templateparser.php
yy_r24
Smarty_Internal_Templateparser::yy_r24() in smarty_internal_templateparser.php
yy_r25
Smarty_Internal_Templateparser::yy_r25() in smarty_internal_templateparser.php
yy_r26
Smarty_Internal_Templateparser::yy_r26() in smarty_internal_templateparser.php
yy_r27
Smarty_Internal_Templateparser::yy_r27() in smarty_internal_templateparser.php
yy_r28
Smarty_Internal_Templateparser::yy_r28() in smarty_internal_templateparser.php
yy_r29
Smarty_Internal_Templateparser::yy_r29() in smarty_internal_templateparser.php
yy_r31
Smarty_Internal_Templateparser::yy_r31() in smarty_internal_templateparser.php
yy_r33
Smarty_Internal_Templateparser::yy_r33() in smarty_internal_templateparser.php
yy_r34
Smarty_Internal_Templateparser::yy_r34() in smarty_internal_templateparser.php
yy_r35
Smarty_Internal_Templateparser::yy_r35() in smarty_internal_templateparser.php
yy_r36
Smarty_Internal_Templateparser::yy_r36() in smarty_internal_templateparser.php
yy_r37
Smarty_Internal_Templateparser::yy_r37() in smarty_internal_templateparser.php
yy_r38
Smarty_Internal_Templateparser::yy_r38() in smarty_internal_templateparser.php
yy_r39
Smarty_Internal_Templateparser::yy_r39() in smarty_internal_templateparser.php
yy_r40
Smarty_Internal_Templateparser::yy_r40() in smarty_internal_templateparser.php
yy_r41
Smarty_Internal_Templateparser::yy_r41() in smarty_internal_templateparser.php
yy_r42
Smarty_Internal_Templateparser::yy_r42() in smarty_internal_templateparser.php
yy_r44
Smarty_Internal_Templateparser::yy_r44() in smarty_internal_templateparser.php
yy_r45
Smarty_Internal_Templateparser::yy_r45() in smarty_internal_templateparser.php
yy_r47
Smarty_Internal_Templateparser::yy_r47() in smarty_internal_templateparser.php
yy_r48
Smarty_Internal_Templateparser::yy_r48() in smarty_internal_templateparser.php
yy_r49
Smarty_Internal_Templateparser::yy_r49() in smarty_internal_templateparser.php
yy_r50
Smarty_Internal_Templateparser::yy_r50() in smarty_internal_templateparser.php
yy_r51
Smarty_Internal_Templateparser::yy_r51() in smarty_internal_templateparser.php
yy_r52
Smarty_Internal_Templateparser::yy_r52() in smarty_internal_templateparser.php
yy_r53
Smarty_Internal_Templateparser::yy_r53() in smarty_internal_templateparser.php
yy_r54
Smarty_Internal_Templateparser::yy_r54() in smarty_internal_templateparser.php
yy_r55
Smarty_Internal_Templateparser::yy_r55() in smarty_internal_templateparser.php
yy_r56
Smarty_Internal_Templateparser::yy_r56() in smarty_internal_templateparser.php
yy_r57
Smarty_Internal_Templateparser::yy_r57() in smarty_internal_templateparser.php
yy_r58
Smarty_Internal_Templateparser::yy_r58() in smarty_internal_templateparser.php
yy_r59
Smarty_Internal_Templateparser::yy_r59() in smarty_internal_templateparser.php
yy_r60
Smarty_Internal_Templateparser::yy_r60() in smarty_internal_templateparser.php
yy_r61
Smarty_Internal_Templateparser::yy_r61() in smarty_internal_templateparser.php
yy_r62
Smarty_Internal_Templateparser::yy_r62() in smarty_internal_templateparser.php
yy_r63
Smarty_Internal_Templateparser::yy_r63() in smarty_internal_templateparser.php
yy_r64
Smarty_Internal_Templateparser::yy_r64() in smarty_internal_templateparser.php
yy_r65
Smarty_Internal_Templateparser::yy_r65() in smarty_internal_templateparser.php
yy_r67
Smarty_Internal_Templateparser::yy_r67() in smarty_internal_templateparser.php
yy_r72
Smarty_Internal_Templateparser::yy_r72() in smarty_internal_templateparser.php
yy_r73
Smarty_Internal_Templateparser::yy_r73() in smarty_internal_templateparser.php
yy_r78
Smarty_Internal_Templateparser::yy_r78() in smarty_internal_templateparser.php
yy_r79
Smarty_Internal_Templateparser::yy_r79() in smarty_internal_templateparser.php
yy_r83
Smarty_Internal_Templateparser::yy_r83() in smarty_internal_templateparser.php
yy_r84
Smarty_Internal_Templateparser::yy_r84() in smarty_internal_templateparser.php
yy_r85
Smarty_Internal_Templateparser::yy_r85() in smarty_internal_templateparser.php
yy_r86
Smarty_Internal_Templateparser::yy_r86() in smarty_internal_templateparser.php
yy_r88
Smarty_Internal_Templateparser::yy_r88() in smarty_internal_templateparser.php
yy_r89
Smarty_Internal_Templateparser::yy_r89() in smarty_internal_templateparser.php
yy_r90
Smarty_Internal_Templateparser::yy_r90() in smarty_internal_templateparser.php
yy_r91
Smarty_Internal_Templateparser::yy_r91() in smarty_internal_templateparser.php
yy_r92
Smarty_Internal_Templateparser::yy_r92() in smarty_internal_templateparser.php
yy_r93
Smarty_Internal_Templateparser::yy_r93() in smarty_internal_templateparser.php
yy_r99
Smarty_Internal_Templateparser::yy_r99() in smarty_internal_templateparser.php
yy_r100
Smarty_Internal_Templateparser::yy_r100() in smarty_internal_templateparser.php
yy_r101
Smarty_Internal_Templateparser::yy_r101() in smarty_internal_templateparser.php
yy_r104
Smarty_Internal_Templateparser::yy_r104() in smarty_internal_templateparser.php
yy_r109
Smarty_Internal_Templateparser::yy_r109() in smarty_internal_templateparser.php
yy_r110
Smarty_Internal_Templateparser::yy_r110() in smarty_internal_templateparser.php
yy_r111
Smarty_Internal_Templateparser::yy_r111() in smarty_internal_templateparser.php
yy_r112
Smarty_Internal_Templateparser::yy_r112() in smarty_internal_templateparser.php
yy_r114
Smarty_Internal_Templateparser::yy_r114() in smarty_internal_templateparser.php
yy_r117
Smarty_Internal_Templateparser::yy_r117() in smarty_internal_templateparser.php
yy_r118
Smarty_Internal_Templateparser::yy_r118() in smarty_internal_templateparser.php
yy_r119
Smarty_Internal_Templateparser::yy_r119() in smarty_internal_templateparser.php
yy_r121
Smarty_Internal_Templateparser::yy_r121() in smarty_internal_templateparser.php
yy_r122
Smarty_Internal_Templateparser::yy_r122() in smarty_internal_templateparser.php
yy_r124
Smarty_Internal_Templateparser::yy_r124() in smarty_internal_templateparser.php
yy_r125
Smarty_Internal_Templateparser::yy_r125() in smarty_internal_templateparser.php
yy_r126
Smarty_Internal_Templateparser::yy_r126() in smarty_internal_templateparser.php
yy_r128
Smarty_Internal_Templateparser::yy_r128() in smarty_internal_templateparser.php
yy_r129
Smarty_Internal_Templateparser::yy_r129() in smarty_internal_templateparser.php
yy_r130
Smarty_Internal_Templateparser::yy_r130() in smarty_internal_templateparser.php
yy_r131
Smarty_Internal_Templateparser::yy_r131() in smarty_internal_templateparser.php
yy_r132
Smarty_Internal_Templateparser::yy_r132() in smarty_internal_templateparser.php
yy_r133
Smarty_Internal_Templateparser::yy_r133() in smarty_internal_templateparser.php
yy_r134
Smarty_Internal_Templateparser::yy_r134() in smarty_internal_templateparser.php
yy_r135
Smarty_Internal_Templateparser::yy_r135() in smarty_internal_templateparser.php
yy_r137
Smarty_Internal_Templateparser::yy_r137() in smarty_internal_templateparser.php
yy_r139
Smarty_Internal_Templateparser::yy_r139() in smarty_internal_templateparser.php
yy_r140
Smarty_Internal_Templateparser::yy_r140() in smarty_internal_templateparser.php
yy_r141
Smarty_Internal_Templateparser::yy_r141() in smarty_internal_templateparser.php
yy_r142
Smarty_Internal_Templateparser::yy_r142() in smarty_internal_templateparser.php
yy_r143
Smarty_Internal_Templateparser::yy_r143() in smarty_internal_templateparser.php
yy_r144
Smarty_Internal_Templateparser::yy_r144() in smarty_internal_templateparser.php
yy_r145
Smarty_Internal_Templateparser::yy_r145() in smarty_internal_templateparser.php
yy_r146
Smarty_Internal_Templateparser::yy_r146() in smarty_internal_templateparser.php
yy_r147
Smarty_Internal_Templateparser::yy_r147() in smarty_internal_templateparser.php
yy_r148
Smarty_Internal_Templateparser::yy_r148() in smarty_internal_templateparser.php
yy_r149
Smarty_Internal_Templateparser::yy_r149() in smarty_internal_templateparser.php
yy_r150
Smarty_Internal_Templateparser::yy_r150() in smarty_internal_templateparser.php
yy_r151
Smarty_Internal_Templateparser::yy_r151() in smarty_internal_templateparser.php
yy_r152
Smarty_Internal_Templateparser::yy_r152() in smarty_internal_templateparser.php
yy_r153
Smarty_Internal_Templateparser::yy_r153() in smarty_internal_templateparser.php
yy_r156
Smarty_Internal_Templateparser::yy_r156() in smarty_internal_templateparser.php
yy_r157
Smarty_Internal_Templateparser::yy_r157() in smarty_internal_templateparser.php
yy_r159
Smarty_Internal_Templateparser::yy_r159() in smarty_internal_templateparser.php
yy_r160
Smarty_Internal_Templateparser::yy_r160() in smarty_internal_templateparser.php
yy_r167
Smarty_Internal_Templateparser::yy_r167() in smarty_internal_templateparser.php
yy_r168
Smarty_Internal_Templateparser::yy_r168() in smarty_internal_templateparser.php
yy_r169
Smarty_Internal_Templateparser::yy_r169() in smarty_internal_templateparser.php
yy_r170
Smarty_Internal_Templateparser::yy_r170() in smarty_internal_templateparser.php
yy_r171
Smarty_Internal_Templateparser::yy_r171() in smarty_internal_templateparser.php
yy_r172
Smarty_Internal_Templateparser::yy_r172() in smarty_internal_templateparser.php
yy_r173
Smarty_Internal_Templateparser::yy_r173() in smarty_internal_templateparser.php
yy_r174
Smarty_Internal_Templateparser::yy_r174() in smarty_internal_templateparser.php
yy_r175
Smarty_Internal_Templateparser::yy_r175() in smarty_internal_templateparser.php
yy_r176
Smarty_Internal_Templateparser::yy_r176() in smarty_internal_templateparser.php
yy_r177
Smarty_Internal_Templateparser::yy_r177() in smarty_internal_templateparser.php
yy_r178
Smarty_Internal_Templateparser::yy_r178() in smarty_internal_templateparser.php
yy_r179
Smarty_Internal_Templateparser::yy_r179() in smarty_internal_templateparser.php
yy_r180
Smarty_Internal_Templateparser::yy_r180() in smarty_internal_templateparser.php
yy_r181
Smarty_Internal_Templateparser::yy_r181() in smarty_internal_templateparser.php
yy_r183
Smarty_Internal_Templateparser::yy_r183() in smarty_internal_templateparser.php
yy_r185
Smarty_Internal_Templateparser::yy_r185() in smarty_internal_templateparser.php
yy_r186
Smarty_Internal_Templateparser::yy_r186() in smarty_internal_templateparser.php
yy_r188
Smarty_Internal_Templateparser::yy_r188() in smarty_internal_templateparser.php
yy_r189
Smarty_Internal_Templateparser::yy_r189() in smarty_internal_templateparser.php
yy_r190
Smarty_Internal_Templateparser::yy_r190() in smarty_internal_templateparser.php
yy_r191
Smarty_Internal_Templateparser::yy_r191() in smarty_internal_templateparser.php
yy_r192
Smarty_Internal_Templateparser::yy_r192() in smarty_internal_templateparser.php
yy_r194
Smarty_Internal_Templateparser::yy_r194() in smarty_internal_templateparser.php
yy_r196
Smarty_Internal_Templateparser::yy_r196() in smarty_internal_templateparser.php
yy_r197
Smarty_Internal_Templateparser::yy_r197() in smarty_internal_templateparser.php
yy_r198
Smarty_Internal_Templateparser::yy_r198() in smarty_internal_templateparser.php
yy_reduce
Smarty_Internal_Templateparser::yy_reduce() in smarty_internal_templateparser.php
yy_reduce
Smarty_Internal_Configfileparser::yy_reduce() in smarty_internal_configfileparser.php
YY_REDUCE_MAX
Smarty_Internal_Templateparser::YY_REDUCE_MAX in smarty_internal_templateparser.php
YY_REDUCE_MAX
Smarty_Internal_Configfileparser::YY_REDUCE_MAX in smarty_internal_configfileparser.php
YY_REDUCE_USE_DFLT
Smarty_Internal_Configfileparser::YY_REDUCE_USE_DFLT in smarty_internal_configfileparser.php
YY_REDUCE_USE_DFLT
Smarty_Internal_Templateparser::YY_REDUCE_USE_DFLT in smarty_internal_templateparser.php
yy_shift
Smarty_Internal_Templateparser::yy_shift() in smarty_internal_templateparser.php
yy_shift
Smarty_Internal_Configfileparser::yy_shift() in smarty_internal_configfileparser.php
YY_SHIFT_MAX
Smarty_Internal_Templateparser::YY_SHIFT_MAX in smarty_internal_templateparser.php
YY_SHIFT_MAX
Smarty_Internal_Configfileparser::YY_SHIFT_MAX in smarty_internal_configfileparser.php
YY_SHIFT_USE_DFLT
Smarty_Internal_Templateparser::YY_SHIFT_USE_DFLT in smarty_internal_templateparser.php
YY_SHIFT_USE_DFLT
Smarty_Internal_Configfileparser::YY_SHIFT_USE_DFLT in smarty_internal_configfileparser.php
yy_syntax_error
Smarty_Internal_Templateparser::yy_syntax_error() in smarty_internal_templateparser.php
yy_syntax_error
Smarty_Internal_Configfileparser::yy_syntax_error() in smarty_internal_configfileparser.php
YY_SZ_ACTTAB
Smarty_Internal_Templateparser::YY_SZ_ACTTAB in smarty_internal_templateparser.php
YY_SZ_ACTTAB
Smarty_Internal_Configfileparser::YY_SZ_ACTTAB in smarty_internal_configfileparser.php
yybegin
Smarty_Internal_Configfilelexer::yybegin() in smarty_internal_configfilelexer.php
yylex
Smarty_Internal_Configfilelexer::yylex() in smarty_internal_configfilelexer.php
yylex1
Smarty_Internal_Configfilelexer::yylex1() in smarty_internal_configfilelexer.php
yylex2
Smarty_Internal_Configfilelexer::yylex2() in smarty_internal_configfilelexer.php
yylex3
Smarty_Internal_Configfilelexer::yylex3() in smarty_internal_configfilelexer.php
yylex4
Smarty_Internal_Configfilelexer::yylex4() in smarty_internal_configfilelexer.php
yylex5
Smarty_Internal_Configfilelexer::yylex5() in smarty_internal_configfilelexer.php
yypopstate
Smarty_Internal_Configfilelexer::yypopstate() in smarty_internal_configfilelexer.php
yypushstate
Smarty_Internal_Configfilelexer::yypushstate() in smarty_internal_configfilelexer.php
yy_r1_1
Smarty_Internal_Configfilelexer::yy_r1_1() in smarty_internal_configfilelexer.php
yy_r1_2
Smarty_Internal_Configfilelexer::yy_r1_2() in smarty_internal_configfilelexer.php
yy_r1_3
Smarty_Internal_Configfilelexer::yy_r1_3() in smarty_internal_configfilelexer.php
yy_r1_4
Smarty_Internal_Configfilelexer::yy_r1_4() in smarty_internal_configfilelexer.php
yy_r1_5
Smarty_Internal_Configfilelexer::yy_r1_5() in smarty_internal_configfilelexer.php
yy_r1_6
Smarty_Internal_Configfilelexer::yy_r1_6() in smarty_internal_configfilelexer.php
yy_r1_7
Smarty_Internal_Configfilelexer::yy_r1_7() in smarty_internal_configfilelexer.php
yy_r2_1
Smarty_Internal_Configfilelexer::yy_r2_1() in smarty_internal_configfilelexer.php
yy_r2_2
Smarty_Internal_Configfilelexer::yy_r2_2() in smarty_internal_configfilelexer.php
yy_r2_3
Smarty_Internal_Configfilelexer::yy_r2_3() in smarty_internal_configfilelexer.php
yy_r2_4
Smarty_Internal_Configfilelexer::yy_r2_4() in smarty_internal_configfilelexer.php
yy_r2_5
Smarty_Internal_Configfilelexer::yy_r2_5() in smarty_internal_configfilelexer.php
yy_r2_6
Smarty_Internal_Configfilelexer::yy_r2_6() in smarty_internal_configfilelexer.php
yy_r2_8
Smarty_Internal_Configfilelexer::yy_r2_8() in smarty_internal_configfilelexer.php
yy_r2_9
Smarty_Internal_Configfilelexer::yy_r2_9() in smarty_internal_configfilelexer.php
yy_r2_10
Smarty_Internal_Configfilelexer::yy_r2_10() in smarty_internal_configfilelexer.php
yy_r3_1
Smarty_Internal_Configfilelexer::yy_r3_1() in smarty_internal_configfilelexer.php
yy_r4_1
Smarty_Internal_Configfilelexer::yy_r4_1() in smarty_internal_configfilelexer.php
yy_r4_2
Smarty_Internal_Configfilelexer::yy_r4_2() in smarty_internal_configfilelexer.php
yy_r4_3
Smarty_Internal_Configfilelexer::yy_r4_3() in smarty_internal_configfilelexer.php
yy_r5_1
Smarty_Internal_Configfilelexer::yy_r5_1() in smarty_internal_configfilelexer.php
yy_r5_2
Smarty_Internal_Configfilelexer::yy_r5_2() in smarty_internal_configfilelexer.php
a b c d e f g h i l m n o p r s t u v w y _
smarty3-3.1.13/development/Smarty3Doc/classtrees_Smarty.html0000644000175000017500000003164011637420324022552 0ustar mikemike

Root class Smarty_CacheResource

Root class Smarty_Internal_CompileBase

Root class Smarty_Internal_Configfilelexer

Root class Smarty_Internal_Configfileparser

Root class Smarty_Internal_Config_File_Compiler

Root class Smarty_Internal_Data

Root class Smarty_Internal_Filter_Handler

Root class Smarty_Internal_Function_Call_Handler

Root class Smarty_Internal_Get_Include_Path

Root class Smarty_Internal_Nocache_Insert

Root class Smarty_Internal_TemplateCompilerBase

Root class Smarty_Internal_Templatelexer

Root class Smarty_Internal_Templateparser

Root class Smarty_Internal_Utility

Root class Smarty_Internal_Write_File

Root class Smarty_Resource

Root class Smarty_Security

Root class Smarty_Template_Cached

Root class Smarty_Template_Compiled

Root class Smarty_Template_Source

Root class Smarty_Variable

Root class TPC_yyStackEntry

Root class TPC_yyToken

Root class TP_yyStackEntry

Root class TP_yyToken

Root class Undefined_Smarty_Variable

Root class Exception

Documentation generated on Sat, 24 Sep 2011 20:23:04 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/packages.html0000644000175000017500000000300611634664106020621 0ustar mikemike smarty3-3.1.13/development/Smarty3Doc/Resource-examples/0000755000175000017500000000000012141655572021562 5ustar mikemikesmarty3-3.1.13/development/Smarty3Doc/Resource-examples/Smarty_Resource_Mysql.html0000644000175000017500000003656011637420324026767 0ustar mikemike Docs For Class Smarty_Resource_Mysql

Class Smarty_Resource_Mysql

Description

MySQL Resource

Resource Implementation based on the Custom API to use MySQL as the storage resource for Smarty's templates and configs.

Table definition:

CREATE TABLE IF NOT EXISTS `templates` (
   `name` varchar(100) NOT NULL,
   `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
   `source` text,
   PRIMARY KEY (`name`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Demo data:

INSERT INTO `templates` (`name`, `modified`, `source`) VALUES ('test.tpl', "2010-12-25 22:00:00", '{$x="hello world"}{$x}');

  • author: Rodney Rehm

Located in /demo/plugins/resource.mysql.php (line 23)

Smarty_Resource
   |
   --Smarty_Resource_Custom
      |
      --Smarty_Resource_Mysql
Variable Summary
mixed $db
mixed $fetch
mixed $mtime
Method Summary
Smarty_Resource_Mysql __construct ()
void fetch (string $name,  &$source,  &$mtime, string $source, integer $mtime)
integer fetchTimestamp (string $name)
Variables
mixed $db (line 25)
  • access: protected
mixed $fetch (line 27)
  • access: protected
mixed $mtime (line 29)
  • access: protected

Inherited Variables

Inherited from Smarty_Resource

Smarty_Resource::$compileds
Smarty_Resource::$compiler_class
Smarty_Resource::$resources
Smarty_Resource::$sources
Smarty_Resource::$sysplugins
Smarty_Resource::$template_lexer_class
Smarty_Resource::$template_parser_class
Methods
Constructor __construct (line 31)
  • access: public
Smarty_Resource_Mysql __construct ()
fetch (line 49)

Fetch a template and its modification time from database

  • access: protected
void fetch (string $name,  &$source,  &$mtime, string $source, integer $mtime)
  • string $name: template name
  • string $source: template source
  • integer $mtime: template modification timestamp (epoch)
  • &$source
  • &$mtime

Redefinition of:
Smarty_Resource_Custom::fetch()
fetch template and its modification time from data source
fetchTimestamp (line 70)

Fetch a template's modification time from database

  • return: timestamp (epoch) the template was modified
  • access: protected
integer fetchTimestamp (string $name)
  • string $name: template name

Redefinition of:
Smarty_Resource_Custom::fetchTimestamp()
Fetch template's modification timestamp from data source

Inherited Methods

Inherited From Smarty_Resource_Custom

Smarty_Resource_Custom::fetch()
Smarty_Resource_Custom::fetchTimestamp()
Smarty_Resource_Custom::getBasename()
Smarty_Resource_Custom::getContent()
Smarty_Resource_Custom::populate()

Inherited From Smarty_Resource

Smarty_Resource::buildFilepath()
Smarty_Resource::config()
Smarty_Resource::fileExists()
Smarty_Resource::getBasename()
Smarty_Resource::getContent()
Smarty_Resource::load()
Smarty_Resource::populate()
Smarty_Resource::populateCompiledFilepath()
Smarty_Resource::populateTimestamp()
Smarty_Resource::source()

Documentation generated on Sat, 24 Sep 2011 20:23:17 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Resource-examples/_demo---plugins---resource.extendsall.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Resource-examples/_demo---plugins---resource.extendsall.php.ht0000644000175000017500000000350311637420324031715 0ustar mikemike Docs for page resource.extendsall.php

/demo/plugins/resource.extendsall.php

Description
Classes
Class Description
Smarty_Resource_Extendsall Extends All Resource

Documentation generated on Sat, 24 Sep 2011 20:23:15 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Resource-examples/_demo---plugins---resource.mysqls.php.html0000644000175000017500000000345511637420324031441 0ustar mikemike Docs for page resource.mysqls.php

/demo/plugins/resource.mysqls.php

Description
Classes
Class Description
Smarty_Resource_Mysqls MySQL Resource

Documentation generated on Sat, 24 Sep 2011 20:23:18 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Resource-examples/Smarty_Resource_Extendsall.html0000644000175000017500000002342611637420324027762 0ustar mikemike Docs For Class Smarty_Resource_Extendsall

Class Smarty_Resource_Extendsall

Description

Extends All Resource

Resource Implementation modifying the extends-Resource to walk through the template_dirs and inherit all templates of the same name

  • author: Rodney Rehm

Located in /demo/plugins/resource.extendsall.php (line 12)

Smarty_Resource
   |
   --Smarty_Internal_Resource_Extends
      |
      --Smarty_Resource_Extendsall
Method Summary
void populate ( $source, [ $_template = null])

Documentation generated on Sat, 24 Sep 2011 20:23:15 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Resource-examples/_demo---plugins---resource.mysql.php.html0000644000175000017500000000345111637420324031252 0ustar mikemike Docs for page resource.mysql.php

/demo/plugins/resource.mysql.php

Description
Classes
Class Description
Smarty_Resource_Mysql MySQL Resource

Documentation generated on Sat, 24 Sep 2011 20:23:17 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Resource-examples/Smarty_Resource_Mysqls.html0000644000175000017500000003262211637420324027145 0ustar mikemike Docs For Class Smarty_Resource_Mysqls

Class Smarty_Resource_Mysqls

Description

MySQL Resource

Resource Implementation based on the Custom API to use MySQL as the storage resource for Smarty's templates and configs.

Note that this MySQL implementation fetches the source and timestamps in a single database query, instead of two seperate like resource.mysql.php does.

Table definition:

CREATE TABLE IF NOT EXISTS `templates` (
   `name` varchar(100) NOT NULL,
   `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
   `source` text,
   PRIMARY KEY (`name`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Demo data:

INSERT INTO `templates` (`name`, `modified`, `source`) VALUES ('test.tpl', "2010-12-25 22:00:00", '{$x="hello world"}{$x}');

  • author: Rodney Rehm

Located in /demo/plugins/resource.mysqls.php (line 26)

Smarty_Resource
   |
   --Smarty_Resource_Custom
      |
      --Smarty_Resource_Mysqls
Variable Summary
mixed $db
mixed $fetch
Method Summary
Smarty_Resource_Mysqls __construct ()
void fetch (string $name,  &$source,  &$mtime, string $source, integer $mtime)
Methods
Constructor __construct (line 32)
  • access: public
Smarty_Resource_Mysqls __construct ()
fetch (line 49)

Fetch a template and its modification time from database

  • access: protected
void fetch (string $name,  &$source,  &$mtime, string $source, integer $mtime)
  • string $name: template name
  • string $source: template source
  • integer $mtime: template modification timestamp (epoch)
  • &$source
  • &$mtime

Redefinition of:
Smarty_Resource_Custom::fetch()
fetch template and its modification time from data source

Inherited Methods

Inherited From Smarty_Resource_Custom

Smarty_Resource_Custom::fetch()
Smarty_Resource_Custom::fetchTimestamp()
Smarty_Resource_Custom::getBasename()
Smarty_Resource_Custom::getContent()
Smarty_Resource_Custom::populate()

Inherited From Smarty_Resource

Smarty_Resource::buildFilepath()
Smarty_Resource::config()
Smarty_Resource::fileExists()
Smarty_Resource::getBasename()
Smarty_Resource::getContent()
Smarty_Resource::load()
Smarty_Resource::populate()
Smarty_Resource::populateCompiledFilepath()
Smarty_Resource::populateTimestamp()
Smarty_Resource::source()

Documentation generated on Sat, 24 Sep 2011 20:23:18 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/elementindex_CacheResource-examples.html0000644000175000017500000003270011634664106026136 0ustar mikemike

[CacheResource-examples] element index

Package indexes

All elements
c d f m p r s w _
_
__construct
__construct
Smarty_CacheResource_Memcache::__construct() in cacheresource.memcache.php
__construct
c
cacheresource.apc.php
cacheresource.apc.php in cacheresource.apc.php
cacheresource.memcache.php
cacheresource.memcache.php in cacheresource.memcache.php
cacheresource.mysql.php
cacheresource.mysql.php in cacheresource.mysql.php
d
$db
Smarty_CacheResource_Mysql::$db in cacheresource.mysql.php
delete
Smarty_CacheResource_Mysql::delete() in cacheresource.mysql.php
Delete content from cache
delete
Smarty_CacheResource_Memcache::delete() in cacheresource.memcache.php
Remove values from cache
delete
Smarty_CacheResource_Apc::delete() in cacheresource.apc.php
Remove values from cache
f
$fetch
Smarty_CacheResource_Mysql::$fetch in cacheresource.mysql.php
$fetchTimestamp
fetch
Smarty_CacheResource_Mysql::fetch() in cacheresource.mysql.php
fetch cached content and its modification time from data source
fetchTimestamp
Fetch cached content's modification timestamp from data source
m
$memcache
Smarty_CacheResource_Memcache::$memcache in cacheresource.memcache.php
memcache instance
p
purge
Smarty_CacheResource_Memcache::purge() in cacheresource.memcache.php
Remove *all* values from cache
purge
Smarty_CacheResource_Apc::purge() in cacheresource.apc.php
Remove *all* values from cache
r
read
Smarty_CacheResource_Memcache::read() in cacheresource.memcache.php
Read values for a set of keys from cache
read
Smarty_CacheResource_Apc::read() in cacheresource.apc.php
Read values for a set of keys from cache
s
$save
Smarty_CacheResource_Mysql::$save in cacheresource.mysql.php
save
Smarty_CacheResource_Mysql::save() in cacheresource.mysql.php
Save content to cache
Smarty_CacheResource_Apc
Smarty_CacheResource_Apc in cacheresource.apc.php
APC CacheResource
Smarty_CacheResource_Memcache
Smarty_CacheResource_Memcache in cacheresource.memcache.php
Memcache CacheResource
Smarty_CacheResource_Mysql
Smarty_CacheResource_Mysql in cacheresource.mysql.php
MySQL CacheResource
w
write
Smarty_CacheResource_Memcache::write() in cacheresource.memcache.php
Save values for a set of keys to cache
write
Smarty_CacheResource_Apc::write() in cacheresource.apc.php
Save values for a set of keys to cache
c d f m p r s w _
smarty3-3.1.13/development/Smarty3Doc/blank.html0000644000175000017500000000061111637420324020124 0ustar mikemike Smarty 3.1.2

Smarty 3.1.2

Welcome to Smarty!

This documentation was generated by phpDocumentor v1.4.1
smarty3-3.1.13/development/Smarty3Doc/li_Resource-examples.html0000644000175000017500000000356211634664106023141 0ustar mikemike
Resource-examples

phpDocumentor v 1.4.1

smarty3-3.1.13/development/Smarty3Doc/CacheResource-examples/0000755000175000017500000000000012141655572022506 5ustar mikemike././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/CacheResource-examples/_demo---plugins---cacheresource.memcache.php.htmlsmarty3-3.1.13/development/Smarty3Doc/CacheResource-examples/_demo---plugins---cacheresource.memcach0000644000175000017500000000352611637420324031664 0ustar mikemike Docs for page cacheresource.memcache.php

/demo/plugins/cacheresource.memcache.php

Description
Classes
Class Description
Smarty_CacheResource_Memcache Memcache CacheResource

Documentation generated on Sat, 24 Sep 2011 20:23:07 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/CacheResource-examples/Smarty_CacheResource_Memcache.html0000644000175000017500000004577511637420324031244 0ustar mikemike Docs For Class Smarty_CacheResource_Memcache

Class Smarty_CacheResource_Memcache

Description

Memcache CacheResource

CacheResource Implementation based on the KeyValueStore API to use memcache as the storage resource for Smarty's output caching.

Note that memcache has a limitation of 256 characters per cache-key. To avoid complications all cache-keys are translated to a sha1 hash.

  • author: Rodney Rehm

Located in /demo/plugins/cacheresource.memcache.php (line 15)

Smarty_CacheResource
   |
   --Smarty_CacheResource_KeyValueStore
      |
      --Smarty_CacheResource_Memcache
Variable Summary
Memcache $memcache
Method Summary
Smarty_CacheResource_Memcache __construct ()
boolean delete ( $keys)
boolean purge ()
array read ( $keys)
boolean write ( $keys, [int $expire = null])
Methods
Constructor __construct (line 22)
  • access: public
Smarty_CacheResource_Memcache __construct ()
delete (line 73)

Remove values from cache

  • return: true on success, false on failure
  • access: protected
boolean delete ( $keys)
  • array $keys: list of keys to delete

Redefinition of:
Smarty_CacheResource_KeyValueStore::delete()
Remove values from cache
purge (line 87)

Remove *all* values from cache

  • return: true on success, false on failure
  • access: protected
boolean purge ()

Redefinition of:
Smarty_CacheResource_KeyValueStore::purge()
Remove *all* values from cache
read (line 35)

Read values for a set of keys from cache

  • return: list of values with the given keys used as indexes
  • access: protected
array read ( $keys)
  • array $keys: list of keys to fetch

Redefinition of:
Smarty_CacheResource_KeyValueStore::read()
Read values for a set of keys from cache
write (line 58)

Save values for a set of keys to cache

  • return: true on success, false on failure
  • access: protected
boolean write ( $keys, [int $expire = null])
  • array $keys: list of values to save
  • int $expire: expiration time

Redefinition of:
Smarty_CacheResource_KeyValueStore::write()
Save values for a set of keys to cache

Inherited Methods

Inherited From Smarty_CacheResource_KeyValueStore

Smarty_CacheResource_KeyValueStore::acquireLock()
Smarty_CacheResource_KeyValueStore::addMetaTimestamp()
Smarty_CacheResource_KeyValueStore::clear()
Smarty_CacheResource_KeyValueStore::clearAll()
Smarty_CacheResource_KeyValueStore::delete()
Smarty_CacheResource_KeyValueStore::fetch()
Smarty_CacheResource_KeyValueStore::getLatestInvalidationTimestamp()
Smarty_CacheResource_KeyValueStore::getMetaTimestamp()
Smarty_CacheResource_KeyValueStore::getTemplateUid()
Smarty_CacheResource_KeyValueStore::hasLock()
Smarty_CacheResource_KeyValueStore::invalidate()
Smarty_CacheResource_KeyValueStore::listInvalidationKeys()
Smarty_CacheResource_KeyValueStore::populate()
Smarty_CacheResource_KeyValueStore::populateTimestamp()
Smarty_CacheResource_KeyValueStore::process()
Smarty_CacheResource_KeyValueStore::purge()
Smarty_CacheResource_KeyValueStore::read()
Smarty_CacheResource_KeyValueStore::releaseLock()
Smarty_CacheResource_KeyValueStore::sanitize()
Smarty_CacheResource_KeyValueStore::write()
Smarty_CacheResource_KeyValueStore::writeCachedContent()

Inherited From Smarty_CacheResource

Smarty_CacheResource::acquireLock()
Smarty_CacheResource::clear()
Smarty_CacheResource::clearAll()
Smarty_CacheResource::getCachedContent()
Smarty_CacheResource::hasLock()
Smarty_CacheResource::invalidLoadedCache()
Smarty_CacheResource::load()
Smarty_CacheResource::locked()
Smarty_CacheResource::populate()
Smarty_CacheResource::populateTimestamp()
Smarty_CacheResource::process()
Smarty_CacheResource::releaseLock()
Smarty_CacheResource::writeCachedContent()

Documentation generated on Sat, 24 Sep 2011 20:23:07 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/CacheResource-examples/_demo---plugins---cacheresource.apc.php.htmlsmarty3-3.1.13/development/Smarty3Doc/CacheResource-examples/_demo---plugins---cacheresource.apc.php0000644000175000017500000000347511637420324031623 0ustar mikemike Docs for page cacheresource.apc.php

/demo/plugins/cacheresource.apc.php

Description
Classes
Class Description
Smarty_CacheResource_Apc APC CacheResource

Documentation generated on Sat, 24 Sep 2011 20:23:05 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/CacheResource-examples/_demo---plugins---cacheresource.mysql.php.htmlsmarty3-3.1.13/development/Smarty3Doc/CacheResource-examples/_demo---plugins---cacheresource.mysql.p0000644000175000017500000000350711637420324031671 0ustar mikemike Docs for page cacheresource.mysql.php

/demo/plugins/cacheresource.mysql.php

Description
Classes
Class Description
Smarty_CacheResource_Mysql MySQL CacheResource

Documentation generated on Sat, 24 Sep 2011 20:23:10 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/CacheResource-examples/Smarty_CacheResource_Apc.html0000644000175000017500000004305111637420324030226 0ustar mikemike Docs For Class Smarty_CacheResource_Apc

Class Smarty_CacheResource_Apc

Description

APC CacheResource

CacheResource Implementation based on the KeyValueStore API to use memcache as the storage resource for Smarty's output caching. *

  • author: Uwe Tews

Located in /demo/plugins/cacheresource.apc.php (line 12)

Smarty_CacheResource
   |
   --Smarty_CacheResource_KeyValueStore
      |
      --Smarty_CacheResource_Apc
Method Summary
Smarty_CacheResource_Apc __construct ()
boolean delete ( $keys)
boolean purge ()
array read ( $keys)
boolean write ( $keys, [int $expire = null])
Methods
Constructor __construct (line 14)
  • access: public
Smarty_CacheResource_Apc __construct ()
delete (line 60)

Remove values from cache

  • return: true on success, false on failure
  • access: protected
boolean delete ( $keys)
  • array $keys: list of keys to delete

Redefinition of:
Smarty_CacheResource_KeyValueStore::delete()
Remove values from cache
purge (line 73)

Remove *all* values from cache

  • return: true on success, false on failure
  • access: protected
boolean purge ()

Redefinition of:
Smarty_CacheResource_KeyValueStore::purge()
Remove *all* values from cache
read (line 29)

Read values for a set of keys from cache

  • return: list of values with the given keys used as indexes
  • access: protected
array read ( $keys)
  • array $keys: list of keys to fetch

Redefinition of:
Smarty_CacheResource_KeyValueStore::read()
Read values for a set of keys from cache
write (line 46)

Save values for a set of keys to cache

  • return: true on success, false on failure
  • access: protected
boolean write ( $keys, [int $expire = null])
  • array $keys: list of values to save
  • int $expire: expiration time

Redefinition of:
Smarty_CacheResource_KeyValueStore::write()
Save values for a set of keys to cache

Inherited Methods

Inherited From Smarty_CacheResource_KeyValueStore

Smarty_CacheResource_KeyValueStore::acquireLock()
Smarty_CacheResource_KeyValueStore::addMetaTimestamp()
Smarty_CacheResource_KeyValueStore::clear()
Smarty_CacheResource_KeyValueStore::clearAll()
Smarty_CacheResource_KeyValueStore::delete()
Smarty_CacheResource_KeyValueStore::fetch()
Smarty_CacheResource_KeyValueStore::getLatestInvalidationTimestamp()
Smarty_CacheResource_KeyValueStore::getMetaTimestamp()
Smarty_CacheResource_KeyValueStore::getTemplateUid()
Smarty_CacheResource_KeyValueStore::hasLock()
Smarty_CacheResource_KeyValueStore::invalidate()
Smarty_CacheResource_KeyValueStore::listInvalidationKeys()
Smarty_CacheResource_KeyValueStore::populate()
Smarty_CacheResource_KeyValueStore::populateTimestamp()
Smarty_CacheResource_KeyValueStore::process()
Smarty_CacheResource_KeyValueStore::purge()
Smarty_CacheResource_KeyValueStore::read()
Smarty_CacheResource_KeyValueStore::releaseLock()
Smarty_CacheResource_KeyValueStore::sanitize()
Smarty_CacheResource_KeyValueStore::write()
Smarty_CacheResource_KeyValueStore::writeCachedContent()

Inherited From Smarty_CacheResource

Smarty_CacheResource::acquireLock()
Smarty_CacheResource::clear()
Smarty_CacheResource::clearAll()
Smarty_CacheResource::getCachedContent()
Smarty_CacheResource::hasLock()
Smarty_CacheResource::invalidLoadedCache()
Smarty_CacheResource::load()
Smarty_CacheResource::locked()
Smarty_CacheResource::populate()
Smarty_CacheResource::populateTimestamp()
Smarty_CacheResource::process()
Smarty_CacheResource::releaseLock()
Smarty_CacheResource::writeCachedContent()

Documentation generated on Sat, 24 Sep 2011 20:23:05 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/CacheResource-examples/Smarty_CacheResource_Mysql.html0000644000175000017500000005717611637420324030645 0ustar mikemike Docs For Class Smarty_CacheResource_Mysql

Class Smarty_CacheResource_Mysql

Description

MySQL CacheResource

CacheResource Implementation based on the Custom API to use MySQL as the storage resource for Smarty's output caching.

Table definition:

CREATE TABLE IF NOT EXISTS `output_cache` (
   `id` CHAR(40) NOT NULL COMMENT 'sha1 hash',
   `name` VARCHAR(250) NOT NULL,
   `cache_id` VARCHAR(250) NULL DEFAULT NULL,
   `compile_id` VARCHAR(250) NULL DEFAULT NULL,
   `modified` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
   `content` LONGTEXT NOT NULL,
   PRIMARY KEY (`id`),
   INDEX(`name`),
   INDEX(`cache_id`),
   INDEX(`compile_id`),
   INDEX(`modified`)
 ) ENGINE = InnoDB;

  • author: Rodney Rehm

Located in /demo/plugins/cacheresource.mysql.php (line 27)

Smarty_CacheResource
   |
   --Smarty_CacheResource_Custom
      |
      --Smarty_CacheResource_Mysql
Variable Summary
mixed $db
mixed $fetch
mixed $save
Method Summary
Smarty_CacheResource_Mysql __construct ()
integer delete (string $name, string $cache_id, string $compile_id, integer|null $exp_time)
void fetch (string $id, string $name, string $cache_id, string $compile_id,  &$content,  &$mtime, string $content, integer $mtime)
integer|boolean fetchTimestamp (string $id, string $name, string $cache_id, string $compile_id)
boolean save (string $id, string $name, string $cache_id, string $compile_id, integer|null $exp_time, string $content)
Variables
mixed $db (line 29)
  • access: protected
mixed $fetch (line 30)
  • access: protected
mixed $fetchTimestamp (line 31)
  • access: protected
mixed $save (line 32)
  • access: protected

Inherited Variables

Inherited from Smarty_CacheResource

Smarty_CacheResource::$resources
Smarty_CacheResource::$sysplugins
Methods
Constructor __construct (line 34)
  • access: public
Smarty_CacheResource_Mysql __construct ()
delete (line 121)

Delete content from cache

  • return: number of deleted caches
  • access: protected
integer delete (string $name, string $cache_id, string $compile_id, integer|null $exp_time)
  • string $name: template name
  • string $cache_id: cache id
  • string $compile_id: compile id
  • integer|null $exp_time: seconds till expiration or null

Redefinition of:
Smarty_CacheResource_Custom::delete()
Delete content from cache
fetch (line 57)

fetch cached content and its modification time from data source

  • access: protected
void fetch (string $id, string $name, string $cache_id, string $compile_id,  &$content,  &$mtime, string $content, integer $mtime)
  • string $id: unique cache content identifier
  • string $name: template name
  • string $cache_id: cache id
  • string $compile_id: compile id
  • string $content: cached content
  • integer $mtime: cache modification timestamp (epoch)
  • &$content
  • &$mtime

Redefinition of:
Smarty_CacheResource_Custom::fetch()
fetch cached content and its modification time from data source
fetchTimestamp (line 81)

Fetch cached content's modification timestamp from data source

  • return: timestamp (epoch) the template was modified, or false if not found
  • access: protected
integer|boolean fetchTimestamp (string $id, string $name, string $cache_id, string $compile_id)
  • string $id: unique cache content identifier
  • string $name: template name
  • string $cache_id: cache id
  • string $compile_id: compile id

Redefinition of:
Smarty_CacheResource_Custom::fetchTimestamp()
Fetch cached content's modification timestamp from data source
save (line 100)

Save content to cache

  • return: success
  • access: protected
boolean save (string $id, string $name, string $cache_id, string $compile_id, integer|null $exp_time, string $content)
  • string $id: unique cache content identifier
  • string $name: template name
  • string $cache_id: cache id
  • string $compile_id: compile id
  • integer|null $exp_time: seconds till expiration time in seconds or null
  • string $content: content to cache

Redefinition of:
Smarty_CacheResource_Custom::save()
Save content to cache

Inherited Methods

Inherited From Smarty_CacheResource_Custom

Smarty_CacheResource_Custom::clear()
Smarty_CacheResource_Custom::clearAll()
Smarty_CacheResource_Custom::delete()
Smarty_CacheResource_Custom::fetch()
Smarty_CacheResource_Custom::fetchTimestamp()
Smarty_CacheResource_Custom::populate()
Smarty_CacheResource_Custom::populateTimestamp()
Smarty_CacheResource_Custom::process()
Smarty_CacheResource_Custom::save()
Smarty_CacheResource_Custom::writeCachedContent()

Inherited From Smarty_CacheResource

Smarty_CacheResource::acquireLock()
Smarty_CacheResource::clear()
Smarty_CacheResource::clearAll()
Smarty_CacheResource::getCachedContent()
Smarty_CacheResource::hasLock()
Smarty_CacheResource::invalidLoadedCache()
Smarty_CacheResource::load()
Smarty_CacheResource::locked()
Smarty_CacheResource::populate()
Smarty_CacheResource::populateTimestamp()
Smarty_CacheResource::process()
Smarty_CacheResource::releaseLock()
Smarty_CacheResource::writeCachedContent()

Documentation generated on Sat, 24 Sep 2011 20:23:10 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/li_CacheResource-examples.html0000644000175000017500000000370711634664106024066 0ustar mikemike
CacheResource-examples

phpDocumentor v 1.4.1

smarty3-3.1.13/development/Smarty3Doc/errors.html0000644000175000017500000001364111637420324020360 0ustar mikemike phpDocumentor Parser Errors and Warnings Post-parsing
cacheresource.memcache.php
cacheresource.mysql.php
index.php
resource.extendsall.php
resource.mysql.php
resource.mysqls.php
shared.escape_special_chars.php
smarty_internal_configfilelexer.php
smarty_internal_configfileparser.php
smarty_internal_resource_php.php
smarty_internal_templatelexer.php
smarty_internal_templateparser.php
smarty_security.php

cacheresource.apc.php

Warnings:


Warning on line 11 - DocBlock would be page-level, but precedes class "Smarty_CacheResource_Apc", use another DocBlock to document the file

Errors:


Error on line 28 - DocBlock has multiple @return tags, illegal. ignoring additional tag "@return boolean true on success, false on failure"

cacheresource.memcache.php

Warnings:


Warning on line 14 - DocBlock would be page-level, but precedes class "Smarty_CacheResource_Memcache", use another DocBlock to document the file

Errors:


Error on line 34 - DocBlock has multiple @return tags, illegal. ignoring additional tag "@return boolean true on success, false on failure"

cacheresource.mysql.php

Warnings:


Warning on line 26 - DocBlock would be page-level, but precedes class "Smarty_CacheResource_Mysql", use another DocBlock to document the file
Warning on line 80 - Unknown tag "@note" used

index.php

Warnings:


Warning on line 7 - Page-level DocBlock precedes "require '../libs/Smarty.class.php'", use another DocBlock to document the source element

resource.extendsall.php

Warnings:


Warning on line 11 - DocBlock would be page-level, but precedes class "Smarty_Resource_Extendsall", use another DocBlock to document the file

resource.mysql.php

Warnings:


Warning on line 22 - DocBlock would be page-level, but precedes class "Smarty_Resource_Mysql", use another DocBlock to document the file
Warning on line 69 - Unknown tag "@note" used

resource.mysqls.php

Warnings:


Warning on line 25 - DocBlock would be page-level, but precedes class "Smarty_Resource_Mysqls", use another DocBlock to document the file

shared.escape_special_chars.php

Warnings:


Warning on line 47 - duplicate function element "smarty_function_escape_special_chars" in file C:\wamp\www\smarty3.1.0\distribution\libs\plugins\shared.escape_special_chars.php will be ignored. Use an @ignore tag on the original if you want this case to be documented.

smarty_internal_configfilelexer.php

Warnings:


Warning on line 13 - no @package tag was used in a DocBlock for class Smarty_Internal_Configfilelexer

smarty_internal_configfileparser.php

Warnings:


Warning on line 12 - DocBlock would be page-level, but precedes class "TPC_yyToken", use another DocBlock to document the file
Warning on line 76 - no @package tag was used in a DocBlock for class TPC_yyStackEntry
Warning on line 87 - no @package tag was used in a DocBlock for class Smarty_Internal_Configfileparser

smarty_internal_resource_php.php

Warnings:


Warning on line 12 - DocBlock would be page-level, but precedes class "Smarty_Internal_Resource_PHP", use another DocBlock to document the file

smarty_internal_templatelexer.php

Warnings:


Warning on line 13 - no @package tag was used in a DocBlock for class Smarty_Internal_Templatelexer

smarty_internal_templateparser.php

Warnings:


Warning on line 12 - DocBlock would be page-level, but precedes class "TP_yyToken", use another DocBlock to document the file
Warning on line 76 - no @package tag was used in a DocBlock for class TP_yyStackEntry
Warning on line 87 - no @package tag was used in a DocBlock for class Smarty_Internal_Templateparser

smarty_security.php

Warnings:


Warning on line 12 - no @package tag was used in a DocBlock for class Smarty_Security

Documentation generated on Sat, 24 Sep 2011 20:24:10 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/0000755000175000017500000000000012141655571017435 5ustar mikemikesmarty3-3.1.13/development/Smarty3Doc/Smarty/Security/0000755000175000017500000000000012141655571021244 5ustar mikemikesmarty3-3.1.13/development/Smarty3Doc/Smarty/Security/Smarty_Internal_Utility.html0000644000175000017500000003527111637420324026773 0ustar mikemike Docs For Class Smarty_Internal_Utility

Class Smarty_Internal_Utility

Description

Utility class

Located in /libs/sysplugins/smarty_internal_utility.php (line 41)


	
			
Method Summary
static integer clearCompiledTemplate (string $resource_name, string $compile_id, integer $exp_time, Smarty $smarty)
static integer compileAllConfig ( $extention, bool $force_compile, int $time_limit, int $max_errors, Smarty $smarty, string $extension)
static integer compileAllTemplates ( $extention, bool $force_compile, int $time_limit, int $max_errors, Smarty $smarty, string $extension)
static array getTags (Smarty_Internal_Template $template, Smarty_Internal_Template $templae)
static bool testInstall (Smarty $smarty, [ &$errors = null], array $errors)
Methods
static method clearCompiledTemplate (line 182)

Delete compiled template file

  • return: number of template files deleted
  • access: public
static integer clearCompiledTemplate (string $resource_name, string $compile_id, integer $exp_time, Smarty $smarty)
  • string $resource_name: template name
  • string $compile_id: compile id
  • integer $exp_time: expiration time
  • Smarty $smarty: Smarty instance
static method compileAllConfig (line 124)

Compile all config files

  • return: number of config files compiled
  • access: public
static integer compileAllConfig ( $extention, bool $force_compile, int $time_limit, int $max_errors, Smarty $smarty, string $extension)
  • string $extension: config file name extension
  • bool $force_compile: force all to recompile
  • int $time_limit: set maximum execution time
  • int $max_errors: set maximum allowed errors
  • Smarty $smarty: Smarty instance
  • $extention
static method compileAllTemplates (line 61)

Compile all template files

  • return: number of template files compiled
  • access: public
static integer compileAllTemplates ( $extention, bool $force_compile, int $time_limit, int $max_errors, Smarty $smarty, string $extension)
  • string $extension: template file name extension
  • bool $force_compile: force all to recompile
  • int $time_limit: set maximum execution time
  • int $max_errors: set maximum allowed errors
  • Smarty $smarty: Smarty instance
  • $extention
static method getTags (line 249)

Return array of tag/attributes of all tags used by an template

  • return: of tag/attributes
  • access: public
static array getTags (Smarty_Internal_Template $template, Smarty_Internal_Template $templae)
static method testInstall (line 266)

diagnose Smarty setup

If $errors is secified, the diagnostic report will be appended to the array, rather than being output.

  • return: status, true if everything is fine, false else
  • access: public
static bool testInstall (Smarty $smarty, [ &$errors = null], array $errors)
  • Smarty $smarty: Smarty instance to test
  • array $errors: array to push results into rather than outputting them
  • &$errors

Documentation generated on Sat, 24 Sep 2011 20:24:06 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Security/_libs---sysplugins---smarty_security.php.html0000644000175000017500000000371111637420324031753 0ustar mikemike Docs for page smarty_security.php

/libs/sysplugins/smarty_security.php

Description

Smarty plugin

  • author: Uwe Tews
Classes
Class Description
Smarty_Security This class does contain the security settings

Documentation generated on Sat, 24 Sep 2011 20:24:09 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Security/Smarty_Security.html0000644000175000017500000007701311637420324025303 0ustar mikemike Docs For Class Smarty_Security

Class Smarty_Security

Description

This class does contain the security settings

Located in /libs/sysplugins/smarty_security.php (line 13)


	
			
Method Summary
Smarty_Security __construct (Smarty $smarty)
boolean isTrustedModifier (string $modifier_name, object $compiler)
boolean isTrustedPHPDir (string $filepath)
boolean isTrustedPhpFunction (string $function_name, object $compiler)
boolean isTrustedPhpModifier (string $modifier_name, object $compiler)
boolean isTrustedResourceDir (string $filepath)
boolean isTrustedStaticClass (string $class_name, object $compiler)
boolean isTrustedStream (string $stream_name)
boolean isTrustedTag (string $tag_name, object $compiler)
Variables
array $allowed_modifiers = array() (line 95)

This is an array of allowed modifier plugins.

If empty no restriction by allowed_modifiers.

  • access: public
array $allowed_tags = array() (line 81)

This is an array of allowed tags.

If empty no restriction by allowed_tags.

  • access: public
boolean $allow_constants = true (line 115)

+ flag if constants can be accessed from template

  • access: public
boolean $allow_super_globals = true (line 120)

+ flag if super globals can be accessed from template

  • access: public
array $disabled_modifiers = array() (line 102)

This is an array of disabled modifier plugins.

If empty no restriction by disabled_modifiers.

  • access: public
array $disabled_tags = array() (line 88)

This is an array of disabled tags.

If empty no restriction by disabled_tags.

  • access: public
array $php_functions = array(
'isset', 'empty',
'count', 'sizeof',
'in_array', 'is_array',
'time',
'nl2br',
)
(line 57)

This is an array of trusted PHP functions.

If empty all functions are allowed. To disable all PHP functions set $php_functions = null.

  • access: public
integer $php_handling = Smarty::PHP_PASSTHRU (line 27)

This determines how Smarty handles "<?php ... ?>" tags in templates.

possible values:

  • Smarty::PHP_PASSTHRU -> echo PHP tags as they are
  • Smarty::PHP_QUOTE -> escape tags as entities
  • Smarty::PHP_REMOVE -> remove php tags
  • Smarty::PHP_ALLOW -> execute php tags

  • access: public
array $php_modifiers = array(
'escape',
'count'
)
(line 71)

This is an array of trusted PHP modifers.

If empty all modifiers are allowed. To disable all modifier set $modifiers = null.

  • access: public
array $secure_dir = array() (line 34)

This is the list of template directories that are considered secure.

$template_dir is in this list implicitly.

  • access: public
array $static_classes = array() (line 49)

This is an array of trusted static classes.

If empty access to all static classes is allowed. If set to 'none' none is allowed.

  • access: public
array $streams = array('file') (line 110)

This is an array of trusted streams.

If empty all streams are allowed. To disable all streams set $streams = null.

  • access: public
array $trusted_dir = array() (line 41)

This is an array of directories where trusted php scripts reside.

$security is disabled during their inclusion/execution.

  • access: public
string $_config_dir = null (line 141)
  • access: protected
string $_php_resource_dir = null (line 149)
  • access: protected
string $_resource_dir = null (line 133)
  • access: protected
string $_secure_dir = null (line 145)
  • access: protected
string $_template_dir = null (line 137)
  • access: protected
string $_trusted_dir = null (line 153)
  • access: protected
Methods
Constructor __construct (line 125)
  • access: public
Smarty_Security __construct (Smarty $smarty)
isTrustedModifier (line 247)

Check if modifier plugin is trusted.

  • return: true if tag is trusted
  • throws: SmartyCompilerException if modifier is not trusted
  • access: public
boolean isTrustedModifier (string $modifier_name, object $compiler)
  • string $modifier_name
  • object $compiler: compiler object
isTrustedPHPDir (line 369)

Check if directory of file resource is trusted.

  • return: true if directory is trusted
  • throws: SmartyException if PHP directory is not trusted
  • access: public
boolean isTrustedPHPDir (string $filepath)
  • string $filepath
isTrustedPhpFunction (line 163)

Check if PHP function is trusted.

  • return: true if function is trusted
  • throws: SmartyCompilerException if php function is not trusted
  • access: public
boolean isTrustedPhpFunction (string $function_name, object $compiler)
  • string $function_name
  • object $compiler: compiler object
isTrustedPhpModifier (line 199)

Check if PHP modifier is trusted.

  • return: true if modifier is trusted
  • throws: SmartyCompilerException if modifier is not trusted
  • access: public
boolean isTrustedPhpModifier (string $modifier_name, object $compiler)
  • string $modifier_name
  • object $compiler: compiler object
isTrustedResourceDir (line 291)

Check if directory of file resource is trusted.

  • return: true if directory is trusted
  • throws: SmartyException if directory is not trusted
  • access: public
boolean isTrustedResourceDir (string $filepath)
  • string $filepath
isTrustedStaticClass (line 181)

Check if static class is trusted.

  • return: true if class is trusted
  • throws: SmartyCompilerException if static class is not trusted
  • access: public
boolean isTrustedStaticClass (string $class_name, object $compiler)
  • string $class_name
  • object $compiler: compiler object
isTrustedStream (line 275)

Check if stream is trusted.

  • return: true if stream is trusted
  • throws: SmartyException if stream is not trusted
  • access: public
boolean isTrustedStream (string $stream_name)
  • string $stream_name
isTrustedTag (line 217)

Check if tag is trusted.

  • return: true if tag is trusted
  • throws: SmartyCompilerException if modifier is not trusted
  • access: public
boolean isTrustedTag (string $tag_name, object $compiler)
  • string $tag_name
  • object $compiler: compiler object

Documentation generated on Sat, 24 Sep 2011 20:24:09 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Security/_libs---sysplugins---smarty_internal_utility.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Security/_libs---sysplugins---smarty_internal_utility.p0000644000175000017500000000650311637420324032212 0ustar mikemike Docs for page smarty_internal_utility.php

/libs/sysplugins/smarty_internal_utility.php

Description

Project: Smarty: the PHP compiling template engine File: smarty_internal_utility.php SVN: $Id: $

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

For questions, help, comments, discussion, etc., please join the Smarty mailing list. Send a blank e-mail to smarty-discussion-subscribe@googlegroups.com

Classes
Class Description
Smarty_Internal_Utility Utility class

Documentation generated on Sat, 24 Sep 2011 20:24:06 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/SmartyException.html0000644000175000017500000001135111637420324023455 0ustar mikemike Docs For Class SmartyException

Class SmartyException

Description

Smarty exception class

Located in /libs/Smarty.class.php (line 1396)

Exception
   |
   --SmartyException
Direct descendents
Class Description
SmartyCompilerException Smarty compiler exception class
Variables

Inherited Variables

Inherited from Exception (Internal Class)

$code
$file
$line
$message
$string
$trace
Methods

Inherited Methods

Inherited From Exception (Internal Class)

constructor __construct ( [$message = ], [$code = ] )
getCode ( )
getFile ( )
getLine ( )
getMessage ( )
getTrace ( )
getTraceAsString ( )
__clone ( )
__toString ( )

Documentation generated on Sat, 24 Sep 2011 20:23:25 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Debug/0000755000175000017500000000000012141655571020463 5ustar mikemike././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Debug/_libs---sysplugins---smarty_internal_debug.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Debug/_libs---sysplugins---smarty_internal_debug.php.ht0000644000175000017500000000407211637420324031755 0ustar mikemike Docs for page smarty_internal_debug.php

/libs/sysplugins/smarty_internal_debug.php

Description

Smarty Internal Plugin Debug

Class to collect data for the Smarty Debugging Consol

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Debug Smarty Internal Plugin Debug Class

Documentation generated on Sat, 24 Sep 2011 20:23:53 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Debug/Smarty_Internal_Debug.html0000644000175000017500000004346511637420324025601 0ustar mikemike Docs For Class Smarty_Internal_Debug

Class Smarty_Internal_Debug

Description

Smarty Internal Plugin Debug Class

Located in /libs/sysplugins/smarty_internal_debug.php (line 18)

Smarty_Internal_Data
   |
   --Smarty_Internal_Debug
Variable Summary
static array $template_data
Method Summary
static void end_cache (object $template)
static void end_compile (object $template)
static void end_render (object $template)
static void start_cache (object $template)
static void start_compile (object $template)
static void start_render (object $template)
Variables
static array $template_data = array() (line 25)

template data

  • access: public

Inherited Variables

Inherited from Smarty_Internal_Data

Smarty_Internal_Data::$config_vars
Smarty_Internal_Data::$parent
Smarty_Internal_Data::$template_class
Smarty_Internal_Data::$tpl_vars
Methods
static method display_debug (line 98)

Opens a window for the Smarty Debugging Consol and display the data

  • access: public
static void display_debug (Smarty_Internal_Template|Smarty $obj)
static method end_cache (line 87)

End logging of cache time

  • access: public
static void end_cache (object $template)
  • object $template: cached template
static method end_compile (line 43)

End logging of compile time

  • access: public
static void end_compile (object $template)
  • object $template
static method end_render (line 65)

End logging of compile time

  • access: public
static void end_render (object $template)
  • object $template
static method get_debug_vars (line 144)

Recursively gets variables from all template/data scopes

  • access: public
static StdClass get_debug_vars (Smarty_Internal_Template|Smarty_Data $obj)
static method start_cache (line 76)

Start logging of cache time

  • access: public
static void start_cache (object $template)
  • object $template: cached template
static method start_compile (line 32)

Start logging of compile time

  • access: public
static void start_compile (object $template)
  • object $template
static method start_render (line 54)

Start logging of render time

  • access: public
static void start_render (object $template)
  • object $template

Inherited Methods

Inherited From Smarty_Internal_Data

Smarty_Internal_Data::append()
Smarty_Internal_Data::appendByRef()
Smarty_Internal_Data::assign()
Smarty_Internal_Data::assignByRef()
Smarty_Internal_Data::assignGlobal()
Smarty_Internal_Data::clearAllAssign()
Smarty_Internal_Data::clearAssign()
Smarty_Internal_Data::clearConfig()
Smarty_Internal_Data::configLoad()
Smarty_Internal_Data::getConfigVariable()
Smarty_Internal_Data::getConfigVars()
Smarty_Internal_Data::getStreamVariable()
Smarty_Internal_Data::getTemplateVars()
Smarty_Internal_Data::getVariable()

Documentation generated on Sat, 24 Sep 2011 20:23:53 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Debug/_libs---plugins---modifier.debug_print_var.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Debug/_libs---plugins---modifier.debug_print_var.php.ht0000644000175000017500000000627111637420324031607 0ustar mikemike Docs for page modifier.debug_print_var.php

/libs/plugins/modifier.debug_print_var.php

Description

Smarty plugin

Functions
smarty_modifier_debug_print_var (line 22)

Smarty debug_print_var modifier plugin

Type: modifier
Name: debug_print_var
Purpose: formats variable contents for display in the console

string smarty_modifier_debug_print_var (array|object  $var, [integer $depth = 0], [integer $length = 40])
  • array|object $var: variable to be formatted
  • integer $depth: maximum recursion depth if $var is an array
  • integer $length: maximum string length if $var is a string

Documentation generated on Sat, 24 Sep 2011 20:23:13 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Template/0000755000175000017500000000000012141655571021210 5ustar mikemikesmarty3-3.1.13/development/Smarty3Doc/Smarty/Template/Smarty.html0000644000175000017500000044663311637420324023370 0ustar mikemike Docs For Class Smarty

Class Smarty

Description

This is the main Smarty class

Located in /libs/Smarty.class.php (line 101)

Smarty_Internal_Data
   |
   --Smarty_Internal_TemplateBase
      |
      --Smarty
Direct descendents
Class Description
SmartyBC Smarty Backward Compatability Wrapper Class
Class Constant Summary
Variable Summary
static mixed $global_tpl_vars
static mixed $_muted_directories
static array $_smarty_vars
boolean $auto_literal
string $cache_dir
string $cache_id
integer $cache_lifetime
boolean $cache_locking
boolean $caching
string $caching_type
boolean $compile_check
string $compile_dir
string $compile_id
string $config_dir
boolean $debugging
string $debug_tpl
boolean $escape_html
boolean $force_cache
boolean $force_compile
boolean $get_used_tags
integer $php_handling
string $plugins_dir
array $properties
string $template_dir
boolean $use_sub_dirs
array $_tag_stack
Method Summary
static void muteExpectedErrors ()
static boolean mutingErrorHandler (integer $errno,  $errstr,  $errfile,  $errline,  $errcontext)
static void unmuteExpectedErrors ()
Smarty __construct ()
void __destruct ()
Smarty addAutoloadFilters (array $filters, [string $type = null])
Smarty addConfigDir (string|array $config_dir, [string $key = null])
Smarty addDefaultModifiers (array|string $modifiers)
Smarty addPluginsDir ( $plugins_dir, object $smarty, string $)
Smarty addTemplateDir (string|array $template_dir, [string $key = null])
integer clearAllCache ([integer $exp_time = null], [string $type = null])
integer clearCache (string $template_name, [string $cache_id = null], [string $compile_id = null], [integer $exp_time = null], [string $type = null])
integer clearCompiledTemplate ([string $resource_name = null], [string $compile_id = null], [integer $exp_time = null])
integer compileAllConfig ([ $extention = '.conf'], [bool $force_compile = false], [int $time_limit = 0], [int $max_errors = null], string $extension)
integer compileAllTemplates ([ $extention = '.tpl'], [bool $force_compile = false], [int $time_limit = 0], [int $max_errors = null], string $extension)
object template createTemplate (string $template, [mixed $cache_id = null], [mixed $compile_id = null], [object $parent = null], [boolean $do_clone = true])
Smarty enableSecurity ([string|Smarty_Security $security_class = null])
array getAutoloadFilters ([string $type = null])
string getCacheDir ()
string getCompileDir ()
array|string getConfigDir ([mixed $index = null])
string getDebugTemplate ()
string getGlobal ([string $varname = null], object $smarty)
array getPluginsDir ()
array getTags (Smarty_Internal_Template $template, object $templae)
array|string getTemplateDir ([mixed $index = null])
string loadPlugin (string $plugin_name, [bool $check = true])
Smarty setAutoloadFilters (array $filters, [string $type = null])
Smarty setCacheDir (string $cache_dir)
Smarty setCompileDir (string $compile_dir)
Smarty setConfigDir ( $config_dir, string|array $template_dir)
Smarty setDebugTemplate (string $tpl_name)
Smarty setDefaultModifiers (array|string $modifiers)
Smarty setPluginsDir (string|array $plugins_dir)
Smarty setTemplateDir (string|array $template_dir)
boolean templateExists (string $resource_name)
boolean testInstall ([ &$errors = null], array $errors)
void __clone ()
mixed __get (string $name)
void __set (string $name, mixed $value)
Variables
static mixed $global_tpl_vars = array() (line 159)

assigned global tpl vars

  • access: public
static mixed $_muted_directories = array() (line 168)

contains directories outside of SMARTY_DIR that are to be muted by muteExpectedErrors()

  • access: public
static mixed $_previous_error_handler = null (line 164)

error handler returned by set_error_hanlder() in Smarty::muteExpectedErrors()

  • access: public
static array $_smarty_vars = array() (line 509)

global internal smarty vars

  • access: public
bool $allow_php_templates = false (line 317)

controls if the php template file resource is allowed

security

  • access: public
array $autoload_filters = array() (line 494)

autoload filter

  • access: public
boolean $auto_literal = true (line 178)

auto literal on delimiters with whitspace

variables

  • access: public
string $cache_dir = null (line 223)

cache directory

variables

  • access: protected
string $cache_id = null (line 270)

Set this if you want different sets of cache files for the same templates.

variables

  • access: public
integer $cache_lifetime = 3600 (line 258)

cache lifetime in seconds

variables

  • access: public
boolean $cache_locking = false (line 406)

Controls whether cache resources should emply locking mechanism

resource locking

  • access: public
boolean $cache_modified_check = false (line 454)

check If-Modified-Since headers

  • access: public
boolean $caching = false (line 248)

caching enabled

variables

  • access: public
string $caching_type = 'file' (line 434)

caching type

Must be an element of $cache_resource_types.

  • access: public
boolean $compile_check = true (line 238)

check template for modifications?

variables

  • access: public
string $compile_dir = null (line 213)

compile directory

variables

  • access: protected
string $compile_id = null (line 277)

Set this if you want different sets of compiled files for the same templates.

variables

  • access: public
boolean $compile_locking = true (line 401)

locking concurrent compiles

resource locking

  • access: public
boolean $config_booleanize = true (line 384)

Controls whether config values of on/true/yes and off/false/no get converted to boolean.

config var settings

  • access: public
string $config_dir = null (line 228)

config directory

variables

  • access: protected
boolean $config_overwrite = true (line 379)

Controls whether variables with the same name overwrite each other.

config var settings

  • access: public
boolean $config_read_hidden = false (line 389)

Controls whether hidden config sections/vars are read from the file.

config var settings

  • access: public
boolean $debugging = false (line 336)

debug mode

Setting this to true enables the debug-console.

  • access: public
string $debugging_ctrl = 'NONE' (line 345)

This determines if debugging is enable-able from the browser.

  • NONE => no debugging control allowed
  • URL => enable debugging when SMARTY_DEBUG is found in the URL.

  • access: public
string $debug_tpl = null (line 359)

Path of debug template.

  • access: public
callable $default_config_handler_func = null (line 203)

default config handler

variables

  • access: public
string $default_config_type = 'file' (line 444)

config type

  • access: public
array $default_modifiers = array() (line 499)

default modifier

  • access: public
callable $default_plugin_handler_func = null (line 208)

default plugin handler

variables

  • access: public
string $default_resource_type = 'file' (line 426)

resource type used if none given

Must be an valid key of $registered_resources.

  • access: public
callable $default_template_handler_func = null (line 198)

default template handler

variables

  • access: public
boolean $direct_access_security = true (line 327)

Should compiled-templates be prevented from being called directly?

security

  • access: public
int $error_reporting = null (line 364)

When set, smarty uses this value as error_reporting-level.

  • access: public
boolean $error_unassigned = false (line 183)

display error on not assigned variables

variables

  • access: public
boolean $escape_html = false (line 504)

autoescape variable output

  • access: public
boolean $force_cache = false (line 263)

force cache file creation

variables

  • access: public
boolean $force_compile = false (line 233)

force template compiling?

variables

  • access: public
boolean $get_used_tags = false (line 369)

Internal flag for getTags()

  • access: public
string $left_delimiter = "{" (line 282)

template left-delimiter

variables

  • access: public
float $locking_timeout = 10 (line 411)

seconds to wait for acquiring a lock before ignoring the write lock

resource locking

  • access: public
array $merged_templates_func = array() (line 550)

Saved parameter of merged templates during compilation

  • access: public
boolean $merge_compiled_includes = false (line 253)

merge compiled includes

variables

  • access: public
integer $php_handling = self::PHP_PASSTHRU (line 311)

controls handling of PHP-blocks

security

  • access: public
string $plugins_dir = null (line 218)

plugins directory

variables

  • access: protected
array $plugin_search_order = array('function', 'block', 'compiler', 'class') (line 464)

plugin search order

  • access: public
array $properties = array() (line 439)

internal config properties

  • access: public
array $registered_cache_resources = array() (line 489)

registered cache resources

  • access: public
array $registered_classes = array() (line 474)

registered classes

  • access: public
array $registered_filters = array() (line 479)

registered filters

  • access: public
array $registered_objects = array() (line 469)

registered objects

  • access: public
array $registered_plugins = array() (line 459)

registered plugins

  • access: public
array $registered_resources = array() (line 484)

registered resources

  • access: public
string $right_delimiter = "}" (line 287)

template right-delimiter

variables

  • access: public
string $security_class = 'Smarty_Security' (line 299)

class name

security This should be instance of Smarty_Security.

Smarty_Security $security_policy = null (line 305)

implementation of security class

security

  • access: public
Smarty $smarty (line 534)

self pointer to Smarty object

  • access: public
type $smarty_debug_id = 'SMARTY_DEBUG' (line 354)

Name of debugging URL-param.

Only used when $debugging_ctrl is set to 'URL'. The name of the URL-parameter that activates debugging.

  • access: public
int $start_time = 0 (line 514)

start time for execution time calculation

  • access: public
string $template_dir = null (line 193)

template directory

variables

  • access: protected
array $template_functions = array() (line 419)

global template functions

  • access: public
array $template_objects = array() (line 449)

cached template objects

  • access: public
boolean $use_include_path = false (line 188)

look up relative filepaths in include_path

variables

  • access: public
boolean $use_sub_dirs = false (line 243)

use sub dirs for compiled/cached files?

variables

  • access: public
string $_current_file = null (line 539)

required by the compiler for BC

  • access: public
int $_dir_perms = 0771 (line 524)

default dir permissions

  • access: public
int $_file_perms = 0644 (line 519)

default file permissions

  • access: public
bool $_parserdebug = false (line 544)

internal flag to enable parser debugging

  • access: public
array $_tag_stack = array() (line 529)

block tag hierarchy

  • access: public

Inherited Variables

Inherited from Smarty_Internal_Data

Smarty_Internal_Data::$config_vars
Smarty_Internal_Data::$parent
Smarty_Internal_Data::$template_class
Smarty_Internal_Data::$tpl_vars
Methods
static method muteExpectedErrors (line 1354)

Enable error handler to mute expected messages

  • access: public
static void muteExpectedErrors ()
static method mutingErrorHandler (line 1309)

Error Handler to mute expected messages

static boolean mutingErrorHandler (integer $errno,  $errstr,  $errfile,  $errline,  $errcontext)
  • integer $errno: Error level
  • $errstr
  • $errfile
  • $errline
  • $errcontext
static method unmuteExpectedErrors (line 1386)

Disable error handler muting expected messages

  • access: public
static void unmuteExpectedErrors ()
Constructor __construct (line 557)

Initialize new Smarty object

  • access: public
Smarty __construct ()

Redefined in descendants as:
Destructor __destruct (line 581)

Class destructor

  • access: public
void __destruct ()
addAutoloadFilters (line 1062)

Add autoload filters

  • return: current Smarty instance for chaining
  • access: public
Smarty addAutoloadFilters (array $filters, [string $type = null])
  • array $filters: filters to load automatically
  • string $type: "pre", "output", … specify the filter type to set. Defaults to none treating $filters' keys as the appropriate types
addConfigDir (line 849)

Add config directory(s)

  • return: current Smarty instance for chaining
  • access: public
Smarty addConfigDir (string|array $config_dir, [string $key = null])
  • string|array $config_dir: directory(s) of config sources
  • string $key: key of the array element to assign the config dir to
addDefaultModifiers (line 1015)

Add default modifiers

  • return: current Smarty instance for chaining
  • access: public
Smarty addDefaultModifiers (array|string $modifiers)
  • array|string $modifiers: modifier or list of modifiers to add
addPluginsDir (line 913)

Adds directory of plugin files

  • return: current Smarty instance for chaining
  • access: public
Smarty addPluginsDir ( $plugins_dir, object $smarty, string $)
  • object $smarty
  • string $: |array $ plugins folder
  • $plugins_dir
addTemplateDir (line 785)

Add template directory(s)

  • return: current Smarty instance for chaining
  • throws: SmartyException when the given template directory is not valid
  • access: public
Smarty addTemplateDir (string|array $template_dir, [string $key = null])
  • string|array $template_dir: directory(s) of template sources
  • string $key: of the array element to assign the template dir to
clearAllCache (line 695)

Empty cache folder

  • return: number of cache files deleted
integer clearAllCache ([integer $exp_time = null], [string $type = null])
  • integer $exp_time: expiration time
  • string $type: resource type
clearCache (line 713)

Empty cache for a specific template

  • return: number of cache files deleted
  • access: public
integer clearCache (string $template_name, [string $cache_id = null], [string $compile_id = null], [integer $exp_time = null], [string $type = null])
  • string $template_name: template name
  • string $cache_id: cache id
  • string $compile_id: compile id
  • integer $exp_time: expiration time
  • string $type: resource type
clearCompiledTemplate (line 1274)

Delete compiled template file

  • return: number of template files deleted
  • access: public
integer clearCompiledTemplate ([string $resource_name = null], [string $compile_id = null], [integer $exp_time = null])
  • string $resource_name: template name
  • string $compile_id: compile id
  • integer $exp_time: expiration time
compileAllConfig (line 1261)

Compile all config files

  • return: number of template files recompiled
  • access: public
integer compileAllConfig ([ $extention = '.conf'], [bool $force_compile = false], [int $time_limit = 0], [int $max_errors = null], string $extension)
  • string $extension: file extension
  • bool $force_compile: force all to recompile
  • int $time_limit
  • int $max_errors
  • $extention
compileAllTemplates (line 1247)

Compile all template files

  • return: number of template files recompiled
  • access: public
integer compileAllTemplates ([ $extention = '.tpl'], [bool $force_compile = false], [int $time_limit = 0], [int $max_errors = null], string $extension)
  • string $extension: file extension
  • bool $force_compile: force all to recompile
  • int $time_limit
  • int $max_errors
  • $extention
createTemplate (line 1135)

creates a template object

  • return: object
  • access: public
object template createTemplate (string $template, [mixed $cache_id = null], [mixed $compile_id = null], [object $parent = null], [boolean $do_clone = true])
  • string $template: the resource handle of the template file
  • mixed $cache_id: cache id to be used with this template
  • mixed $compile_id: compile id to be used with this template
  • object $parent: next higher level of Smarty variables
  • boolean $do_clone: flag is Smarty object shall be cloned
disableSecurity (line 754)

Disable security

  • return: current Smarty instance for chaining
  • access: public
Smarty disableSecurity ()
enableSecurity (line 728)

Loads security class and enables security

  • return: current Smarty instance for chaining
  • throws: SmartyException when an invalid class name is provided
  • access: public
Smarty enableSecurity ([string|Smarty_Security $security_class = null])
  • string|Smarty_Security $security_class: if a string is used, it must be class-name
getAutoloadFilters (line 1089)

Get autoload filters

  • return: array( 'type1' => array( 'filter1', 'filter2', … ) ) or array( 'filter1', 'filter2', …) if $type was specified
  • access: public
array getAutoloadFilters ([string $type = null])
  • string $type: type of filter to get autoloads for. Defaults to all autoload filters
getCacheDir (line 992)

Get cache directory

  • return: path of cache directory
  • access: public
string getCacheDir ()
getCompileDir (line 967)

Get compiled directory

  • return: path to compiled templates
  • access: public
string getCompileDir ()
getConfigDir (line 881)

Get config directory

  • return: configuration directory
  • access: public
array|string getConfigDir ([mixed $index = null])
  • mixed $index: index of directory to get, null to get all
getDebugTemplate (line 1103)

return name of debugging template

  • access: public
string getDebugTemplate ()
getDefaultModifiers (line 1031)

Get default modifiers

  • return: list of default modifiers
  • access: public
array getDefaultModifiers ()
getGlobal (line 671)

Returns a single or all global variables

  • return: variable value or or array of variables
  • access: public
string getGlobal ([string $varname = null], object $smarty)
  • object $smarty
  • string $varname: variable name or null
getPluginsDir (line 942)

Get plugin directories

  • return: list of plugin directories
  • access: public
array getPluginsDir ()
getTags (line 1286)

Return array of tag/attributes of all tags used by an template

  • return: of tag/attributes
  • access: public
array getTags (Smarty_Internal_Template $template, object $templae)
getTemplateDir (line 817)

Get template directories

  • return: list of template directories, or directory of $index
  • access: public
array|string getTemplateDir ([mixed $index = null])
  • mixed $index: index of directory to get, null to get all
loadPlugin (line 1189)

Takes unknown classes and loads plugin files for them class name format: Smarty_PluginType_PluginName plugin filename format: plugintype.pluginname.php

  • return: |boolean filepath of loaded file or false
  • access: public
string loadPlugin (string $plugin_name, [bool $check = true])
  • string $plugin_name: class plugin name to load
  • bool $check: check if already loaded
setAutoloadFilters (line 1044)

Set autoload filters

  • return: current Smarty instance for chaining
  • access: public
Smarty setAutoloadFilters (array $filters, [string $type = null])
  • array $filters: filters to load automatically
  • string $type: "pre", "output", … specify the filter type to set. Defaults to none treating $filters' keys as the appropriate types
setCacheDir (line 978)

Set cache directory

  • return: current Smarty instance for chaining
  • access: public
Smarty setCacheDir (string $cache_dir)
  • string $cache_dir: directory to store cached templates in
setCompileDir (line 953)

Set compile directory

  • return: current Smarty instance for chaining
  • access: public
Smarty setCompileDir (string $compile_dir)
  • string $compile_dir: directory to store compiled templates in
setConfigDir (line 832)

Set config directory

  • return: current Smarty instance for chaining
  • access: public
Smarty setConfigDir ( $config_dir, string|array $template_dir)
  • string|array $template_dir: directory(s) of configuration sources
  • $config_dir
setDebugTemplate (line 1115)

set the debug template

  • return: current Smarty instance for chaining
  • throws: SmartyException if file is not readable
  • access: public
Smarty setDebugTemplate (string $tpl_name)
  • string $tpl_name
setDefaultModifiers (line 1003)

Set default modifiers

  • return: current Smarty instance for chaining
  • access: public
Smarty setDefaultModifiers (array|string $modifiers)
  • array|string $modifiers: modifier or list of modifiers to set
setPluginsDir (line 896)

Set plugins directory

  • return: current Smarty instance for chaining
  • access: public
Smarty setPluginsDir (string|array $plugins_dir)
  • string|array $plugins_dir: directory(s) of plugins
setTemplateDir (line 767)

Set template directory

  • return: current Smarty instance for chaining
  • access: public
Smarty setTemplateDir (string|array $template_dir)
  • string|array $template_dir: directory(s) of template sources
templateExists (line 653)

Check if a template resource exists

  • return: status
  • access: public
boolean templateExists (string $resource_name)
  • string $resource_name: template name
testInstall (line 1297)

Run installation test

  • return: true if setup is fine, false if something is wrong
  • access: public
boolean testInstall ([ &$errors = null], array $errors)
  • array $errors: Array to write errors into, rather than outputting them
  • &$errors
__clone (line 589)

magic>> set selfpointer on cloned object

  • access: public
void __clone ()
__get (line 604)

magic>> Generic getter.

Calls the appropriate getter function. Issues an E_USER_NOTICE if no valid getter is found.

  • access: public
mixed __get (string $name)
  • string $name: property name
__set (line 630)

magic>> Generic setter.

Calls the appropriate setter function. Issues an E_USER_NOTICE if no valid setter is found.

  • access: public
void __set (string $name, mixed $value)
  • string $name: property name
  • mixed $value: parameter passed to setter

Inherited Methods

Inherited From Smarty_Internal_TemplateBase

Smarty_Internal_TemplateBase::createData()
Smarty_Internal_TemplateBase::display()
Smarty_Internal_TemplateBase::fetch()
Smarty_Internal_TemplateBase::getRegisteredObject()
Smarty_Internal_TemplateBase::isCached()
Smarty_Internal_TemplateBase::loadFilter()
Smarty_Internal_TemplateBase::registerCacheResource()
Smarty_Internal_TemplateBase::registerClass()
Smarty_Internal_TemplateBase::registerDefaultConfigHandler()
Smarty_Internal_TemplateBase::registerDefaultPluginHandler()
Smarty_Internal_TemplateBase::registerDefaultTemplateHandler()
Smarty_Internal_TemplateBase::registerFilter()
Smarty_Internal_TemplateBase::registerObject()
Smarty_Internal_TemplateBase::registerPlugin()
Smarty_Internal_TemplateBase::registerResource()
Smarty_Internal_TemplateBase::unregisterCacheResource()
Smarty_Internal_TemplateBase::unregisterFilter()
Smarty_Internal_TemplateBase::unregisterObject()
Smarty_Internal_TemplateBase::unregisterPlugin()
Smarty_Internal_TemplateBase::unregisterResource()
Smarty_Internal_TemplateBase::_get_filter_name()
Smarty_Internal_TemplateBase::__call()

Inherited From Smarty_Internal_Data

Smarty_Internal_Data::append()
Smarty_Internal_Data::appendByRef()
Smarty_Internal_Data::assign()
Smarty_Internal_Data::assignByRef()
Smarty_Internal_Data::assignGlobal()
Smarty_Internal_Data::clearAllAssign()
Smarty_Internal_Data::clearAssign()
Smarty_Internal_Data::clearConfig()
Smarty_Internal_Data::configLoad()
Smarty_Internal_Data::getConfigVariable()
Smarty_Internal_Data::getConfigVars()
Smarty_Internal_Data::getStreamVariable()
Smarty_Internal_Data::getTemplateVars()
Smarty_Internal_Data::getVariable()
Class Constants
CACHING_LIFETIME_CURRENT = 1 (line 123)

constant definitions

CACHING_LIFETIME_SAVED = 2 (line 124)

constant definitions

CACHING_OFF = 0 (line 122)

define caching modes

constant definitions

COMPILECHECK_CACHEMISS = 2 (line 130)

constant definitions

COMPILECHECK_OFF = 0 (line 128)

define compile check modes

constant definitions

COMPILECHECK_ON = 1 (line 129)

constant definitions

FILTER_OUTPUT = 'output' (line 143)

constant definitions

FILTER_POST = 'post' (line 141)

filter types

constant definitions

FILTER_PRE = 'pre' (line 142)

constant definitions

FILTER_VARIABLE = 'variable' (line 144)

constant definitions

PHP_ALLOW = 3 (line 137)

constant definitions

PHP_PASSTHRU = 0 (line 134)

modes for handling of "<?php ... ?>" tags in templates.

constant definitions

PHP_QUOTE = 1 (line 135)

constant definitions

PHP_REMOVE = 2 (line 136)

constant definitions

PLUGIN_BLOCK = 'block' (line 149)

constant definitions

PLUGIN_COMPILER = 'compiler' (line 150)

constant definitions

PLUGIN_FUNCTION = 'function' (line 148)

plugin types

constant definitions

PLUGIN_MODIFIER = 'modifier' (line 151)

constant definitions

PLUGIN_MODIFIERCOMPILER = 'modifiercompiler' (line 152)

constant definitions

SCOPE_GLOBAL = 3 (line 118)

constant definitions

SCOPE_LOCAL = 0 (line 115)

define variable scopes

constant definitions

SCOPE_PARENT = 1 (line 116)

constant definitions

SCOPE_ROOT = 2 (line 117)

constant definitions

SMARTY_VERSION = 'Smarty 3.1-DEV' (line 110)

smarty version

constant definitions

Documentation generated on Sat, 24 Sep 2011 20:23:19 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Template/Smarty_Data.html0000644000175000017500000002357011637420324024310 0ustar mikemike Docs For Class Smarty_Data

Class Smarty_Data

Description

class for the Smarty data object

The Smarty data object will hold Smarty variables in the current scope

Located in /libs/sysplugins/smarty_internal_data.php (line 412)

Smarty_Internal_Data
   |
   --Smarty_Data
Variable Summary
Method Summary
Smarty_Data __construct ([Smarty|array $_parent = null], [Smarty $smarty = null])
Variables

Documentation generated on Sat, 24 Sep 2011 20:23:52 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Template/Smarty_Internal_Template.html0000644000175000017500000014202111637420324027037 0ustar mikemike Docs For Class Smarty_Internal_Template

Class Smarty_Internal_Template

Description

Main class with template data structures and methods

Located in /libs/sysplugins/smarty_internal_template.php (line 22)

Smarty_Internal_Data
   |
   --Smarty_Internal_TemplateBase
      |
      --Smarty_Internal_Template
Method Summary
Smarty_Internal_Template __construct (string $template_resource, Smarty $smarty, [Smarty_Internal_Template $_parent = null], [mixed $_cache_id = null], [mixed $_compile_id = null], [bool $_caching = null], [int $_cache_lifetime = null])
void __destruct ()
void createLocalArrayVariable (string $tpl_var, [bool $nocache = false], [int $scope = Smarty::SCOPE_LOCAL])
string createTemplateCodeFrame ([string $content = ''], [bool $cache = false])
bool decodeProperties (array $properties, [bool $cache = false])
array &getScope (int $scope)
mixed getScopePointer (int $scope)
string getSubTemplate (string $template, mixed $cache_id, mixed $compile_id, integer $caching, integer $cache_lifetime,  $data, int $parent_scope, array $vars)
boolean mustCompile ()
string setupInlineSubTemplate (string $template, mixed $cache_id, mixed $compile_id, integer $caching, integer $cache_lifetime,  $data, int $parent_scope, string $hash, array $vars)
bool writeCachedContent ( $content)
int _count (mixed $value)
void __get (string $property_name)
void __set (string $property_name, mixed $value)
Variables
bool $allow_relative_path = false (line 95)

internal flag to allow relative path in child template blocks

  • access: public
array $block_data = array() (line 80)

blocks for template inheritance

  • access: public
string $cache_id = null (line 28)

cache_id

  • access: public
integer $cache_lifetime = null (line 43)

cache lifetime in seconds

  • access: public
boolean $caching = null (line 38)

caching enabled

  • access: public
string $compile_id = null (line 33)

$compile_id

  • access: public
bool $has_nocache_code = false (line 58)

flag if template does contain nocache code sections

  • access: public
bool $mustCompile = null (line 53)

flag if compiled template is invalid and must be (re)compiled

  • access: public
array $properties = array('file_dependency' => array(),'nocache_hash'=>'','function'=>array()) (line 63)

special compiled and cached template properties

  • access: public
array $required_plugins = array('compiled' => array(),'nocache'=>array()) (line 70)

required plugins

  • access: public
Smarty $smarty = null (line 75)

Global smarty instance

  • access: public
string $template_resource = null (line 48)

Template resource

  • access: public
array $used_tags = array() (line 90)

optional log of tag/attributes

  • access: public
array $variable_filters = array() (line 85)

variable filters

  • access: public

Inherited Variables

Inherited from Smarty_Internal_Data

Smarty_Internal_Data::$config_vars
Smarty_Internal_Data::$parent
Smarty_Internal_Data::$template_class
Smarty_Internal_Data::$tpl_vars
Methods
Constructor __construct (line 111)

Create template data object

Some of the global Smarty settings copied to template scope It load the required template resources and cacher plugins

  • access: public
Smarty_Internal_Template __construct (string $template_resource, Smarty $smarty, [Smarty_Internal_Template $_parent = null], [mixed $_cache_id = null], [mixed $_compile_id = null], [bool $_caching = null], [int $_cache_lifetime = null])
  • string $template_resource: template resource string
  • Smarty $smarty: Smarty instance
  • Smarty_Internal_Template $_parent: back pointer to parent object with variables or null
  • mixed $_cache_id: cache id or null
  • mixed $_compile_id: compile id or null
  • bool $_caching: use caching?
  • int $_cache_lifetime: cache life-time in seconds
Destructor __destruct (line 623)

Template data object destrutor

  • access: public
void __destruct ()
compileTemplateSource (line 159)

Compiles the template

If the template is not evaluated the compiled template is saved on disk

  • access: public
void compileTemplateSource ()
createLocalArrayVariable (line 458)

Template code runtime function to create a local Smarty variable for array assignments

  • access: public
void createLocalArrayVariable (string $tpl_var, [bool $nocache = false], [int $scope = Smarty::SCOPE_LOCAL])
  • string $tpl_var: tempate variable name
  • bool $nocache: cache mode of variable
  • int $scope: scope of variable
createTemplateCodeFrame (line 322)

Create code frame for compiled and cached templates

  • access: public
string createTemplateCodeFrame ([string $content = ''], [bool $cache = false])
  • string $content: optional template content
  • bool $cache: flag for cache file
decodeProperties (line 397)

This function is executed automatically when a compiled or cached template file is included

  • Decode saved properties from compiled template and cache files
  • Check if compiled or cache file is valid

  • return: flag if compiled or cache file is valid
  • access: public
bool decodeProperties (array $properties, [bool $cache = false])
  • array $properties: special template properties
  • bool $cache: flag if called from cache file
getScope (line 479)

Template code runtime function to get pointer to template variable array of requested scope

  • return: array of template variables
  • access: public
array &getScope (int $scope)
  • int $scope: requested variable scope
getScopePointer (line 502)

Get parent or root of template parent chain

  • return: object
  • access: public
mixed getScopePointer (int $scope)
  • int $scope: pqrent or root scope
getSubTemplate (line 240)

Template code runtime function to get subtemplate content

  • return: template content
  • access: public
string getSubTemplate (string $template, mixed $cache_id, mixed $compile_id, integer $caching, integer $cache_lifetime,  $data, int $parent_scope, array $vars)
  • string $template: the resource handle of the template file
  • mixed $cache_id: cache id to be used with this template
  • mixed $compile_id: compile id to be used with this template
  • integer $caching: cache mode
  • integer $cache_lifetime: life time of cache data
  • array $vars: optional variables to assign
  • int $parent_scope: scope in which {include} should execute
  • $data
mustCompile (line 137)

Returns if the current template must be compiled by the Smarty compiler

It does compare the timestamps of template source and the compiled templates and checks the force compile configuration

  • return: true if the template must be compiled
  • access: public
boolean mustCompile ()
setupInlineSubTemplate (line 288)

Template code runtime function to set up an inline subtemplate

  • return: template content
  • access: public
string setupInlineSubTemplate (string $template, mixed $cache_id, mixed $compile_id, integer $caching, integer $cache_lifetime,  $data, int $parent_scope, string $hash, array $vars)
  • string $template: the resource handle of the template file
  • mixed $cache_id: cache id to be used with this template
  • mixed $compile_id: compile id to be used with this template
  • integer $caching: cache mode
  • integer $cache_lifetime: life time of cache data
  • array $vars: optional variables to assign
  • int $parent_scope: scope in which {include} should execute
  • string $hash: nocache hash code
  • $data
writeCachedContent (line 212)

Writes the cached template output

  • access: public
bool writeCachedContent ( $content)
  • $content
_count (line 522)

[util function] counts an array, arrayaccess/traversable or PDOStatement object

  • return: the count for arrays and objects that implement countable, 1 for other objects that don't, and 0 for empty elements
  • access: public
int _count (mixed $value)
  • mixed $value
__get (line 578)

get Smarty property in template context

  • access: public
void __get (string $property_name)
  • string $property_name: property name
__set (line 552)

set Smarty property in template context

  • access: public
void __set (string $property_name, mixed $value)
  • string $property_name: property name
  • mixed $value: value

Inherited Methods

Inherited From Smarty_Internal_TemplateBase

Smarty_Internal_TemplateBase::createData()
Smarty_Internal_TemplateBase::display()
Smarty_Internal_TemplateBase::fetch()
Smarty_Internal_TemplateBase::getRegisteredObject()
Smarty_Internal_TemplateBase::isCached()
Smarty_Internal_TemplateBase::loadFilter()
Smarty_Internal_TemplateBase::registerCacheResource()
Smarty_Internal_TemplateBase::registerClass()
Smarty_Internal_TemplateBase::registerDefaultConfigHandler()
Smarty_Internal_TemplateBase::registerDefaultPluginHandler()
Smarty_Internal_TemplateBase::registerDefaultTemplateHandler()
Smarty_Internal_TemplateBase::registerFilter()
Smarty_Internal_TemplateBase::registerObject()
Smarty_Internal_TemplateBase::registerPlugin()
Smarty_Internal_TemplateBase::registerResource()
Smarty_Internal_TemplateBase::unregisterCacheResource()
Smarty_Internal_TemplateBase::unregisterFilter()
Smarty_Internal_TemplateBase::unregisterObject()
Smarty_Internal_TemplateBase::unregisterPlugin()
Smarty_Internal_TemplateBase::unregisterResource()
Smarty_Internal_TemplateBase::_get_filter_name()
Smarty_Internal_TemplateBase::__call()

Inherited From Smarty_Internal_Data

Smarty_Internal_Data::append()
Smarty_Internal_Data::appendByRef()
Smarty_Internal_Data::assign()
Smarty_Internal_Data::assignByRef()
Smarty_Internal_Data::assignGlobal()
Smarty_Internal_Data::clearAllAssign()
Smarty_Internal_Data::clearAssign()
Smarty_Internal_Data::clearConfig()
Smarty_Internal_Data::configLoad()
Smarty_Internal_Data::getConfigVariable()
Smarty_Internal_Data::getConfigVars()
Smarty_Internal_Data::getStreamVariable()
Smarty_Internal_Data::getTemplateVars()
Smarty_Internal_Data::getVariable()

Documentation generated on Sat, 24 Sep 2011 20:23:59 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Template/SmartyBC.html0000644000175000017500000026231511637420324023566 0ustar mikemike Docs For Class SmartyBC

Class SmartyBC

Description

Smarty Backward Compatability Wrapper Class

Located in /libs/SmartyBC.class.php (line 42)

Smarty_Internal_Data
   |
   --Smarty_Internal_TemplateBase
      |
      --Smarty
         |
         --SmartyBC
Variable Summary
string $_version
Method Summary
SmartyBC __construct ([ $options = array()])
void append_by_ref (string $tpl_var, mixed &$value, [boolean $merge = false])
void assign_by_ref (string $tpl_var, mixed &$value)
boolean clear_all_cache ([string $exp_time = null])
void clear_assign (string $tpl_var)
boolean clear_cache ([string $tpl_file = null], [string $cache_id = null], [string $compile_id = null], [string $exp_time = null])
boolean clear_compiled_tpl ([string $tpl_file = null], [string $compile_id = null], [string $exp_time = null])
void clear_config ([string $var = null])
void config_load (string $file, [string $section = null], [string $scope = 'global'])
array get_config_vars ([string $name = null])
object get_registered_object (string $name)
array get_template_vars ([string $name = null])
boolean is_cached (string $tpl_file, [string $cache_id = null], [string $compile_id = null])
void load_filter (string $type, string $name)
void register_block (string $block, string $block_impl, [bool $cacheable = true], [mixed $cache_attrs = null])
void register_compiler_function (string $function, string $function_impl, [bool $cacheable = true])
void register_function (string $function, string $function_impl, [bool $cacheable = true], [mixed $cache_attrs = null])
void register_modifier (string $modifier, string $modifier_impl)
void register_object (string $object, object $object_impl, [array $allowed = array()], [boolean $smarty_args = true], [ $block_methods = array()], array $block_functs)
void register_outputfilter (callable $function)
void register_postfilter (callable $function)
void register_prefilter (callable $function)
void register_resource (string $type, array $functions)
boolean template_exists (string $tpl_file)
void trigger_error (string $error_msg, [integer $error_type = E_USER_WARNING])
void unregister_block (string $block)
void unregister_compiler_function (string $function)
void unregister_function (string $function)
void unregister_modifier (string $modifier)
void unregister_object (string $object)
void unregister_outputfilter (callable $function)
void unregister_postfilter (callable $function)
void unregister_prefilter (callable $function)
void unregister_resource (string $type)
Variables
string $_version = self::SMARTY_VERSION (line 48)

Smarty 2 BC

  • access: public

Inherited Variables

Inherited from Smarty

Smarty::$allow_php_templates
Smarty::$autoload_filters
Smarty::$auto_literal
Smarty::$cache_dir
Smarty::$cache_id
Smarty::$cache_lifetime
Smarty::$cache_locking
Smarty::$cache_modified_check
Smarty::$caching
Smarty::$caching_type
Smarty::$compile_check
Smarty::$compile_dir
Smarty::$compile_id
Smarty::$compile_locking
Smarty::$config_booleanize
Smarty::$config_dir
Smarty::$config_overwrite
Smarty::$config_read_hidden
Smarty::$debugging
Smarty::$debugging_ctrl
Smarty::$debug_tpl
Smarty::$default_config_handler_func
Smarty::$default_config_type
Smarty::$default_modifiers
Smarty::$default_plugin_handler_func
Smarty::$default_resource_type
Smarty::$default_template_handler_func
Smarty::$direct_access_security
Smarty::$error_reporting
Smarty::$error_unassigned
Smarty::$escape_html
Smarty::$force_cache
Smarty::$force_compile
Smarty::$get_used_tags
Smarty::$global_tpl_vars
Smarty::$left_delimiter
Smarty::$locking_timeout
Smarty::$merged_templates_func
Smarty::$merge_compiled_includes
Smarty::$php_handling
Smarty::$plugins_dir
Smarty::$plugin_search_order
Smarty::$properties
Smarty::$registered_cache_resources
Smarty::$registered_classes
Smarty::$registered_filters
Smarty::$registered_objects
Smarty::$registered_plugins
Smarty::$registered_resources
Smarty::$right_delimiter
Smarty::$security_class
Smarty::$security_policy
Smarty::$smarty
Smarty::$smarty_debug_id
Smarty::$start_time
Smarty::$template_dir
Smarty::$template_functions
Smarty::$template_objects
Smarty::$use_include_path
Smarty::$use_sub_dirs
Smarty::$_current_file
Smarty::$_dir_perms
Smarty::$_file_perms
Smarty::$_muted_directories
Smarty::$_parserdebug
Smarty::$_previous_error_handler
Smarty::$_smarty_vars
Smarty::$_tag_stack

Inherited from Smarty_Internal_Data

Smarty_Internal_Data::$config_vars
Smarty_Internal_Data::$parent
Smarty_Internal_Data::$template_class
Smarty_Internal_Data::$tpl_vars
Methods
Constructor __construct (line 55)

Initialize new SmartyBC object

  • access: public
SmartyBC __construct ([ $options = array()])
  • array $options: options to set during initialization, e.g. array( 'forceCompile' => false )

Redefinition of:
Smarty::__construct()
Initialize new Smarty object
append_by_ref (line 80)

wrapper for append_by_ref

  • access: public
void append_by_ref (string $tpl_var, mixed &$value, [boolean $merge = false])
  • string $tpl_var: the template variable name
  • mixed &$value: the referenced value to append
  • boolean $merge: flag if array elements shall be merged
assign_by_ref (line 68)

wrapper for assign_by_ref

  • access: public
void assign_by_ref (string $tpl_var, mixed &$value)
  • string $tpl_var: the template variable name
  • mixed &$value: the referenced value to assign
clear_all_assign (line 346)

clear all the assigned template variables.

  • access: public
void clear_all_assign ()
clear_all_cache (line 325)

clear the entire contents of cache (all templates)

  • access: public
boolean clear_all_cache ([string $exp_time = null])
  • string $exp_time: expire time
clear_assign (line 90)

clear the given assigned template variable.

  • access: public
void clear_assign (string $tpl_var)
  • string $tpl_var: the template variable to clear
clear_cache (line 314)

clear cached content for the given template and cache id

  • access: public
boolean clear_cache ([string $tpl_file = null], [string $cache_id = null], [string $compile_id = null], [string $exp_time = null])
  • string $tpl_file: name of template file
  • string $cache_id: name of cache_id
  • string $compile_id: name of compile_id
  • string $exp_time: expiration time
clear_compiled_tpl (line 361)

clears compiled version of specified template resource, or all compiled template files if one is not specified.

This function is for advanced use only, not normally needed.

  • return: results of smarty_core_rm_auto()
  • access: public
boolean clear_compiled_tpl ([string $tpl_file = null], [string $compile_id = null], [string $exp_time = null])
  • string $tpl_file
  • string $compile_id
  • string $exp_time
clear_config (line 427)

clear configuration values

  • access: public
void clear_config ([string $var = null])
  • string $var
config_load (line 406)

load configuration values

  • access: public
void config_load (string $file, [string $section = null], [string $scope = 'global'])
  • string $file
  • string $section
  • string $scope
get_config_vars (line 394)

Returns an array containing config variables

  • access: public
array get_config_vars ([string $name = null])
  • string $name
get_registered_object (line 417)

return a reference to a registered object

  • access: public
object get_registered_object (string $name)
  • string $name
get_template_vars (line 383)

Returns an array containing template variables

  • access: public
array get_template_vars ([string $name = null])
  • string $name
is_cached (line 338)

test to see if valid cache exists for this template

  • access: public
boolean is_cached (string $tpl_file, [string $cache_id = null], [string $compile_id = null])
  • string $tpl_file: name of template file
  • string $cache_id
  • string $compile_id
load_filter (line 300)

load a filter of specified type and name

  • access: public
void load_filter (string $type, string $name)
  • string $type: filter type
  • string $name: filter name
register_block (line 152)

Registers block function to be used in templates

  • access: public
void register_block (string $block, string $block_impl, [bool $cacheable = true], [mixed $cache_attrs = null])
  • string $block: name of template block
  • string $block_impl: PHP function to register
  • bool $cacheable
  • mixed $cache_attrs
register_compiler_function (line 174)

Registers compiler function

  • access: public
void register_compiler_function (string $function, string $function_impl, [bool $cacheable = true])
  • string $function: name of template function
  • string $function_impl: name of PHP function to register
  • bool $cacheable
register_function (line 103)

Registers custom function to be used in templates

  • access: public
void register_function (string $function, string $function_impl, [bool $cacheable = true], [mixed $cache_attrs = null])
  • string $function: the name of the template function
  • string $function_impl: the name of the PHP function to register
  • bool $cacheable
  • mixed $cache_attrs
register_modifier (line 195)

Registers modifier to be used in templates

  • access: public
void register_modifier (string $modifier, string $modifier_impl)
  • string $modifier: name of template modifier
  • string $modifier_impl: name of PHP function to register
register_object (line 127)

Registers object to be used in templates

  • access: public
void register_object (string $object, object $object_impl, [array $allowed = array()], [boolean $smarty_args = true], [ $block_methods = array()], array $block_functs)
  • string $object: name of template object
  • object $object_impl: the referenced PHP object to register
  • array $allowed: list of allowed methods (empty = all)
  • boolean $smarty_args: smarty argument format, else traditional
  • array $block_functs: list of methods that are block format
  • $block_methods
register_outputfilter (line 279)

Registers an output filter function to apply to a template output

  • access: public
void register_outputfilter (callable $function)
  • callable $function
register_postfilter (line 258)

Registers a postfilter function to apply to a compiled template after compilation

  • access: public
void register_postfilter (callable $function)
  • callable $function
register_prefilter (line 237)

Registers a prefilter function to apply to a template before compiling

  • access: public
void register_prefilter (callable $function)
  • callable $function
register_resource (line 216)

Registers a resource to fetch a template

  • access: public
void register_resource (string $type, array $functions)
  • string $type: name of resource
  • array $functions: array of functions to handle resource
template_exists (line 372)

Checks whether requested template exists.

  • access: public
boolean template_exists (string $tpl_file)
  • string $tpl_file
trigger_error (line 438)

trigger Smarty error

  • access: public
void trigger_error (string $error_msg, [integer $error_type = E_USER_WARNING])
  • string $error_msg
  • integer $error_type
unregister_block (line 162)

Unregisters block function

  • access: public
void unregister_block (string $block)
  • string $block: name of template function
unregister_compiler_function (line 184)

Unregisters compiler function

  • access: public
void unregister_compiler_function (string $function)
  • string $function: name of template function
unregister_function (line 113)

Unregisters custom function

  • access: public
void unregister_function (string $function)
  • string $function: name of template function
unregister_modifier (line 205)

Unregisters modifier

  • access: public
void unregister_modifier (string $modifier)
  • string $modifier: name of template modifier
unregister_object (line 139)

Unregisters object

  • access: public
void unregister_object (string $object)
  • string $object: name of template object
unregister_outputfilter (line 289)

Unregisters an outputfilter function

  • access: public
void unregister_outputfilter (callable $function)
  • callable $function
unregister_postfilter (line 268)

Unregisters a postfilter function

  • access: public
void unregister_postfilter (callable $function)
  • callable $function
unregister_prefilter (line 247)

Unregisters a prefilter function

  • access: public
void unregister_prefilter (callable $function)
  • callable $function
unregister_resource (line 226)

Unregisters a resource

  • access: public
void unregister_resource (string $type)
  • string $type: name of resource

Inherited Methods

Inherited From Smarty

Smarty::__construct()
Smarty::addAutoloadFilters()
Smarty::addConfigDir()
Smarty::addDefaultModifiers()
Smarty::addPluginsDir()
Smarty::addTemplateDir()
Smarty::clearAllCache()
Smarty::clearCache()
Smarty::clearCompiledTemplate()
Smarty::compileAllConfig()
Smarty::compileAllTemplates()
Smarty::createTemplate()
Smarty::disableSecurity()
Smarty::enableSecurity()
Smarty::getAutoloadFilters()
Smarty::getCacheDir()
Smarty::getCompileDir()
Smarty::getConfigDir()
Smarty::getDebugTemplate()
Smarty::getDefaultModifiers()
Smarty::getGlobal()
Smarty::getPluginsDir()
Smarty::getTags()
Smarty::getTemplateDir()
Smarty::loadPlugin()
Smarty::muteExpectedErrors()
Smarty::mutingErrorHandler()
Smarty::setAutoloadFilters()
Smarty::setCacheDir()
Smarty::setCompileDir()
Smarty::setConfigDir()
Smarty::setDebugTemplate()
Smarty::setDefaultModifiers()
Smarty::setPluginsDir()
Smarty::setTemplateDir()
Smarty::templateExists()
Smarty::testInstall()
Smarty::unmuteExpectedErrors()
Smarty::__clone()
Smarty::__destruct()
Smarty::__get()
Smarty::__set()

Inherited From Smarty_Internal_TemplateBase

Smarty_Internal_TemplateBase::createData()
Smarty_Internal_TemplateBase::display()
Smarty_Internal_TemplateBase::fetch()
Smarty_Internal_TemplateBase::getRegisteredObject()
Smarty_Internal_TemplateBase::isCached()
Smarty_Internal_TemplateBase::loadFilter()
Smarty_Internal_TemplateBase::registerCacheResource()
Smarty_Internal_TemplateBase::registerClass()
Smarty_Internal_TemplateBase::registerDefaultConfigHandler()
Smarty_Internal_TemplateBase::registerDefaultPluginHandler()
Smarty_Internal_TemplateBase::registerDefaultTemplateHandler()
Smarty_Internal_TemplateBase::registerFilter()
Smarty_Internal_TemplateBase::registerObject()
Smarty_Internal_TemplateBase::registerPlugin()
Smarty_Internal_TemplateBase::registerResource()
Smarty_Internal_TemplateBase::unregisterCacheResource()
Smarty_Internal_TemplateBase::unregisterFilter()
Smarty_Internal_TemplateBase::unregisterObject()
Smarty_Internal_TemplateBase::unregisterPlugin()
Smarty_Internal_TemplateBase::unregisterResource()
Smarty_Internal_TemplateBase::_get_filter_name()
Smarty_Internal_TemplateBase::__call()

Inherited From Smarty_Internal_Data

Smarty_Internal_Data::append()
Smarty_Internal_Data::appendByRef()
Smarty_Internal_Data::assign()
Smarty_Internal_Data::assignByRef()
Smarty_Internal_Data::assignGlobal()
Smarty_Internal_Data::clearAllAssign()
Smarty_Internal_Data::clearAssign()
Smarty_Internal_Data::clearConfig()
Smarty_Internal_Data::configLoad()
Smarty_Internal_Data::getConfigVariable()
Smarty_Internal_Data::getConfigVars()
Smarty_Internal_Data::getStreamVariable()
Smarty_Internal_Data::getTemplateVars()
Smarty_Internal_Data::getVariable()

Documentation generated on Sat, 24 Sep 2011 20:23:26 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Template/Smarty_Internal_TemplateBase.html0000644000175000017500000013554611637420324027650 0ustar mikemike Docs For Class Smarty_Internal_TemplateBase

Class Smarty_Internal_TemplateBase

Description

Class with shared template methodes

  • abstract:

Located in /libs/sysplugins/smarty_internal_templatebase.php (line 18)

Smarty_Internal_Data
   |
   --Smarty_Internal_TemplateBase
Direct descendents
Class Description
Smarty This is the main Smarty class
Smarty_Internal_Template Main class with template data structures and methods
Method Summary
Smarty_Data createData ([object $parent = null])
void display ([string $template = null], [mixed $cache_id = null], [mixed $compile_id = null], [object $parent = null])
string fetch ([string $template = null], [mixed $cache_id = null], [mixed $compile_id = null], [object $parent = null], [bool $display = false], [bool $merge_tpl_vars = true], [bool $no_output_filter = false])
object getRegisteredObject (string $name)
boolean isCached ([string|object  $template = null], [mixed $cache_id = null], [mixed $compile_id = null], [object $parent = null])
bool loadFilter (string $type, string $name)
void registerCacheResource (string $type, Smarty_CacheResource $callback)
void registerClass ( $class_name, string $class_impl, string $class)
void registerDefaultConfigHandler (callable $callback)
void registerDefaultPluginHandler (callable $callback)
void registerDefaultTemplateHandler (callable $callback)
void registerFilter (string $type, callback $callback)
void registerObject ( $object_name, object $object_impl, [array $allowed = array()], [boolean $smarty_args = true], [array $block_methods = array()], string $object, array $block_functs)
void registerPlugin (string $type, string $tag, callback $callback, [boolean $cacheable = true], [array $cache_attr = null])
void registerResource (string $type, Smarty_Resource|array $callback)
void unregisterCacheResource (string $type)
void unregisterFilter (string $type, callback $callback)
void unregisterObject (string $name)
void unregisterPlugin (string $type, string $tag)
void unregisterResource (string $type)
void _get_filter_name (callback $function_name)
void __call (string $name, array $args)
Methods
createData (line 386)

creates a data object

  • return: data object
  • access: public
Smarty_Data createData ([object $parent = null])
  • object $parent: next higher level of Smarty variables
display (line 350)

displays a Smarty template

  • access: public
void display ([string $template = null], [mixed $cache_id = null], [mixed $compile_id = null], [object $parent = null])
  • string $template: the resource handle of the template file or template object
  • mixed $cache_id: cache id to be used with this template
  • mixed $compile_id: compile id to be used with this template
  • object $parent: next higher level of Smarty variables
fetch (line 32)

fetches a rendered Smarty template

  • return: rendered template output
  • access: public
string fetch ([string $template = null], [mixed $cache_id = null], [mixed $compile_id = null], [object $parent = null], [bool $display = false], [bool $merge_tpl_vars = true], [bool $no_output_filter = false])
  • string $template: the resource handle of the template file or template object
  • mixed $cache_id: cache id to be used with this template
  • mixed $compile_id: compile id to be used with this template
  • object $parent: next higher level of Smarty variables
  • bool $display: true: display, false: fetch
  • bool $merge_tpl_vars: if true parent template variables merged in to local scope
  • bool $no_output_filter: if true do not run output filter
getRegisteredObject (line 512)

return a reference to a registered object

  • throws: SmartyException if no such object is found
  • access: public
object getRegisteredObject (string $name)
  • string $name: object name
isCached (line 365)

test if cache is valid

  • return: cache status
  • access: public
boolean isCached ([string|object  $template = null], [mixed $cache_id = null], [mixed $compile_id = null], [object $parent = null])
  • string|object $template: the resource handle of the template file or template object
  • mixed $cache_id: cache id to be used with this template
  • mixed $compile_id: compile id to be used with this template
  • object $parent: next higher level of Smarty variables
loadFilter (line 645)

load a filter of specified type and name

  • access: public
bool loadFilter (string $type, string $name)
  • string $type: filter type
  • string $name: filter name
registerCacheResource (line 454)

Registers a cache resource to cache a template's output

  • access: public
void registerCacheResource (string $type, Smarty_CacheResource $callback)
  • string $type: name of cache resource type
  • Smarty_CacheResource $callback: instance of Smarty_CacheResource to handle output caching
registerClass (line 542)

Registers static classes to be used in templates

  • throws: SmartyException if $class_impl does not refer to an existing class
  • access: public
void registerClass ( $class_name, string $class_impl, string $class)
  • string $class: name of template class
  • string $class_impl: the referenced PHP class to register
  • $class_name
registerDefaultConfigHandler (line 588)

Registers a default template handler

  • throws: SmartyException if $callback is not callable
  • access: public
void registerDefaultConfigHandler (callable $callback)
  • callable $callback: class/method name
registerDefaultPluginHandler (line 558)

Registers a default plugin handler

  • throws: SmartyException if $callback is not callable
  • access: public
void registerDefaultPluginHandler (callable $callback)
  • callable $callback: class/method name
registerDefaultTemplateHandler (line 573)

Registers a default template handler

  • throws: SmartyException if $callback is not callable
  • access: public
void registerDefaultTemplateHandler (callable $callback)
  • callable $callback: class/method name
registerFilter (line 603)

Registers a filter function

  • access: public
void registerFilter (string $type, callback $callback)
  • string $type: filter type
  • callback $callback
registerObject (line 482)

Registers object to be used in templates

  • throws: SmartyException if any of the methods in $allowed or $block_methods are invalid
  • access: public
void registerObject ( $object_name, object $object_impl, [array $allowed = array()], [boolean $smarty_args = true], [array $block_methods = array()], string $object, array $block_functs)
  • string $object: name of template object
  • object $object_impl: the referenced PHP object to register
  • array $allowed: list of allowed methods (empty = all)
  • boolean $smarty_args: smarty argument format, else traditional
  • array $block_methods: list of block-methods
  • array $block_functs: list of methods that are block format
  • $object_name
registerPlugin (line 401)

Registers plugin to be used in templates

  • throws: SmartyException when the plugin tag is invalid
  • access: public
void registerPlugin (string $type, string $tag, callback $callback, [boolean $cacheable = true], [array $cache_attr = null])
  • string $type: plugin type
  • string $tag: name of template tag
  • callback $callback: PHP callback to register
  • boolean $cacheable: if true (default) this fuction is cachable
  • array $cache_attr: caching attributes if any
registerResource (line 431)

Registers a resource to fetch a template

  • access: public
void registerResource (string $type, Smarty_Resource|array $callback)
  • string $type: name of resource type
  • Smarty_Resource|array $callback: or instance of Smarty_Resource, or array of callbacks to handle resource (deprecated)
unregisterCacheResource (line 464)

Unregisters a cache resource

  • access: public
void unregisterCacheResource (string $type)
  • string $type: name of cache resource type
unregisterFilter (line 614)

Unregisters a filter function

  • access: public
void unregisterFilter (string $type, callback $callback)
  • string $type: filter type
  • callback $callback
unregisterObject (line 529)

unregister an object

  • throws: SmartyException if no such object is found
  • access: public
void unregisterObject (string $name)
  • string $name: object name
unregisterPlugin (line 418)

Unregister Plugin

  • access: public
void unregisterPlugin (string $type, string $tag)
  • string $type: of plugin
  • string $tag: name of plugin
unregisterResource (line 441)

Unregisters a resource

  • access: public
void unregisterResource (string $type)
  • string $type: name of resource type
_get_filter_name (line 627)

Return internal filter name

  • access: public
void _get_filter_name (callback $function_name)
  • callback $function_name
__call (line 677)

Handle unknown class methods

  • access: public
void __call (string $name, array $args)
  • string $name: unknown method-name
  • array $args: argument array

Inherited Methods

Inherited From Smarty_Internal_Data

Smarty_Internal_Data::append()
Smarty_Internal_Data::appendByRef()
Smarty_Internal_Data::assign()
Smarty_Internal_Data::assignByRef()
Smarty_Internal_Data::assignGlobal()
Smarty_Internal_Data::clearAllAssign()
Smarty_Internal_Data::clearAssign()
Smarty_Internal_Data::clearConfig()
Smarty_Internal_Data::configLoad()
Smarty_Internal_Data::getConfigVariable()
Smarty_Internal_Data::getConfigVars()
Smarty_Internal_Data::getStreamVariable()
Smarty_Internal_Data::getTemplateVars()
Smarty_Internal_Data::getVariable()

Documentation generated on Sat, 24 Sep 2011 20:24:01 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Template/_libs---SmartyBC.class.php.html0000644000175000017500000001235711637420324026677 0ustar mikemike Docs for page SmartyBC.class.php

/libs/SmartyBC.class.php

Description

Project: Smarty: the PHP compiling template engine File: SmartyBC.class.php SVN: $Id: $

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

For questions, help, comments, discussion, etc., please join the Smarty mailing list. Send a blank e-mail to smarty-discussion-subscribe@googlegroups.com

Classes
Class Description
SmartyBC Smarty Backward Compatability Wrapper Class
Functions
smarty_php_tag (line 454)

Smarty {php}{/php} block function

  • return: content re-formatted
string smarty_php_tag (array $params, string $content, object $template, boolean &$repeat)
  • array $params: parameter list
  • string $content: contents of the block
  • object $template: template object
  • boolean &$repeat: repeat flag

Documentation generated on Sat, 24 Sep 2011 20:23:26 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Template/Smarty_Internal_Data.html0000644000175000017500000010070211637420324026135 0ustar mikemike Docs For Class Smarty_Internal_Data

Class Smarty_Internal_Data

Description

Base class with template and variable methodes

Located in /libs/sysplugins/smarty_internal_data.php (line 18)


	
			
Direct descendents
Class Description
Smarty_Data class for the Smarty data object
Smarty_Internal_Debug Smarty Internal Plugin Debug Class
Smarty_Internal_TemplateBase Class with shared template methodes
Method Summary
void append (array|string $tpl_var, [mixed $value = null], [boolean $merge = false], [boolean $nocache = false])
void appendByRef (string $tpl_var, mixed &$value, [boolean $merge = false])
void assign (array|string $tpl_var, [mixed $value = null], [boolean $nocache = false], boolean $scope)
void assignByRef (string $tpl_var,  &$value, [boolean $nocache = false], mixed $)
void assignGlobal (string $varname, [mixed $value = null], [boolean $nocache = false])
void clearAllAssign ()
void clearAssign (string|array $tpl_var)
void clearConfig ([string $varname = null])
void configLoad (string $config_file, [mixed $sections = null])
mixed getConfigVariable (string $variable, [ $error_enable = true])
string getConfigVars ([string $varname = null], [ $search_parents = true])
mixed getStreamVariable (string $variable)
string getTemplateVars ([string $varname = null], [string $_ptr = null], [boolean $search_parents = true])
object the getVariable (string $variable, [object $_ptr = null], [boolean $search_parents = true], [ $error_enable = true])
Variables
array $config_vars = array() (line 43)

configuration settings

  • access: public
Smarty_Internal_Template $parent = null (line 37)

parent template (if any)

  • access: public
string $template_class = 'Smarty_Internal_Template' (line 25)

name of class used for templates

  • access: public
array $tpl_vars = array() (line 31)

template variables

  • access: public
Methods
append (line 114)

appends values to template variables

  • access: public
void append (array|string $tpl_var, [mixed $value = null], [boolean $merge = false], [boolean $nocache = false])
  • array|string $tpl_var: the template variable name(s)
  • mixed $value: the value to append
  • boolean $merge: flag if array elements shall be merged
  • boolean $nocache: if true any output of this variable will be not cached
appendByRef (line 171)

appends values to template variables by reference

  • access: public
void appendByRef (string $tpl_var, mixed &$value, [boolean $merge = false])
  • string $tpl_var: the template variable name
  • mixed &$value: the referenced value to append
  • boolean $merge: flag if array elements shall be merged
assign (line 53)

assigns a Smarty variable

  • access: public
void assign (array|string $tpl_var, [mixed $value = null], [boolean $nocache = false], boolean $scope)
  • array|string $tpl_var: the template variable name(s)
  • mixed $value: the value to assign
  • boolean $nocache: if true any output of this variable will be not cached
  • boolean $scope: the scope the variable will have (local,parent or root)
assignByRef (line 98)

assigns values to template variables by reference

  • access: public
void assignByRef (string $tpl_var,  &$value, [boolean $nocache = false], mixed $)
  • string $tpl_var: the template variable name
  • mixed $: &$value the referenced value to assign
  • boolean $nocache: if true any output of this variable will be not cached
  • &$value
assignGlobal (line 85)

assigns a global Smarty variable

  • access: public
void assignGlobal (string $varname, [mixed $value = null], [boolean $nocache = false])
  • string $varname: the global variable name
  • mixed $value: the value to assign
  • boolean $nocache: if true any output of this variable will be not cached
clearAllAssign (line 254)

clear all the assigned template variables.

  • access: public
void clearAllAssign ()
clearAssign (line 240)

clear the given assigned template variable.

  • access: public
void clearAssign (string|array $tpl_var)
  • string|array $tpl_var: the template variable(s) to clear
clearConfig (line 393)

Deassigns a single or all config variables

  • access: public
void clearConfig ([string $varname = null])
  • string $varname: variable name or null
configLoad (line 265)

load a config file, optionally load just selected sections

  • access: public
void configLoad (string $config_file, [mixed $sections = null])
  • string $config_file: filename
  • mixed $sections: array of section names, single section or null
getConfigVariable (line 313)

gets a config variable

  • return: the value of the config variable
  • access: public
mixed getConfigVariable (string $variable, [ $error_enable = true])
  • string $variable: the name of the config variable
  • $error_enable
getConfigVars (line 362)

Returns a single or all config variables

  • return: variable value or or array of variables
  • access: public
string getConfigVars ([string $varname = null], [ $search_parents = true])
  • string $varname: variable name or null
  • $search_parents
getStreamVariable (line 337)

gets a stream variable

  • return: the value of the stream variable
  • access: public
mixed getStreamVariable (string $variable)
  • string $variable: the stream of the variable
getTemplateVars (line 198)

Returns a single or all template variables

  • return: variable value or or array of variables
  • access: public
string getTemplateVars ([string $varname = null], [string $_ptr = null], [boolean $search_parents = true])
  • string $varname: variable name or null
  • string $_ptr: optional pointer to data object
  • boolean $search_parents: include parent templates?
getVariable (line 280)

gets the object of a Smarty variable

  • return: object of the variable
  • access: public
object the getVariable (string $variable, [object $_ptr = null], [boolean $search_parents = true], [ $error_enable = true])
  • string $variable: the name of the Smarty variable
  • object $_ptr: optional pointer to data object
  • boolean $search_parents: search also in parent data
  • $error_enable

Documentation generated on Sat, 24 Sep 2011 20:23:52 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Template/_libs---sysplugins---smarty_internal_templatebase.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Template/_libs---sysplugins---smarty_internal_templateb0000644000175000017500000000416711637420324032176 0ustar mikemike Docs for page smarty_internal_templatebase.php

/libs/sysplugins/smarty_internal_templatebase.php

Description

Smarty Internal Plugin Smarty Template Base

This file contains the basic shared methodes for template handling

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_TemplateBase Class with shared template methodes

Documentation generated on Sat, 24 Sep 2011 20:24:01 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Template/Smarty_Variable.html0000644000175000017500000002062611637420324025163 0ustar mikemike Docs For Class Smarty_Variable

Class Smarty_Variable

Description

class for the Smarty variable object

This class defines the Smarty variable object

Located in /libs/sysplugins/smarty_internal_data.php (line 453)


	
			
Variable Summary
boolean $nocache
int $scope
mixed $value
Method Summary
Smarty_Variable __construct ([mixed $value = null], [boolean $nocache = false], [int $scope = Smarty::SCOPE_LOCAL])
string __toString ()
Variables
boolean $nocache = false (line 466)

if true any output of this variable will be not cached

  • access: public
int $scope = Smarty::SCOPE_LOCAL (line 472)

the scope the variable will have (local,parent or root)

  • access: public
mixed $value = null (line 460)

template variable

  • access: public
Methods
Constructor __construct (line 481)

create Smarty variable object

  • access: public
Smarty_Variable __construct ([mixed $value = null], [boolean $nocache = false], [int $scope = Smarty::SCOPE_LOCAL])
  • mixed $value: the value to assign
  • boolean $nocache: if true any output of this variable will be not cached
  • int $scope: the scope the variable will have (local,parent or root)
__toString (line 493)

magic>> String conversion

  • access: public
string __toString ()

Documentation generated on Sat, 24 Sep 2011 20:23:53 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Template/_libs---sysplugins---smarty_internal_data.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Template/_libs---sysplugins---smarty_internal_data.php.0000644000175000017500000000551111637420324031770 0ustar mikemike Docs for page smarty_internal_data.php

/libs/sysplugins/smarty_internal_data.php

Description

Smarty Internal Plugin Data

This file contains the basic classes and methodes for template and variable creation

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Data Base class with template and variable methodes
Smarty_Data class for the Smarty data object
Smarty_Variable class for the Smarty variable object
Undefined_Smarty_Variable class for undefined variable object

Documentation generated on Sat, 24 Sep 2011 20:23:52 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Template/Undefined_Smarty_Variable.html0000644000175000017500000001014211637420324027134 0ustar mikemike Docs For Class Undefined_Smarty_Variable

Class Undefined_Smarty_Variable

Description

class for undefined variable object

This class defines an object for undefined variable handling

Located in /libs/sysplugins/smarty_internal_data.php (line 508)


	
			
Method Summary
bool __get (string $name)
string __toString ()
Methods
__get (line 516)

Returns FALSE for 'nocache' and NULL otherwise.

  • access: public
bool __get (string $name)
  • string $name
__toString (line 530)

Always returns an empty string.

  • access: public
string __toString ()

Documentation generated on Sat, 24 Sep 2011 20:23:53 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Template/_libs---sysplugins---smarty_internal_template.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Template/_libs---sysplugins---smarty_internal_template.0000644000175000017500000000412611637420324032105 0ustar mikemike Docs for page smarty_internal_template.php

/libs/sysplugins/smarty_internal_template.php

Description

Smarty Internal Plugin Template

This file contains the Smarty template engine

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Template Main class with template data structures and methods

Documentation generated on Sat, 24 Sep 2011 20:23:59 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsBlock/0000755000175000017500000000000012141655571022031 5ustar mikemike././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsBlock/_libs---plugins---block.textformat.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsBlock/_libs---plugins---block.textformat.php.htm0000644000175000017500000000773011637420324031652 0ustar mikemike Docs for page block.textformat.php

/libs/plugins/block.textformat.php

Description

Smarty plugin to format text blocks

Functions
smarty_block_textformat (line 35)

Smarty {textformat}{/textformat} block plugin

Type: block function
Name: textformat
Purpose: format text a certain way with preset styles or custom wrap/indent settings
Params:

 - style         - string (email)
 - indent        - integer (0)
 - wrap          - integer (80)
 - wrap_char     - string ("\n")
 - indent_char   - string (" ")
 - wrap_boundary - boolean (true)

string smarty_block_textformat (array $params, string $content, Smarty_Internal_Template $template, boolean &$repeat)
  • array $params: parameters
  • string $content: contents of the block
  • Smarty_Internal_Template $template: template object
  • boolean &$repeat: repeat flag

Documentation generated on Sat, 24 Sep 2011 20:23:04 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifier/0000755000175000017500000000000012141655571022535 5ustar mikemike././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifier/_libs---plugins---modifier.truncate.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifier/_libs---plugins---modifier.truncate.php0000644000175000017500000001010011637420324031704 0ustar mikemike Docs for page modifier.truncate.php

/libs/plugins/modifier.truncate.php

Description

Smarty plugin

Functions
smarty_modifier_truncate (line 27)

Smarty truncate modifier plugin

Type: modifier
Name: truncate
Purpose: Truncate a string to a certain length if necessary, optionally splitting in the middle of a word, and appending the $etc string or inserting $etc into the middle.

string smarty_modifier_truncate (string $string, [integer $length = 80], [string $etc = '...'], [boolean $break_words = false], [boolean $middle = false])
  • string $string: input string
  • integer $length: length of truncated text
  • string $etc: end string
  • boolean $break_words: truncate at word boundary
  • boolean $middle: truncate in the middle of text

Documentation generated on Sat, 24 Sep 2011 20:23:14 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifier/_libs---plugins---modifier.capitalize.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifier/_libs---plugins---modifier.capitalize.p0000644000175000017500000000650211637420324031667 0ustar mikemike Docs for page modifier.capitalize.php

/libs/plugins/modifier.capitalize.php

Description

Smarty plugin

Functions
smarty_modifier_capitalize (line 25)

Smarty capitalize modifier plugin

Type: modifier
Name: capitalize
Purpose: capitalize words in the string

string smarty_modifier_capitalize (string $string, [boolean $uc_digits = false], [boolean $lc_rest = false])
  • string $string: string to capitalize
  • boolean $uc_digits: also capitalize "x123" to "X123"
  • boolean $lc_rest: capitalize first letters, lowercase all following letters "aAa" to "Aaa"

Documentation generated on Sat, 24 Sep 2011 20:23:12 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifier/_libs---plugins---modifier.regex_replace.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifier/_libs---plugins---modifier.regex_replac0000644000175000017500000000645611637420324031754 0ustar mikemike Docs for page modifier.regex_replace.php

/libs/plugins/modifier.regex_replace.php

Description

Smarty plugin

Functions
smarty_modifier_regex_replace (line 24)

Smarty regex_replace modifier plugin

Type: modifier
Name: regex_replace
Purpose: regular expression search/replace

string smarty_modifier_regex_replace (string $string, string|array $search, string|array $replace)
  • string $string: input string
  • string|array $search: regular expression(s) to search for
  • string|array $replace: string(s) that should be replaced

Documentation generated on Sat, 24 Sep 2011 20:23:14 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifier/_libs---plugins---modifier.replace.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifier/_libs---plugins---modifier.replace.php.0000644000175000017500000000632611637420324031567 0ustar mikemike Docs for page modifier.replace.php

/libs/plugins/modifier.replace.php

Description

Smarty plugin

Functions
smarty_modifier_replace (line 23)

Smarty replace modifier plugin

Type: modifier
Name: replace
Purpose: simple search/replace

string smarty_modifier_replace (string $string, string $search, string $replace)
  • string $string: input string
  • string $search: text to search for
  • string $replace: replacement text

Documentation generated on Sat, 24 Sep 2011 20:23:14 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifier/_libs---plugins---modifier.spacify.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifier/_libs---plugins---modifier.spacify.php.0000644000175000017500000000602211637420324031603 0ustar mikemike Docs for page modifier.spacify.php

/libs/plugins/modifier.spacify.php

Description

Smarty plugin

Functions
smarty_modifier_spacify (line 21)

Smarty spacify modifier plugin

Type: modifier
Name: spacify
Purpose: add spaces between characters in a string

string smarty_modifier_spacify (string $string, [string $spacify_char = ' '])
  • string $string: input string
  • string $spacify_char: string to insert between characters.

Documentation generated on Sat, 24 Sep 2011 20:23:14 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifier/_libs---plugins---modifier.escape.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifier/_libs---plugins---modifier.escape.php.h0000644000175000017500000000735711637420324031571 0ustar mikemike Docs for page modifier.escape.php

/libs/plugins/modifier.escape.php

Description

Smarty plugin

Functions
smarty_modifier_escape (line 24)

Smarty escape modifier plugin

Type: modifier
Name: escape
Purpose: escape string for output

string smarty_modifier_escape (string $string, [string $esc_type = 'html'], [string $char_set = null], [boolean $double_encode = true])
  • string $string: input string
  • string $esc_type: escape type
  • string $char_set: character set, used for htmlspecialchars() or htmlentities()
  • boolean $double_encode: encode already encoded entitites again, used for htmlspecialchars() or htmlentities()

Documentation generated on Sat, 24 Sep 2011 20:23:13 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifier/_libs---plugins---modifier.date_format.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifier/_libs---plugins---modifier.date_format.0000644000175000017500000001006611637420324031647 0ustar mikemike Docs for page modifier.date_format.php

/libs/plugins/modifier.date_format.php

Description

Smarty plugin

Functions
smarty_modifier_date_format (line 29)

Smarty date_format modifier plugin

Type: modifier
Name: date_format
Purpose: format datestamps via strftime
Input:

  • string: input date string
  • format: strftime format for output
  • default_date: default date if $string is empty

string smarty_modifier_date_format (string $string, [string $format = SMARTY_RESOURCE_DATE_FORMAT], [string $default_date = ''], [string $formatter = 'auto'])
  • string $string: input date string
  • string $format: strftime format for output
  • string $default_date: default date if $string is empty
  • string $formatter: either 'strftime' or 'auto'

Documentation generated on Sat, 24 Sep 2011 20:23:13 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsInternal/0000755000175000017500000000000012141655571022553 5ustar mikemikesmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsInternal/Smarty_Internal_Get_Include_Path.html0000644000175000017500000000676611637420324032004 0ustar mikemike Docs For Class Smarty_Internal_Get_Include_Path

Class Smarty_Internal_Get_Include_Path

Description

Smarty Internal Read Include Path Class

Located in /libs/sysplugins/smarty_internal_get_include_path.php (line 16)


	
			
Method Summary
static string|boolean getIncludePath (string $filepath)
Methods
static method getIncludePath (line 24)

Return full file path from PHP include_path

  • return: full filepath or false
  • access: public
static string|boolean getIncludePath (string $filepath)
  • string $filepath: filepath

Documentation generated on Sat, 24 Sep 2011 20:23:55 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsInternal/_libs---sysplugins---smarty_internal_write_file.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsInternal/_libs---sysplugins---smarty_internal_wr0000644000175000017500000000377411637420324032217 0ustar mikemike Docs for page smarty_internal_write_file.php

/libs/sysplugins/smarty_internal_write_file.php

Description

Smarty write file plugin

  • author: Monte Ohrt
Classes
Class Description
Smarty_Internal_Write_File Smarty Internal Write File Class

Documentation generated on Sat, 24 Sep 2011 20:24:06 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsInternal/_libs---sysplugins---smarty_internal_filter_handler.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsInternal/_libs---sysplugins---smarty_internal_fi0000644000175000017500000000412011637420324032147 0ustar mikemike Docs for page smarty_internal_filter_handler.php

/libs/sysplugins/smarty_internal_filter_handler.php

Description

Smarty Internal Plugin Filter Handler

Smarty filter handler class

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Filter_Handler Class for filter processing

Documentation generated on Sat, 24 Sep 2011 20:23:54 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsInternal/_libs---sysplugins---smarty_internal_get_include_path.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsInternal/_libs---sysplugins---smarty_internal_ge0000644000175000017500000000404211637420324032147 0ustar mikemike Docs for page smarty_internal_get_include_path.php

/libs/sysplugins/smarty_internal_get_include_path.php

Description

Smarty read include path plugin

  • author: Monte Ohrt
Classes
Class Description
Smarty_Internal_Get_Include_Path Smarty Internal Read Include Path Class

Documentation generated on Sat, 24 Sep 2011 20:23:55 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsInternal/Smarty_Internal_Write_File.html0000644000175000017500000001025211637420324030660 0ustar mikemike Docs For Class Smarty_Internal_Write_File

Class Smarty_Internal_Write_File

Description

Smarty Internal Write File Class

Located in /libs/sysplugins/smarty_internal_write_file.php (line 16)


	
			
Method Summary
static boolean writeFile (string $_filepath, string $_contents, Smarty $smarty)
Methods
static method writeFile (line 26)

Writes file in a safe way to disk

  • return: true
  • access: public
static boolean writeFile (string $_filepath, string $_contents, Smarty $smarty)
  • string $_filepath: complete filepath
  • string $_contents: file content
  • Smarty $smarty: smarty instance

Documentation generated on Sat, 24 Sep 2011 20:24:06 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsInternal/Smarty_Internal_Filter_Handler.html0000644000175000017500000001110011637420324031502 0ustar mikemike Docs For Class Smarty_Internal_Filter_Handler

Class Smarty_Internal_Filter_Handler

Description

Class for filter processing

Located in /libs/sysplugins/smarty_internal_filter_handler.php (line 18)


	
			
Method Summary
static string runFilter (string $type, string $content, Smarty_Internal_Template $template)
Methods
static method runFilter (line 33)

Run filters over content

The filters will be lazy loaded if required class name format: Smarty_FilterType_FilterName plugin filename format: filtertype.filtername.php Smarty2 filter plugins could be used

  • return: the filtered content
  • access: public
static string runFilter (string $type, string $content, Smarty_Internal_Template $template)
  • string $type: the type of filter ('pre','post','output') which shall run
  • string $content: the content which shall be processed by the filters
  • Smarty_Internal_Template $template: template object

Documentation generated on Sat, 24 Sep 2011 20:23:54 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000020100000000000011556 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsInternal/_libs---sysplugins---smarty_internal_function_call_handler.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsInternal/_libs---sysplugins---smarty_internal_fu0000644000175000017500000000412711637420324032172 0ustar mikemike Docs for page smarty_internal_function_call_handler.php

/libs/sysplugins/smarty_internal_function_call_handler.php

Description

Smarty Internal Plugin Function Call Handler

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Function_Call_Handler This class does call function defined with the {function} tag

Documentation generated on Sat, 24 Sep 2011 20:23:55 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsInternal/Smarty_Internal_Function_Call_Handler.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsInternal/Smarty_Internal_Function_Call_Handler.h0000644000175000017500000001175311660225534032300 0ustar mikemike Docs For Class Smarty_Internal_Function_Call_Handler

Class Smarty_Internal_Function_Call_Handler

Description

This class does call function defined with the {function} tag

Located in /libs/sysplugins/smarty_internal_function_call_handler.php (line 16)


	
			
Method Summary
static void call (string $_name, Smarty_Internal_Template $_template, array $_params, string $_hash, bool $_nocache)
Methods
static method call (line 28)

This function handles calls to template functions defined by {function} It does create a PHP function at the first call

  • access: public
static void call (string $_name, Smarty_Internal_Template $_template, array $_params, string $_hash, bool $_nocache)
  • string $_name: template function name
  • Smarty_Internal_Template $_template: template object
  • array $_params: Smarty variables passed as call parameter
  • string $_hash: nocache hash value
  • bool $_nocache: nocache flag

Documentation generated on Sat, 24 Sep 2011 20:23:55 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFilter/0000755000175000017500000000000012141655571022224 5ustar mikemike././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFilter/_libs---plugins---outputfilter.trimwhitespace.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFilter/_libs---plugins---outputfilter.trimwhites0000644000175000017500000000563111637420324032144 0ustar mikemike Docs for page outputfilter.trimwhitespace.php

/libs/plugins/outputfilter.trimwhitespace.php

Description

Smarty plugin

Functions
smarty_outputfilter_trimwhitespace (line 19)

Smarty trimwhitespace outputfilter plugin

Trim unnecessary whitespace from HTML markup.

  • return: filtered output
  • author: Rodney Rehm
string smarty_outputfilter_trimwhitespace (string $source, Smarty_Internal_Template $smarty)

Documentation generated on Sat, 24 Sep 2011 20:23:15 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFilter/_libs---plugins---variablefilter.htmlspecialchars.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFilter/_libs---plugins---variablefilter.htmlspec0000644000175000017500000000545111637420324032011 0ustar mikemike Docs for page variablefilter.htmlspecialchars.php

/libs/plugins/variablefilter.htmlspecialchars.php

Description

Smarty plugin

Functions
smarty_variablefilter_htmlspecialchars (line 16)

Smarty htmlspecialchars variablefilter plugin

  • return: filtered output
string smarty_variablefilter_htmlspecialchars (string $source, Smarty_Internal_Template $smarty)

Documentation generated on Sat, 24 Sep 2011 20:24:10 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/0000755000175000017500000000000012141655571024230 5ustar mikemike././@LongLink0000000000000000000000000000020200000000000011557 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompiler.count_characters.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompi0000644000175000017500000000601011637420324032022 0ustar mikemike Docs for page modifiercompiler.count_characters.php

/libs/plugins/modifiercompiler.count_characters.php

Description

Smarty plugin

Functions
smarty_modifiercompiler_count_characters (line 21)

Smarty count_characters modifier plugin

Type: modifier
Name: count_characteres
Purpose: count the number of characters in a text

string smarty_modifiercompiler_count_characters (array $params,  $compiler)
  • array $params: parameters
  • $compiler

Documentation generated on Sat, 24 Sep 2011 20:23:14 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompiler.strip.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompi0000644000175000017500000000607211637420324032032 0ustar mikemike Docs for page modifiercompiler.strip.php

/libs/plugins/modifiercompiler.strip.php

Description

Smarty plugin

Functions
smarty_modifiercompiler_strip (line 25)

Smarty strip modifier plugin

Type: modifier
Name: strip
Purpose: Replace all repeated spaces, newlines, tabs with a single space or supplied replacement string.
Example: {$var|strip} {$var|strip:"&nbsp;"}
Date: September 25th, 2002

string smarty_modifiercompiler_strip (array $params,  $compiler)
  • array $params: parameters
  • $compiler

Documentation generated on Sat, 24 Sep 2011 20:23:15 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompiler.noprint.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompi0000644000175000017500000000527211637420324032033 0ustar mikemike Docs for page modifiercompiler.noprint.php

/libs/plugins/modifiercompiler.noprint.php

Description

Smarty plugin

Functions
smarty_modifiercompiler_noprint (line 20)

Smarty noprint modifier plugin

Type: modifier
Name: noprint
Purpose: return an empty string

  • return: with compiled code
  • author: Uwe Tews
string smarty_modifiercompiler_noprint (array $params,  $compiler)
  • array $params: parameters
  • $compiler

Documentation generated on Sat, 24 Sep 2011 20:23:15 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompiler.count_words.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompi0000644000175000017500000000571211637420324032032 0ustar mikemike Docs for page modifiercompiler.count_words.php

/libs/plugins/modifiercompiler.count_words.php

Description

Smarty plugin

Functions
smarty_modifiercompiler_count_words (line 21)

Smarty count_words modifier plugin

Type: modifier
Name: count_words
Purpose: count the number of words in a text

string smarty_modifiercompiler_count_words (array $params,  $compiler)
  • array $params: parameters
  • $compiler

Documentation generated on Sat, 24 Sep 2011 20:23:15 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompiler.unescape.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompi0000644000175000017500000000530611637420324032031 0ustar mikemike Docs for page modifiercompiler.unescape.php

/libs/plugins/modifiercompiler.unescape.php

Description

Smarty plugin

Functions
smarty_modifiercompiler_unescape (line 20)

Smarty unescape modifier plugin

Type: modifier
Name: unescape
Purpose: unescape html entities

  • return: with compiled code
  • author: Rodney Rehm
string smarty_modifiercompiler_unescape (array $params,  $compiler)
  • array $params: parameters
  • $compiler

Documentation generated on Sat, 24 Sep 2011 20:23:15 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000020100000000000011556 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompiler.count_sentences.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompi0000644000175000017500000000600111637420324032022 0ustar mikemike Docs for page modifiercompiler.count_sentences.php

/libs/plugins/modifiercompiler.count_sentences.php

Description

Smarty plugin

Functions
smarty_modifiercompiler_count_sentences (line 22)

Smarty count_sentences modifier plugin

Type: modifier
Name: count_sentences Purpose: count the number of sentences in a text

string smarty_modifiercompiler_count_sentences (array $params,  $compiler)
  • array $params: parameters
  • $compiler

Documentation generated on Sat, 24 Sep 2011 20:23:14 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompiler.default.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompi0000644000175000017500000000564711637420324032041 0ustar mikemike Docs for page modifiercompiler.default.php

/libs/plugins/modifiercompiler.default.php

Description

Smarty plugin

Functions
smarty_modifiercompiler_default (line 21)

Smarty default modifier plugin

Type: modifier
Name: default
Purpose: designate default value for empty variables

string smarty_modifiercompiler_default (array $params,  $compiler)
  • array $params: parameters
  • $compiler

Documentation generated on Sat, 24 Sep 2011 20:23:15 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompiler.wordwrap.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompi0000644000175000017500000000565611637420324032041 0ustar mikemike Docs for page modifiercompiler.wordwrap.php

/libs/plugins/modifiercompiler.wordwrap.php

Description

Smarty plugin

Functions
smarty_modifiercompiler_wordwrap (line 21)

Smarty wordwrap modifier plugin

Type: modifier
Name: wordwrap
Purpose: wrap a string of text at a given length

string smarty_modifiercompiler_wordwrap (array $params,  $compiler)
  • array $params: parameters
  • $compiler

Documentation generated on Sat, 24 Sep 2011 20:23:15 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompiler.upper.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompi0000644000175000017500000000560011637420324032026 0ustar mikemike Docs for page modifiercompiler.upper.php

/libs/plugins/modifiercompiler.upper.php

Description

Smarty plugin

Functions
smarty_modifiercompiler_upper (line 21)

Smarty upper modifier plugin

Type: modifier
Name: lower
Purpose: convert string to uppercase

string smarty_modifiercompiler_upper (array $params,  $compiler)
  • array $params: parameters
  • $compiler

Documentation generated on Sat, 24 Sep 2011 20:23:15 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000020200000000000011557 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompiler.count_paragraphs.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompi0000644000175000017500000000602011637420324032023 0ustar mikemike Docs for page modifiercompiler.count_paragraphs.php

/libs/plugins/modifiercompiler.count_paragraphs.php

Description

Smarty plugin

Functions
smarty_modifiercompiler_count_paragraphs (line 22)

Smarty count_paragraphs modifier plugin

Type: modifier
Name: count_paragraphs
Purpose: count the number of paragraphs in a text

string smarty_modifiercompiler_count_paragraphs (array $params,  $compiler)
  • array $params: parameters
  • $compiler

Documentation generated on Sat, 24 Sep 2011 20:23:14 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompiler.strip_tags.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompi0000644000175000017500000000566611637420324032042 0ustar mikemike Docs for page modifiercompiler.strip_tags.php

/libs/plugins/modifiercompiler.strip_tags.php

Description

Smarty plugin

Functions
smarty_modifiercompiler_strip_tags (line 21)

Smarty strip_tags modifier plugin

Type: modifier
Name: strip_tags
Purpose: strip html tags from text

string smarty_modifiercompiler_strip_tags (array $params,  $compiler)
  • array $params: parameters
  • $compiler

Documentation generated on Sat, 24 Sep 2011 20:23:15 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompiler.escape.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompi0000644000175000017500000000561511637420324032034 0ustar mikemike Docs for page modifiercompiler.escape.php

/libs/plugins/modifiercompiler.escape.php

Description

Smarty plugin

Functions
smarty_modifiercompiler_escape (line 26)

Smarty escape modifier plugin

Type: modifier
Name: escape
Purpose: escape string for output

string smarty_modifiercompiler_escape (array $params,  $compiler)
  • array $params: parameters
  • $compiler

Documentation generated on Sat, 24 Sep 2011 20:23:15 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompiler.indent.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompi0000644000175000017500000000560411637420324032032 0ustar mikemike Docs for page modifiercompiler.indent.php

/libs/plugins/modifiercompiler.indent.php

Description

Smarty plugin

Functions
smarty_modifiercompiler_indent (line 21)

Smarty indent modifier plugin

Type: modifier
Name: indent
Purpose: indent lines of text

string smarty_modifiercompiler_indent (array $params,  $compiler)
  • array $params: parameters
  • $compiler

Documentation generated on Sat, 24 Sep 2011 20:23:15 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompiler.cat.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompi0000644000175000017500000000574511637420324032040 0ustar mikemike Docs for page modifiercompiler.cat.php

/libs/plugins/modifiercompiler.cat.php

Description

Smarty plugin

Functions
smarty_modifiercompiler_cat (line 25)

Smarty cat modifier plugin

Type: modifier
Name: cat
Date: Feb 24, 2003
Purpose: catenate a value to a variable
Input: string to catenate
Example: {$var|cat:"foo"}

string smarty_modifiercompiler_cat (array $params,  $compiler)
  • array $params: parameters
  • $compiler

Documentation generated on Sat, 24 Sep 2011 20:23:14 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompiler.from_charset.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompi0000644000175000017500000000541511637420324032032 0ustar mikemike Docs for page modifiercompiler.from_charset.php

/libs/plugins/modifiercompiler.from_charset.php

Description

Smarty plugin

Functions
smarty_modifiercompiler_from_charset (line 20)

Smarty from_charset modifier plugin

Type: modifier
Name: from_charset
Purpose: convert character encoding from $charset to internal encoding

  • return: with compiled code
  • author: Rodney Rehm
string smarty_modifiercompiler_from_charset (array $params,  $compiler)
  • array $params: parameters
  • $compiler

Documentation generated on Sat, 24 Sep 2011 20:23:15 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompiler.to_charset.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompi0000644000175000017500000000537411637420324032036 0ustar mikemike Docs for page modifiercompiler.to_charset.php

/libs/plugins/modifiercompiler.to_charset.php

Description

Smarty plugin

Functions
smarty_modifiercompiler_to_charset (line 20)

Smarty to_charset modifier plugin

Type: modifier
Name: to_charset
Purpose: convert character encoding from internal encoding to $charset

  • return: with compiled code
  • author: Rodney Rehm
string smarty_modifiercompiler_to_charset (array $params,  $compiler)
  • array $params: parameters
  • $compiler

Documentation generated on Sat, 24 Sep 2011 20:23:15 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000017700000000000011572 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompiler.string_format.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompi0000644000175000017500000000573011637420324032032 0ustar mikemike Docs for page modifiercompiler.string_format.php

/libs/plugins/modifiercompiler.string_format.php

Description

Smarty plugin

Functions
smarty_modifiercompiler_string_format (line 21)

Smarty string_format modifier plugin

Type: modifier
Name: string_format
Purpose: format strings via sprintf

string smarty_modifiercompiler_string_format (array $params,  $compiler)
  • array $params: parameters
  • $compiler

Documentation generated on Sat, 24 Sep 2011 20:23:15 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompiler.lower.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsModifierCompiler/_libs---plugins---modifiercompi0000644000175000017500000000600511637420324032026 0ustar mikemike Docs for page modifiercompiler.lower.php

/libs/plugins/modifiercompiler.lower.php

Description

Smarty plugin

Functions
smarty_modifiercompiler_lower (line 22)

Smarty lower modifier plugin

Type: modifier
Name: lower
Purpose: convert string to lowercase

string smarty_modifiercompiler_lower (array $params,  $compiler)
  • array $params: parameters
  • $compiler

Documentation generated on Sat, 24 Sep 2011 20:23:15 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/SmartyCompilerException.html0000644000175000017500000000257011637420324025153 0ustar mikemike Docs For Class SmartyCompilerException

Class SmartyCompilerException

Description

Smarty compiler exception class

Located in /libs/Smarty.class.php (line 1403)

Exception
   |
   --SmartyException
      |
      --SmartyCompilerException

Documentation generated on Sat, 24 Sep 2011 20:23:24 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Cacher/0000755000175000017500000000000012141655571020622 5ustar mikemike././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Cacher/_libs---sysplugins---smarty_cacheresource_custom.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Cacher/_libs---sysplugins---smarty_cacheresource_custom0000644000175000017500000000361711637420324032143 0ustar mikemike Docs for page smarty_cacheresource_custom.php

/libs/sysplugins/smarty_cacheresource_custom.php

Description

Smarty Internal Plugin

Classes
Class Description
Smarty_CacheResource_Custom Cache Handler API

Documentation generated on Sat, 24 Sep 2011 20:23:33 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Cacher/Smarty_CacheResource_KeyValueStore.html0000644000175000017500000016326111637420324030410 0ustar mikemike Docs For Class Smarty_CacheResource_KeyValueStore

Class Smarty_CacheResource_KeyValueStore

Description

Smarty Cache Handler Base for Key/Value Storage Implementations

This class implements the functionality required to use simple key/value stores for hierarchical cache groups. key/value stores like memcache or APC do not support wildcards in keys, therefore a cache group cannot be cleared like "a|*" - which is no problem to filesystem and RDBMS implementations.

This implementation is based on the concept of invalidation. While one specific cache can be identified and cleared, any range of caches cannot be identified. For this reason each level of the cache group hierarchy can have its own value in the store. These values are nothing but microtimes, telling us when a particular cache group was cleared for the last time. These keys are evaluated for every cache read to determine if the cache has been invalidated since it was created and should hence be treated as inexistent.

Although deep hierarchies are possible, they are not recommended. Try to keep your cache groups as shallow as possible. Anything up 3-5 parents should be ok. So »a|b|c« is a good depth where »a|b|c|d|e|f|g|h|i|j|k« isn't. Try to join correlating cache groups: if your cache groups look somewhat like »a|b|$page|$items|$whatever« consider using »a|b|c|$page-$items-$whatever« instead.

  • author: Rodney Rehm
  • abstract:

Located in /libs/sysplugins/smarty_cacheresource_keyvaluestore.php (line 34)

Smarty_CacheResource
   |
   --Smarty_CacheResource_KeyValueStore
Direct descendents
Class Description
Smarty_CacheResource_Apc APC CacheResource
Smarty_CacheResource_Memcache Memcache CacheResource
Variable Summary
array $contents
array $timestamps
Method Summary
void acquireLock (Smarty $smarty, Smarty_Template_Cached $cached)
void addMetaTimestamp (string &$content)
integer clear (Smarty $smarty, string $resource_name, string $cache_id, string $compile_id, integer $exp_time)
integer clearAll (Smarty $smarty, [integer $exp_time = null])
boolean delete ( $keys)
boolean fetch (string $cid, [string $resource_name = null], [string $cache_id = null], [string $compile_id = null], [ &$content = null], [integer &$timestamp = null], [string $resource_uid = null], string $content)
float getLatestInvalidationTimestamp (string $cid, [string $resource_name = null], [string $cache_id = null], [string $compile_id = null], [string $resource_uid = null])
float getMetaTimestamp (string &$content)
string getTemplateUid (Smarty $smarty, string $resource_name, string $cache_id, string $compile_id)
booelan hasLock (Smarty $smarty, Smarty_Template_Cached $cached)
void invalidate ([string $cid = null], [string $resource_name = null], [string $cache_id = null], [string $compile_id = null], [string $resource_uid = null])
array listInvalidationKeys (string $cid, [string $resource_name = null], [string $cache_id = null], [string $compile_id = null], [string $resource_uid = null])
booelan process (Smarty_Internal_Template $_template, [Smarty_Template_Cached $cached = null])
boolean purge ()
array read ( $keys)
void releaseLock (Smarty $smarty, Smarty_Template_Cached $cached)
string sanitize (string $string)
boolean write ( $keys, [int $expire = null])
boolean writeCachedContent (Smarty_Internal_Template $_template, string $content)
Variables
array $contents = array() (line 40)

cache for contents

  • access: protected
array $timestamps = array() (line 45)

cache for timestamps

  • access: protected

Inherited Variables

Inherited from Smarty_CacheResource

Smarty_CacheResource::$resources
Smarty_CacheResource::$sysplugins
Methods
acquireLock (line 397)

Lock cache for this template

  • access: public
void acquireLock (Smarty $smarty, Smarty_Template_Cached $cached)

Redefinition of:
Smarty_CacheResource::acquireLock()
addMetaTimestamp (line 237)

Add current microtime to the beginning of $cache_content

  • access: protected
void addMetaTimestamp (string &$content)
  • string &$content: the content to be cached
clear (line 154)

Empty cache for a specific template

integer clear (Smarty $smarty, string $resource_name, string $cache_id, string $compile_id, integer $exp_time)
  • Smarty $smarty: Smarty object
  • string $resource_name: template name
  • string $cache_id: cache id
  • string $compile_id: compile id
  • integer $exp_time: expiration time [being ignored]

Redefinition of:
Smarty_CacheResource::clear()
Empty cache for a specific template
clearAll (line 131)

Empty cache

integer clearAll (Smarty $smarty, [integer $exp_time = null])
  • Smarty $smarty: Smarty object
  • integer $exp_time: expiration time [being ignored]

Redefinition of:
Smarty_CacheResource::clearAll()
Empty cache
delete (line 440)

Remove values from cache

boolean delete ( $keys)
  • array $keys: list of keys to delete

Redefined in descendants as:
fetch (line 213)

Fetch and prepare a cache object.

  • return: success
  • access: protected
boolean fetch (string $cid, [string $resource_name = null], [string $cache_id = null], [string $compile_id = null], [ &$content = null], [integer &$timestamp = null], [string $resource_uid = null], string $content)
  • string $cid: CacheID to fetch
  • string $resource_name: template name
  • string $cache_id: cache id
  • string $compile_id: compile id
  • string $content: cached content
  • integer &$timestamp: cached timestamp (epoch)
  • string $resource_uid: resource's uid
  • &$content
getLatestInvalidationTimestamp (line 305)

Determine the latest timestamp known to the invalidation chain

  • return: the microtime the CacheID was invalidated
  • access: protected
float getLatestInvalidationTimestamp (string $cid, [string $resource_name = null], [string $cache_id = null], [string $compile_id = null], [string $resource_uid = null])
  • string $cid: CacheID to determine latest invalidation timestamp of
  • string $resource_name: template name
  • string $cache_id: cache id
  • string $compile_id: compile id
  • string $resource_uid: source's filepath
getMetaTimestamp (line 250)

Extract the timestamp the $content was cached

  • return: the microtime the content was cached
  • access: protected
float getMetaTimestamp (string &$content)
  • string &$content: the cached content
getTemplateUid (line 171)

Get template's unique ID

  • return: filepath of cache file
  • access: protected
string getTemplateUid (Smarty $smarty, string $resource_name, string $cache_id, string $compile_id)
  • Smarty $smarty: Smarty object
  • string $resource_name: template name
  • string $cache_id: cache id
  • string $compile_id: compile id
hasLock (line 384)

Check is cache is locked for this template

  • return: true or false if cache is locked
  • access: public
booelan hasLock (Smarty $smarty, Smarty_Template_Cached $cached)

Redefinition of:
Smarty_CacheResource::hasLock()
invalidate (line 268)

Invalidate CacheID

void invalidate ([string $cid = null], [string $resource_name = null], [string $cache_id = null], [string $compile_id = null], [string $resource_uid = null])
  • string $cid: CacheID
  • string $resource_name: template name
  • string $cache_id: cache id
  • string $compile_id: compile id
  • string $resource_uid: source's uid
listInvalidationKeys (line 338)

Translate a CacheID into the list of applicable InvalidationKeys.

Splits "some|chain|into|an|array" into array( '#clearAll#', 'some', 'some|chain', 'some|chain|into', ... )

  • return: list of InvalidationKeys
  • access: protected
  • uses: $invalidationKeyPrefix - to prepend to each InvalidationKey
array listInvalidationKeys (string $cid, [string $resource_name = null], [string $cache_id = null], [string $compile_id = null], [string $resource_uid = null])
  • string $cid: CacheID to translate
  • string $resource_name: template name
  • string $cache_id: cache id
  • string $compile_id: compile id
  • string $resource_uid: source's filepath
populate (line 54)

populate Cached Object with meta data from Resource

  • access: public
void populate (Smarty_Template_Cached $cached, Smarty_Internal_Template $_template)

Redefinition of:
Smarty_CacheResource::populate()
populate Cached Object with meta data from Resource
populateTimestamp (line 70)

populate Cached Object with timestamp and exists from Resource

  • access: public
void populateTimestamp (Smarty_Template_Cached $cached)

Redefinition of:
Smarty_CacheResource::populateTimestamp()
populate Cached Object with timestamp and exists from Resource
process (line 87)

Read the cached template and process the header

  • return: true or false if the cached content does not exist
  • access: public
booelan process (Smarty_Internal_Template $_template, [Smarty_Template_Cached $cached = null])

Redefinition of:
Smarty_CacheResource::process()
Read the cached template and process header
purge (line 447)

Remove *all* values from cache

boolean purge ()

Redefined in descendants as:
read (line 423)

Read values for a set of keys from cache

  • return: list of values with the given keys used as indexes
  • abstract:
  • access: protected
array read ( $keys)
  • array $keys: list of keys to fetch

Redefined in descendants as:
releaseLock (line 410)

Unlock cache for this template

  • access: public
void releaseLock (Smarty $smarty, Smarty_Template_Cached $cached)

Redefinition of:
Smarty_CacheResource::releaseLock()
sanitize (line 191)

Sanitize CacheID components

  • return: sanitized CacheID component
  • access: protected
string sanitize (string $string)
  • string $string: CacheID component to sanitize
write (line 432)

Save values for a set of keys to cache

  • return: true on success, false on failure
  • abstract:
  • access: protected
boolean write ( $keys, [int $expire = null])
  • array $keys: list of values to save
  • int $expire: expiration time

Redefined in descendants as:
writeCachedContent (line 114)

Write the rendered template output to cache

  • return: success
  • access: public
boolean writeCachedContent (Smarty_Internal_Template $_template, string $content)

Redefinition of:
Smarty_CacheResource::writeCachedContent()
Write the rendered template output to cache

Inherited Methods

Inherited From Smarty_CacheResource

Smarty_CacheResource::acquireLock()
Smarty_CacheResource::clear()
Smarty_CacheResource::clearAll()
Smarty_CacheResource::getCachedContent()
Smarty_CacheResource::hasLock()
Smarty_CacheResource::invalidLoadedCache()
Smarty_CacheResource::load()
Smarty_CacheResource::locked()
Smarty_CacheResource::populate()
Smarty_CacheResource::populateTimestamp()
Smarty_CacheResource::process()
Smarty_CacheResource::releaseLock()
Smarty_CacheResource::writeCachedContent()

Documentation generated on Sat, 24 Sep 2011 20:23:34 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Cacher/Smarty_Internal_CacheResource_File.html0000644000175000017500000006514611637420324030364 0ustar mikemike Docs For Class Smarty_Internal_CacheResource_File

Class Smarty_Internal_CacheResource_File

Description

This class does contain all necessary methods for the HTML cache on file system

Implements the file system as resource for the HTML cache Version ussing nocache inserts.

  • author: Rodney Rehm

Located in /libs/sysplugins/smarty_internal_cacheresource_file.php (line 19)

Smarty_CacheResource
   |
   --Smarty_Internal_CacheResource_File
Method Summary
void acquireLock (Smarty $smarty, Smarty_Template_Cached $cached)
integer clear (Smarty $smarty, string $resource_name, string $cache_id, string $compile_id, integer $exp_time, Smarty $_template)
integer clearAll (Smarty $smarty, [integer $exp_time = null], Smarty_Internal_Template $_template)
booelan hasLock (Smarty $smarty, Smarty_Template_Cached $cached)
booelan process (Smarty_Internal_Template $_template, [Smarty_Template_Cached $cached = null])
void releaseLock (Smarty $smarty, Smarty_Template_Cached $cached)
boolean writeCachedContent (Smarty_Internal_Template $_template, string $content)
Methods
acquireLock (line 236)

Lock cache for this template

  • access: public
void acquireLock (Smarty $smarty, Smarty_Template_Cached $cached)

Redefinition of:
Smarty_CacheResource::acquireLock()
clear (line 132)

Empty cache for a specific template

  • return: number of cache files deleted
  • access: public
integer clear (Smarty $smarty, string $resource_name, string $cache_id, string $compile_id, integer $exp_time, Smarty $_template)
  • Smarty $_template: template object
  • string $resource_name: template name
  • string $cache_id: cache id
  • string $compile_id: compile id
  • integer $exp_time: expiration time (number of seconds, not timestamp)
  • Smarty $smarty

Redefinition of:
Smarty_CacheResource::clear()
Empty cache for a specific template
clearAll (line 117)

Empty cache

  • return: number of cache files deleted
  • access: public
integer clearAll (Smarty $smarty, [integer $exp_time = null], Smarty_Internal_Template $_template)

Redefinition of:
Smarty_CacheResource::clearAll()
Empty cache
hasLock (line 219)

Check is cache is locked for this template

  • return: true or false if cache is locked
  • access: public
booelan hasLock (Smarty $smarty, Smarty_Template_Cached $cached)

Redefinition of:
Smarty_CacheResource::hasLock()
populate (line 28)

populate Cached Object with meta data from Resource

  • access: public
void populate (Smarty_Template_Cached $cached, Smarty_Internal_Template $_template)

Redefinition of:
Smarty_CacheResource::populate()
populate Cached Object with meta data from Resource
populateTimestamp (line 74)

populate Cached Object with timestamp and exists from Resource

  • access: public
void populateTimestamp (Smarty_Template_Cached $cached)

Redefinition of:
Smarty_CacheResource::populateTimestamp()
populate Cached Object with timestamp and exists from Resource
process (line 87)

Read the cached template and process its header

  • return: true or false if the cached content does not exist
  • access: public
booelan process (Smarty_Internal_Template $_template, [Smarty_Template_Cached $cached = null])

Redefinition of:
Smarty_CacheResource::process()
Read the cached template and process header
releaseLock (line 248)

Unlock cache for this template

  • access: public
void releaseLock (Smarty $smarty, Smarty_Template_Cached $cached)

Redefinition of:
Smarty_CacheResource::releaseLock()
writeCachedContent (line 100)

Write the rendered template output to cache

  • return: success
  • access: public
boolean writeCachedContent (Smarty_Internal_Template $_template, string $content)

Redefinition of:
Smarty_CacheResource::writeCachedContent()
Write the rendered template output to cache

Inherited Methods

Inherited From Smarty_CacheResource

Smarty_CacheResource::acquireLock()
Smarty_CacheResource::clear()
Smarty_CacheResource::clearAll()
Smarty_CacheResource::getCachedContent()
Smarty_CacheResource::hasLock()
Smarty_CacheResource::invalidLoadedCache()
Smarty_CacheResource::load()
Smarty_CacheResource::locked()
Smarty_CacheResource::populate()
Smarty_CacheResource::populateTimestamp()
Smarty_CacheResource::process()
Smarty_CacheResource::releaseLock()
Smarty_CacheResource::writeCachedContent()

Documentation generated on Sat, 24 Sep 2011 20:23:36 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Cacher/Smarty_CacheResource.html0000644000175000017500000011140511637420324025557 0ustar mikemike Docs For Class Smarty_CacheResource

Class Smarty_CacheResource

Description

Cache Handler API

  • author: Rodney Rehm
  • abstract:

Located in /libs/sysplugins/smarty_cacheresource.php (line 16)


	
			
Direct descendents
Class Description
Smarty_CacheResource_Custom Cache Handler API
Smarty_CacheResource_KeyValueStore Smarty Cache Handler Base for Key/Value Storage Implementations
Smarty_Internal_CacheResource_File This class does contain all necessary methods for the HTML cache on file system
Variable Summary
static array $resources
static array $sysplugins
Method Summary
static void invalidLoadedCache (Smarty $smarty)
static Smarty_CacheResource load (Smarty $smarty, [string $type = null])
void acquireLock (Smarty $smarty, Smarty_Template_Cached $cached)
integer clear (Smarty $smarty, string $resource_name, string $cache_id, string $compile_id, integer $exp_time)
integer clearAll (Smarty $smarty, [integer $exp_time = null])
void getCachedContent (Smarty_Internal_Template $_template, string $content)
void hasLock (Smarty $smarty, Smarty_Template_Cached $cached)
void locked (Smarty $smarty, Smarty_Template_Cached $cached)
booelan process (Smarty_Internal_Template $_template, [Smarty_Template_Cached $cached = null])
void releaseLock (Smarty $smarty, Smarty_Template_Cached $cached)
boolean writeCachedContent (Smarty_Internal_Template $_template, string $content)
Variables
static array $resources = array() (line 21)

cache for Smarty_CacheResource instances

  • access: protected
static array $sysplugins = array(
'file' => true,
)
(line 27)

resource types provided by the core

  • access: protected
Methods
static method invalidLoadedCache (line 179)

Invalid Loaded Cache Files

  • access: public
static void invalidLoadedCache (Smarty $smarty)
  • Smarty $smarty: Smarty object
static method load (line 146)

Load Cache Resource Handler

  • return: Cache Resource Handler
  • access: public
static Smarty_CacheResource load (Smarty $smarty, [string $type = null])
  • Smarty $smarty: Smarty object
  • string $type: name of the cache resource
acquireLock (line 126)
  • access: public
void acquireLock (Smarty $smarty, Smarty_Template_Cached $cached)

Redefined in descendants as:
clear (line 101)

Empty cache for a specific template

  • return: number of cache files deleted
  • abstract:
  • access: public
integer clear (Smarty $smarty, string $resource_name, string $cache_id, string $compile_id, integer $exp_time)
  • Smarty $smarty: Smarty object
  • string $resource_name: template name
  • string $cache_id: cache id
  • string $compile_id: compile id
  • integer $exp_time: expiration time (number of seconds, not timestamp)

Redefined in descendants as:
clearAll (line 89)

Empty cache

  • return: number of cache files deleted
  • abstract:
  • access: public
integer clearAll (Smarty $smarty, [integer $exp_time = null])
  • Smarty $smarty: Smarty object
  • integer $exp_time: expiration time (number of seconds, not timestamp)

Redefined in descendants as:
getCachedContent (line 72)

Return cached content

  • access: public
void getCachedContent (Smarty_Internal_Template $_template, string $content)
hasLock (line 120)
  • access: public
void hasLock (Smarty $smarty, Smarty_Template_Cached $cached)

Redefined in descendants as:
locked (line 104)
  • access: public
void locked (Smarty $smarty, Smarty_Template_Cached $cached)
populate (line 38)

populate Cached Object with meta data from Resource

  • abstract:
  • access: public
void populate (Smarty_Template_Cached $cached, Smarty_Internal_Template $_template)

Redefined in descendants as:
populateTimestamp (line 46)

populate Cached Object with timestamp and exists from Resource

  • abstract:
  • access: public
void populateTimestamp (Smarty_Template_Cached $cached, Smarty_Template_Cached $source)

Redefined in descendants as:
process (line 55)

Read the cached template and process header

  • return: true or false if the cached content does not exist
  • abstract:
  • access: public
booelan process (Smarty_Internal_Template $_template, [Smarty_Template_Cached $cached = null])

Redefined in descendants as:
releaseLock (line 132)
  • access: public
void releaseLock (Smarty $smarty, Smarty_Template_Cached $cached)

Redefined in descendants as:
writeCachedContent (line 64)

Write the rendered template output to cache

  • return: success
  • abstract:
  • access: public
boolean writeCachedContent (Smarty_Internal_Template $_template, string $content)

Redefined in descendants as:

Documentation generated on Sat, 24 Sep 2011 20:23:31 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Cacher/Smarty_CacheResource_Custom.html0000644000175000017500000010125311637420324027111 0ustar mikemike Docs For Class Smarty_CacheResource_Custom

Class Smarty_CacheResource_Custom

Description

Cache Handler API

  • author: Rodney Rehm
  • abstract:

Located in /libs/sysplugins/smarty_cacheresource_custom.php (line 16)

Smarty_CacheResource
   |
   --Smarty_CacheResource_Custom
Direct descendents
Class Description
Smarty_CacheResource_Mysql MySQL CacheResource
Method Summary
integer clear (Smarty $smarty, string $resource_name, string $cache_id, string $compile_id, integer $exp_time)
integer clearAll (Smarty $smarty, [integer $exp_time = null])
integer delete (string $name, string $cache_id, string $compile_id, integer|null $exp_time)
void fetch (string $id, string $name, string $cache_id, string $compile_id,  &$content,  &$mtime, string $content, integer $mtime)
integer|boolean fetchTimestamp (string $id, string $name, string $cache_id, string $compile_id)
booelan process (Smarty_Internal_Template $_template, [Smarty_Template_Cached $cached = null])
boolean save (string $id, string $name, string $cache_id, string $compile_id, integer|null $exp_time, string $content)
boolean writeCachedContent (Smarty_Internal_Template $_template, string $content)
Methods
clear (line 182)

Empty cache for a specific template

  • return: number of cache files deleted
  • access: public
integer clear (Smarty $smarty, string $resource_name, string $cache_id, string $compile_id, integer $exp_time)
  • Smarty $smarty: Smarty object
  • string $resource_name: template name
  • string $cache_id: cache id
  • string $compile_id: compile id
  • integer $exp_time: expiration time (number of seconds, not timestamp)

Redefinition of:
Smarty_CacheResource::clear()
Empty cache for a specific template
clearAll (line 166)

Empty cache

  • return: number of cache files deleted
  • access: public
integer clearAll (Smarty $smarty, [integer $exp_time = null])
  • Smarty $smarty: Smarty object
  • integer $exp_time: expiration time (number of seconds, not timestamp)

Redefinition of:
Smarty_CacheResource::clearAll()
Empty cache
delete (line 70)

Delete content from cache

  • return: number of deleted caches
  • abstract:
  • access: protected
integer delete (string $name, string $cache_id, string $compile_id, integer|null $exp_time)
  • string $name: template name
  • string $cache_id: cache id
  • string $compile_id: compile id
  • integer|null $exp_time: seconds till expiration time in seconds or null

Redefined in descendants as:
fetch (line 29)

fetch cached content and its modification time from data source

  • abstract:
  • access: protected
void fetch (string $id, string $name, string $cache_id, string $compile_id,  &$content,  &$mtime, string $content, integer $mtime)
  • string $id: unique cache content identifier
  • string $name: template name
  • string $cache_id: cache id
  • string $compile_id: compile id
  • string $content: cached content
  • integer $mtime: cache modification timestamp (epoch)
  • &$content
  • &$mtime

Redefined in descendants as:
fetchTimestamp (line 43)

Fetch cached content's modification timestamp from data source

  • return: timestamp (epoch) the template was modified, or false if not found
  • access: protected
integer|boolean fetchTimestamp (string $id, string $name, string $cache_id, string $compile_id)
  • string $id: unique cache content identifier
  • string $name: template name
  • string $cache_id: cache id
  • string $compile_id: compile id

Redefined in descendants as:
populate (line 79)

populate Cached Object with meta data from Resource

  • access: public
void populate (Smarty_Template_Cached $cached, Smarty_Internal_Template $_template)

Redefinition of:
Smarty_CacheResource::populate()
populate Cached Object with meta data from Resource
populateTimestamp (line 94)

populate Cached Object with timestamp and exists from Resource

  • access: public
void populateTimestamp (Smarty_Template_Cached $cached, Smarty_Template_Cached $source)

Redefinition of:
Smarty_CacheResource::populateTimestamp()
populate Cached Object with timestamp and exists from Resource
process (line 115)

Read the cached template and process the header

  • return: true or false if the cached content does not exist
  • access: public
booelan process (Smarty_Internal_Template $_template, [Smarty_Template_Cached $cached = null])

Redefinition of:
Smarty_CacheResource::process()
Read the cached template and process header
save (line 59)

Save content to cache

  • return: success
  • abstract:
  • access: protected
boolean save (string $id, string $name, string $cache_id, string $compile_id, integer|null $exp_time, string $content)
  • string $id: unique cache content identifier
  • string $name: template name
  • string $cache_id: cache id
  • string $compile_id: compile id
  • integer|null $exp_time: seconds till expiration or null
  • string $content: content to cache

Redefined in descendants as:
writeCachedContent (line 147)

Write the rendered template output to cache

  • return: success
  • access: public
boolean writeCachedContent (Smarty_Internal_Template $_template, string $content)

Redefinition of:
Smarty_CacheResource::writeCachedContent()
Write the rendered template output to cache

Inherited Methods

Inherited From Smarty_CacheResource

Smarty_CacheResource::acquireLock()
Smarty_CacheResource::clear()
Smarty_CacheResource::clearAll()
Smarty_CacheResource::getCachedContent()
Smarty_CacheResource::hasLock()
Smarty_CacheResource::invalidLoadedCache()
Smarty_CacheResource::load()
Smarty_CacheResource::locked()
Smarty_CacheResource::populate()
Smarty_CacheResource::populateTimestamp()
Smarty_CacheResource::process()
Smarty_CacheResource::releaseLock()
Smarty_CacheResource::writeCachedContent()

Documentation generated on Sat, 24 Sep 2011 20:23:33 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Cacher/_libs---sysplugins---smarty_cacheresource_keyvaluestore.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Cacher/_libs---sysplugins---smarty_cacheresource_keyval0000644000175000017500000000373111637420324032121 0ustar mikemike Docs for page smarty_cacheresource_keyvaluestore.php

/libs/sysplugins/smarty_cacheresource_keyvaluestore.php

Description

Smarty Internal Plugin

Classes
Class Description
Smarty_CacheResource_KeyValueStore Smarty Cache Handler Base for Key/Value Storage Implementations

Documentation generated on Sat, 24 Sep 2011 20:23:34 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Cacher/_libs---sysplugins---smarty_internal_cacheresource_file.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Cacher/_libs---sysplugins---smarty_internal_cacheresour0000644000175000017500000000421511637420324032130 0ustar mikemike Docs for page smarty_internal_cacheresource_file.php

/libs/sysplugins/smarty_internal_cacheresource_file.php

Description

Smarty Internal Plugin CacheResource File

  • author: Uwe Tews
  • author: Rodney Rehm
Classes
Class Description
Smarty_Internal_CacheResource_File This class does contain all necessary methods for the HTML cache on file system

Documentation generated on Sat, 24 Sep 2011 20:23:35 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFunction/0000755000175000017500000000000012141655571022564 5ustar mikemike././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFunction/_libs---plugins---function.fetch.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFunction/_libs---plugins---function.fetch.php.ht0000644000175000017500000000634111637420324031654 0ustar mikemike Docs for page function.fetch.php

/libs/plugins/function.fetch.php

Description

Smarty plugin

Functions
smarty_function_fetch (line 23)

Smarty {fetch} plugin

Type: function
Name: fetch
Purpose: fetch file, web or ftp data and display results

string|null smarty_function_fetch (array $params, Smarty_Internal_Template $template)

Documentation generated on Sat, 24 Sep 2011 20:23:11 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFunction/_libs---plugins---function.html_select_date.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFunction/_libs---plugins---function.html_select_0000644000175000017500000001026211637420324032022 0ustar mikemike Docs for page function.html_select_date.php

/libs/plugins/function.html_select_date.php

Description

Smarty plugin

Functions
smarty_function_html_select_date (line 54)

Smarty {html_select_date} plugin

Type: function
Name: html_select_date
Purpose: Prints the dropdowns for date selection.

ChangeLog:

            - 1.0 initial release
            - 1.1 added support for +/- N syntax for begin
              and end year values. (Monte)
            - 1.2 added support for yyyy-mm-dd syntax for
              time value. (Jan Rosier)
            - 1.3 added support for choosing format for
              month values (Gary Loescher)
            - 1.3.1 added support for choosing format for
              day values (Marcus Bointon)
            - 1.3.2 support negative timestamps, force year
              dropdown to include given date unless explicitly set (Monte)
            - 1.3.4 fix behaviour of 0000-00-00 00:00:00 dates to match that
              of 0000-00-00 dates (cybot, boots)
            - 2.0 complete rewrite for performance,
              added attributes month_names, *_id

string smarty_function_html_select_date (array $params, Smarty_Internal_Template $template)

Documentation generated on Sat, 24 Sep 2011 20:23:12 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFunction/_libs---plugins---function.cycle.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFunction/_libs---plugins---function.cycle.php.ht0000644000175000017500000001030111637420324031651 0ustar mikemike Docs for page function.cycle.php

/libs/plugins/function.cycle.php

Description

Smarty plugin

Functions
smarty_function_cycle (line 46)

Smarty {cycle} function plugin

Type: function
Name: cycle
Date: May 3, 2002
Purpose: cycle through given values
Params:

 - name      - name of cycle (optional)
 - values    - comma separated list of values to cycle, or an array of values to cycle
               (this can be left out for subsequent calls)
 - reset     - boolean - resets given var to true
 - print     - boolean - print var or not. default is true
 - advance   - boolean - whether or not to advance the cycle
 - delimiter - the value delimiter, default is ","
 - assign    - boolean, assigns to template var instead of printed.
Examples:
 {cycle values="#eeeeee,#d0d0d0d"}
 {cycle name=row values="one,two,three" reset=true}
 {cycle name=row}

string|null smarty_function_cycle (array $params, Smarty_Internal_Template $template)

Documentation generated on Sat, 24 Sep 2011 20:23:11 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFunction/_libs---plugins---function.counter.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFunction/_libs---plugins---function.counter.php.0000644000175000017500000000614611637420324031711 0ustar mikemike Docs for page function.counter.php

/libs/plugins/function.counter.php

Description

Smarty plugin

Functions
smarty_function_counter (line 22)

Smarty {counter} function plugin

Type: function
Name: counter
Purpose: print out a counter value

string|null smarty_function_counter (array $params, Smarty_Internal_Template $template)

Documentation generated on Sat, 24 Sep 2011 20:23:11 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFunction/_libs---plugins---function.math.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFunction/_libs---plugins---function.math.php.htm0000644000175000017500000000623011637420324031666 0ustar mikemike Docs for page function.math.php

/libs/plugins/function.math.php

Description

Smarty plugin

This plugin is only for Smarty2 BC

Functions
smarty_function_math (line 24)

Smarty {math} function plugin

Type: function
Name: math
Purpose: handle math computations in template

string|null smarty_function_math (array $params, Smarty_Internal_Template $template)

Documentation generated on Sat, 24 Sep 2011 20:23:12 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFunction/_libs---plugins---function.html_select_time.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFunction/_libs---plugins---function.html_select_0000644000175000017500000000702211637420324032022 0ustar mikemike Docs for page function.html_select_time.php

/libs/plugins/function.html_select_time.php

Description

Smarty plugin

Functions
smarty_function_html_select_time (line 34)

Smarty {html_select_time} function plugin

Type: function
Name: html_select_time
Purpose: Prints the dropdowns for time selection

string smarty_function_html_select_time (array $params, Smarty_Internal_Template $template)

Documentation generated on Sat, 24 Sep 2011 20:23:12 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFunction/_libs---plugins---function.html_table.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFunction/_libs---plugins---function.html_table.p0000644000175000017500000001274711637420324031743 0ustar mikemike Docs for page function.html_table.php

/libs/plugins/function.html_table.php

Description

Smarty plugin

Functions
smarty_function_html_table (line 50)

Smarty {html_table} function plugin

Type: function
Name: html_table
Date: Feb 17, 2003
Purpose: make an html table from an array of data
Params:

 - loop       - array to loop through
 - cols       - number of columns, comma separated list of column names
                or array of column names
 - rows       - number of rows
 - table_attr - table attributes
 - th_attr    - table heading attributes (arrays are cycled)
 - tr_attr    - table row attributes (arrays are cycled)
 - td_attr    - table cell attributes (arrays are cycled)
 - trailpad   - value to pad trailing cells with
 - caption    - text for caption element
 - vdir       - vertical direction (default: "down", means top-to-bottom)
 - hdir       - horizontal direction (default: "right", means left-to-right)
 - inner      - inner loop (default "cols": print $loop line by line,
                $loop will be printed column by column otherwise)
Examples:
 {table loop=$data}
 {table loop=$data cols=4 tr_attr='"bgcolor=red"'}
 {table loop=$data cols="first,second,third" tr_attr=$colors}

string smarty_function_html_table (array $params, Smarty_Internal_Template $template)
smarty_function_html_table_cycle (line 166)
void smarty_function_html_table_cycle ( $name,  $var,  $no)
  • $name
  • $var
  • $no

Documentation generated on Sat, 24 Sep 2011 20:23:12 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFunction/_libs---plugins---function.mailto.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFunction/_libs---plugins---function.mailto.php.h0000644000175000017500000001066711637420324031672 0ustar mikemike Docs for page function.mailto.php

/libs/plugins/function.mailto.php

Description

Smarty plugin

Functions
smarty_function_mailto (line 51)

Smarty {mailto} function plugin

Type: function
Name: mailto
Date: May 21, 2002 Purpose: automate mailto address link creation, and optionally encode them.
Params:

 - address    - (required) - e-mail address
 - text       - (optional) - text to display, default is address
 - encode     - (optional) - can be one of:
                             * none : no encoding (default)
                             * javascript : encode with javascript
                             * javascript_charcode : encode with javascript charcode
                             * hex : encode with hexidecimal (no javascript)
 - cc         - (optional) - address(es) to carbon copy
 - bcc        - (optional) - address(es) to blind carbon copy
 - subject    - (optional) - e-mail subject
 - newsgroups - (optional) - newsgroup(s) to post to
 - followupto - (optional) - address(es) to follow up to
 - extra      - (optional) - extra tags for the href link
Examples:
 {mailto address="me@domain.com"}
 {mailto address="me@domain.com" encode="javascript"}
 {mailto address="me@domain.com" encode="hex"}
 {mailto address="me@domain.com" subject="Hello to you!"}
 {mailto address="me@domain.com" cc="you@domain.com,they@domain.com"}
 {mailto address="me@domain.com" extra='class="mailto"'}

string smarty_function_mailto (array $params, Smarty_Internal_Template $template)

Documentation generated on Sat, 24 Sep 2011 20:23:12 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFunction/_libs---plugins---function.html_radios.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFunction/_libs---plugins---function.html_radios.0000644000175000017500000001416611637420324031752 0ustar mikemike Docs for page function.html_radios.php

/libs/plugins/function.html_radios.php

Description

Smarty plugin

Functions
smarty_function_html_radios (line 44)

Smarty {html_radios} function plugin

File: function.html_radios.php
Type: function
Name: html_radios
Date: 24.Feb.2003
Purpose: Prints out a list of radio input types
Params:

 - name       (optional) - string default "radio"
 - values     (required) - array
 - options    (required) - associative array
 - checked    (optional) - array default not set
 - separator  (optional) - ie 
or   - output (optional) - the output next to each radio button - assign (optional) - assign the output as an array to this variable
Examples:
 {html_radios values=$ids output=$names}
 {html_radios values=$ids name='box' separator='
' output=$names} {html_radios values=$ids checked=$checked separator='
' output=$names}

string smarty_function_html_radios (array $params, Smarty_Internal_Template $template)
smarty_function_html_radios_output (line 129)
void smarty_function_html_radios_output ( $name,  $value,  $output,  $selected,  $extra,  $separator,  $labels,  $label_ids)
  • $name
  • $value
  • $output
  • $selected
  • $extra
  • $separator
  • $labels
  • $label_ids

Documentation generated on Sat, 24 Sep 2011 20:23:12 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFunction/_libs---plugins---function.html_image.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFunction/_libs---plugins---function.html_image.p0000644000175000017500000001012211637420324031717 0ustar mikemike Docs for page function.html_image.php

/libs/plugins/function.html_image.php

Description

Smarty plugin

Functions
smarty_function_html_image (line 37)

Smarty {html_image} function plugin

Type: function
Name: html_image
Date: Feb 24, 2003
Purpose: format HTML tags for the image
Examples: {html_image file="/images/masthead.gif"}
Output: <img src="/images/masthead.gif" width=400 height=23>
Params:

 - file        - (required) - file (and path) of image
 - height      - (optional) - image height (default actual height)
 - width       - (optional) - image width (default actual width)
 - basedir     - (optional) - base directory for absolute paths, default is environment variable DOCUMENT_ROOT
 - path_prefix - prefix for path output (optional, default empty)

string smarty_function_html_image (array $params, Smarty_Internal_Template $template)

Documentation generated on Sat, 24 Sep 2011 20:23:12 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFunction/_libs---plugins---function.html_options.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFunction/_libs---plugins---function.html_options0000644000175000017500000001606511637420324032106 0ustar mikemike Docs for page function.html_options.php

/libs/plugins/function.html_options.php

Description

Smarty plugin

Functions
smarty_function_html_options (line 36)

Smarty {html_options} function plugin

Type: function
Name: html_options
Purpose: Prints the list of <option> tags generated from the passed parameters
Params:

 - name       (optional) - string default "select"
 - values     (required) - if no options supplied) - array
 - options    (required) - if no values supplied) - associative array
 - selected   (optional) - string default not set
 - output     (required) - if not options supplied) - array
 - id         (optional) - string default not set
 - class      (optional) - string default not set

string smarty_function_html_options (array $params, Smarty_Internal_Template $template)
smarty_function_html_options_optgroup (line 135)
void smarty_function_html_options_optgroup ( $key,  $values,  $selected,  $id,  $class,  &$idx)
  • $key
  • $values
  • $selected
  • $id
  • $class
  • &$idx
smarty_function_html_options_optoutput (line 112)
void smarty_function_html_options_optoutput ( $key,  $value,  $selected,  $id,  $class,  &$idx)
  • $key
  • $value
  • $selected
  • $id
  • $class
  • &$idx

Documentation generated on Sat, 24 Sep 2011 20:23:12 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFunction/_libs---plugins---function.html_checkboxes.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsFunction/_libs---plugins---function.html_checkbo0000644000175000017500000001355411637420324032011 0ustar mikemike Docs for page function.html_checkboxes.php

/libs/plugins/function.html_checkboxes.php

Description

Smarty plugin

Functions
smarty_function_html_checkboxes (line 44)

Smarty {html_checkboxes} function plugin

File: function.html_checkboxes.php
Type: function
Name: html_checkboxes
Date: 24.Feb.2003
Purpose: Prints out a list of checkbox input types
Examples:

 {html_checkboxes values=$ids output=$names}
 {html_checkboxes values=$ids name='box' separator='
' output=$names} {html_checkboxes values=$ids checked=$checked separator='
' output=$names}
Params:
 - name       (optional) - string default "checkbox"
 - values     (required) - array
 - options    (optional) - associative array
 - checked    (optional) - array default not set
 - separator  (optional) - ie 
or   - output (optional) - the output next to each checkbox - assign (optional) - assign the output as an array to this variable

string smarty_function_html_checkboxes (array $params, object $template)
  • array $params: parameters
  • object $template: template object
smarty_function_html_checkboxes_output (line 129)
void smarty_function_html_checkboxes_output ( $name,  $value,  $output,  $selected,  $extra,  $separator,  $labels)
  • $name
  • $value
  • $output
  • $selected
  • $extra
  • $separator
  • $labels

Documentation generated on Sat, 24 Sep 2011 20:23:12 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/0000755000175000017500000000000012141655571023103 5ustar mikemikesmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/Smarty_Resource_Uncompiled.html0000644000175000017500000003114111637420324031271 0ustar mikemike Docs For Class Smarty_Resource_Uncompiled

Class Smarty_Resource_Uncompiled

Description

Smarty Resource Plugin

Base implementation for resource plugins that don't use the compiler

  • abstract:

Located in /libs/sysplugins/smarty_resource_uncompiled.php (line 18)

Smarty_Resource
   |
   --Smarty_Resource_Uncompiled
Direct descendents
Class Description
Smarty_Internal_Resource_PHP Smarty Internal Plugin Resource PHP
Methods
populateCompiledFilepath (line 35)

populate compiled object with compiled filepath

  • access: public
void populateCompiledFilepath (Smarty_Template_Compiled $compiled, Smarty_Internal_Template $_template)

Redefinition of:
Smarty_Resource::populateCompiledFilepath()
populate Compiled Object with compiled filepath
renderUncompiled (line 27)

Render and output the template (without using the compiler)

  • abstract:
  • throws: SmartyException on failure
  • access: public
void renderUncompiled (Smarty_Template_Source $source, Smarty_Internal_Template $_template)

Redefined in descendants as:

Inherited Methods

Inherited From Smarty_Resource

Smarty_Resource::buildFilepath()
Smarty_Resource::config()
Smarty_Resource::fileExists()
Smarty_Resource::getBasename()
Smarty_Resource::getContent()
Smarty_Resource::load()
Smarty_Resource::populate()
Smarty_Resource::populateCompiledFilepath()
Smarty_Resource::populateTimestamp()
Smarty_Resource::source()

Documentation generated on Sat, 24 Sep 2011 20:24:09 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/Smarty_Template_Source.html0000644000175000017500000005767511637420324030442 0ustar mikemike Docs For Class Smarty_Template_Source

Class Smarty_Template_Source

Description

Smarty Resource Data Object

Meta Data Container for Template Files

  • property: integer $timestamp: Source Timestamp
  • property: boolean $exists: Source Existance
  • property: boolean $template: Extended Template reference
  • property: string $content: Source Content
  • author: Rodney Rehm

Located in /libs/sysplugins/smarty_resource.php (line 487)


	
			
Direct descendents
Class Description
Smarty_Config_Source Smarty Resource Data Object
Method Summary
Smarty_Template_Source __construct (Smarty_Resource $handler, Smarty $smarty, string $resource, string $type, string $name)
mixed __get (string $property_name)
void __set (string $property_name, mixed $value)
Variables
string $compiler_class = null (line 493)

Name of the Class to compile this resource's contents with

  • access: public
array $components = null (line 553)

The Components an extended template is made of

  • access: public
string $filepath = null (line 535)

Source Filepath

  • access: public
Smarty_Resource $handler = null (line 559)

Resource Handler

  • access: public
string $name = null (line 529)

Resource Name

  • access: public
boolean $recompiled = null (line 547)

Source must be recompiled on every occasion

  • access: public
string $resource = null (line 517)

Template Resource (Smarty_Internal_Template::$template_resource)

  • access: public
Smarty $smarty = null (line 565)

Smarty instance

  • access: public
string $template_lexer_class = null (line 499)

Name of the Class to tokenize this resource's contents with

  • access: public
string $template_parser_class = null (line 505)

Name of the Class to parse this resource's contents with

  • access: public
string $type = null (line 523)

Resource Type

  • access: public
string $uid = null (line 511)

Unique Template ID

  • access: public
boolean $uncompiled = null (line 541)

Source is bypassing compiler

  • access: public
Methods
Constructor __construct (line 576)

create Source Object container

  • access: public
Smarty_Template_Source __construct (Smarty_Resource $handler, Smarty $smarty, string $resource, string $type, string $name)
  • Smarty_Resource $handler: Resource Handler this source object communicates with
  • Smarty $smarty: Smarty instance this source object belongs to
  • string $resource: full template_resource
  • string $type: type of resource
  • string $name: resource name

Redefined in descendants as:
getCompiled (line 598)

get a Compiled Object of this source

  • return: compiled object
  • access: public
renderUncompiled (line 626)

render the uncompiled source

  • access: public
void renderUncompiled (Smarty_Internal_Template $_template)
__get (line 662)

magic>> Generic getter.

  • throws: SmartyException if $property_name is not valid
  • access: public
mixed __get (string $property_name)
  • string $property_name: valid: timestamp, exists, content

Redefined in descendants as:
__set (line 638)

magic>> Generic Setter.

  • throws: SmartyException if $property_name is not valid
  • access: public
void __set (string $property_name, mixed $value)
  • string $property_name: valid: timestamp, exists, content, template
  • mixed $value: new value (is not checked)

Redefined in descendants as:

Documentation generated on Sat, 24 Sep 2011 20:24:08 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/Smarty_Internal_Resource_Eval.html0000644000175000017500000003201211637420324031713 0ustar mikemike Docs For Class Smarty_Internal_Resource_Eval

Class Smarty_Internal_Resource_Eval

Description

Smarty Internal Plugin Resource Eval

Implements the strings as resource for Smarty template

Located in /libs/sysplugins/smarty_internal_resource_eval.php (line 21)

Smarty_Resource
   |
   --Smarty_Resource_Recompiled
      |
      --Smarty_Internal_Resource_Eval
Method Summary
void populate (Smarty_Template_Source $source, [Smarty_Internal_Template $_template = null])
Methods
getBasename (line 65)

Determine basename for compiled filename

  • return: resource's basename
  • access: protected
string getBasename (Smarty_Template_Source $source)

Redefinition of:
Smarty_Resource::getBasename()
Determine basename for compiled filename
getContent (line 45)

Load template's source from $resource_name into current template object

  • return: template source
  • access: public
string getContent (Smarty_Template_Source $source)

Redefinition of:
Smarty_Resource::getContent()
Load template's source into current template object
populate (line 30)

populate Source Object with meta data from Resource

  • access: public
void populate (Smarty_Template_Source $source, [Smarty_Internal_Template $_template = null])

Redefinition of:
Smarty_Resource::populate()
populate Source Object with meta data from Resource

Inherited Methods

Inherited From Smarty_Resource_Recompiled

Smarty_Resource_Recompiled::populateCompiledFilepath()

Inherited From Smarty_Resource

Smarty_Resource::buildFilepath()
Smarty_Resource::config()
Smarty_Resource::fileExists()
Smarty_Resource::getBasename()
Smarty_Resource::getContent()
Smarty_Resource::load()
Smarty_Resource::populate()
Smarty_Resource::populateCompiledFilepath()
Smarty_Resource::populateTimestamp()
Smarty_Resource::source()

Documentation generated on Sat, 24 Sep 2011 20:23:56 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/Smarty_Resource_Custom.html0000644000175000017500000004331711637420324030454 0ustar mikemike Docs For Class Smarty_Resource_Custom

Class Smarty_Resource_Custom

Description

Smarty Resource Plugin

Wrapper Implementation for custom resource plugins

  • abstract:

Located in /libs/sysplugins/smarty_resource_custom.php (line 18)

Smarty_Resource
   |
   --Smarty_Resource_Custom
Direct descendents
Class Description
Smarty_Resource_Mysql MySQL Resource
Smarty_Resource_Mysqls MySQL Resource
Method Summary
void fetch (string $name, string &$source, integer &$mtime)
integer|boolean fetchTimestamp (string $name)
void populate (Smarty_Template_Source $source, [Smarty_Internal_Template $_template = null])
Methods
fetch (line 27)

fetch template and its modification time from data source

  • abstract:
  • access: protected
void fetch (string $name, string &$source, integer &$mtime)
  • string $name: template name
  • string &$source: template source
  • integer &$mtime: template modification timestamp (epoch)

Redefined in descendants as:
fetchTimestamp (line 38)

Fetch template's modification timestamp from data source

  • return: timestamp (epoch) the template was modified, or false if not found
  • access: protected
integer|boolean fetchTimestamp (string $name)
  • string $name: template name

Redefined in descendants as:
getBasename (line 89)

Determine basename for compiled filename

  • return: resource's basename
  • access: protected
string getBasename (Smarty_Template_Source $source)

Redefinition of:
Smarty_Resource::getBasename()
Determine basename for compiled filename
getContent (line 73)

Load template's source into current template object

  • return: template source
  • throws: SmartyException if source cannot be loaded
  • access: public
string getContent (Smarty_Template_Source $source)

Redefinition of:
Smarty_Resource::getContent()
Load template's source into current template object
populate (line 49)

populate Source Object with meta data from Resource

  • access: public
void populate (Smarty_Template_Source $source, [Smarty_Internal_Template $_template = null])

Redefinition of:
Smarty_Resource::populate()
populate Source Object with meta data from Resource

Inherited Methods

Inherited From Smarty_Resource

Smarty_Resource::buildFilepath()
Smarty_Resource::config()
Smarty_Resource::fileExists()
Smarty_Resource::getBasename()
Smarty_Resource::getContent()
Smarty_Resource::load()
Smarty_Resource::populate()
Smarty_Resource::populateCompiledFilepath()
Smarty_Resource::populateTimestamp()
Smarty_Resource::source()

Documentation generated on Sat, 24 Sep 2011 20:24:08 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/Smarty_Config_Source.html0000644000175000017500000003323311637420324030054 0ustar mikemike Docs For Class Smarty_Config_Source

Class Smarty_Config_Source

Description

Smarty Resource Data Object

Meta Data Container for Config Files

  • author: Rodney Rehm

Located in /libs/sysplugins/smarty_config_source.php (line 22)

Smarty_Template_Source
   |
   --Smarty_Config_Source
Method Summary
Smarty_Config_Source __construct (Smarty_Resource $handler, Smarty $smarty, string $resource, string $type, string $name)
void __get (string $property_name)
void __set (string $property_name, mixed $value)
Methods
Constructor __construct (line 33)

create Config Object container

  • access: public
Smarty_Config_Source __construct (Smarty_Resource $handler, Smarty $smarty, string $resource, string $type, string $name)
  • Smarty_Resource $handler: Resource Handler this source object communicates with
  • Smarty $smarty: Smarty instance this source object belongs to
  • string $resource: full config_resource
  • string $type: type of resource
  • string $name: resource name

Redefinition of:
Smarty_Template_Source::__construct()
create Source Object container
__get (line 89)

magic>> Generic getter.

  • throws: SmartyException when the given property name is not valid
  • access: public
void __get (string $property_name)
  • string $property_name: valid: content, timestamp, exists

Redefinition of:
Smarty_Template_Source::__get()
magic>> Generic getter.
__set (line 69)

magic>> Generic setter.

  • throws: SmartyException when the given property name is not valid
  • access: public
void __set (string $property_name, mixed $value)
  • string $property_name: valid: content, timestamp, exists
  • mixed $value: newly assigned value (not check for correct type)

Redefinition of:
Smarty_Template_Source::__set()
magic>> Generic Setter.

Inherited Methods

Inherited From Smarty_Template_Source

Smarty_Template_Source::__construct()
Smarty_Template_Source::getCompiled()
Smarty_Template_Source::renderUncompiled()
Smarty_Template_Source::__get()
Smarty_Template_Source::__set()

Documentation generated on Sat, 24 Sep 2011 20:23:35 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/Smarty_Internal_Resource_Extends.html0000644000175000017500000003724211637420324032450 0ustar mikemike Docs For Class Smarty_Internal_Resource_Extends

Class Smarty_Internal_Resource_Extends

Description

Smarty Internal Plugin Resource Extends

Implements the file system as resource for Smarty which {extend}s a chain of template files templates

Located in /libs/sysplugins/smarty_internal_resource_extends.php (line 19)

Smarty_Resource
   |
   --Smarty_Internal_Resource_Extends
Direct descendents
Class Description
Smarty_Resource_Extendsall Extends All Resource
Method Summary
Methods
getBasename (line 141)

Determine basename for compiled filename

  • return: resource's basename
  • access: public
string getBasename (Smarty_Template_Source $source)

Redefinition of:
Smarty_Resource::getBasename()
Determine basename for compiled filename
getContent (line 76)

Load template's source from files into current template object

  • return: template source
  • throws: SmartyException if source cannot be loaded
  • access: public
string getContent (Smarty_Template_Source $source)

Redefinition of:
Smarty_Resource::getContent()
Load template's source into current template object
populate (line 27)

populate Source Object with meta data from Resource

  • access: public
void populate (Smarty_Template_Source $source, [Smarty_Internal_Template $_template = null])

Redefinition of:
Smarty_Resource::populate()
populate Source Object with meta data from Resource

Redefined in descendants as:
populateTimestamp (line 60)

populate Source Object with timestamp and exists from Resource

  • access: public
void populateTimestamp (Smarty_Template_Source $source)

Redefinition of:
Smarty_Resource::populateTimestamp()
populate Source Object with timestamp and exists from Resource

Inherited Methods

Inherited From Smarty_Resource

Smarty_Resource::buildFilepath()
Smarty_Resource::config()
Smarty_Resource::fileExists()
Smarty_Resource::getBasename()
Smarty_Resource::getContent()
Smarty_Resource::load()
Smarty_Resource::populate()
Smarty_Resource::populateCompiledFilepath()
Smarty_Resource::populateTimestamp()
Smarty_Resource::source()

Documentation generated on Sat, 24 Sep 2011 20:23:56 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/Smarty_Internal_Resource_Registered.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/Smarty_Internal_Resource_Registered.h0000644000175000017500000003773611637420324032426 0ustar mikemike Docs For Class Smarty_Internal_Resource_Registered

Class Smarty_Internal_Resource_Registered

Description

Smarty Internal Plugin Resource Registered

Implements the registered resource for Smarty template

  • deprecated:

Located in /libs/sysplugins/smarty_internal_resource_registered.php (line 20)

Smarty_Resource
   |
   --Smarty_Internal_Resource_Registered
Method Summary
Methods
getBasename (line 88)

Determine basename for compiled filename

  • return: resource's basename
  • access: protected
string getBasename (Smarty_Template_Source $source)

Redefinition of:
Smarty_Resource::getBasename()
Determine basename for compiled filename
getContent (line 72)

Load template's source by invoking the registered callback into current template object

  • return: template source
  • throws: SmartyException if source cannot be loaded
  • access: public
string getContent (Smarty_Template_Source $source)

Redefinition of:
Smarty_Resource::getContent()
Load template's source into current template object
getTemplateTimestamp (line 57)

Get timestamp (epoch) the template source was modified

  • return: timestamp (epoch) the template was modified, false if resources has no timestamp
  • access: public
integer|boolean getTemplateTimestamp (Smarty_Template_Source $source)
populate (line 29)

populate Source Object with meta data from Resource

  • access: public
void populate (Smarty_Template_Source $source, [Smarty_Internal_Template $_template = null])

Redefinition of:
Smarty_Resource::populate()
populate Source Object with meta data from Resource
populateTimestamp (line 45)

populate Source Object with timestamp and exists from Resource

  • access: public
void populateTimestamp (Smarty_Template_Source $source)

Redefinition of:
Smarty_Resource::populateTimestamp()
populate Source Object with timestamp and exists from Resource

Inherited Methods

Inherited From Smarty_Resource

Smarty_Resource::buildFilepath()
Smarty_Resource::config()
Smarty_Resource::fileExists()
Smarty_Resource::getBasename()
Smarty_Resource::getContent()
Smarty_Resource::load()
Smarty_Resource::populate()
Smarty_Resource::populateCompiledFilepath()
Smarty_Resource::populateTimestamp()
Smarty_Resource::source()

Documentation generated on Sat, 24 Sep 2011 20:23:57 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/Smarty_Internal_Resource_String.html0000644000175000017500000003114711637420324032302 0ustar mikemike Docs For Class Smarty_Internal_Resource_String

Class Smarty_Internal_Resource_String

Description

Smarty Internal Plugin Resource String

Implements the strings as resource for Smarty template

Located in /libs/sysplugins/smarty_internal_resource_string.php (line 21)

Smarty_Resource
   |
   --Smarty_Internal_Resource_String
Method Summary
void populate (Smarty_Template_Source $source, [Smarty_Internal_Template $_template = null])
Methods
getBasename (line 68)

Determine basename for compiled filename

Always returns an empty string.

  • return: resource's basename
  • access: protected
string getBasename (Smarty_Template_Source $source)

Redefinition of:
Smarty_Resource::getBasename()
Determine basename for compiled filename
getContent (line 46)

Load template's source from $resource_name into current template object

  • return: template source
  • throws: SmartyException if source cannot be loaded
  • access: public
string getContent (Smarty_Template_Source $source)

Redefinition of:
Smarty_Resource::getContent()
Load template's source into current template object
populate (line 30)

populate Source Object with meta data from Resource

  • access: public
void populate (Smarty_Template_Source $source, [Smarty_Internal_Template $_template = null])

Redefinition of:
Smarty_Resource::populate()
populate Source Object with meta data from Resource

Inherited Methods

Inherited From Smarty_Resource

Smarty_Resource::buildFilepath()
Smarty_Resource::config()
Smarty_Resource::fileExists()
Smarty_Resource::getBasename()
Smarty_Resource::getContent()
Smarty_Resource::load()
Smarty_Resource::populate()
Smarty_Resource::populateCompiledFilepath()
Smarty_Resource::populateTimestamp()
Smarty_Resource::source()

Documentation generated on Sat, 24 Sep 2011 20:23:58 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/Smarty_Internal_Resource_Stream.html0000644000175000017500000002672711637420324032277 0ustar mikemike Docs For Class Smarty_Internal_Resource_Stream

Class Smarty_Internal_Resource_Stream

Description

Smarty Internal Plugin Resource Stream

Implements the streams as resource for Smarty template

Located in /libs/sysplugins/smarty_internal_resource_stream.php (line 22)

Smarty_Resource
   |
   --Smarty_Resource_Recompiled
      |
      --Smarty_Internal_Resource_Stream
Method Summary
void populate (Smarty_Template_Source $source, [Smarty_Internal_Template $_template = null])
Methods
getContent (line 47)

Load template's source from stream into current template object

  • return: template source
  • throws: SmartyException if source cannot be loaded
  • access: public
string getContent (Smarty_Template_Source $source)

Redefinition of:
Smarty_Resource::getContent()
Load template's source into current template object
populate (line 31)

populate Source Object with meta data from Resource

  • access: public
void populate (Smarty_Template_Source $source, [Smarty_Internal_Template $_template = null])

Redefinition of:
Smarty_Resource::populate()
populate Source Object with meta data from Resource

Inherited Methods

Inherited From Smarty_Resource_Recompiled

Smarty_Resource_Recompiled::populateCompiledFilepath()

Inherited From Smarty_Resource

Smarty_Resource::buildFilepath()
Smarty_Resource::config()
Smarty_Resource::fileExists()
Smarty_Resource::getBasename()
Smarty_Resource::getContent()
Smarty_Resource::load()
Smarty_Resource::populate()
Smarty_Resource::populateCompiledFilepath()
Smarty_Resource::populateTimestamp()
Smarty_Resource::source()

Documentation generated on Sat, 24 Sep 2011 20:23:58 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/_libs---sysplugins---smarty_resource.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/_libs---sysplugins---smarty_resource.0000644000175000017500000000472111637420324032121 0ustar mikemike Docs for page smarty_resource.php

/libs/sysplugins/smarty_resource.php

Description

Smarty Resource Plugin

  • author: Rodney Rehm
Classes
Class Description
Smarty_Resource Smarty Resource Plugin
Smarty_Template_Source Smarty Resource Data Object
Smarty_Template_Compiled Smarty Resource Data Object

Documentation generated on Sat, 24 Sep 2011 20:24:07 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/Smarty_Template_Compiled.html0000644000175000017500000002412711637420324030720 0ustar mikemike Docs For Class Smarty_Template_Compiled

Class Smarty_Template_Compiled

Description

Smarty Resource Data Object

Meta Data Container for Template Files

  • property: string $content: compiled content
  • author: Rodney Rehm

Located in /libs/sysplugins/smarty_resource.php (line 691)


	
			
Variable Summary
Method Summary
Smarty_Template_Compiled __construct (Smarty_Template_Source $source)
Variables
boolean $exists = false (line 709)

Compiled Existance

  • access: public
string $filepath = null (line 697)

Compiled Filepath

  • access: public
boolean $isCompiled = false (line 721)

Template was compiled

  • access: public
boolean $loaded = false (line 715)

Compiled Content Loaded

  • access: public
Smarty_Template_Source $source = null (line 727)

Source Object

  • access: public
integer $timestamp = null (line 703)

Compiled Timestamp

  • access: public
array $_properties = null (line 735)

Metadata properties

populated by Smarty_Internal_Template::decodeProperties()

  • access: public
Methods
Constructor __construct (line 742)

create Compiled Object container

  • access: public
Smarty_Template_Compiled __construct (Smarty_Template_Source $source)

Documentation generated on Sat, 24 Sep 2011 20:24:08 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/_libs---sysplugins---smarty_internal_resource_extends.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/_libs---sysplugins---smarty_internal_0000644000175000017500000000414611637420324032170 0ustar mikemike Docs for page smarty_internal_resource_extends.php

/libs/sysplugins/smarty_internal_resource_extends.php

Description

Smarty Internal Plugin Resource Extends

  • author: Uwe Tews
  • author: Rodney Rehm
Classes
Class Description
Smarty_Internal_Resource_Extends Smarty Internal Plugin Resource Extends

Documentation generated on Sat, 24 Sep 2011 20:23:56 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000020100000000000011556 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/_libs---sysplugins---smarty_internal_resource_registered.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/_libs---sysplugins---smarty_internal_0000644000175000017500000000417011637420324032165 0ustar mikemike Docs for page smarty_internal_resource_registered.php

/libs/sysplugins/smarty_internal_resource_registered.php

Description

Smarty Internal Plugin Resource Registered

  • author: Uwe Tews
  • author: Rodney Rehm
Classes
Class Description
Smarty_Internal_Resource_Registered Smarty Internal Plugin Resource Registered

Documentation generated on Sat, 24 Sep 2011 20:23:57 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/_libs---sysplugins---smarty_resource_uncompiled.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/_libs---sysplugins---smarty_resource_0000644000175000017500000000376311637420324032207 0ustar mikemike Docs for page smarty_resource_uncompiled.php

/libs/sysplugins/smarty_resource_uncompiled.php

Description

Smarty Resource Plugin

  • author: Rodney Rehm
Classes
Class Description
Smarty_Resource_Uncompiled Smarty Resource Plugin

Documentation generated on Sat, 24 Sep 2011 20:24:09 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/Smarty_Internal_Resource_File.html0000644000175000017500000003434511637420324031716 0ustar mikemike Docs For Class Smarty_Internal_Resource_File

Class Smarty_Internal_Resource_File

Description

Smarty Internal Plugin Resource File

Implements the file system as resource for Smarty templates

Located in /libs/sysplugins/smarty_internal_resource_file.php (line 19)

Smarty_Resource
   |
   --Smarty_Internal_Resource_File
Method Summary
Methods
getBasename (line 79)

Determine basename for compiled filename

  • return: resource's basename
  • access: public
string getBasename (Smarty_Template_Source $source)

Redefinition of:
Smarty_Resource::getBasename()
Determine basename for compiled filename
getContent (line 62)

Load template's source from file into current template object

  • return: template source
  • throws: SmartyException if source cannot be loaded
  • access: public
string getContent (Smarty_Template_Source $source)

Redefinition of:
Smarty_Resource::getContent()
Load template's source into current template object
populate (line 27)

populate Source Object with meta data from Resource

  • access: public
void populate (Smarty_Template_Source $source, [Smarty_Internal_Template $_template = null])

Redefinition of:
Smarty_Resource::populate()
populate Source Object with meta data from Resource
populateTimestamp (line 49)

populate Source Object with timestamp and exists from Resource

  • access: public
void populateTimestamp (Smarty_Template_Source $source)

Redefinition of:
Smarty_Resource::populateTimestamp()
populate Source Object with timestamp and exists from Resource

Inherited Methods

Inherited From Smarty_Resource

Smarty_Resource::buildFilepath()
Smarty_Resource::config()
Smarty_Resource::fileExists()
Smarty_Resource::getBasename()
Smarty_Resource::getContent()
Smarty_Resource::load()
Smarty_Resource::populate()
Smarty_Resource::populateCompiledFilepath()
Smarty_Resource::populateTimestamp()
Smarty_Resource::source()

Documentation generated on Sat, 24 Sep 2011 20:23:56 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/_libs---sysplugins---smarty_config_source.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/_libs---sysplugins---smarty_config_so0000644000175000017500000000361011637420324032156 0ustar mikemike Docs for page smarty_config_source.php

/libs/sysplugins/smarty_config_source.php

Description

Smarty Internal Plugin

Classes
Class Description
Smarty_Config_Source Smarty Resource Data Object

Documentation generated on Sat, 24 Sep 2011 20:23:35 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/_libs---sysplugins---smarty_resource_recompiled.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/_libs---sysplugins---smarty_resource_0000644000175000017500000000376311637420324032207 0ustar mikemike Docs for page smarty_resource_recompiled.php

/libs/sysplugins/smarty_resource_recompiled.php

Description

Smarty Resource Plugin

  • author: Rodney Rehm
Classes
Class Description
Smarty_Resource_Recompiled Smarty Resource Plugin

Documentation generated on Sat, 24 Sep 2011 20:24:09 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/Smarty_Resource_Recompiled.html0000644000175000017500000002453511637420324031266 0ustar mikemike Docs For Class Smarty_Resource_Recompiled

Class Smarty_Resource_Recompiled

Description

Smarty Resource Plugin

Base implementation for resource plugins that don't compile cache

  • abstract:

Located in /libs/sysplugins/smarty_resource_recompiled.php (line 18)

Smarty_Resource
   |
   --Smarty_Resource_Recompiled
Direct descendents
Class Description
Smarty_Internal_Resource_Eval Smarty Internal Plugin Resource Eval
Smarty_Internal_Resource_Stream Smarty Internal Plugin Resource Stream
Method Summary
Methods
populateCompiledFilepath (line 27)

populate Compiled Object with compiled filepath

  • access: public
void populateCompiledFilepath (Smarty_Template_Compiled $compiled, Smarty_Internal_Template $_template)

Redefinition of:
Smarty_Resource::populateCompiledFilepath()
populate Compiled Object with compiled filepath

Inherited Methods

Inherited From Smarty_Resource

Smarty_Resource::buildFilepath()
Smarty_Resource::config()
Smarty_Resource::fileExists()
Smarty_Resource::getBasename()
Smarty_Resource::getContent()
Smarty_Resource::load()
Smarty_Resource::populate()
Smarty_Resource::populateCompiledFilepath()
Smarty_Resource::populateTimestamp()
Smarty_Resource::source()

Documentation generated on Sat, 24 Sep 2011 20:24:09 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/_libs---sysplugins---smarty_internal_resource_stream.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/_libs---sysplugins---smarty_internal_0000644000175000017500000000427111637420324032167 0ustar mikemike Docs for page smarty_internal_resource_stream.php

/libs/sysplugins/smarty_internal_resource_stream.php

Description

Smarty Internal Plugin Resource Stream

Implements the streams as resource for Smarty template

  • author: Uwe Tews
  • author: Rodney Rehm
Classes
Class Description
Smarty_Internal_Resource_Stream Smarty Internal Plugin Resource Stream

Documentation generated on Sat, 24 Sep 2011 20:23:58 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/_libs---sysplugins---smarty_internal_resource_php.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/_libs---sysplugins---smarty_internal_0000644000175000017500000000357011637420324032170 0ustar mikemike Docs for page smarty_internal_resource_php.php

/libs/sysplugins/smarty_internal_resource_php.php

Description
Classes
Class Description
Smarty_Internal_Resource_PHP Smarty Internal Plugin Resource PHP

Documentation generated on Sat, 24 Sep 2011 20:23:57 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/_libs---sysplugins---smarty_internal_resource_string.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/_libs---sysplugins---smarty_internal_0000644000175000017500000000414011637420324032162 0ustar mikemike Docs for page smarty_internal_resource_string.php

/libs/sysplugins/smarty_internal_resource_string.php

Description

Smarty Internal Plugin Resource String

  • author: Uwe Tews
  • author: Rodney Rehm
Classes
Class Description
Smarty_Internal_Resource_String Smarty Internal Plugin Resource String

Documentation generated on Sat, 24 Sep 2011 20:23:58 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/Smarty_Resource.html0000644000175000017500000011277411637420324027126 0ustar mikemike Docs For Class Smarty_Resource

Class Smarty_Resource

Description

Smarty Resource Plugin

Base implementation for resource plugins

  • abstract:

Located in /libs/sysplugins/smarty_resource.php (line 18)


	
			
Direct descendents
Class Description
Smarty_Internal_Resource_Extends Smarty Internal Plugin Resource Extends
Smarty_Internal_Resource_File Smarty Internal Plugin Resource File
Smarty_Internal_Resource_Registered Smarty Internal Plugin Resource Registered
Smarty_Internal_Resource_String Smarty Internal Plugin Resource String
Smarty_Resource_Custom Smarty Resource Plugin
Smarty_Resource_Recompiled Smarty Resource Plugin
Smarty_Resource_Uncompiled Smarty Resource Plugin
Variable Summary
static array $compileds
static array $resources
static array $sources
static array $sysplugins
Method Summary
static Smarty_Config_Source config ( $_config)
static Smarty_Resource load (Smarty $smarty, string $resource_type)
static Smarty_Template_Source source ([Smarty_Internal_Template $_template = null], [Smarty $smarty = null], [string $template_resource = null])
string buildFilepath (Smarty_Template_Source $source, [Smarty_Internal_Template $_template = null])
bool fileExists (Smarty_Template_Source $source, string $file)
void populate (Smarty_Template_Source $source, [Smarty_Internal_Template $_template = null])
Variables
static array $compileds = array() (line 28)

cache for Smarty_Template_Compiled instances

  • access: public
static array $resources = array() (line 33)

cache for Smarty_Resource instances

  • access: protected
static array $sources = array() (line 23)

cache for Smarty_Template_Source instances

  • access: public
static array $sysplugins = array(
'file' => true,
'string' => true,
'extends' => true,
'stream' => true,
'eval' => true,
'php' => true
)
(line 38)

resource types provided by the core

  • access: protected
string $compiler_class = 'Smarty_Internal_SmartyTemplateCompiler' (line 51)

Name of the Class to compile this resource's contents with

  • access: public
string $template_lexer_class = 'Smarty_Internal_Templatelexer' (line 57)

Name of the Class to tokenize this resource's contents with

  • access: public
string $template_parser_class = 'Smarty_Internal_Templateparser' (line 63)

Name of the Class to parse this resource's contents with

  • access: public
Methods
static method config (line 441)

initialize Config Source Object for given resource

  • return: Source Object
  • access: public
static Smarty_Config_Source config ( $_config)
  • Smarty_Internal_Config $_config: config object
static method load (line 325)

Load Resource Handler

  • return: Resource Handler
  • access: public
static Smarty_Resource load (Smarty $smarty, string $resource_type)
  • Smarty $smarty: smarty object
  • string $resource_type: name of the resource
static method source (line 394)

initialize Source Object for given resource

Either [$_template] or [$smarty, $template_resource] must be specified

  • return: Source Object
  • access: public
static Smarty_Template_Source source ([Smarty_Internal_Template $_template = null], [Smarty $smarty = null], [string $template_resource = null])
buildFilepath (line 143)

build template filepath by traversing the template_dir array

  • return: fully qualified filepath
  • throws: SmartyException if default template handler is registered but not callable
  • access: protected
string buildFilepath (Smarty_Template_Source $source, [Smarty_Internal_Template $_template = null])
fileExists (line 300)

test is file exists and save timestamp

  • return: true if file exists
  • access: protected
bool fileExists (Smarty_Template_Source $source, string $file)
getBasename (line 313)

Determine basename for compiled filename

  • return: resource's basename
  • access: protected
string getBasename (Smarty_Template_Source $source)

Redefined in descendants as:
getContent (line 74)

Load template's source into current template object

  • return: template source
  • abstract:
  • throws: SmartyException if source cannot be loaded
  • access: public
string getContent (Smarty_Template_Source $source)

Redefined in descendants as:
populate (line 82)

populate Source Object with meta data from Resource

  • abstract:
  • access: public
void populate (Smarty_Template_Source $source, [Smarty_Internal_Template $_template = null])

Redefined in descendants as:
populateCompiledFilepath (line 100)

populate Compiled Object with compiled filepath

  • access: public
void populateCompiledFilepath (Smarty_Template_Compiled $compiled, Smarty_Internal_Template $_template)

Redefined in descendants as:
populateTimestamp (line 89)

populate Source Object with timestamp and exists from Resource

  • access: public
void populateTimestamp (Smarty_Template_Source $source)

Redefined in descendants as:

Documentation generated on Sat, 24 Sep 2011 20:24:07 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/_libs---sysplugins---smarty_internal_resource_file.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/_libs---sysplugins---smarty_internal_0000644000175000017500000000412411637420324032164 0ustar mikemike Docs for page smarty_internal_resource_file.php

/libs/sysplugins/smarty_internal_resource_file.php

Description

Smarty Internal Plugin Resource File

  • author: Uwe Tews
  • author: Rodney Rehm
Classes
Class Description
Smarty_Internal_Resource_File Smarty Internal Plugin Resource File

Documentation generated on Sat, 24 Sep 2011 20:23:56 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/_libs---sysplugins---smarty_internal_resource_eval.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/_libs---sysplugins---smarty_internal_0000644000175000017500000000412411637420324032164 0ustar mikemike Docs for page smarty_internal_resource_eval.php

/libs/sysplugins/smarty_internal_resource_eval.php

Description

Smarty Internal Plugin Resource Eval

  • author: Uwe Tews
  • author: Rodney Rehm
Classes
Class Description
Smarty_Internal_Resource_Eval Smarty Internal Plugin Resource Eval

Documentation generated on Sat, 24 Sep 2011 20:23:56 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/Smarty_Internal_Resource_PHP.html0000644000175000017500000004377111637420324031471 0ustar mikemike Docs For Class Smarty_Internal_Resource_PHP

Class Smarty_Internal_Resource_PHP

Description

Smarty Internal Plugin Resource PHP

Implements the file system as resource for PHP templates

  • author: Uwe Tews
  • author: Rodney Rehm

Located in /libs/sysplugins/smarty_internal_resource_php.php (line 13)

Smarty_Resource
   |
   --Smarty_Resource_Uncompiled
      |
      --Smarty_Internal_Resource_PHP
Variable Summary
Method Summary
Smarty_Internal_Resource_PHP __construct ()
void populate (Smarty_Template_Source $source, [Smarty_Internal_Template $_template = null])
Variables
string $short_open_tag (line 18)

container for short_open_tag directive's value before executing PHP templates

  • access: protected

Inherited Variables

Inherited from Smarty_Resource

Smarty_Resource::$compileds
Smarty_Resource::$compiler_class
Smarty_Resource::$resources
Smarty_Resource::$sources
Smarty_Resource::$sysplugins
Smarty_Resource::$template_lexer_class
Smarty_Resource::$template_parser_class
Methods
Constructor __construct (line 24)

Create a new PHP Resource

  • access: public
Smarty_Internal_Resource_PHP __construct ()
getContent (line 72)

Load template's source from file into current template object

  • return: template source
  • throws: SmartyException if source cannot be loaded
  • access: public
string getContent (Smarty_Template_Source $source)

Redefinition of:
Smarty_Resource::getContent()
Load template's source into current template object
populate (line 36)

populate Source Object with meta data from Resource

  • access: public
void populate (Smarty_Template_Source $source, [Smarty_Internal_Template $_template = null])

Redefinition of:
Smarty_Resource::populate()
populate Source Object with meta data from Resource
populateTimestamp (line 59)

populate Source Object with timestamp and exists from Resource

  • access: public
void populateTimestamp (Smarty_Template_Source $source)

Redefinition of:
Smarty_Resource::populateTimestamp()
populate Source Object with timestamp and exists from Resource
renderUncompiled (line 88)

Render and output the template (without using the compiler)

  • throws: SmartyException if template cannot be loaded or allow_php_templates is disabled
  • access: public
void renderUncompiled (Smarty_Template_Source $source, Smarty_Internal_Template $_template)

Redefinition of:
Smarty_Resource_Uncompiled::renderUncompiled()
Render and output the template (without using the compiler)

Inherited Methods

Inherited From Smarty_Resource_Uncompiled

Smarty_Resource_Uncompiled::populateCompiledFilepath()
Smarty_Resource_Uncompiled::renderUncompiled()

Inherited From Smarty_Resource

Smarty_Resource::buildFilepath()
Smarty_Resource::config()
Smarty_Resource::fileExists()
Smarty_Resource::getBasename()
Smarty_Resource::getContent()
Smarty_Resource::load()
Smarty_Resource::populate()
Smarty_Resource::populateCompiledFilepath()
Smarty_Resource::populateTimestamp()
Smarty_Resource::source()

Documentation generated on Sat, 24 Sep 2011 20:23:57 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/Smarty_Template_Cached.html0000644000175000017500000003634711637420324030342 0ustar mikemike Docs For Class Smarty_Template_Cached

Class Smarty_Template_Cached

Description

Smarty Resource Data Object

Cache Data Container for Template Files

  • author: Rodney Rehm

Located in /libs/sysplugins/smarty_cacheresource.php (line 199)


	
			
Variable Summary
Method Summary
Smarty_Template_Cached __construct (Smarty_Internal_Template $_template)
boolean write (Smarty_Internal_Template $_template, string $content)
Variables
string $cache_id = null (line 252)

Template Cache Id (Smarty_Internal_Template::$cache_id)

  • access: public
string $compile_id = null (line 246)

Template Compile Id (Smarty_Internal_Template::$compile_id)

  • access: public
string $content = null (line 210)

Source Content

  • access: public
boolean $exists = false (line 222)

Source Existance

  • access: public
string $filepath = false (line 204)

Source Filepath

  • access: public
Smarty_CacheResource $handler = null (line 240)

CacheResource Handler

  • access: public
bool $is_locked = false (line 264)

flag that cache is locked by this instance

  • access: public
string $lock_id = null (line 258)

Id for cache locking

  • access: public
boolean $processed = false (line 234)

Cache was processed

  • access: public
Smarty_Template_Source $source = null (line 270)

Source Object

  • access: public
integer $timestamp = false (line 216)

Source Timestamp

  • access: public
boolean $valid = false (line 228)

Cache Is Valid

  • access: public
Methods
Constructor __construct (line 277)

create Cached Object container

  • access: public
Smarty_Template_Cached __construct (Smarty_Internal_Template $_template)
write (line 355)

Write this cache object to handler

  • return: success
  • access: public
boolean write (Smarty_Internal_Template $_template, string $content)

Documentation generated on Sat, 24 Sep 2011 20:23:32 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/_libs---sysplugins---smarty_resource_custom.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/TemplateResources/_libs---sysplugins---smarty_resource_0000644000175000017500000000374311637420324032205 0ustar mikemike Docs for page smarty_resource_custom.php

/libs/sysplugins/smarty_resource_custom.php

Description

Smarty Resource Plugin

  • author: Rodney Rehm
Classes
Class Description
Smarty_Resource_Custom Smarty Resource Plugin

Documentation generated on Sat, 24 Sep 2011 20:24:08 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Templates/0000755000175000017500000000000012141655571021373 5ustar mikemikesmarty3-3.1.13/development/Smarty3Doc/Smarty/_libs---Smarty.class.php.html0000644000175000017500000003050211637420324024707 0ustar mikemike Docs for page Smarty.class.php

/libs/Smarty.class.php

Description

Project: Smarty: the PHP compiling template engine File: Smarty.class.php SVN: $Id: Smarty.class.php 4319 2011-09-24 15:45:30Z rodneyrehm $

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

For questions, help, comments, discussion, etc., please join the Smarty mailing list. Send a blank e-mail to smarty-discussion-subscribe@googlegroups.com

Classes
Class Description
Smarty This is the main Smarty class
SmartyException Smarty exception class
SmartyCompilerException Smarty compiler exception class
Includes
include_once (smarty_internal_resource_file.php) (line 93)
include_once (smarty_internal_data.php) (line 89)

Load always needed external class files

include_once (smarty_internal_cacheresource_file.php) (line 95)
include_once (smarty_cacheresource.php) (line 94)
include_once (smarty_resource.php) (line 92)
include_once (smarty_internal_templatebase.php) (line 90)
include_once (smarty_internal_template.php) (line 91)
Constants
DS = DIRECTORY_SEPARATOR (line 38)

define shorthand directory separator constant

SMARTY_DIR = dirname(__FILE__).DS (line 46)

set SMARTY_DIR to absolute path to Smarty library files.

Sets SMARTY_DIR only if user application has not already defined it.

SMARTY_MBSTRING = function_exists('mb_strlen') (line 60)
SMARTY_PLUGINS_DIR = SMARTY_DIR.'plugins'.DS (line 57)
SMARTY_RESOURCE_CHAR_SET = SMARTY_MBSTRING?'UTF-8':'ISO-8859-1' (line 64)
SMARTY_RESOURCE_DATE_FORMAT = '%b %e, %Y' (line 67)
SMARTY_SPL_AUTOLOAD = 0 (line 74)

register the class autoloader

SMARTY_SYSPLUGINS_DIR = SMARTY_DIR.'sysplugins'.DS (line 54)

set SMARTY_SYSPLUGINS_DIR to absolute path to Smarty internal plugins.

Sets SMARTY_SYSPLUGINS_DIR only if user application has not already defined it.

Functions
smartyAutoload (line 1409)

Autoloader

void smartyAutoload ( $class)
  • $class

Documentation generated on Sat, 24 Sep 2011 20:23:19 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsShared/0000755000175000017500000000000012141655571022205 5ustar mikemike././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsShared/_libs---plugins---shared.mb_str_replace.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsShared/_libs---plugins---shared.mb_str_replace.p0000644000175000017500000000616511637420324031650 0ustar mikemike Docs for page shared.mb_str_replace.php

/libs/plugins/shared.mb_str_replace.php

Description

Smarty shared plugin

Functions
smarty_mb_str_replace (line 20)

Multibyte string replace

  • return: replaced string
  • author: Rodney Rehm
string smarty_mb_str_replace (string $search, string $replace, string $subject, [int &$count = 0])
  • string $search: the string to be searched
  • string $replace: the replacement string
  • string $subject: the source string
  • int &$count: number of matches found

Documentation generated on Sat, 24 Sep 2011 20:23:19 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsShared/_libs---plugins---shared.literal_compiler_param.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsShared/_libs---plugins---shared.literal_compiler0000644000175000017500000000622611660225534031757 0ustar mikemike Docs for page shared.literal_compiler_param.php

/libs/plugins/shared.literal_compiler_param.php

Description

Smarty plugin

Functions
smarty_literal_compiler_param (line 19)

evaluate compiler parameter

  • return: evaluated value of parameter or $default
  • author: Rodney Rehm
  • throws: SmartyException if parameter is not a literal (but an expression, variable, …)
mixed smarty_literal_compiler_param (array $params, integer $index, [mixed $default = null])
  • array $params: parameter array as given to the compiler function
  • integer $index: array index of the parameter to convert
  • mixed $default: value to be returned if the parameter is not present

Documentation generated on Sat, 24 Sep 2011 20:23:19 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsShared/_libs---plugins---shared.escape_special_chars.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsShared/_libs---plugins---shared.escape_special_c0000644000175000017500000000673411637420324031675 0ustar mikemike Docs for page shared.escape_special_chars.php

/libs/plugins/shared.escape_special_chars.php

Description

Smarty shared plugin

Functions
smarty_function_escape_special_chars (line 21)

escape_special_chars common function

Function: smarty_function_escape_special_chars
Purpose: used by other smarty functions to escape special chars except for already escaped ones

string smarty_function_escape_special_chars (string $string)
  • string $string: text that should by escaped

Documentation generated on Sat, 24 Sep 2011 20:23:19 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsShared/_libs---plugins---shared.mb_wordwrap.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsShared/_libs---plugins---shared.mb_wordwrap.php.0000644000175000017500000000662211637420324031616 0ustar mikemike Docs for page shared.mb_wordwrap.php

/libs/plugins/shared.mb_wordwrap.php

Description

Smarty shared plugin

Functions
smarty_mb_wordwrap (line 22)

Wrap a string to a given number of characters

string smarty_mb_wordwrap (string $str, [int $width = 75], [string $break = &quot;\n&quot;], [boolean $cut = false])
  • string $str: the string to wrap
  • int $width: the width of the output
  • string $break: the character used to break the line
  • boolean $cut: ignored parameter, just for the sake of

Documentation generated on Sat, 24 Sep 2011 20:23:19 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsShared/_libs---plugins---shared.mb_unicode.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsShared/_libs---plugins---shared.mb_unicode.php.h0000644000175000017500000001102211637420324031535 0ustar mikemike Docs for page shared.mb_unicode.php

/libs/plugins/shared.mb_unicode.php

Description

Smarty shared plugin

Functions
smarty_mb_from_unicode (line 36)

convert unicodes to the character of given encoding

string smarty_mb_from_unicode (integer|array $unicode, [string $encoding = null])
  • integer|array $unicode: single unicode or list of unicodes to convert
  • string $encoding: encoding of returned string, if null mb_internal_encoding() is used
smarty_mb_to_unicode (line 18)

convert characters to their decimal unicode equivalents

array smarty_mb_to_unicode (string $string, [string $encoding = null])
  • string $string: characters to calculate unicode of
  • string $encoding: encoding of $string, if null mb_internal_encoding() is used

Documentation generated on Sat, 24 Sep 2011 20:23:19 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsShared/_libs---plugins---shared.make_timestamp.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/PluginsShared/_libs---plugins---shared.make_timestamp.p0000644000175000017500000000571311637420324031665 0ustar mikemike Docs for page shared.make_timestamp.php

/libs/plugins/shared.make_timestamp.php

Description

Smarty shared plugin

Functions
smarty_make_timestamp (line 17)

Function: smarty_make_timestamp
Purpose: used by other smarty functions to make a timestamp from a string.

int smarty_make_timestamp (DateTime|int|string $string)
  • DateTime|int|string $string: date object, timestamp or string that can be converted using strtotime()

Documentation generated on Sat, 24 Sep 2011 20:23:19 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/_libs---sysplugins---smarty_cacheresource.php.html0000644000175000017500000000415511637420324031113 0ustar mikemike Docs for page smarty_cacheresource.php

/libs/sysplugins/smarty_cacheresource.php

Description

Smarty Internal Plugin

Classes
Class Description
Smarty_CacheResource Cache Handler API
Smarty_Template_Cached Smarty Resource Data Object

Documentation generated on Sat, 24 Sep 2011 20:23:31 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Config/0000755000175000017500000000000012141655571020642 5ustar mikemike././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Config/_libs---sysplugins---smarty_internal_config_file_compiler.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Config/_libs---sysplugins---smarty_internal_config_file0000644000175000017500000000425611637420324032116 0ustar mikemike Docs for page smarty_internal_config_file_compiler.php

/libs/sysplugins/smarty_internal_config_file_compiler.php

Description

Smarty Internal Plugin Config File Compiler

This is the config file compiler class. It calls the lexer and parser to perform the compiling.

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Config_File_Compiler Main config file compiler class

Documentation generated on Sat, 24 Sep 2011 20:23:52 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Config/Smarty_Internal_Config_File_Compiler.html0000644000175000017500000002572011637420324030722 0ustar mikemike Docs For Class Smarty_Internal_Config_File_Compiler

Class Smarty_Internal_Config_File_Compiler

Description

Main config file compiler class

Located in /libs/sysplugins/smarty_internal_config_file_compiler.php (line 19)


	
			
Variable Summary
Smarty_Internal_Config $config
array $config_data
object $lex
object $parser
Method Summary
Smarty_Internal_Config_File_Compiler __construct (Smarty $smarty)
bool compileSource ( $config)
void trigger_config_file_error ([string $args = null])
Variables
Smarty_Internal_Config $config (line 47)

Smarty object

  • var: object
  • access: public
array $config_data = array() (line 54)

Compiled config data sections and variables

  • access: public
object $lex (line 26)

Lexer object

  • access: public
object $parser (line 33)

Parser object

  • access: public
Smarty $smarty (line 40)

Smarty object

  • var: object
  • access: public
Methods
Constructor __construct (line 61)

Initialize compiler

  • access: public
Smarty_Internal_Config_File_Compiler __construct (Smarty $smarty)
  • Smarty $smarty: base instance
compileSource (line 74)

Method to compile a Smarty template.

  • return: true if compiling succeeded, false if it failed
  • access: public
bool compileSource ( $config)
  • Smarty_Internal_Config $config: config object
trigger_config_file_error (line 110)

display compiler error messages without dying

If parameter $args is empty it is a parser detected syntax error. In this case the parser is called to obtain information about exspected tokens.

If parameter $args contains a string this is used as error message

  • access: public
void trigger_config_file_error ([string $args = null])
  • string $args: individual error message or null

Documentation generated on Sat, 24 Sep 2011 20:23:52 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Config/_libs---sysplugins---smarty_internal_config.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Config/_libs---sysplugins---smarty_internal_config.php.0000644000175000017500000000225511637420324031760 0ustar mikemike Docs for page smarty_internal_config.php

/libs/sysplugins/smarty_internal_config.php

Description

Smarty Internal Plugin Config

  • author: Uwe Tews

Documentation generated on Sat, 24 Sep 2011 20:23:50 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Config/Smarty_Internal_Configfilelexer.html0000644000175000017500000012110211637420324030020 0ustar mikemike Docs For Class Smarty_Internal_Configfilelexer

Class Smarty_Internal_Configfilelexer

Description

Smarty Internal Plugin Configfilelexer

Located in /libs/sysplugins/smarty_internal_configfilelexer.php (line 13)


	
			
Class Constant Summary
Variable Summary
mixed $counter
mixed $data
mixed $line
mixed $node
mixed $token
mixed $value
Method Summary
static void &instance ([ $new_instance = null])
Smarty_Internal_Configfilelexer __construct ( $data,  $smarty)
void yybegin ( $state)
void yylex ()
void yylex1 ()
void yylex2 ()
void yylex3 ()
void yylex4 ()
void yylex5 ()
void yypopstate ()
void yypushstate ( $state)
void yy_r1_1 ( $yy_subpatterns)
void yy_r1_2 ( $yy_subpatterns)
void yy_r1_3 ( $yy_subpatterns)
void yy_r1_4 ( $yy_subpatterns)
void yy_r1_5 ( $yy_subpatterns)
void yy_r1_6 ( $yy_subpatterns)
void yy_r1_7 ( $yy_subpatterns)
void yy_r2_1 ( $yy_subpatterns)
void yy_r2_2 ( $yy_subpatterns)
void yy_r2_3 ( $yy_subpatterns)
void yy_r2_4 ( $yy_subpatterns)
void yy_r2_5 ( $yy_subpatterns)
void yy_r2_6 ( $yy_subpatterns)
void yy_r2_8 ( $yy_subpatterns)
void yy_r2_9 ( $yy_subpatterns)
void yy_r2_10 ( $yy_subpatterns)
void yy_r3_1 ( $yy_subpatterns)
void yy_r4_1 ( $yy_subpatterns)
void yy_r4_2 ( $yy_subpatterns)
void yy_r4_3 ( $yy_subpatterns)
void yy_r5_1 ( $yy_subpatterns)
void yy_r5_2 ( $yy_subpatterns)
Variables
mixed $counter (line 17)
  • access: public
mixed $data (line 16)
  • access: public
mixed $line (line 21)
  • access: public
mixed $node (line 20)
  • access: public
mixed $smarty_token_names = array ( // Text for parser error messages
)
(line 23)
  • access: public
mixed $token (line 18)
  • access: public
mixed $value (line 19)
  • access: public
Methods
static method instance (line 36)
  • access: public
static void &instance ([ $new_instance = null])
  • $new_instance
Constructor __construct (line 27)
Smarty_Internal_Configfilelexer __construct ( $data,  $smarty)
  • $data
  • $smarty
yybegin (line 65)
void yybegin ( $state)
  • $state
yylex (line 49)
void yylex ()
yylex1 (line 73)
void yylex1 ()
yylex2 (line 178)
void yylex2 ()
yylex3 (line 307)
void yylex3 ()
yylex4 (line 374)
void yylex4 ()
yylex5 (line 453)
void yylex5 ()
yypopstate (line 60)
void yypopstate ()
yypushstate (line 54)
void yypushstate ( $state)
  • $state
yy_r1_1 (line 137)
void yy_r1_1 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_2 (line 143)
void yy_r1_2 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_3 (line 149)
void yy_r1_3 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_4 (line 154)
void yy_r1_4 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_5 (line 160)
void yy_r1_5 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_6 (line 165)
void yy_r1_6 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_7 (line 170)
void yy_r1_7 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_1 (line 244)
void yy_r2_1 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_2 (line 249)
void yy_r2_2 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_3 (line 255)
void yy_r2_3 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_4 (line 261)
void yy_r2_4 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_5 (line 267)
void yy_r2_5 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_6 (line 273)
void yy_r2_6 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_8 (line 279)
void yy_r2_8 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_9 (line 291)
void yy_r2_9 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_10 (line 297)
void yy_r2_10 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r3_1 (line 365)
void yy_r3_1 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r4_1 (line 434)
void yy_r4_1 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r4_2 (line 439)
void yy_r4_2 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r4_3 (line 444)
void yy_r4_3 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r5_1 (line 512)
void yy_r5_1 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r5_2 (line 517)
void yy_r5_2 ( $yy_subpatterns)
  • $yy_subpatterns
Class Constants
COMMENT = 4 (line 433)
NAKED_STRING_VALUE = 3 (line 364)
SECTION = 5 (line 511)
START = 1 (line 136)
VALUE = 2 (line 243)

Documentation generated on Sat, 24 Sep 2011 20:23:50 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Config/_libs---sysplugins---smarty_internal_configfilelexer.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Config/_libs---sysplugins---smarty_internal_configfilel0000644000175000017500000000417111637420324032127 0ustar mikemike Docs for page smarty_internal_configfilelexer.php

/libs/sysplugins/smarty_internal_configfilelexer.php

Description

Smarty Internal Plugin Configfilelexer

This is the lexer to break the config file source into tokens

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Configfilelexer Smarty Internal Plugin Configfilelexer

Documentation generated on Sat, 24 Sep 2011 20:23:50 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/0000755000175000017500000000000012141655571021207 5ustar mikemike././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_assign.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_a0000644000175000017500000000412711637420324032144 0ustar mikemike Docs for page smarty_internal_compile_assign.php

/libs/sysplugins/smarty_internal_compile_assign.php

Description

Smarty Internal Plugin Compile Assign

Compiles the {assign} tag

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Assign Smarty Internal Plugin Compile Assign Class

Documentation generated on Sat, 24 Sep 2011 20:23:39 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Extends.html0000644000175000017500000002172511637420324030354 0ustar mikemike Docs For Class Smarty_Internal_Compile_Extends

Class Smarty_Internal_Compile_Extends

Description

Smarty Internal Plugin Compile extend Class

Located in /libs/sysplugins/smarty_internal_compile_extends.php (line 19)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Extends
Variable Summary
Method Summary
string compile (array $args, object $compiler)
Variables
array $required_attributes = array('file') (line 27)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$required_attributes
Array of names of required attribute required by tag
array $shorttag_order = array('file') (line 34)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$shorttag_order
Shorttag attribute order defined by its names

Inherited Variables

Inherited from Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::$optional_attributes
Smarty_Internal_CompileBase::$option_flags
Methods
compile (line 43)

Compiles code for the {extends} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler)
  • array $args: array with attributes from parser
  • object $compiler: compiler object

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:41 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_SmartyTemplateCompiler.html0000644000175000017500000004120611637420324031734 0ustar mikemike Docs For Class Smarty_Internal_SmartyTemplateCompiler

Class Smarty_Internal_SmartyTemplateCompiler

Description

Class SmartyTemplateCompiler

Located in /libs/sysplugins/smarty_internal_smartytemplatecompiler.php (line 23)

Smarty_Internal_TemplateCompilerBase
   |
   --Smarty_Internal_SmartyTemplateCompiler
Variable Summary
object $lex
string $lexer_class
array $local_var
object $parser
string $parser_class
object $smarty
Method Summary
Smarty_Internal_SmartyTemplateCompiler __construct (string $lexer_class, string $parser_class, Smarty $smarty)
bool doCompile (mixed $_content)
Methods
Constructor __construct (line 74)

Initialize compiler

  • access: public
Smarty_Internal_SmartyTemplateCompiler __construct (string $lexer_class, string $parser_class, Smarty $smarty)
  • string $lexer_class: class name
  • string $parser_class: class name
  • Smarty $smarty: global instance

Redefinition of:
Smarty_Internal_TemplateCompilerBase::__construct()
Initialize compiler
doCompile (line 89)

Methode to compile a Smarty template

  • return: true if compiling succeeded, false if it failed
  • access: protected
bool doCompile (mixed $_content)
  • mixed $_content: template source

Inherited Methods

Inherited From Smarty_Internal_TemplateCompilerBase

Smarty_Internal_TemplateCompilerBase::__construct()
Smarty_Internal_TemplateCompilerBase::callTagCompiler()
Smarty_Internal_TemplateCompilerBase::compileTag()
Smarty_Internal_TemplateCompilerBase::compileTemplate()
Smarty_Internal_TemplateCompilerBase::getPlugin()
Smarty_Internal_TemplateCompilerBase::getPluginFromDefaultHandler()
Smarty_Internal_TemplateCompilerBase::processNocacheCode()
Smarty_Internal_TemplateCompilerBase::trigger_template_error()

Documentation generated on Sat, 24 Sep 2011 20:23:59 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Debug.html0000644000175000017500000001466711637420324027777 0ustar mikemike Docs For Class Smarty_Internal_Compile_Debug

Class Smarty_Internal_Compile_Debug

Description

Smarty Internal Plugin Compile Debug Class

Located in /libs/sysplugins/smarty_internal_compile_debug.php (line 19)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Debug
Method Summary
string compile (array $args, object $compiler)
Methods
compile (line 28)

Compiles code for the {debug} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler)
  • array $args: array with attributes from parser
  • object $compiler: compiler object

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:41 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_include.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_i0000644000175000017500000000413611637420324032154 0ustar mikemike Docs for page smarty_internal_compile_include.php

/libs/sysplugins/smarty_internal_compile_include.php

Description

Smarty Internal Plugin Compile Include

Compiles the {include} tag

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Include Smarty Internal Plugin Compile Include Class

Documentation generated on Sat, 24 Sep 2011 20:23:44 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/TP_yyStackEntry.html0000644000175000017500000000737711637420324025162 0ustar mikemike Docs For Class TP_yyStackEntry

Class TP_yyStackEntry

Description
Variable Summary
mixed $major
mixed $minor
mixed $stateno
Variables
mixed $major (line 79)
  • access: public
mixed $minor (line 81)
  • access: public
mixed $stateno (line 78)
  • access: public

Documentation generated on Sat, 24 Sep 2011 20:24:06 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_nocache.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_n0000644000175000017500000000463011637420324032160 0ustar mikemike Docs for page smarty_internal_compile_nocache.php

/libs/sysplugins/smarty_internal_compile_nocache.php

Description

Smarty Internal Plugin Compile Nocache

Compiles the {nocache} {/nocache} tags.

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Nocache Smarty Internal Plugin Compile Nocache Classv
Smarty_Internal_Compile_Nocacheclose Smarty Internal Plugin Compile Nocacheclose Class

Documentation generated on Sat, 24 Sep 2011 20:23:45 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_TemplateCompilerBase.html0000644000175000017500000007377411637420324031346 0ustar mikemike Docs For Class Smarty_Internal_TemplateCompilerBase

Class Smarty_Internal_TemplateCompilerBase

Description

Main abstract compiler class

  • abstract:

Located in /libs/sysplugins/smarty_internal_templatecompilerbase.php (line 18)


	
			
Direct descendents
Class Description
Smarty_Internal_SmartyTemplateCompiler Class SmartyTemplateCompiler
Method Summary
Smarty_Internal_TemplateCompilerBase __construct ()
string callTagCompiler (string $tag, array $args, [mixed $param1 = null], [mixed $param2 = null], [mixed $param3 = null])
string compileTag (string $tag, array $args, [array $parameter = array()])
string getPlugin ( $plugin_name, string $plugin_type, string $pugin_name)
boolean getPluginFromDefaultHandler (string $tag, string $plugin_type)
string processNocacheCode (string $content, boolean $is_code)
void trigger_template_error ([string $args = null], [string $line = null])
Variables
static array $_tag_objects = array() (line 43)

compile tag objects

  • access: public
array $default_handler_plugins = array() (line 73)

plugins loaded by default plugin handler

  • access: public
mixed $default_modifier_list = null (line 79)

saved preprocessed modifier list

  • access: public
boolean $forceNocache = false (line 84)

force compilation of complete template as nocache

  • access: public
bool $inheritance = false (line 67)

flag when compiling {block}

  • access: public
array $merged_templates = array() (line 61)

merged templates

  • access: public
array $modifier_plugins = array() (line 104)

flags for used modifier plugins

  • access: public
bool $suppressHeader = false (line 89)

suppress Smarty header code in compiled template

  • access: public
bool $suppressMergedTemplates = false (line 37)

suppress generation of merged template code

  • access: public
bool $suppressNocacheProcessing = false (line 31)

suppress generation of nocache code

  • access: public
bool $suppressTemplatePropertyHeader = false (line 94)

suppress template property header code in compiled template

  • access: public
Smarty_Internal_Template $template = null (line 55)

current template

  • access: public
bool $write_compiled_code = true (line 99)

flag if compiled template file shall we written

  • access: public
array $_tag_stack = array() (line 49)

tag stack

  • access: public
Methods
Constructor __construct (line 109)

Initialize compiler

  • access: public
Smarty_Internal_TemplateCompilerBase __construct ()

Redefined in descendants as:
callTagCompiler (line 408)

lazy loads internal compile plugin for tag and calls the compile methode

compile objects cached for reuse. class name format: Smarty_Internal_Compile_TagName plugin filename format: Smarty_Internal_Tagname.php

  • return: compiled code
  • access: public
string callTagCompiler (string $tag, array $args, [mixed $param1 = null], [mixed $param2 = null], [mixed $param3 = null])
  • string $tag: tag name
  • array $args: list of tag attributes
  • mixed $param1: optional parameter
  • mixed $param2: optional parameter
  • mixed $param3: optional parameter
compileTag (line 195)

Compile Tag

This is a call back from the lexer/parser It executes the required compile plugin for the Smarty tag

  • return: compiled code
  • access: public
string compileTag (string $tag, array $args, [array $parameter = array()])
  • string $tag: tag name
  • array $args: array with tag attributes
  • array $parameter: array with compilation parameter
compileTemplate (line 120)

Method to compile a Smarty template

  • return: true if compiling succeeded, false if it failed
  • access: public
bool compileTemplate (Smarty_Internal_Template $template)
getPlugin (line 437)

Check for plugins and return function name

  • return: call name of function
  • access: public
string getPlugin ( $plugin_name, string $plugin_type, string $pugin_name)
  • string $pugin_name: name of plugin or function
  • string $plugin_type: type of plugin
  • $plugin_name
getPluginFromDefaultHandler (line 492)

Check for plugins by default plugin handler

  • return: true if found
  • access: public
boolean getPluginFromDefaultHandler (string $tag, string $plugin_type)
  • string $tag: name of tag
  • string $plugin_type: type of plugin
processNocacheCode (line 536)

Inject inline code for nocache template sections

This method gets the content of each template element from the parser. If the content is compiled code and it should be not cached the code is injected into the rendered output.

  • return: content
  • access: public
string processNocacheCode (string $content, boolean $is_code)
  • string $content: content of template element
  • boolean $is_code: true if content is compiled code
trigger_template_error (line 577)

display compiler error messages without dying

If parameter $args is empty it is a parser detected syntax error. In this case the parser is called to obtain information about expected tokens.

If parameter $args contains a string this is used as error message

  • throws: SmartyCompilerException when an unexpected token is found
  • access: public
void trigger_template_error ([string $args = null], [string $line = null])
  • string $args: individual error message or null
  • string $line: line-number

Documentation generated on Sat, 24 Sep 2011 20:24:03 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_foreach.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_f0000644000175000017500000000531511637420324032151 0ustar mikemike Docs for page smarty_internal_compile_foreach.php

/libs/sysplugins/smarty_internal_compile_foreach.php

Description

Smarty Internal Plugin Compile Foreach

Compiles the {foreach} {foreachelse} {/foreach} tags

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Foreach Smarty Internal Plugin Compile Foreach Class
Smarty_Internal_Compile_Foreachelse Smarty Internal Plugin Compile Foreachelse Class
Smarty_Internal_Compile_Foreachclose Smarty Internal Plugin Compile Foreachclose Class

Documentation generated on Sat, 24 Sep 2011 20:23:42 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Templateparser.html0000644000175000017500000102516311637420324030263 0ustar mikemike Docs For Class Smarty_Internal_Templateparser

Class Smarty_Internal_Templateparser

Description
Class Constant Summary
 Err1 = "Security error: Call to private object member not allowed"
 Err2 = "Security error: Call to dynamic object member not allowed"
 Err3 = "PHP in template not allowed. Use SmartyBC to enable it"
 TP_ANDSYM = 40
 TP_APTR = 30
 TP_AS = 29
 TP_AT = 60
 TP_CLOSEB = 63
 TP_CLOSEP = 37
 TP_COLON = 2
 TP_COMMA = 35
 TP_DOLLAR = 17
 TP_DOT = 57
 TP_EQUAL = 19
 TP_EQUALS = 64
 TP_HATCH = 61
 TP_HEX = 56
 TP_ID = 18
 TP_INCDEC = 24
 TP_INTEGER = 34
 TP_ISDIVBY = 42
 TP_ISEVEN = 44
 TP_ISIN = 41
 TP_ISODD = 48
 TP_ISODDBY = 50
 TP_LAND = 73
 TP_LDEL = 15
 TP_LDELFOR = 22
 TP_LDELIF = 21
 TP_LITERAL = 14
 TP_LOR = 74
 TP_LXOR = 75
 TP_MATH = 38
 TP_MOD = 72
 TP_NOT = 54
 TP_OPENB = 62
 TP_OPENP = 36
 TP_OTHER = 10
 TP_PTR = 20
 TP_QMARK = 53
 TP_QUOTE = 76
 TP_RDEL = 16
 TP_SPACE = 28
 TP_STEP = 26
 TP_TO = 25
 TP_UNIMATH = 39
 TP_VERT = 1
 TP_XMLTAG = 9
 YYERRSYMDT = 'yy0'
 YYNOCODE = 122
 YYNRULE = 201
 YYNSTATE = 387
 YYSTACKDEPTH = 100
 YY_NO_ACTION = 590
 YY_SHIFT_MAX = 252
 YY_SZ_ACTTAB = 2393
Variable Summary
static mixed $yyExpectedTokens
static mixed $yyFallback
static mixed $yyReduceMap
static mixed $yyRuleInfo
static mixed $yyRuleName
static mixed $yyTraceFILE
static mixed $yyTracePrompt
static mixed $yy_action
static mixed $yy_default
static mixed $yy_lookahead
static mixed $yy_reduce_ofst
static mixed $yy_shift_ofst
mixed $retvalue
mixed $successful
mixed $yyerrcnt
mixed $yyidx
mixed $yystack
mixed $yyTokenName
Method Summary
static void escape_end_tag ( $tag_text)
static void escape_start_tag ( $tag_text)
static void PrintTrace ()
static void Trace ( $TraceFILE,  $zTracePrompt)
static void yy_destructor ( $yymajor,  $yypminor)
void compileVariable ( $variable)
void doParse ( $yymajor,  $yytokenvalue)
void tokenName ( $tokenType)
void yy_accept ()
void yy_find_reduce_action ( $stateno,  $iLookAhead)
void yy_find_shift_action ( $iLookAhead)
void yy_get_expected_tokens ( $token)
void yy_is_expected_token ( $token)
Smarty_Internal_Templateparser __construct ( $lex,  $compiler)
void __destruct ()
void yy_parse_failed ()
void yy_r0 ()
void yy_r1 ()
void yy_r4 ()
void yy_r5 ()
void yy_r6 ()
void yy_r7 ()
void yy_r8 ()
void yy_r9 ()
void yy_r10 ()
void yy_r11 ()
void yy_r12 ()
void yy_r13 ()
void yy_r14 ()
void yy_r15 ()
void yy_r16 ()
void yy_r17 ()
void yy_r19 ()
void yy_r21 ()
void yy_r23 ()
void yy_r24 ()
void yy_r25 ()
void yy_r26 ()
void yy_r27 ()
void yy_r28 ()
void yy_r29 ()
void yy_r31 ()
void yy_r33 ()
void yy_r34 ()
void yy_r35 ()
void yy_r36 ()
void yy_r37 ()
void yy_r38 ()
void yy_r39 ()
void yy_r40 ()
void yy_r41 ()
void yy_r42 ()
void yy_r44 ()
void yy_r45 ()
void yy_r47 ()
void yy_r48 ()
void yy_r49 ()
void yy_r50 ()
void yy_r51 ()
void yy_r52 ()
void yy_r53 ()
void yy_r54 ()
void yy_r55 ()
void yy_r56 ()
void yy_r57 ()
void yy_r58 ()
void yy_r59 ()
void yy_r60 ()
void yy_r61 ()
void yy_r62 ()
void yy_r63 ()
void yy_r64 ()
void yy_r65 ()
void yy_r67 ()
void yy_r72 ()
void yy_r73 ()
void yy_r78 ()
void yy_r79 ()
void yy_r83 ()
void yy_r84 ()
void yy_r85 ()
void yy_r86 ()
void yy_r88 ()
void yy_r89 ()
void yy_r90 ()
void yy_r91 ()
void yy_r92 ()
void yy_r93 ()
void yy_r99 ()
void yy_r100 ()
void yy_r101 ()
void yy_r104 ()
void yy_r109 ()
void yy_r110 ()
void yy_r111 ()
void yy_r112 ()
void yy_r114 ()
void yy_r117 ()
void yy_r118 ()
void yy_r119 ()
void yy_r121 ()
void yy_r122 ()
void yy_r124 ()
void yy_r125 ()
void yy_r126 ()
void yy_r128 ()
void yy_r129 ()
void yy_r130 ()
void yy_r131 ()
void yy_r132 ()
void yy_r133 ()
void yy_r134 ()
void yy_r135 ()
void yy_r137 ()
void yy_r139 ()
void yy_r140 ()
void yy_r141 ()
void yy_r142 ()
void yy_r143 ()
void yy_r144 ()
void yy_r145 ()
void yy_r146 ()
void yy_r147 ()
void yy_r148 ()
void yy_r149 ()
void yy_r150 ()
void yy_r151 ()
void yy_r152 ()
void yy_r153 ()
void yy_r156 ()
void yy_r157 ()
void yy_r159 ()
void yy_r160 ()
void yy_r167 ()
void yy_r168 ()
void yy_r169 ()
void yy_r170 ()
void yy_r171 ()
void yy_r172 ()
void yy_r173 ()
void yy_r174 ()
void yy_r175 ()
void yy_r176 ()
void yy_r177 ()
void yy_r178 ()
void yy_r179 ()
void yy_r180 ()
void yy_r181 ()
void yy_r183 ()
void yy_r185 ()
void yy_r186 ()
void yy_r188 ()
void yy_r189 ()
void yy_r190 ()
void yy_r191 ()
void yy_r192 ()
void yy_r194 ()
void yy_r196 ()
void yy_r197 ()
void yy_r198 ()
void yy_reduce ( $yyruleno)
void yy_shift ( $yyNewState,  $yyMajor,  $yypMinor)
void yy_syntax_error ( $yymajor,  $TOKEN)
Variables
static mixed $yyExpectedTokens = array(
/* 0 */ array(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 21, 22, 27, 31, 32, 33, ),/* 1 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 2 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 3 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 4 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 5 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 6 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 7 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 8 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,63,76,),/* 9 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 10 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 11 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 12 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 13 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 14 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 15 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 16 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 17 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 18 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 19 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 20 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 21 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 22 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 23 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 24 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 25 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 26 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 27 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 28 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 29 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 30 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 31 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 32 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 33 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 34 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 35 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 36 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 37 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 38 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 39 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 40 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 41 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 42 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 43 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 44 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 45 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,62,76,),/* 46 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,76,),/* 47 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,76,),/* 48 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,76,),/* 49 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,76,),/* 50 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,76,),/* 51 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,76,),/* 52 */array(15,17,18,21,22,27,31,32,33,34,36,39,54,55,56,57,58,61,76,),/* 53 */array(1,16,28,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 54 */array(1,16,28,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 55 */array(1,16,28,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 56 */array(1,26,28,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 57 */array(1,28,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 58 */array(1,28,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 59 */array(1,28,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 60 */array(1,16,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 61 */array(1,16,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 62 */array(1,38,39,40,41,42,43,44,45,46,47,48,49,50,51,63,64,65,66,67,68,69,70,71,72,73,74,75,),/* 63 */array(1,16,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 64 */array(1,29,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 65 */array(1,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 66 */array(1,2,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 67 */array(1,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,77,),/* 68 */array(1,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 69 */array(1,16,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 70 */array(1,23,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 71 */array(1,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 72 */array(1,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 73 */array(1,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 74 */array(1,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 75 */array(1,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 76 */array(1,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 77 */array(1,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 78 */array(1,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 79 */array(1,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 80 */array(1,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 81 */array(1,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 82 */array(1,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 83 */array(1,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 84 */array(1,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 85 */array(1,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 86 */array(1,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 87 */array(1,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 88 */array(1,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 89 */array(1,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 90 */array(38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 91 */array(38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66,67,68,69,70,71,72,73,74,75,),/* 92 */array(1,16,20,28,36,59,),/* 93 */array(1,16,28,52,),/* 94 */array(1,28,),/* 95 */array(3,4,5,6,7,8,9,10,11,12,15,21,22,27,31,32,33,),/* 96 */array(10,15,21,22,27,31,32,33,76,77,78,),/* 97 */array(15,18,28,30,),/* 98 */array(15,18,28,30,),/* 99 */array(20,57,62,),/* 100 */array(1,2,16,),/* 101 */array(1,16,28,),/* 102 */array(1,16,28,),/* 103 */array(15,18,28,),/* 104 */array(15,18,28,),/* 105 */array(17,18,61,),/* 106 */array(17,36,),/* 107 */array(1,28,),/* 108 */array(1,28,),/* 109 */array(10,15,21,22,27,31,32,33,76,77,78,),/* 110 */array(4,5,6,7,8,12,13,14,),/* 111 */array(1,16,28,29,52,),/* 112 */array(15,18,19,24,),/* 113 */array(15,18,19,60,),/* 114 */array(1,16,28,52,),/* 115 */array(1,16,28,52,),/* 116 */array(15,18,60,),/* 117 */array(1,30,52,),/* 118 */array(15,18,19,),/* 119 */array(1,16,20,),/* 120 */array(19,20,59,),/* 121 */array(1,16,52,),/* 122 */array(19,20,59,),/* 123 */array(15,18,),/* 124 */array(17,36,),/* 125 */array(15,18,),/* 126 */array(15,18,),/* 127 */array(15,18,),/* 128 */array(15,18,),/* 129 */array(17,18,),/* 130 */array(17,36,),/* 131 */array(15,18,),/* 132 */array(1,16,),/* 133 */array(15,18,),/* 134 */array(15,18,),/* 135 */array(20,59,),/* 136 */array(15,18,),/* 137 */array(15,18,),/* 138 */array(15,18,),/* 139 */array(16,28,),/* 140 */array(15,18,),/* 141 */array(15,18,),/* 142 */array(1,52,),/* 143 */array(15,18,),/* 144 */array(17,18,),/* 145 */array(1,),/* 146 */array(28,),/* 147 */array(1,),/* 148 */array(20,),/* 149 */array(1,),/* 150 */array(28,),/* 151 */array(1,),/* 152 */array(1,),/* 153 */array(1,),/* 154 */array(1,),/* 155 */array(20,),/* 156 */array(1,),/* 157 */array(),/* 158 */array(15,17,18,),/* 159 */array(15,18,60,),/* 160 */array(16,28,),/* 161 */array(16,28,),/* 162 */array(16,28,),/* 163 */array(16,28,),/* 164 */array(57,62,),/* 165 */array(15,36,),/* 166 */array(57,62,),/* 167 */array(1,16,),/* 168 */array(16,28,),/* 169 */array(57,62,),/* 170 */array(16,28,),/* 171 */array(16,28,),/* 172 */array(16,28,),/* 173 */array(16,28,),/* 174 */array(57,62,),/* 175 */array(1,16,),/* 176 */array(16,28,),/* 177 */array(16,28,),/* 178 */array(57,62,),/* 179 */array(16,28,),/* 180 */array(1,16,),/* 181 */array(16,28,),/* 182 */array(16,28,),/* 183 */array(16,28,),/* 184 */array(16,28,),/* 185 */array(16,28,),/* 186 */array(16,28,),/* 187 */array(16,28,),/* 188 */array(16,28,),/* 189 */array(13,),/* 190 */array(28,),/* 191 */array(28,),/* 192 */array(20,),/* 193 */array(20,),/* 194 */array(1,),/* 195 */array(20,),/* 196 */array(1,),/* 197 */array(2,),/* 198 */array(2,),/* 199 */array(36,),/* 200 */array(),/* 201 */array(),/* 202 */array(),/* 203 */array(),/* 204 */array(),/* 205 */array(16,23,25,26,28,29,35,36,37,52,59,63,77,),/* 206 */array(16,19,28,36,59,),/* 207 */array(36,57,59,63,),/* 208 */array(15,17,18,34,),/* 209 */array(16,28,36,59,),/* 210 */array(30,36,59,),/* 211 */array(18,60,),/* 212 */array(2,19,),/* 213 */array(36,59,),/* 214 */array(36,59,),/* 215 */array(16,24,),/* 216 */array(35,37,),/* 217 */array(24,77,),/* 218 */array(35,63,),/* 219 */array(23,35,),/* 220 */array(19,57,),/* 221 */array(35,37,),/* 222 */array(35,37,),/* 223 */array(18,),/* 224 */array(2,),/* 225 */array(24,),/* 226 */array(17,),/* 227 */array(18,),/* 228 */array(18,),/* 229 */array(36,),/* 230 */array(57,),/* 231 */array(18,),/* 232 */array(36,),/* 233 */array(18,),/* 234 */array(17,),/* 235 */array(18,),/* 236 */array(34,),/* 237 */array(34,),/* 238 */array(18,),/* 239 */array(17,),/* 240 */array(61,),/* 241 */array(18,),/* 242 */array(37,),/* 243 */array(17,),/* 244 */array(19,),/* 245 */array(63,),/* 246 */array(53,),/* 247 */array(2,),/* 248 */array(17,),/* 249 */array(25,),/* 250 */array(18,),/* 251 */array(18,),/* 252 */array(61,),/* 253 */array(),/* 254 */array(),/* 255 */array(),/* 256 */array(),/* 257 */array(),/* 258 */array(),/* 259 */array(),/* 260 */array(),/* 261 */array(),/* 262 */array(),/* 263 */array(),/* 264 */array(),/* 265 */array(),/* 266 */array(),/* 267 */array(),/* 268 */array(),/* 269 */array(),/* 270 */array(),/* 271 */array(),/* 272 */array(),/* 273 */array(),/* 274 */array(),/* 275 */array(),/* 276 */array(),/* 277 */array(),/* 278 */array(),/* 279 */array(),/* 280 */array(),/* 281 */array(),/* 282 */array(),/* 283 */array(),/* 284 */array(),/* 285 */array(),/* 286 */array(),/* 287 */array(),/* 288 */array(),/* 289 */array(),/* 290 */array(),/* 291 */array(),/* 292 */array(),/* 293 */array(),/* 294 */array(),/* 295 */array(),/* 296 */array(),/* 297 */array(),/* 298 */array(),/* 299 */array(),/* 300 */array(),/* 301 */array(),/* 302 */array(),/* 303 */array(),/* 304 */array(),/* 305 */array(),/* 306 */array(),/* 307 */array(),/* 308 */array(),/* 309 */array(),/* 310 */array(),/* 311 */array(),/* 312 */array(),/* 313 */array(),/* 314 */array(),/* 315 */array(),/* 316 */array(),/* 317 */array(),/* 318 */array(),/* 319 */array(),/* 320 */array(),/* 321 */array(),/* 322 */array(),/* 323 */array(),/* 324 */array(),/* 325 */array(),/* 326 */array(),/* 327 */array(),/* 328 */array(),/* 329 */array(),/* 330 */array(),/* 331 */array(),/* 332 */array(),/* 333 */array(),/* 334 */array(),/* 335 */array(),/* 336 */array(),/* 337 */array(),/* 338 */array(),/* 339 */array(),/* 340 */array(),/* 341 */array(),/* 342 */array(),/* 343 */array(),/* 344 */array(),/* 345 */array(),/* 346 */array(),/* 347 */array(),/* 348 */array(),/* 349 */array(),/* 350 */array(),/* 351 */array(),/* 352 */array(),/* 353 */array(),/* 354 */array(),/* 355 */array(),/* 356 */array(),/* 357 */array(),/* 358 */array(),/* 359 */array(),/* 360 */array(),/* 361 */array(),/* 362 */array(),/* 363 */array(),/* 364 */array(),/* 365 */array(),/* 366 */array(),/* 367 */array(),/* 368 */array(),/* 369 */array(),/* 370 */array(),/* 371 */array(),/* 372 */array(),/* 373 */array(),/* 374 */array(),/* 375 */array(),/* 376 */array(),/* 377 */array(),/* 378 */array(),/* 379 */array(),/* 380 */array(),/* 381 */array(),/* 382 */array(),/* 383 */array(),/* 384 */array(),/* 385 */array(),/* 386 */array(),)
(line 762)
  • access: public
static mixed $yyFallback = array(
)
(line 1199)
  • access: public
static mixed $yyReduceMap = array(
0 => 0,
1 => 1,
2 => 1,
4 => 4,
5 => 5,
6 => 6,
7 => 7,
8 => 8,
9 => 9,
10 => 10,
11 => 11,
12 => 12,
13 => 13,
14 => 14,
15 => 15,
18 => 15,
200 => 15,
16 => 16,
75 => 16,
17 => 17,
103 => 17,
105 => 17,
106 => 17,
127 => 17,
165 => 17,
19 => 19,
20 => 19,
46 => 19,
68 => 19,
69 => 19,
76 => 19,
77 => 19,
82 => 19,
102 => 19,
107 => 19,
108 => 19,
113 => 19,
115 => 19,
116 => 19,
123 => 19,
138 => 19,
164 => 19,
166 => 19,
182 => 19,
187 => 19,
199 => 19,
21 => 21,
22 => 21,
23 => 23,
24 => 24,
25 => 25,
26 => 26,
27 => 27,
28 => 28,
30 => 28,
29 => 29,
31 => 31,
32 => 31,
33 => 33,
34 => 34,
35 => 35,
36 => 36,
37 => 37,
38 => 38,
39 => 39,
40 => 40,
41 => 41,
43 => 41,
42 => 42,
44 => 44,
45 => 45,
47 => 47,
48 => 48,
49 => 49,
50 => 50,
51 => 51,
52 => 52,
53 => 53,
54 => 54,
55 => 55,
56 => 56,
57 => 57,
58 => 58,
59 => 59,
60 => 60,
61 => 61,
62 => 62,
71 => 62,
154 => 62,
158 => 62,
162 => 62,
163 => 62,
63 => 63,
155 => 63,
161 => 63,
64 => 64,
65 => 65,
66 => 65,
70 => 65,
67 => 67,
72 => 72,
73 => 73,
74 => 73,
78 => 78,
79 => 79,
80 => 79,
81 => 79,
83 => 83,
120 => 83,
84 => 84,
87 => 84,
98 => 84,
85 => 85,
86 => 86,
88 => 88,
89 => 89,
90 => 90,
95 => 90,
91 => 91,
94 => 91,
92 => 92,
97 => 92,
93 => 93,
96 => 93,
99 => 99,
100 => 100,
101 => 101,
104 => 104,
109 => 109,
110 => 110,
111 => 111,
112 => 112,
114 => 114,
117 => 117,
118 => 118,
119 => 119,
121 => 121,
122 => 122,
124 => 124,
125 => 125,
126 => 126,
128 => 128,
184 => 128,
129 => 129,
130 => 130,
131 => 131,
132 => 132,
133 => 133,
136 => 133,
134 => 134,
135 => 135,
137 => 137,
139 => 139,
140 => 140,
141 => 141,
142 => 142,
143 => 143,
144 => 144,
145 => 145,
146 => 146,
147 => 147,
148 => 148,
149 => 149,
150 => 150,
151 => 151,
152 => 152,
153 => 153,
156 => 156,
157 => 157,
159 => 159,
160 => 160,
167 => 167,
168 => 168,
169 => 169,
170 => 170,
171 => 171,
172 => 172,
173 => 173,
174 => 174,
175 => 175,
176 => 176,
177 => 177,
178 => 178,
179 => 179,
180 => 180,
181 => 181,
183 => 183,
185 => 185,
186 => 186,
188 => 188,
189 => 189,
190 => 190,
191 => 191,
192 => 192,
193 => 192,
195 => 192,
194 => 194,
196 => 196,
197 => 197,
198 => 198,
)
(line 1943)
  • access: public
static mixed $yyRuleInfo = array(
array( 'lhs' => 80, 'rhs' => 1 ),array('lhs'=>81,'rhs'=>1),array('lhs'=>81,'rhs'=>2),array('lhs'=>81,'rhs'=>0),array('lhs'=>82,'rhs'=>1),array('lhs'=>82,'rhs'=>1),array('lhs'=>82,'rhs'=>1),array('lhs'=>82,'rhs'=>1),array('lhs'=>82,'rhs'=>1),array('lhs'=>82,'rhs'=>1),array('lhs'=>82,'rhs'=>1),array('lhs'=>82,'rhs'=>1),array('lhs'=>82,'rhs'=>1),array('lhs'=>82,'rhs'=>1),array('lhs'=>82,'rhs'=>1),array('lhs'=>84,'rhs'=>2),array('lhs'=>84,'rhs'=>3),array('lhs'=>85,'rhs'=>2),array('lhs'=>85,'rhs'=>0),array('lhs'=>86,'rhs'=>1),array('lhs'=>86,'rhs'=>1),array('lhs'=>86,'rhs'=>1),array('lhs'=>86,'rhs'=>1),array('lhs'=>86,'rhs'=>1),array('lhs'=>86,'rhs'=>1),array('lhs'=>86,'rhs'=>1),array('lhs'=>83,'rhs'=>3),array('lhs'=>83,'rhs'=>5),array('lhs'=>83,'rhs'=>4),array('lhs'=>83,'rhs'=>5),array('lhs'=>83,'rhs'=>4),array('lhs'=>83,'rhs'=>6),array('lhs'=>83,'rhs'=>6),array('lhs'=>83,'rhs'=>7),array('lhs'=>83,'rhs'=>6),array('lhs'=>83,'rhs'=>4),array('lhs'=>83,'rhs'=>3),array('lhs'=>83,'rhs'=>6),array('lhs'=>83,'rhs'=>5),array('lhs'=>83,'rhs'=>7),array('lhs'=>83,'rhs'=>3),array('lhs'=>83,'rhs'=>4),array('lhs'=>83,'rhs'=>3),array('lhs'=>83,'rhs'=>4),array('lhs'=>83,'rhs'=>12),array('lhs'=>96,'rhs'=>2),array('lhs'=>96,'rhs'=>1),array('lhs'=>83,'rhs'=>6),array('lhs'=>83,'rhs'=>8),array('lhs'=>83,'rhs'=>3),array('lhs'=>83,'rhs'=>8),array('lhs'=>83,'rhs'=>11),array('lhs'=>83,'rhs'=>8),array('lhs'=>83,'rhs'=>11),array('lhs'=>83,'rhs'=>4),array('lhs'=>83,'rhs'=>5),array('lhs'=>83,'rhs'=>1),array('lhs'=>83,'rhs'=>3),array('lhs'=>83,'rhs'=>4),array('lhs'=>83,'rhs'=>5),array('lhs'=>83,'rhs'=>6),array('lhs'=>89,'rhs'=>2),array('lhs'=>89,'rhs'=>1),array('lhs'=>89,'rhs'=>0),array('lhs'=>98,'rhs'=>4),array('lhs'=>98,'rhs'=>4),array('lhs'=>98,'rhs'=>4),array('lhs'=>98,'rhs'=>2),array('lhs'=>98,'rhs'=>2),array('lhs'=>98,'rhs'=>2),array('lhs'=>98,'rhs'=>4),array('lhs'=>93,'rhs'=>1),array('lhs'=>93,'rhs'=>3),array('lhs'=>92,'rhs'=>4),array('lhs'=>92,'rhs'=>3),array('lhs'=>92,'rhs'=>3),array('lhs'=>90,'rhs'=>1),array('lhs'=>90,'rhs'=>1),array('lhs'=>90,'rhs'=>4),array('lhs'=>90,'rhs'=>3),array('lhs'=>90,'rhs'=>3),array('lhs'=>90,'rhs'=>3),array('lhs'=>90,'rhs'=>1),array('lhs'=>90,'rhs'=>2),array('lhs'=>90,'rhs'=>3),array('lhs'=>90,'rhs'=>3),array('lhs'=>90,'rhs'=>3),array('lhs'=>90,'rhs'=>3),array('lhs'=>90,'rhs'=>3),array('lhs'=>90,'rhs'=>3),array('lhs'=>90,'rhs'=>2),array('lhs'=>90,'rhs'=>2),array('lhs'=>90,'rhs'=>3),array('lhs'=>90,'rhs'=>3),array('lhs'=>90,'rhs'=>2),array('lhs'=>90,'rhs'=>2),array('lhs'=>90,'rhs'=>3),array('lhs'=>90,'rhs'=>3),array('lhs'=>90,'rhs'=>3),array('lhs'=>90,'rhs'=>3),array('lhs'=>99,'rhs'=>8),array('lhs'=>99,'rhs'=>7),array('lhs'=>87,'rhs'=>1),array('lhs'=>87,'rhs'=>2),array('lhs'=>87,'rhs'=>2),array('lhs'=>87,'rhs'=>2),array('lhs'=>87,'rhs'=>2),array('lhs'=>87,'rhs'=>1),array('lhs'=>87,'rhs'=>1),array('lhs'=>87,'rhs'=>3),array('lhs'=>87,'rhs'=>2),array('lhs'=>87,'rhs'=>2),array('lhs'=>87,'rhs'=>1),array('lhs'=>87,'rhs'=>1),array('lhs'=>87,'rhs'=>3),array('lhs'=>87,'rhs'=>1),array('lhs'=>87,'rhs'=>1),array('lhs'=>87,'rhs'=>3),array('lhs'=>87,'rhs'=>3),array('lhs'=>87,'rhs'=>1),array('lhs'=>87,'rhs'=>2),array('lhs'=>103,'rhs'=>1),array('lhs'=>103,'rhs'=>4),array('lhs'=>103,'rhs'=>1),array('lhs'=>103,'rhs'=>3),array('lhs'=>103,'rhs'=>3),array('lhs'=>91,'rhs'=>3),array('lhs'=>108,'rhs'=>2),array('lhs'=>108,'rhs'=>0),array('lhs'=>109,'rhs'=>3),array('lhs'=>109,'rhs'=>5),array('lhs'=>109,'rhs'=>2),array('lhs'=>109,'rhs'=>2),array('lhs'=>109,'rhs'=>4),array('lhs'=>109,'rhs'=>3),array('lhs'=>109,'rhs'=>5),array('lhs'=>109,'rhs'=>3),array('lhs'=>109,'rhs'=>2),array('lhs'=>95,'rhs'=>1),array('lhs'=>95,'rhs'=>2),array('lhs'=>110,'rhs'=>1),array('lhs'=>110,'rhs'=>3),array('lhs'=>107,'rhs'=>2),array('lhs'=>111,'rhs'=>1),array('lhs'=>111,'rhs'=>2),array('lhs'=>112,'rhs'=>3),array('lhs'=>112,'rhs'=>4),array('lhs'=>112,'rhs'=>5),array('lhs'=>112,'rhs'=>6),array('lhs'=>112,'rhs'=>2),array('lhs'=>104,'rhs'=>4),array('lhs'=>113,'rhs'=>4),array('lhs'=>113,'rhs'=>5),array('lhs'=>114,'rhs'=>3),array('lhs'=>114,'rhs'=>1),array('lhs'=>114,'rhs'=>0),array('lhs'=>88,'rhs'=>3),array('lhs'=>88,'rhs'=>2),array('lhs'=>115,'rhs'=>3),array('lhs'=>115,'rhs'=>2),array('lhs'=>97,'rhs'=>2),array('lhs'=>97,'rhs'=>0),array('lhs'=>116,'rhs'=>2),array('lhs'=>116,'rhs'=>2),array('lhs'=>106,'rhs'=>1),array('lhs'=>106,'rhs'=>2),array('lhs'=>106,'rhs'=>1),array('lhs'=>106,'rhs'=>3),array('lhs'=>106,'rhs'=>4),array('lhs'=>101,'rhs'=>1),array('lhs'=>101,'rhs'=>1),array('lhs'=>101,'rhs'=>1),array('lhs'=>101,'rhs'=>1),array('lhs'=>101,'rhs'=>1),array('lhs'=>101,'rhs'=>1),array('lhs'=>101,'rhs'=>1),array('lhs'=>101,'rhs'=>1),array('lhs'=>101,'rhs'=>1),array('lhs'=>102,'rhs'=>1),array('lhs'=>102,'rhs'=>1),array('lhs'=>102,'rhs'=>1),array('lhs'=>100,'rhs'=>3),array('lhs'=>117,'rhs'=>1),array('lhs'=>117,'rhs'=>3),array('lhs'=>117,'rhs'=>0),array('lhs'=>118,'rhs'=>3),array('lhs'=>118,'rhs'=>3),array('lhs'=>118,'rhs'=>1),array('lhs'=>105,'rhs'=>2),array('lhs'=>105,'rhs'=>3),array('lhs'=>119,'rhs'=>2),array('lhs'=>119,'rhs'=>1),array('lhs'=>120,'rhs'=>3),array('lhs'=>120,'rhs'=>3),array('lhs'=>120,'rhs'=>1),array('lhs'=>120,'rhs'=>3),array('lhs'=>120,'rhs'=>3),array('lhs'=>120,'rhs'=>1),array('lhs'=>120,'rhs'=>1),array('lhs'=>94,'rhs'=>1),array('lhs'=>94,'rhs'=>0),)
(line 1739)
  • access: public
static mixed $yyRuleName = array(
/* 0 */ "start ::= template",
/* 1 */ "template ::= template_element",
/* 2 */ "template ::= template template_element",
/* 3 */ "template ::=",
/* 4 */ "template_element ::= smartytag",
/* 5 */ "template_element ::= COMMENT",
/* 6 */ "template_element ::= literal",
/* 7 */ "template_element ::= PHPSTARTTAG",
/* 8 */ "template_element ::= PHPENDTAG",
/* 9 */ "template_element ::= ASPSTARTTAG",
/* 10 */ "template_element ::= ASPENDTAG",
/* 11 */ "template_element ::= FAKEPHPSTARTTAG",
/* 12 */ "template_element ::= XMLTAG",
/* 13 */ "template_element ::= OTHER",
/* 14 */ "template_element ::= LINEBREAK",
/* 15 */ "literal ::= LITERALSTART LITERALEND",
/* 16 */ "literal ::= LITERALSTART literal_elements LITERALEND",
/* 17 */ "literal_elements ::= literal_elements literal_element",
/* 18 */ "literal_elements ::=",
/* 19 */ "literal_element ::= literal",
/* 20 */ "literal_element ::= LITERAL",
/* 21 */ "literal_element ::= PHPSTARTTAG",
/* 22 */ "literal_element ::= FAKEPHPSTARTTAG",
/* 23 */ "literal_element ::= PHPENDTAG",
/* 24 */ "literal_element ::= ASPSTARTTAG",
/* 25 */ "literal_element ::= ASPENDTAG",
/* 26 */ "smartytag ::= LDEL value RDEL",
/* 27 */ "smartytag ::= LDEL value modifierlist attributes RDEL",
/* 28 */ "smartytag ::= LDEL value attributes RDEL",
/* 29 */ "smartytag ::= LDEL expr modifierlist attributes RDEL",
/* 30 */ "smartytag ::= LDEL expr attributes RDEL",
/* 31 */ "smartytag ::= LDEL DOLLAR ID EQUAL value RDEL",
/* 32 */ "smartytag ::= LDEL DOLLAR ID EQUAL expr RDEL",
/* 33 */ "smartytag ::= LDEL DOLLAR ID EQUAL expr attributes RDEL",
/* 34 */ "smartytag ::= LDEL varindexed EQUAL expr attributes RDEL",
/* 35 */ "smartytag ::= LDEL ID attributes RDEL",
/* 36 */ "smartytag ::= LDEL ID RDEL",
/* 37 */ "smartytag ::= LDEL ID PTR ID attributes RDEL",
/* 38 */ "smartytag ::= LDEL ID modifierlist attributes RDEL",
/* 39 */ "smartytag ::= LDEL ID PTR ID modifierlist attributes RDEL",
/* 40 */ "smartytag ::= LDELIF expr RDEL",
/* 41 */ "smartytag ::= LDELIF expr attributes RDEL",
/* 42 */ "smartytag ::= LDELIF statement RDEL",
/* 43 */ "smartytag ::= LDELIF statement attributes RDEL",
/* 44 */ "smartytag ::= LDELFOR statements SEMICOLON optspace expr SEMICOLON optspace DOLLAR varvar foraction attributes RDEL",
/* 45 */ "foraction ::= EQUAL expr",
/* 46 */ "foraction ::= INCDEC",
/* 47 */ "smartytag ::= LDELFOR statement TO expr attributes RDEL",
/* 48 */ "smartytag ::= LDELFOR statement TO expr STEP expr attributes RDEL",
/* 49 */ "smartytag ::= LDELFOREACH attributes RDEL",
/* 50 */ "smartytag ::= LDELFOREACH SPACE value AS DOLLAR varvar attributes RDEL",
/* 51 */ "smartytag ::= LDELFOREACH SPACE value AS DOLLAR varvar APTR DOLLAR varvar attributes RDEL",
/* 52 */ "smartytag ::= LDELFOREACH SPACE expr AS DOLLAR varvar attributes RDEL",
/* 53 */ "smartytag ::= LDELFOREACH SPACE expr AS DOLLAR varvar APTR DOLLAR varvar attributes RDEL",
/* 54 */ "smartytag ::= LDELSETFILTER ID modparameters RDEL",
/* 55 */ "smartytag ::= LDELSETFILTER ID modparameters modifierlist RDEL",
/* 56 */ "smartytag ::= SMARTYBLOCKCHILD",
/* 57 */ "smartytag ::= LDELSLASH ID RDEL",
/* 58 */ "smartytag ::= LDELSLASH ID modifierlist RDEL",
/* 59 */ "smartytag ::= LDELSLASH ID PTR ID RDEL",
/* 60 */ "smartytag ::= LDELSLASH ID PTR ID modifierlist RDEL",
/* 61 */ "attributes ::= attributes attribute",
/* 62 */ "attributes ::= attribute",
/* 63 */ "attributes ::=",
/* 64 */ "attribute ::= SPACE ID EQUAL ID",
/* 65 */ "attribute ::= SPACE ID EQUAL expr",
/* 66 */ "attribute ::= SPACE ID EQUAL value",
/* 67 */ "attribute ::= SPACE ID",
/* 68 */ "attribute ::= SPACE expr",
/* 69 */ "attribute ::= SPACE value",
/* 70 */ "attribute ::= SPACE INTEGER EQUAL expr",
/* 71 */ "statements ::= statement",
/* 72 */ "statements ::= statements COMMA statement",
/* 73 */ "statement ::= DOLLAR varvar EQUAL expr",
/* 74 */ "statement ::= varindexed EQUAL expr",
/* 75 */ "statement ::= OPENP statement CLOSEP",
/* 76 */ "expr ::= value",
/* 77 */ "expr ::= ternary",
/* 78 */ "expr ::= DOLLAR ID COLON ID",
/* 79 */ "expr ::= expr MATH value",
/* 80 */ "expr ::= expr UNIMATH value",
/* 81 */ "expr ::= expr ANDSYM value",
/* 82 */ "expr ::= array",
/* 83 */ "expr ::= expr modifierlist",
/* 84 */ "expr ::= expr ifcond expr",
/* 85 */ "expr ::= expr ISIN array",
/* 86 */ "expr ::= expr ISIN value",
/* 87 */ "expr ::= expr lop expr",
/* 88 */ "expr ::= expr ISDIVBY expr",
/* 89 */ "expr ::= expr ISNOTDIVBY expr",
/* 90 */ "expr ::= expr ISEVEN",
/* 91 */ "expr ::= expr ISNOTEVEN",
/* 92 */ "expr ::= expr ISEVENBY expr",
/* 93 */ "expr ::= expr ISNOTEVENBY expr",
/* 94 */ "expr ::= expr ISODD",
/* 95 */ "expr ::= expr ISNOTODD",
/* 96 */ "expr ::= expr ISODDBY expr",
/* 97 */ "expr ::= expr ISNOTODDBY expr",
/* 98 */ "expr ::= value INSTANCEOF ID",
/* 99 */ "expr ::= value INSTANCEOF value",
/* 100 */ "ternary ::= OPENP expr CLOSEP QMARK DOLLAR ID COLON expr",
/* 101 */ "ternary ::= OPENP expr CLOSEP QMARK expr COLON expr",
/* 102 */ "value ::= variable",
/* 103 */ "value ::= UNIMATH value",
/* 104 */ "value ::= NOT value",
/* 105 */ "value ::= TYPECAST value",
/* 106 */ "value ::= variable INCDEC",
/* 107 */ "value ::= HEX",
/* 108 */ "value ::= INTEGER",
/* 109 */ "value ::= INTEGER DOT INTEGER",
/* 110 */ "value ::= INTEGER DOT",
/* 111 */ "value ::= DOT INTEGER",
/* 112 */ "value ::= ID",
/* 113 */ "value ::= function",
/* 114 */ "value ::= OPENP expr CLOSEP",
/* 115 */ "value ::= SINGLEQUOTESTRING",
/* 116 */ "value ::= doublequoted_with_quotes",
/* 117 */ "value ::= ID DOUBLECOLON static_class_access",
/* 118 */ "value ::= varindexed DOUBLECOLON static_class_access",
/* 119 */ "value ::= smartytag",
/* 120 */ "value ::= value modifierlist",
/* 121 */ "variable ::= varindexed",
/* 122 */ "variable ::= DOLLAR varvar AT ID",
/* 123 */ "variable ::= object",
/* 124 */ "variable ::= HATCH ID HATCH",
/* 125 */ "variable ::= HATCH variable HATCH",
/* 126 */ "varindexed ::= DOLLAR varvar arrayindex",
/* 127 */ "arrayindex ::= arrayindex indexdef",
/* 128 */ "arrayindex ::=",
/* 129 */ "indexdef ::= DOT DOLLAR varvar",
/* 130 */ "indexdef ::= DOT DOLLAR varvar AT ID",
/* 131 */ "indexdef ::= DOT ID",
/* 132 */ "indexdef ::= DOT INTEGER",
/* 133 */ "indexdef ::= DOT LDEL expr RDEL",
/* 134 */ "indexdef ::= OPENB ID CLOSEB",
/* 135 */ "indexdef ::= OPENB ID DOT ID CLOSEB",
/* 136 */ "indexdef ::= OPENB expr CLOSEB",
/* 137 */ "indexdef ::= OPENB CLOSEB",
/* 138 */ "varvar ::= varvarele",
/* 139 */ "varvar ::= varvar varvarele",
/* 140 */ "varvarele ::= ID",
/* 141 */ "varvarele ::= LDEL expr RDEL",
/* 142 */ "object ::= varindexed objectchain",
/* 143 */ "objectchain ::= objectelement",
/* 144 */ "objectchain ::= objectchain objectelement",
/* 145 */ "objectelement ::= PTR ID arrayindex",
/* 146 */ "objectelement ::= PTR DOLLAR varvar arrayindex",
/* 147 */ "objectelement ::= PTR LDEL expr RDEL arrayindex",
/* 148 */ "objectelement ::= PTR ID LDEL expr RDEL arrayindex",
/* 149 */ "objectelement ::= PTR method",
/* 150 */ "function ::= ID OPENP params CLOSEP",
/* 151 */ "method ::= ID OPENP params CLOSEP",
/* 152 */ "method ::= DOLLAR ID OPENP params CLOSEP",
/* 153 */ "params ::= params COMMA expr",
/* 154 */ "params ::= expr",
/* 155 */ "params ::=",
/* 156 */ "modifierlist ::= modifierlist modifier modparameters",
/* 157 */ "modifierlist ::= modifier modparameters",
/* 158 */ "modifier ::= VERT AT ID",
/* 159 */ "modifier ::= VERT ID",
/* 160 */ "modparameters ::= modparameters modparameter",
/* 161 */ "modparameters ::=",
/* 162 */ "modparameter ::= COLON value",
/* 163 */ "modparameter ::= COLON array",
/* 164 */ "static_class_access ::= method",
/* 165 */ "static_class_access ::= method objectchain",
/* 166 */ "static_class_access ::= ID",
/* 167 */ "static_class_access ::= DOLLAR ID arrayindex",
/* 168 */ "static_class_access ::= DOLLAR ID arrayindex objectchain",
/* 169 */ "ifcond ::= EQUALS",
/* 170 */ "ifcond ::= NOTEQUALS",
/* 171 */ "ifcond ::= GREATERTHAN",
/* 172 */ "ifcond ::= LESSTHAN",
/* 173 */ "ifcond ::= GREATEREQUAL",
/* 174 */ "ifcond ::= LESSEQUAL",
/* 175 */ "ifcond ::= IDENTITY",
/* 176 */ "ifcond ::= NONEIDENTITY",
/* 177 */ "ifcond ::= MOD",
/* 178 */ "lop ::= LAND",
/* 179 */ "lop ::= LOR",
/* 180 */ "lop ::= LXOR",
/* 181 */ "array ::= OPENB arrayelements CLOSEB",
/* 182 */ "arrayelements ::= arrayelement",
/* 183 */ "arrayelements ::= arrayelements COMMA arrayelement",
/* 184 */ "arrayelements ::=",
/* 185 */ "arrayelement ::= value APTR expr",
/* 186 */ "arrayelement ::= ID APTR expr",
/* 187 */ "arrayelement ::= expr",
/* 188 */ "doublequoted_with_quotes ::= QUOTE QUOTE",
/* 189 */ "doublequoted_with_quotes ::= QUOTE doublequoted QUOTE",
/* 190 */ "doublequoted ::= doublequoted doublequotedcontent",
/* 191 */ "doublequoted ::= doublequotedcontent",
/* 192 */ "doublequotedcontent ::= BACKTICK variable BACKTICK",
/* 193 */ "doublequotedcontent ::= BACKTICK expr BACKTICK",
/* 194 */ "doublequotedcontent ::= DOLLARID",
/* 195 */ "doublequotedcontent ::= LDEL variable RDEL",
/* 196 */ "doublequotedcontent ::= LDEL expr RDEL",
/* 197 */ "doublequotedcontent ::= smartytag",
/* 198 */ "doublequotedcontent ::= OTHER",
/* 199 */ "optspace ::= SPACE",
/* 200 */ "optspace ::=",
)
(line 1258)
  • access: public
static mixed $yyTraceFILE (line 1218)
  • access: public
static mixed $yyTracePrompt (line 1219)
  • access: public
static mixed $yy_action = array(
/* 0 */ 211, 316, 317, 319, 318, 315, 314, 310, 309, 311,
/* 10 */ 312, 313, 320, 189, 304, 161, 38, 589, 95, 265,
/* 20 */ 317, 319, 7, 106, 289, 37, 26, 30, 146, 283,
/* 30 */ 10, 285, 250, 286, 238, 280, 287, 49, 48, 46,
/* 40 */ 45, 20, 29, 365, 366, 28, 32, 373, 374, 15,
/* 50 */ 11, 328, 323, 322, 324, 327, 231, 211, 4, 189,
/* 60 */ 329, 332, 211, 382, 383, 384, 385, 381, 380, 376,
/* 70 */ 375, 377, 281, 378, 379, 211, 360, 450, 180, 251,
/* 80 */ 117, 144, 196, 74, 135, 260, 17, 451, 26, 30,
/* 90 */ 307, 283, 299, 361, 35, 158, 225, 368, 362, 451,
/* 100 */ 343, 30, 30, 226, 44, 203, 285, 4, 47, 203,
/* 110 */ 218, 259, 49, 48, 46, 45, 20, 29, 365, 366,
/* 120 */ 28, 32, 373, 374, 15, 11, 351, 108, 176, 334,
/* 130 */ 144, 193, 337, 23, 129, 134, 371, 289, 382, 383,
/* 140 */ 384, 385, 381, 380, 376, 375, 377, 281, 378, 379,
/* 150 */ 211, 360, 372, 26, 203, 142, 283, 31, 68, 122,
/* 160 */ 242, 26, 109, 353, 283, 346, 454, 299, 361, 25,
/* 170 */ 185, 225, 368, 362, 30, 343, 239, 30, 454, 289,
/* 180 */ 4, 41, 26, 143, 165, 283, 4, 49, 48, 46,
/* 190 */ 45, 20, 29, 365, 366, 28, 32, 373, 374, 15,
/* 200 */ 11, 101, 160, 144, 26, 208, 34, 283, 31, 144,
/* 210 */ 8, 289, 4, 382, 383, 384, 385, 381, 380, 376,
/* 220 */ 375, 377, 281, 378, 379, 211, 360, 227, 203, 357,
/* 230 */ 142, 197, 19, 73, 135, 144, 211, 302, 9, 158,
/* 240 */ 340, 26, 299, 361, 283, 158, 225, 368, 362, 228,
/* 250 */ 343, 294, 30, 6, 331, 235, 330, 221, 195, 337,
/* 260 */ 126, 240, 49, 48, 46, 45, 20, 29, 365, 366,
/* 270 */ 28, 32, 373, 374, 15, 11, 211, 16, 129, 244,
/* 280 */ 249, 219, 208, 192, 337, 302, 228, 8, 382, 383,
/* 290 */ 384, 385, 381, 380, 376, 375, 377, 281, 378, 379,
/* 300 */ 163, 211, 107, 188, 105, 40, 40, 266, 277, 289,
/* 310 */ 241, 232, 289, 49, 48, 46, 45, 20, 29, 365,
/* 320 */ 366, 28, 32, 373, 374, 15, 11, 211, 168, 203,
/* 330 */ 40, 2, 278, 167, 175, 244, 242, 289, 350, 382,
/* 340 */ 383, 384, 385, 381, 380, 376, 375, 377, 281, 378,
/* 350 */ 379, 191, 47, 184, 204, 234, 169, 198, 287, 386,
/* 360 */ 203, 203, 289, 124, 49, 48, 46, 45, 20, 29,
/* 370 */ 365, 366, 28, 32, 373, 374, 15, 11, 211, 204,
/* 380 */ 182, 26, 26, 26, 283, 212, 224, 118, 131, 289,
/* 390 */ 382, 383, 384, 385, 381, 380, 376, 375, 377, 281,
/* 400 */ 378, 379, 370, 172, 244, 270, 204, 130, 211, 164,
/* 410 */ 26, 287, 289, 229, 178, 49, 48, 46, 45, 20,
/* 420 */ 29, 365, 366, 28, 32, 373, 374, 15, 11, 204,
/* 430 */ 364, 298, 5, 26, 100, 30, 247, 148, 148, 99,
/* 440 */ 159, 382, 383, 384, 385, 381, 380, 376, 375, 377,
/* 450 */ 281, 378, 379, 211, 354, 370, 360, 174, 26, 369,
/* 460 */ 142, 283, 360, 73, 135, 158, 157, 123, 24, 155,
/* 470 */ 135, 30, 299, 361, 211, 190, 225, 368, 362, 272,
/* 480 */ 343, 252, 225, 368, 362, 343, 343, 222, 223, 306,
/* 490 */ 49, 48, 46, 45, 20, 29, 365, 366, 28, 32,
/* 500 */ 373, 374, 15, 11, 129, 43, 236, 9, 269, 258,
/* 510 */ 199, 133, 33, 14, 202, 103, 382, 383, 384, 385,
/* 520 */ 381, 380, 376, 375, 377, 281, 378, 379, 211, 360,
/* 530 */ 370, 170, 262, 142, 360, 36, 73, 135, 151, 141,
/* 540 */ 289, 245, 135, 276, 211, 299, 361, 211, 44, 225,
/* 550 */ 368, 362, 287, 343, 225, 368, 362, 119, 343, 295,
/* 560 */ 216, 267, 282, 296, 211, 49, 48, 46, 45, 20,
/* 570 */ 29, 365, 366, 28, 32, 373, 374, 15, 11, 284,
/* 580 */ 181, 223, 333, 138, 302, 236, 297, 6, 127, 289,
/* 590 */ 116, 382, 383, 384, 385, 381, 380, 376, 375, 377,
/* 600 */ 281, 378, 379, 211, 360, 370, 177, 94, 142, 303,
/* 610 */ 292, 54, 122, 139, 162, 289, 150, 261, 264, 293,
/* 620 */ 299, 361, 30, 289, 225, 368, 362, 287, 343, 30,
/* 630 */ 287, 30, 132, 300, 308, 287, 158, 211, 30, 334,
/* 640 */ 49, 48, 46, 45, 20, 29, 365, 366, 28, 32,
/* 650 */ 373, 374, 15, 11, 211, 204, 166, 12, 275, 287,
/* 660 */ 273, 248, 342, 98, 97, 113, 382, 383, 384, 385,
/* 670 */ 381, 380, 376, 375, 377, 281, 378, 379, 370, 370,
/* 680 */ 370, 110, 18, 321, 324, 324, 324, 324, 324, 324,
/* 690 */ 246, 49, 48, 46, 45, 20, 29, 365, 366, 28,
/* 700 */ 32, 373, 374, 15, 11, 211, 324, 324, 324, 324,
/* 710 */ 324, 324, 324, 324, 112, 136, 104, 382, 383, 384,
/* 720 */ 385, 381, 380, 376, 375, 377, 281, 378, 379, 370,
/* 730 */ 370, 370, 324, 324, 324, 324, 324, 324, 324, 324,
/* 740 */ 324, 256, 49, 48, 46, 45, 20, 29, 365, 366,
/* 750 */ 28, 32, 373, 374, 15, 11, 211, 324, 324, 324,
/* 760 */ 324, 324, 324, 324, 324, 324, 324, 324, 382, 383,
/* 770 */ 384, 385, 381, 380, 376, 375, 377, 281, 378, 379,
/* 780 */ 351, 324, 324, 30, 324, 324, 324, 324, 324, 324,
/* 790 */ 324, 324, 324, 49, 48, 46, 45, 20, 29, 365,
/* 800 */ 366, 28, 32, 373, 374, 15, 11, 211, 324, 324,
/* 810 */ 324, 324, 324, 324, 324, 324, 324, 355, 324, 382,
/* 820 */ 383, 384, 385, 381, 380, 376, 375, 377, 281, 378,
/* 830 */ 379, 324, 324, 324, 324, 324, 324, 324, 324, 324,
/* 840 */ 324, 324, 324, 324, 49, 48, 46, 45, 20, 29,
/* 850 */ 365, 366, 28, 32, 373, 374, 15, 11, 324, 324,
/* 860 */ 324, 324, 324, 324, 324, 324, 324, 324, 324, 257,
/* 870 */ 382, 383, 384, 385, 381, 380, 376, 375, 377, 281,
/* 880 */ 378, 379, 211, 324, 324, 324, 194, 360, 211, 288,
/* 890 */ 255, 145, 324, 352, 336, 135, 324, 200, 42, 22,
/* 900 */ 27, 30, 30, 341, 7, 106, 30, 225, 368, 362,
/* 910 */ 146, 343, 324, 203, 250, 286, 238, 324, 211, 49,
/* 920 */ 48, 46, 45, 20, 29, 365, 366, 28, 32, 373,
/* 930 */ 374, 15, 11, 305, 324, 324, 324, 324, 324, 47,
/* 940 */ 324, 324, 324, 324, 324, 382, 383, 384, 385, 381,
/* 950 */ 380, 376, 375, 377, 281, 378, 379, 211, 324, 359,
/* 960 */ 39, 349, 360, 326, 348, 291, 156, 324, 352, 344,
/* 970 */ 135, 324, 201, 42, 324, 30, 30, 30, 324, 7,
/* 980 */ 106, 30, 225, 368, 362, 146, 343, 324, 324, 250,
/* 990 */ 286, 238, 324, 324, 49, 48, 46, 45, 20, 29,
/* 1000 */ 365, 366, 28, 32, 373, 374, 15, 11, 211, 324,
/* 1010 */ 324, 324, 324, 324, 324, 324, 324, 324, 324, 324,
/* 1020 */ 382, 383, 384, 385, 381, 380, 376, 375, 377, 281,
/* 1030 */ 378, 379, 324, 324, 358, 39, 349, 324, 324, 324,
/* 1040 */ 324, 324, 324, 324, 324, 49, 48, 46, 45, 20,
/* 1050 */ 29, 365, 366, 28, 32, 373, 374, 15, 11, 324,
/* 1060 */ 324, 324, 324, 324, 324, 324, 324, 324, 324, 324,
/* 1070 */ 324, 382, 383, 384, 385, 381, 380, 376, 375, 377,
/* 1080 */ 281, 378, 379, 324, 49, 48, 46, 45, 20, 29,
/* 1090 */ 365, 366, 28, 32, 373, 374, 15, 11, 324, 324,
/* 1100 */ 324, 324, 324, 324, 324, 324, 324, 324, 324, 324,
/* 1110 */ 382, 383, 384, 385, 381, 380, 376, 375, 377, 281,
/* 1120 */ 378, 379, 324, 324, 324, 324, 38, 324, 140, 207,
/* 1130 */ 324, 360, 7, 106, 290, 147, 324, 356, 146, 135,
/* 1140 */ 324, 324, 250, 286, 238, 230, 30, 13, 367, 30,
/* 1150 */ 51, 225, 368, 362, 324, 343, 360, 324, 324, 324,
/* 1160 */ 152, 324, 324, 324, 135, 50, 52, 301, 237, 363,
/* 1170 */ 324, 360, 105, 1, 254, 154, 225, 368, 362, 135,
/* 1180 */ 343, 324, 38, 324, 140, 214, 324, 96, 7, 106,
/* 1190 */ 279, 225, 368, 362, 146, 343, 347, 345, 250, 286,
/* 1200 */ 238, 230, 30, 13, 274, 324, 51, 338, 30, 30,
/* 1210 */ 360, 324, 324, 324, 121, 324, 30, 53, 135, 30,
/* 1220 */ 211, 50, 52, 301, 237, 363, 299, 361, 105, 1,
/* 1230 */ 225, 368, 362, 211, 343, 453, 324, 268, 38, 324,
/* 1240 */ 128, 214, 324, 96, 7, 106, 253, 453, 339, 30,
/* 1250 */ 146, 335, 233, 324, 250, 286, 238, 230, 30, 3,
/* 1260 */ 30, 324, 51, 30, 271, 324, 360, 324, 4, 324,
/* 1270 */ 142, 47, 324, 84, 135, 324, 30, 50, 52, 301,
/* 1280 */ 237, 363, 299, 361, 105, 1, 225, 368, 362, 324,
/* 1290 */ 343, 144, 324, 324, 38, 324, 125, 92, 324, 96,
/* 1300 */ 7, 106, 324, 324, 324, 324, 146, 324, 324, 324,
/* 1310 */ 250, 286, 238, 230, 324, 13, 324, 324, 51, 324,
/* 1320 */ 324, 324, 360, 324, 324, 324, 142, 324, 324, 89,
/* 1330 */ 135, 324, 211, 50, 52, 301, 237, 363, 299, 361,
/* 1340 */ 105, 1, 225, 368, 362, 324, 343, 456, 324, 324,
/* 1350 */ 38, 324, 126, 214, 324, 96, 7, 106, 324, 456,
/* 1360 */ 243, 324, 146, 324, 324, 324, 250, 286, 238, 230,
/* 1370 */ 324, 21, 324, 324, 51, 324, 324, 324, 360, 324,
/* 1380 */ 324, 324, 142, 47, 324, 87, 135, 324, 211, 50,
/* 1390 */ 52, 301, 237, 363, 299, 361, 105, 1, 225, 368,
/* 1400 */ 362, 324, 343, 456, 324, 324, 38, 324, 140, 210,
/* 1410 */ 324, 96, 7, 106, 324, 456, 324, 324, 146, 324,
/* 1420 */ 324, 324, 250, 286, 238, 230, 324, 13, 324, 324,
/* 1430 */ 51, 324, 324, 324, 360, 324, 324, 324, 142, 47,
/* 1440 */ 324, 63, 135, 324, 211, 50, 52, 301, 237, 363,
/* 1450 */ 299, 361, 105, 1, 225, 368, 362, 324, 343, 325,
/* 1460 */ 324, 324, 38, 324, 137, 214, 324, 96, 7, 106,
/* 1470 */ 324, 30, 324, 324, 146, 324, 324, 324, 250, 286,
/* 1480 */ 238, 230, 324, 13, 324, 324, 51, 324, 324, 324,
/* 1490 */ 360, 324, 324, 324, 142, 47, 324, 80, 135, 324,
/* 1500 */ 324, 50, 52, 301, 237, 363, 299, 361, 105, 1,
/* 1510 */ 225, 368, 362, 324, 343, 324, 324, 324, 38, 324,
/* 1520 */ 140, 206, 324, 96, 7, 106, 324, 324, 324, 324,
/* 1530 */ 146, 324, 324, 324, 250, 286, 238, 220, 324, 13,
/* 1540 */ 324, 324, 51, 324, 324, 324, 360, 324, 324, 324,
/* 1550 */ 114, 324, 324, 75, 135, 324, 324, 50, 52, 301,
/* 1560 */ 237, 363, 299, 361, 105, 1, 225, 368, 362, 324,
/* 1570 */ 343, 324, 324, 324, 38, 324, 140, 205, 324, 96,
/* 1580 */ 7, 106, 324, 324, 324, 324, 146, 324, 324, 324,
/* 1590 */ 250, 286, 238, 230, 324, 13, 324, 324, 51, 324,
/* 1600 */ 324, 324, 360, 324, 324, 324, 142, 324, 324, 77,
/* 1610 */ 135, 324, 324, 50, 52, 301, 237, 363, 299, 361,
/* 1620 */ 105, 1, 225, 368, 362, 324, 343, 324, 324, 324,
/* 1630 */ 38, 324, 140, 209, 324, 96, 7, 106, 324, 324,
/* 1640 */ 324, 324, 146, 324, 324, 324, 250, 286, 238, 230,
/* 1650 */ 324, 13, 324, 324, 51, 324, 324, 324, 360, 324,
/* 1660 */ 324, 324, 142, 324, 324, 85, 135, 324, 324, 50,
/* 1670 */ 52, 301, 237, 363, 299, 361, 105, 1, 225, 368,
/* 1680 */ 362, 324, 343, 324, 324, 324, 38, 324, 126, 213,
/* 1690 */ 324, 96, 7, 106, 324, 324, 324, 324, 146, 324,
/* 1700 */ 324, 324, 250, 286, 238, 230, 324, 21, 324, 324,
/* 1710 */ 51, 324, 324, 324, 360, 324, 324, 324, 142, 324,
/* 1720 */ 324, 71, 135, 324, 324, 50, 52, 301, 237, 363,
/* 1730 */ 299, 361, 105, 324, 225, 368, 362, 324, 343, 324,
/* 1740 */ 324, 324, 38, 324, 126, 214, 324, 96, 7, 106,
/* 1750 */ 324, 324, 324, 324, 146, 324, 324, 324, 250, 286,
/* 1760 */ 238, 230, 324, 21, 102, 186, 51, 324, 324, 324,
/* 1770 */ 324, 324, 324, 324, 289, 324, 324, 22, 27, 324,
/* 1780 */ 499, 50, 52, 301, 237, 363, 324, 499, 105, 499,
/* 1790 */ 499, 203, 499, 499, 324, 324, 324, 324, 324, 499,
/* 1800 */ 4, 499, 324, 96, 324, 324, 324, 324, 324, 324,
/* 1810 */ 324, 324, 324, 360, 324, 324, 499, 117, 324, 324,
/* 1820 */ 74, 135, 324, 144, 324, 324, 324, 499, 324, 299,
/* 1830 */ 361, 324, 324, 225, 368, 362, 324, 343, 360, 324,
/* 1840 */ 324, 499, 142, 324, 324, 66, 135, 324, 263, 324,
/* 1850 */ 324, 324, 324, 324, 299, 361, 324, 324, 225, 368,
/* 1860 */ 362, 324, 343, 324, 360, 324, 324, 324, 142, 324,
/* 1870 */ 324, 79, 135, 324, 360, 324, 324, 324, 149, 324,
/* 1880 */ 299, 361, 135, 360, 225, 368, 362, 142, 343, 324,
/* 1890 */ 81, 135, 324, 324, 225, 368, 362, 324, 343, 299,
/* 1900 */ 361, 324, 324, 225, 368, 362, 324, 343, 324, 324,
/* 1910 */ 324, 360, 324, 324, 324, 115, 324, 324, 83, 135,
/* 1920 */ 324, 324, 360, 324, 324, 324, 142, 299, 361, 72,
/* 1930 */ 135, 225, 368, 362, 324, 343, 324, 324, 299, 361,
/* 1940 */ 324, 324, 225, 368, 362, 324, 343, 324, 360, 324,
/* 1950 */ 324, 324, 142, 324, 324, 70, 135, 324, 360, 324,
/* 1960 */ 324, 324, 153, 324, 299, 361, 135, 360, 225, 368,
/* 1970 */ 362, 142, 343, 324, 68, 135, 324, 324, 225, 368,
/* 1980 */ 362, 324, 343, 299, 361, 324, 324, 225, 368, 362,
/* 1990 */ 324, 343, 324, 324, 324, 360, 324, 324, 324, 142,
/* 2000 */ 324, 324, 90, 135, 324, 324, 360, 324, 324, 324,
/* 2010 */ 142, 299, 361, 86, 135, 225, 368, 362, 324, 343,
/* 2020 */ 324, 324, 299, 361, 324, 324, 225, 368, 362, 324,
/* 2030 */ 343, 324, 360, 194, 183, 324, 142, 324, 324, 91,
/* 2040 */ 135, 324, 324, 289, 324, 324, 22, 27, 299, 361,
/* 2050 */ 324, 360, 225, 368, 362, 142, 343, 324, 61, 135,
/* 2060 */ 203, 324, 324, 324, 194, 171, 324, 299, 361, 324,
/* 2070 */ 324, 225, 368, 362, 289, 343, 324, 22, 27, 360,
/* 2080 */ 324, 324, 324, 142, 324, 324, 88, 135, 324, 324,
/* 2090 */ 360, 203, 324, 324, 142, 299, 361, 69, 135, 225,
/* 2100 */ 368, 362, 324, 343, 324, 324, 299, 361, 324, 324,
/* 2110 */ 225, 368, 362, 324, 343, 324, 360, 194, 179, 324,
/* 2120 */ 142, 324, 324, 76, 135, 324, 324, 289, 324, 324,
/* 2130 */ 22, 27, 299, 361, 324, 360, 225, 368, 362, 142,
/* 2140 */ 343, 324, 65, 135, 203, 324, 324, 324, 194, 187,
/* 2150 */ 324, 299, 361, 324, 324, 225, 368, 362, 289, 343,
/* 2160 */ 324, 22, 27, 360, 324, 324, 324, 111, 324, 324,
/* 2170 */ 64, 135, 324, 324, 360, 203, 324, 324, 142, 299,
/* 2180 */ 361, 62, 135, 225, 368, 362, 324, 343, 324, 324,
/* 2190 */ 299, 361, 324, 324, 225, 368, 362, 324, 343, 324,
/* 2200 */ 360, 194, 173, 324, 142, 324, 324, 82, 135, 324,
/* 2210 */ 324, 289, 324, 324, 22, 27, 299, 361, 324, 360,
/* 2220 */ 225, 368, 362, 142, 343, 324, 60, 135, 203, 324,
/* 2230 */ 324, 324, 324, 324, 324, 299, 361, 324, 324, 225,
/* 2240 */ 368, 362, 324, 343, 324, 324, 324, 360, 324, 324,
/* 2250 */ 324, 93, 324, 324, 57, 120, 324, 324, 360, 324,
/* 2260 */ 324, 324, 142, 299, 361, 58, 135, 225, 368, 362,
/* 2270 */ 324, 343, 324, 324, 299, 361, 324, 324, 225, 368,
/* 2280 */ 362, 324, 343, 324, 360, 324, 324, 324, 142, 324,
/* 2290 */ 324, 59, 135, 324, 324, 324, 324, 324, 324, 324,
/* 2300 */ 299, 361, 324, 360, 225, 368, 362, 93, 343, 324,
/* 2310 */ 55, 120, 324, 324, 324, 324, 324, 324, 324, 299,
/* 2320 */ 361, 324, 324, 215, 368, 362, 324, 343, 324, 324,
/* 2330 */ 324, 360, 324, 324, 324, 142, 324, 324, 56, 135,
/* 2340 */ 324, 324, 360, 324, 324, 324, 142, 299, 361, 78,
/* 2350 */ 135, 225, 368, 362, 324, 343, 324, 324, 299, 361,
/* 2360 */ 324, 324, 225, 368, 362, 324, 343, 324, 360, 324,
/* 2370 */ 324, 324, 142, 324, 324, 67, 135, 324, 324, 324,
/* 2380 */ 324, 324, 324, 324, 299, 361, 324, 324, 217, 368,
/* 2390 */ 362, 324, 343,
)
(line 223)
  • access: public
static mixed $yy_default = array(
/* 0 */ 390, 571, 588, 588, 542, 542, 542, 588, 588, 588,
/* 10 */ 588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
/* 20 */ 588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
/* 30 */ 588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
/* 40 */ 588, 588, 588, 588, 588, 588, 588, 588, 588, 588,
/* 50 */ 588, 588, 588, 588, 588, 588, 450, 450, 450, 450,
/* 60 */ 588, 588, 588, 588, 455, 588, 588, 588, 588, 588,
/* 70 */ 588, 573, 457, 541, 574, 455, 471, 460, 540, 480,
/* 80 */ 484, 432, 461, 452, 479, 483, 572, 474, 475, 476,
/* 90 */ 487, 488, 499, 463, 450, 387, 588, 450, 450, 554,
/* 100 */ 588, 507, 470, 450, 450, 588, 588, 450, 450, 588,
/* 110 */ 588, 463, 588, 515, 463, 463, 515, 463, 515, 588,
/* 120 */ 508, 463, 508, 588, 588, 588, 588, 588, 588, 588,
/* 130 */ 588, 588, 588, 588, 588, 508, 515, 588, 588, 588,
/* 140 */ 588, 588, 463, 588, 588, 467, 450, 473, 551, 490,
/* 150 */ 450, 468, 486, 491, 492, 508, 466, 549, 588, 516,
/* 160 */ 588, 588, 588, 588, 533, 515, 532, 588, 588, 513,
/* 170 */ 588, 588, 588, 588, 534, 588, 588, 588, 535, 588,
/* 180 */ 588, 588, 588, 588, 588, 588, 588, 588, 588, 405,
/* 190 */ 587, 587, 529, 555, 470, 552, 507, 543, 544, 515,
/* 200 */ 515, 515, 548, 548, 548, 465, 499, 499, 588, 499,
/* 210 */ 499, 588, 527, 485, 499, 489, 588, 489, 588, 588,
/* 220 */ 495, 588, 588, 588, 527, 489, 588, 588, 588, 527,
/* 230 */ 495, 588, 553, 588, 588, 588, 497, 588, 588, 588,
/* 240 */ 588, 588, 588, 588, 588, 588, 501, 527, 588, 458,
/* 250 */ 588, 588, 588, 435, 524, 439, 501, 523, 511, 569,
/* 260 */ 521, 415, 522, 570, 520, 388, 537, 512, 440, 462,
/* 270 */ 459, 429, 550, 586, 430, 536, 528, 538, 539, 434,
/* 280 */ 433, 565, 441, 527, 442, 547, 443, 526, 438, 449,
/* 290 */ 428, 431, 436, 437, 444, 445, 498, 496, 504, 464,
/* 300 */ 465, 494, 493, 545, 546, 446, 447, 427, 448, 397,
/* 310 */ 396, 398, 399, 400, 395, 394, 389, 391, 392, 393,
/* 320 */ 401, 402, 411, 410, 412, 413, 414, 409, 408, 403,
/* 330 */ 404, 406, 407, 509, 514, 421, 420, 530, 422, 423,
/* 340 */ 419, 418, 531, 510, 416, 417, 583, 424, 426, 581,
/* 350 */ 579, 584, 585, 578, 580, 577, 425, 582, 575, 576,
/* 360 */ 506, 469, 503, 502, 505, 477, 478, 472, 500, 517,
/* 370 */ 525, 518, 519, 481, 482, 563, 562, 564, 566, 567,
/* 380 */ 561, 560, 556, 557, 558, 559, 568,
)
(line 1151)
  • access: public
static mixed $yy_lookahead = array(
/* 0 */ 1, 82, 83, 84, 3, 4, 5, 6, 7, 8,
/* 10 */ 9, 10, 11, 12, 18, 89, 15, 80, 81, 82,
/* 20 */ 83, 84, 21, 22, 98, 26, 15, 28, 27, 18,
/* 30 */ 19, 116, 31, 32, 33, 24, 110, 38, 39, 40,
/* 40 */ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
/* 50 */ 51, 4, 5, 6, 7, 8, 60, 1, 36, 12,
/* 60 */ 13, 14, 1, 64, 65, 66, 67, 68, 69, 70,
/* 70 */ 71, 72, 73, 74, 75, 1, 83, 16, 88, 57,
/* 80 */ 87, 59, 88, 90, 91, 63, 30, 16, 15, 28,
/* 90 */ 16, 18, 99, 100, 19, 20, 103, 104, 105, 28,
/* 100 */ 107, 28, 28, 30, 2, 115, 116, 36, 52, 115,
/* 110 */ 117, 118, 38, 39, 40, 41, 42, 43, 44, 45,
/* 120 */ 46, 47, 48, 49, 50, 51, 83, 88, 89, 109,
/* 130 */ 59, 111, 112, 15, 59, 17, 18, 98, 64, 65,
/* 140 */ 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
/* 150 */ 1, 83, 34, 15, 115, 87, 18, 19, 90, 91,
/* 160 */ 92, 15, 119, 120, 18, 16, 16, 99, 100, 19,
/* 170 */ 89, 103, 104, 105, 28, 107, 30, 28, 28, 98,
/* 180 */ 36, 15, 15, 17, 18, 18, 36, 38, 39, 40,
/* 190 */ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
/* 200 */ 51, 88, 89, 59, 15, 57, 30, 18, 19, 59,
/* 210 */ 62, 98, 36, 64, 65, 66, 67, 68, 69, 70,
/* 220 */ 71, 72, 73, 74, 75, 1, 83, 60, 115, 16,
/* 230 */ 87, 97, 15, 90, 91, 59, 1, 24, 19, 20,
/* 240 */ 16, 15, 99, 100, 18, 20, 103, 104, 105, 60,
/* 250 */ 107, 16, 28, 36, 84, 20, 86, 114, 111, 112,
/* 260 */ 17, 18, 38, 39, 40, 41, 42, 43, 44, 45,
/* 270 */ 46, 47, 48, 49, 50, 51, 1, 2, 59, 91,
/* 280 */ 92, 93, 57, 111, 112, 24, 60, 62, 64, 65,
/* 290 */ 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
/* 300 */ 89, 1, 88, 89, 61, 35, 35, 37, 37, 98,
/* 310 */ 17, 18, 98, 38, 39, 40, 41, 42, 43, 44,
/* 320 */ 45, 46, 47, 48, 49, 50, 51, 1, 89, 115,
/* 330 */ 35, 35, 37, 88, 88, 91, 92, 98, 77, 64,
/* 340 */ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
/* 350 */ 75, 23, 52, 89, 115, 29, 108, 97, 110, 63,
/* 360 */ 115, 115, 98, 35, 38, 39, 40, 41, 42, 43,
/* 370 */ 44, 45, 46, 47, 48, 49, 50, 51, 1, 115,
/* 380 */ 89, 15, 15, 15, 18, 18, 18, 95, 17, 98,
/* 390 */ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
/* 400 */ 74, 75, 110, 89, 91, 92, 115, 36, 1, 108,
/* 410 */ 15, 110, 98, 18, 108, 38, 39, 40, 41, 42,
/* 420 */ 43, 44, 45, 46, 47, 48, 49, 50, 51, 115,
/* 430 */ 106, 106, 36, 15, 97, 28, 18, 113, 113, 108,
/* 440 */ 95, 64, 65, 66, 67, 68, 69, 70, 71, 72,
/* 450 */ 73, 74, 75, 1, 77, 110, 83, 108, 15, 18,
/* 460 */ 87, 18, 83, 90, 91, 20, 87, 17, 19, 91,
/* 470 */ 91, 28, 99, 100, 1, 23, 103, 104, 105, 100,
/* 480 */ 107, 103, 103, 104, 105, 107, 107, 114, 2, 16,
/* 490 */ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
/* 500 */ 48, 49, 50, 51, 59, 19, 57, 19, 37, 61,
/* 510 */ 18, 17, 53, 2, 18, 95, 64, 65, 66, 67,
/* 520 */ 68, 69, 70, 71, 72, 73, 74, 75, 1, 83,
/* 530 */ 110, 89, 63, 87, 83, 25, 90, 91, 87, 17,
/* 540 */ 98, 18, 91, 16, 1, 99, 100, 1, 2, 103,
/* 550 */ 104, 105, 110, 107, 103, 104, 105, 18, 107, 16,
/* 560 */ 114, 61, 16, 34, 1, 38, 39, 40, 41, 42,
/* 570 */ 43, 44, 45, 46, 47, 48, 49, 50, 51, 16,
/* 580 */ 89, 2, 18, 17, 24, 57, 34, 36, 17, 98,
/* 590 */ 95, 64, 65, 66, 67, 68, 69, 70, 71, 72,
/* 600 */ 73, 74, 75, 1, 83, 110, 89, 18, 87, 18,
/* 610 */ 16, 90, 91, 92, 89, 98, 96, 16, 16, 16,
/* 620 */ 99, 100, 28, 98, 103, 104, 105, 110, 107, 28,
/* 630 */ 110, 28, 18, 18, 98, 110, 20, 1, 28, 109,
/* 640 */ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
/* 650 */ 48, 49, 50, 51, 1, 115, 108, 28, 113, 110,
/* 660 */ 28, 94, 112, 95, 95, 95, 64, 65, 66, 67,
/* 670 */ 68, 69, 70, 71, 72, 73, 74, 75, 110, 110,
/* 680 */ 110, 85, 94, 13, 121, 121, 121, 121, 121, 121,
/* 690 */ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
/* 700 */ 47, 48, 49, 50, 51, 1, 121, 121, 121, 121,
/* 710 */ 121, 121, 121, 121, 95, 95, 95, 64, 65, 66,
/* 720 */ 67, 68, 69, 70, 71, 72, 73, 74, 75, 110,
/* 730 */ 110, 110, 121, 121, 121, 121, 121, 121, 121, 121,
/* 740 */ 121, 37, 38, 39, 40, 41, 42, 43, 44, 45,
/* 750 */ 46, 47, 48, 49, 50, 51, 1, 121, 121, 121,
/* 760 */ 121, 121, 121, 121, 121, 121, 121, 121, 64, 65,
/* 770 */ 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
/* 780 */ 83, 121, 121, 28, 121, 121, 121, 121, 121, 121,
/* 790 */ 121, 121, 121, 38, 39, 40, 41, 42, 43, 44,
/* 800 */ 45, 46, 47, 48, 49, 50, 51, 1, 121, 121,
/* 810 */ 121, 121, 121, 121, 121, 121, 121, 120, 121, 64,
/* 820 */ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
/* 830 */ 75, 121, 121, 121, 121, 121, 121, 121, 121, 121,
/* 840 */ 121, 121, 121, 121, 38, 39, 40, 41, 42, 43,
/* 850 */ 44, 45, 46, 47, 48, 49, 50, 51, 121, 121,
/* 860 */ 121, 121, 121, 121, 121, 121, 121, 121, 121, 63,
/* 870 */ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
/* 880 */ 74, 75, 1, 121, 121, 121, 88, 83, 1, 16,
/* 890 */ 16, 87, 121, 10, 16, 91, 121, 16, 15, 101,
/* 900 */ 102, 28, 28, 16, 21, 22, 28, 103, 104, 105,
/* 910 */ 27, 107, 121, 115, 31, 32, 33, 121, 1, 38,
/* 920 */ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
/* 930 */ 49, 50, 51, 16, 121, 121, 121, 121, 121, 52,
/* 940 */ 121, 121, 121, 121, 121, 64, 65, 66, 67, 68,
/* 950 */ 69, 70, 71, 72, 73, 74, 75, 1, 121, 76,
/* 960 */ 77, 78, 83, 16, 16, 16, 87, 121, 10, 16,
/* 970 */ 91, 121, 16, 15, 121, 28, 28, 28, 121, 21,
/* 980 */ 22, 28, 103, 104, 105, 27, 107, 121, 121, 31,
/* 990 */ 32, 33, 121, 121, 38, 39, 40, 41, 42, 43,
/* 1000 */ 44, 45, 46, 47, 48, 49, 50, 51, 1, 121,
/* 1010 */ 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
/* 1020 */ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
/* 1030 */ 74, 75, 121, 121, 76, 77, 78, 121, 121, 121,
/* 1040 */ 121, 121, 121, 121, 121, 38, 39, 40, 41, 42,
/* 1050 */ 43, 44, 45, 46, 47, 48, 49, 50, 51, 121,
/* 1060 */ 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
/* 1070 */ 121, 64, 65, 66, 67, 68, 69, 70, 71, 72,
/* 1080 */ 73, 74, 75, 121, 38, 39, 40, 41, 42, 43,
/* 1090 */ 44, 45, 46, 47, 48, 49, 50, 51, 121, 121,
/* 1100 */ 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
/* 1110 */ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
/* 1120 */ 74, 75, 121, 121, 121, 121, 15, 121, 17, 18,
/* 1130 */ 121, 83, 21, 22, 16, 87, 121, 16, 27, 91,
/* 1140 */ 121, 121, 31, 32, 33, 34, 28, 36, 100, 28,
/* 1150 */ 39, 103, 104, 105, 121, 107, 83, 121, 121, 121,
/* 1160 */ 87, 121, 121, 121, 91, 54, 55, 56, 57, 58,
/* 1170 */ 121, 83, 61, 62, 63, 87, 103, 104, 105, 91,
/* 1180 */ 107, 121, 15, 121, 17, 18, 121, 76, 21, 22,
/* 1190 */ 16, 103, 104, 105, 27, 107, 16, 16, 31, 32,
/* 1200 */ 33, 34, 28, 36, 16, 121, 39, 16, 28, 28,
/* 1210 */ 83, 121, 121, 121, 87, 121, 28, 90, 91, 28,
/* 1220 */ 1, 54, 55, 56, 57, 58, 99, 100, 61, 62,
/* 1230 */ 103, 104, 105, 1, 107, 16, 121, 16, 15, 121,
/* 1240 */ 17, 18, 121, 76, 21, 22, 16, 28, 16, 28,
/* 1250 */ 27, 16, 20, 121, 31, 32, 33, 34, 28, 36,
/* 1260 */ 28, 121, 39, 28, 16, 121, 83, 121, 36, 121,
/* 1270 */ 87, 52, 121, 90, 91, 121, 28, 54, 55, 56,
/* 1280 */ 57, 58, 99, 100, 61, 62, 103, 104, 105, 121,
/* 1290 */ 107, 59, 121, 121, 15, 121, 17, 18, 121, 76,
/* 1300 */ 21, 22, 121, 121, 121, 121, 27, 121, 121, 121,
/* 1310 */ 31, 32, 33, 34, 121, 36, 121, 121, 39, 121,
/* 1320 */ 121, 121, 83, 121, 121, 121, 87, 121, 121, 90,
/* 1330 */ 91, 121, 1, 54, 55, 56, 57, 58, 99, 100,
/* 1340 */ 61, 62, 103, 104, 105, 121, 107, 16, 121, 121,
/* 1350 */ 15, 121, 17, 18, 121, 76, 21, 22, 121, 28,
/* 1360 */ 29, 121, 27, 121, 121, 121, 31, 32, 33, 34,
/* 1370 */ 121, 36, 121, 121, 39, 121, 121, 121, 83, 121,
/* 1380 */ 121, 121, 87, 52, 121, 90, 91, 121, 1, 54,
/* 1390 */ 55, 56, 57, 58, 99, 100, 61, 62, 103, 104,
/* 1400 */ 105, 121, 107, 16, 121, 121, 15, 121, 17, 18,
/* 1410 */ 121, 76, 21, 22, 121, 28, 121, 121, 27, 121,
/* 1420 */ 121, 121, 31, 32, 33, 34, 121, 36, 121, 121,
/* 1430 */ 39, 121, 121, 121, 83, 121, 121, 121, 87, 52,
/* 1440 */ 121, 90, 91, 121, 1, 54, 55, 56, 57, 58,
/* 1450 */ 99, 100, 61, 62, 103, 104, 105, 121, 107, 16,
/* 1460 */ 121, 121, 15, 121, 17, 18, 121, 76, 21, 22,
/* 1470 */ 121, 28, 121, 121, 27, 121, 121, 121, 31, 32,
/* 1480 */ 33, 34, 121, 36, 121, 121, 39, 121, 121, 121,
/* 1490 */ 83, 121, 121, 121, 87, 52, 121, 90, 91, 121,
/* 1500 */ 121, 54, 55, 56, 57, 58, 99, 100, 61, 62,
/* 1510 */ 103, 104, 105, 121, 107, 121, 121, 121, 15, 121,
/* 1520 */ 17, 18, 121, 76, 21, 22, 121, 121, 121, 121,
/* 1530 */ 27, 121, 121, 121, 31, 32, 33, 34, 121, 36,
/* 1540 */ 121, 121, 39, 121, 121, 121, 83, 121, 121, 121,
/* 1550 */ 87, 121, 121, 90, 91, 121, 121, 54, 55, 56,
/* 1560 */ 57, 58, 99, 100, 61, 62, 103, 104, 105, 121,
/* 1570 */ 107, 121, 121, 121, 15, 121, 17, 18, 121, 76,
/* 1580 */ 21, 22, 121, 121, 121, 121, 27, 121, 121, 121,
/* 1590 */ 31, 32, 33, 34, 121, 36, 121, 121, 39, 121,
/* 1600 */ 121, 121, 83, 121, 121, 121, 87, 121, 121, 90,
/* 1610 */ 91, 121, 121, 54, 55, 56, 57, 58, 99, 100,
/* 1620 */ 61, 62, 103, 104, 105, 121, 107, 121, 121, 121,
/* 1630 */ 15, 121, 17, 18, 121, 76, 21, 22, 121, 121,
/* 1640 */ 121, 121, 27, 121, 121, 121, 31, 32, 33, 34,
/* 1650 */ 121, 36, 121, 121, 39, 121, 121, 121, 83, 121,
/* 1660 */ 121, 121, 87, 121, 121, 90, 91, 121, 121, 54,
/* 1670 */ 55, 56, 57, 58, 99, 100, 61, 62, 103, 104,
/* 1680 */ 105, 121, 107, 121, 121, 121, 15, 121, 17, 18,
/* 1690 */ 121, 76, 21, 22, 121, 121, 121, 121, 27, 121,
/* 1700 */ 121, 121, 31, 32, 33, 34, 121, 36, 121, 121,
/* 1710 */ 39, 121, 121, 121, 83, 121, 121, 121, 87, 121,
/* 1720 */ 121, 90, 91, 121, 121, 54, 55, 56, 57, 58,
/* 1730 */ 99, 100, 61, 121, 103, 104, 105, 121, 107, 121,
/* 1740 */ 121, 121, 15, 121, 17, 18, 121, 76, 21, 22,
/* 1750 */ 121, 121, 121, 121, 27, 121, 121, 121, 31, 32,
/* 1760 */ 33, 34, 121, 36, 88, 89, 39, 121, 121, 121,
/* 1770 */ 121, 121, 121, 121, 98, 121, 121, 101, 102, 121,
/* 1780 */ 16, 54, 55, 56, 57, 58, 121, 23, 61, 25,
/* 1790 */ 26, 115, 28, 29, 121, 121, 121, 121, 121, 35,
/* 1800 */ 36, 37, 121, 76, 121, 121, 121, 121, 121, 121,
/* 1810 */ 121, 121, 121, 83, 121, 121, 52, 87, 121, 121,
/* 1820 */ 90, 91, 121, 59, 121, 121, 121, 63, 121, 99,
/* 1830 */ 100, 121, 121, 103, 104, 105, 121, 107, 83, 121,
/* 1840 */ 121, 77, 87, 121, 121, 90, 91, 121, 118, 121,
/* 1850 */ 121, 121, 121, 121, 99, 100, 121, 121, 103, 104,
/* 1860 */ 105, 121, 107, 121, 83, 121, 121, 121, 87, 121,
/* 1870 */ 121, 90, 91, 121, 83, 121, 121, 121, 87, 121,
/* 1880 */ 99, 100, 91, 83, 103, 104, 105, 87, 107, 121,
/* 1890 */ 90, 91, 121, 121, 103, 104, 105, 121, 107, 99,
/* 1900 */ 100, 121, 121, 103, 104, 105, 121, 107, 121, 121,
/* 1910 */ 121, 83, 121, 121, 121, 87, 121, 121, 90, 91,
/* 1920 */ 121, 121, 83, 121, 121, 121, 87, 99, 100, 90,
/* 1930 */ 91, 103, 104, 105, 121, 107, 121, 121, 99, 100,
/* 1940 */ 121, 121, 103, 104, 105, 121, 107, 121, 83, 121,
/* 1950 */ 121, 121, 87, 121, 121, 90, 91, 121, 83, 121,
/* 1960 */ 121, 121, 87, 121, 99, 100, 91, 83, 103, 104,
/* 1970 */ 105, 87, 107, 121, 90, 91, 121, 121, 103, 104,
/* 1980 */ 105, 121, 107, 99, 100, 121, 121, 103, 104, 105,
/* 1990 */ 121, 107, 121, 121, 121, 83, 121, 121, 121, 87,
/* 2000 */ 121, 121, 90, 91, 121, 121, 83, 121, 121, 121,
/* 2010 */ 87, 99, 100, 90, 91, 103, 104, 105, 121, 107,
/* 2020 */ 121, 121, 99, 100, 121, 121, 103, 104, 105, 121,
/* 2030 */ 107, 121, 83, 88, 89, 121, 87, 121, 121, 90,
/* 2040 */ 91, 121, 121, 98, 121, 121, 101, 102, 99, 100,
/* 2050 */ 121, 83, 103, 104, 105, 87, 107, 121, 90, 91,
/* 2060 */ 115, 121, 121, 121, 88, 89, 121, 99, 100, 121,
/* 2070 */ 121, 103, 104, 105, 98, 107, 121, 101, 102, 83,
/* 2080 */ 121, 121, 121, 87, 121, 121, 90, 91, 121, 121,
/* 2090 */ 83, 115, 121, 121, 87, 99, 100, 90, 91, 103,
/* 2100 */ 104, 105, 121, 107, 121, 121, 99, 100, 121, 121,
/* 2110 */ 103, 104, 105, 121, 107, 121, 83, 88, 89, 121,
/* 2120 */ 87, 121, 121, 90, 91, 121, 121, 98, 121, 121,
/* 2130 */ 101, 102, 99, 100, 121, 83, 103, 104, 105, 87,
/* 2140 */ 107, 121, 90, 91, 115, 121, 121, 121, 88, 89,
/* 2150 */ 121, 99, 100, 121, 121, 103, 104, 105, 98, 107,
/* 2160 */ 121, 101, 102, 83, 121, 121, 121, 87, 121, 121,
/* 2170 */ 90, 91, 121, 121, 83, 115, 121, 121, 87, 99,
/* 2180 */ 100, 90, 91, 103, 104, 105, 121, 107, 121, 121,
/* 2190 */ 99, 100, 121, 121, 103, 104, 105, 121, 107, 121,
/* 2200 */ 83, 88, 89, 121, 87, 121, 121, 90, 91, 121,
/* 2210 */ 121, 98, 121, 121, 101, 102, 99, 100, 121, 83,
/* 2220 */ 103, 104, 105, 87, 107, 121, 90, 91, 115, 121,
/* 2230 */ 121, 121, 121, 121, 121, 99, 100, 121, 121, 103,
/* 2240 */ 104, 105, 121, 107, 121, 121, 121, 83, 121, 121,
/* 2250 */ 121, 87, 121, 121, 90, 91, 121, 121, 83, 121,
/* 2260 */ 121, 121, 87, 99, 100, 90, 91, 103, 104, 105,
/* 2270 */ 121, 107, 121, 121, 99, 100, 121, 121, 103, 104,
/* 2280 */ 105, 121, 107, 121, 83, 121, 121, 121, 87, 121,
/* 2290 */ 121, 90, 91, 121, 121, 121, 121, 121, 121, 121,
/* 2300 */ 99, 100, 121, 83, 103, 104, 105, 87, 107, 121,
/* 2310 */ 90, 91, 121, 121, 121, 121, 121, 121, 121, 99,
/* 2320 */ 100, 121, 121, 103, 104, 105, 121, 107, 121, 121,
/* 2330 */ 121, 83, 121, 121, 121, 87, 121, 121, 90, 91,
/* 2340 */ 121, 121, 83, 121, 121, 121, 87, 99, 100, 90,
/* 2350 */ 91, 103, 104, 105, 121, 107, 121, 121, 99, 100,
/* 2360 */ 121, 121, 103, 104, 105, 121, 107, 121, 83, 121,
/* 2370 */ 121, 121, 87, 121, 121, 90, 91, 121, 121, 121,
/* 2380 */ 121, 121, 121, 121, 99, 100, 121, 121, 103, 104,
/* 2390 */ 105, 121, 107,
)
(line 465)
  • access: public
static mixed $yy_reduce_ofst = array(
/* 0 */ -63, -7, 1730, 68, 446, 373, 143, 521, 2091, 2117,
/* 10 */ 1800, 1407, 2080, 1884, 1912, 1575, 1949, 1923, 1865, 1968,
/* 20 */ 1996, 2052, 2033, 2007, 1839, 1828, 1351, 1295, 1183, 1239,
/* 30 */ 1463, 1519, 1781, 1755, 1631, 2175, 2248, 2201, 2164, 2285,
/* 40 */ 2259, 2136, 2220, 1127, 379, 1048, 451, 1073, 804, 879,
/* 50 */ 1875, 1791, 1088, 1976, 1945, 1676, 2060, 1676, 2113, 2029,
/* 60 */ 798, 798, 798, 798, 798, 798, 798, 798, 798, 798,
/* 70 */ 798, 798, 798, 798, 798, 798, 798, 798, 798, 798,
/* 80 */ 798, 798, 798, 798, 798, 798, 798, 798, 798, 798,
/* 90 */ 798, 798, 39, 113, 214, -81, 43, 442, -74, 20,
/* 100 */ -10, 239, 264, 525, 517, 378, 188, 314, 291, 697,
/* 110 */ 170, -6, 520, 248, -6, -6, 248, -6, 248, 246,
/* 120 */ 172, -6, 172, 568, 313, 495, 495, 569, 570, 324,
/* 130 */ 244, 292, 245, 420, 345, 172, 301, 495, 621, 491,
/* 140 */ 495, 619, -6, 620, 325, -6, 211, -6, 147, -6,
/* 150 */ 81, -6, -6, -6, -6, 172, -6, -6, 545, 549,
/* 160 */ 536, 536, 536, 536, 530, 548, 530, 540, 536, 530,
/* 170 */ 536, 536, 536, 536, 530, 540, 536, 536, 530, 536,
/* 180 */ 540, 536, 536, 536, 536, 536, 536, 536, 536, 596,
/* 190 */ 567, 588, 550, 550, 540, 550, 540, -85, -85, 331,
/* 200 */ 306, 349, 337, 260, 134,
)
(line 739)
  • access: public
static mixed $yy_shift_ofst = array(
/* 0 */ 1, 1391, 1391, 1223, 1167, 1167, 1167, 1223, 1111, 1167,
/* 10 */ 1167, 1167, 1503, 1167, 1559, 1167, 1167, 1167, 1167, 1167,
/* 20 */ 1167, 1167, 1167, 1167, 1167, 1615, 1167, 1167, 1167, 1167,
/* 30 */ 1503, 1167, 1167, 1447, 1167, 1167, 1167, 1167, 1279, 1167,
/* 40 */ 1167, 1167, 1279, 1167, 1335, 1335, 1727, 1671, 1727, 1727,
/* 50 */ 1727, 1727, 1727, 224, 74, 149, -1, 755, 755, 755,
/* 60 */ 956, 881, 806, 527, 326, 704, 275, 377, 653, 602,
/* 70 */ 452, 1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
/* 80 */ 1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
/* 90 */ 1046, 1046, 1232, 1443, 407, 1, 958, 73, 146, 225,
/* 100 */ 546, 61, 61, 443, 443, 243, 371, 407, 407, 883,
/* 110 */ 47, 1331, 11, 189, 1387, 1219, 226, 56, 138, 235,
/* 120 */ 75, 887, 219, 366, 371, 367, 366, 366, 368, 293,
/* 130 */ 371, 366, 917, 366, 366, 445, 366, 418, 366, 1248,
/* 140 */ 368, 366, 300, 395, 293, 636, 629, 636, 616, 636,
/* 150 */ 610, 636, 636, 636, 636, 616, 636, -5, 166, 167,
/* 160 */ 601, 603, 873, 594, 148, 217, 148, 473, 947, 148,
/* 170 */ 874, 878, 948, 1235, 148, 543, 1191, 1221, 148, 1230,
/* 180 */ 563, 1188, 1121, 1118, 953, 949, 1181, 1174, 1180, 670,
/* 190 */ 632, 632, 616, 616, 636, 616, 636, 102, 102, 396,
/* 200 */ -5, -5, -5, -5, -5, 1764, 150, 22, 118, 71,
/* 210 */ 176, -4, 486, 144, 144, 213, 270, 261, 296, 328,
/* 220 */ 449, 271, 295, 615, 579, 560, 566, 441, 564, 396,
/* 230 */ 528, 591, 551, 589, 571, 614, 552, 529, 539, 494,
/* 240 */ 448, 492, 471, 450, 488, 469, 459, 511, 522, 510,
/* 250 */ 496, 523, 500,
)
(line 709)
  • access: public
mixed $retvalue = 0 (line 96)
  • access: public
mixed $successful = true (line 95)
  • access: public
mixed $yyerrcnt (line 1221)
  • access: public
mixed $yyidx (line 1220)
  • access: public
mixed $yystack = array() (line 1222)
  • access: public
mixed $yyTokenName = array(
'$', 'VERT', 'COLON', 'COMMENT',
'PHPSTARTTAG', 'PHPENDTAG', 'ASPSTARTTAG', 'ASPENDTAG',
'FAKEPHPSTARTTAG', 'XMLTAG', 'OTHER', 'LINEBREAK',
'LITERALSTART', 'LITERALEND', 'LITERAL', 'LDEL',
'RDEL', 'DOLLAR', 'ID', 'EQUAL',
'PTR', 'LDELIF', 'LDELFOR', 'SEMICOLON',
'INCDEC', 'TO', 'STEP', 'LDELFOREACH',
'SPACE', 'AS', 'APTR', 'LDELSETFILTER',
'SMARTYBLOCKCHILD', 'LDELSLASH', 'INTEGER', 'COMMA',
'OPENP', 'CLOSEP', 'MATH', 'UNIMATH',
'ANDSYM', 'ISIN', 'ISDIVBY', 'ISNOTDIVBY',
'ISEVEN', 'ISNOTEVEN', 'ISEVENBY', 'ISNOTEVENBY',
'ISODD', 'ISNOTODD', 'ISODDBY', 'ISNOTODDBY',
'INSTANCEOF', 'QMARK', 'NOT', 'TYPECAST',
'HEX', 'DOT', 'SINGLEQUOTESTRING', 'DOUBLECOLON',
'AT', 'HATCH', 'OPENB', 'CLOSEB',
'EQUALS', 'NOTEQUALS', 'GREATERTHAN', 'LESSTHAN',
'GREATEREQUAL', 'LESSEQUAL', 'IDENTITY', 'NONEIDENTITY',
'MOD', 'LAND', 'LOR', 'LXOR',
'QUOTE', 'BACKTICK', 'DOLLARID', 'error',
'start', 'template', 'template_element', 'smartytag',
'literal', 'literal_elements', 'literal_element', 'value',
'modifierlist', 'attributes', 'expr', 'varindexed',
'statement', 'statements', 'optspace', 'varvar',
'foraction', 'modparameters', 'attribute', 'ternary',
'array', 'ifcond', 'lop', 'variable',
'function', 'doublequoted_with_quotes', 'static_class_access', 'object',
'arrayindex', 'indexdef', 'varvarele', 'objectchain',
'objectelement', 'method', 'params', 'modifier',
'modparameter', 'arrayelements', 'arrayelement', 'doublequoted',
'doublequotedcontent',
)
(line 1224)
  • access: public
Methods
static method escape_end_tag (line 124)
  • access: public
static void escape_end_tag ( $tag_text)
  • $tag_text
static method escape_start_tag (line 119)
  • access: public
static void escape_start_tag ( $tag_text)
  • $tag_text
static method PrintTrace (line 1212)
static void PrintTrace ()
static method Trace (line 1201)
static void Trace ( $TraceFILE,  $zTracePrompt)
  • $TraceFILE
  • $zTracePrompt
static method yy_destructor (line 1474)
static void yy_destructor ( $yymajor,  $yypminor)
  • $yymajor
  • $yypminor
compileVariable (line 128)
  • access: public
void compileVariable ( $variable)
  • $variable
doParse (line 3128)
void doParse ( $yymajor,  $yytokenvalue)
  • $yymajor
  • $yytokenvalue
tokenName (line 1462)
void tokenName ( $tokenType)
  • $tokenType
yy_accept (line 3111)
void yy_accept ()
yy_find_reduce_action (line 1681)
void yy_find_reduce_action ( $stateno,  $iLookAhead)
  • $stateno
  • $iLookAhead
yy_find_shift_action (line 1647)
void yy_find_shift_action ( $iLookAhead)
  • $iLookAhead
yy_get_expected_tokens (line 1508)
void yy_get_expected_tokens ( $token)
  • $token
yy_is_expected_token (line 1576)
void yy_is_expected_token ( $token)
  • $token
Constructor __construct (line 100)
Smarty_Internal_Templateparser __construct ( $lex,  $compiler)
  • $lex
  • $compiler
Destructor __destruct (line 1498)
void __destruct ()
yy_parse_failed (line 3091)
void yy_parse_failed ()
yy_pop_parser_stack (line 1481)
void yy_pop_parser_stack ()
yy_r0 (line 2146)
void yy_r0 ()
yy_r1 (line 2151)
void yy_r1 ()
yy_r4 (line 2156)
void yy_r4 ()
yy_r5 (line 2168)
void yy_r5 ()
yy_r6 (line 2173)
void yy_r6 ()
yy_r7 (line 2178)
void yy_r7 ()
yy_r8 (line 2194)
void yy_r8 ()
yy_r9 (line 2213)
void yy_r9 ()
yy_r10 (line 2237)
void yy_r10 ()
yy_r11 (line 2258)
void yy_r11 ()
yy_r12 (line 2267)
void yy_r12 ()
yy_r13 (line 2276)
void yy_r13 ()
yy_r14 (line 2285)
void yy_r14 ()
yy_r15 (line 2290)
void yy_r15 ()
yy_r16 (line 2295)
void yy_r16 ()
yy_r17 (line 2300)
void yy_r17 ()
yy_r19 (line 2305)
void yy_r19 ()
yy_r21 (line 2310)
void yy_r21 ()
yy_r23 (line 2315)
void yy_r23 ()
yy_r24 (line 2320)
void yy_r24 ()
yy_r25 (line 2325)
void yy_r25 ()
yy_r26 (line 2330)
void yy_r26 ()
yy_r27 (line 2335)
void yy_r27 ()
yy_r28 (line 2340)
void yy_r28 ()
yy_r29 (line 2345)
void yy_r29 ()
yy_r31 (line 2350)
void yy_r31 ()
yy_r33 (line 2355)
void yy_r33 ()
yy_r34 (line 2360)
void yy_r34 ()
yy_r35 (line 2365)
void yy_r35 ()
yy_r36 (line 2370)
void yy_r36 ()
yy_r37 (line 2375)
void yy_r37 ()
yy_r38 (line 2380)
void yy_r38 ()
yy_r39 (line 2386)
void yy_r39 ()
yy_r40 (line 2392)
void yy_r40 ()
yy_r41 (line 2398)
void yy_r41 ()
yy_r42 (line 2404)
void yy_r42 ()
yy_r44 (line 2410)
void yy_r44 ()
yy_r45 (line 2415)
void yy_r45 ()
yy_r47 (line 2420)
void yy_r47 ()
yy_r48 (line 2425)
void yy_r48 ()
yy_r49 (line 2430)
void yy_r49 ()
yy_r50 (line 2435)
void yy_r50 ()
yy_r51 (line 2440)
void yy_r51 ()
yy_r52 (line 2445)
void yy_r52 ()
yy_r53 (line 2450)
void yy_r53 ()
yy_r54 (line 2455)
void yy_r54 ()
yy_r55 (line 2460)
void yy_r55 ()
yy_r56 (line 2465)
void yy_r56 ()
yy_r57 (line 2470)
void yy_r57 ()
yy_r58 (line 2475)
void yy_r58 ()
yy_r59 (line 2480)
void yy_r59 ()
yy_r60 (line 2485)
void yy_r60 ()
yy_r61 (line 2490)
void yy_r61 ()
yy_r62 (line 2496)
void yy_r62 ()
yy_r63 (line 2501)
void yy_r63 ()
yy_r64 (line 2506)
void yy_r64 ()
yy_r65 (line 2519)
void yy_r65 ()
yy_r67 (line 2524)
void yy_r67 ()
yy_r72 (line 2529)
void yy_r72 ()
yy_r73 (line 2535)
void yy_r73 ()
yy_r78 (line 2540)
void yy_r78 ()
yy_r79 (line 2545)
void yy_r79 ()
yy_r83 (line 2550)
void yy_r83 ()
yy_r84 (line 2555)
void yy_r84 ()
yy_r85 (line 2560)
void yy_r85 ()
yy_r86 (line 2565)
void yy_r86 ()
yy_r88 (line 2570)
void yy_r88 ()
yy_r89 (line 2575)
void yy_r89 ()
yy_r90 (line 2580)
void yy_r90 ()
yy_r91 (line 2585)
void yy_r91 ()
yy_r92 (line 2590)
void yy_r92 ()
yy_r93 (line 2595)
void yy_r93 ()
yy_r99 (line 2600)
void yy_r99 ()
yy_r100 (line 2607)
void yy_r100 ()
yy_r101 (line 2612)
void yy_r101 ()
yy_r104 (line 2617)
void yy_r104 ()
yy_r109 (line 2622)
void yy_r109 ()
yy_r110 (line 2627)
void yy_r110 ()
yy_r111 (line 2632)
void yy_r111 ()
yy_r112 (line 2637)
void yy_r112 ()
yy_r114 (line 2650)
void yy_r114 ()
yy_r117 (line 2655)
void yy_r117 ()
yy_r118 (line 2668)
void yy_r118 ()
yy_r119 (line 2677)
void yy_r119 ()
yy_r121 (line 2684)
void yy_r121 ()
yy_r122 (line 2697)
void yy_r122 ()
yy_r124 (line 2702)
void yy_r124 ()
yy_r125 (line 2707)
void yy_r125 ()
yy_r126 (line 2712)
void yy_r126 ()
yy_r128 (line 2717)
void yy_r128 ()
yy_r129 (line 2722)
void yy_r129 ()
yy_r130 (line 2727)
void yy_r130 ()
yy_r131 (line 2732)
void yy_r131 ()
yy_r132 (line 2737)
void yy_r132 ()
yy_r133 (line 2742)
void yy_r133 ()
yy_r134 (line 2747)
void yy_r134 ()
yy_r135 (line 2752)
void yy_r135 ()
yy_r137 (line 2757)
void yy_r137 ()
yy_r139 (line 2762)
void yy_r139 ()
yy_r140 (line 2767)
void yy_r140 ()
yy_r141 (line 2772)
void yy_r141 ()
yy_r142 (line 2777)
void yy_r142 ()
yy_r143 (line 2786)
void yy_r143 ()
yy_r144 (line 2791)
void yy_r144 ()
yy_r145 (line 2796)
void yy_r145 ()
yy_r146 (line 2804)
void yy_r146 ()
yy_r147 (line 2812)
void yy_r147 ()
yy_r148 (line 2820)
void yy_r148 ()
yy_r149 (line 2828)
void yy_r149 ()
yy_r150 (line 2833)
void yy_r150 ()
yy_r151 (line 2869)
void yy_r151 ()
yy_r152 (line 2877)
void yy_r152 ()
yy_r153 (line 2887)
void yy_r153 ()
yy_r156 (line 2892)
void yy_r156 ()
yy_r157 (line 2897)
void yy_r157 ()
yy_r159 (line 2902)
void yy_r159 ()
yy_r160 (line 2907)
void yy_r160 ()
yy_r167 (line 2912)
void yy_r167 ()
yy_r168 (line 2917)
void yy_r168 ()
yy_r169 (line 2922)
void yy_r169 ()
yy_r170 (line 2927)
void yy_r170 ()
yy_r171 (line 2932)
void yy_r171 ()
yy_r172 (line 2937)
void yy_r172 ()
yy_r173 (line 2942)
void yy_r173 ()
yy_r174 (line 2947)
void yy_r174 ()
yy_r175 (line 2952)
void yy_r175 ()
yy_r176 (line 2957)
void yy_r176 ()
yy_r177 (line 2962)
void yy_r177 ()
yy_r178 (line 2967)
void yy_r178 ()
yy_r179 (line 2972)
void yy_r179 ()
yy_r180 (line 2977)
void yy_r180 ()
yy_r181 (line 2982)
void yy_r181 ()
yy_r183 (line 2987)
void yy_r183 ()
yy_r185 (line 2992)
void yy_r185 ()
yy_r186 (line 2997)
void yy_r186 ()
yy_r188 (line 3002)
void yy_r188 ()
yy_r189 (line 3007)
void yy_r189 ()
yy_r190 (line 3012)
void yy_r190 ()
yy_r191 (line 3018)
void yy_r191 ()
yy_r192 (line 3023)
void yy_r192 ()
yy_r194 (line 3028)
void yy_r194 ()
yy_r196 (line 3033)
void yy_r196 ()
yy_r197 (line 3038)
void yy_r197 ()
yy_r198 (line 3043)
void yy_r198 ()
yy_reduce (line 3050)
void yy_reduce ( $yyruleno)
  • $yyruleno
yy_shift (line 1704)
void yy_shift ( $yyNewState,  $yyMajor,  $yypMinor)
  • $yyNewState
  • $yyMajor
  • $yypMinor
yy_syntax_error (line 3101)
void yy_syntax_error ( $yymajor,  $TOKEN)
  • $yymajor
  • $TOKEN
Class Constants
Err1 = "Security error: Call to private object member not allowed" (line 91)
Err2 = "Security error: Call to dynamic object member not allowed" (line 92)
Err3 = "PHP in template not allowed. Use SmartyBC to enable it" (line 93)
TP_ANDSYM = 40 (line 179)
TP_APTR = 30 (line 169)
TP_AS = 29 (line 168)
TP_ASPENDTAG = 7 (line 146)
TP_ASPSTARTTAG = 6 (line 145)
TP_AT = 60 (line 199)
TP_BACKTICK = 77 (line 216)
TP_CLOSEB = 63 (line 202)
TP_CLOSEP = 37 (line 176)
TP_COLON = 2 (line 141)
TP_COMMA = 35 (line 174)
TP_COMMENT = 3 (line 142)
TP_DOLLAR = 17 (line 156)
TP_DOLLARID = 78 (line 217)
TP_DOT = 57 (line 196)
TP_DOUBLECOLON = 59 (line 198)
TP_EQUAL = 19 (line 158)
TP_EQUALS = 64 (line 203)
TP_FAKEPHPSTARTTAG = 8 (line 147)
TP_GREATEREQUAL = 68 (line 207)
TP_GREATERTHAN = 66 (line 205)
TP_HATCH = 61 (line 200)
TP_HEX = 56 (line 195)
TP_ID = 18 (line 157)
TP_IDENTITY = 70 (line 209)
TP_INCDEC = 24 (line 163)
TP_INSTANCEOF = 52 (line 191)
TP_INTEGER = 34 (line 173)
TP_ISDIVBY = 42 (line 181)
TP_ISEVEN = 44 (line 183)
TP_ISEVENBY = 46 (line 185)
TP_ISIN = 41 (line 180)
TP_ISNOTDIVBY = 43 (line 182)
TP_ISNOTEVEN = 45 (line 184)
TP_ISNOTEVENBY = 47 (line 186)
TP_ISNOTODD = 49 (line 188)
TP_ISNOTODDBY = 51 (line 190)
TP_ISODD = 48 (line 187)
TP_ISODDBY = 50 (line 189)
TP_LAND = 73 (line 212)
TP_LDEL = 15 (line 154)
TP_LDELFOR = 22 (line 161)
TP_LDELFOREACH = 27 (line 166)
TP_LDELIF = 21 (line 160)
TP_LDELSETFILTER = 31 (line 170)
TP_LDELSLASH = 33 (line 172)
TP_LESSEQUAL = 69 (line 208)
TP_LESSTHAN = 67 (line 206)
TP_LINEBREAK = 11 (line 150)
TP_LITERAL = 14 (line 153)
TP_LITERALEND = 13 (line 152)
TP_LITERALSTART = 12 (line 151)
TP_LOR = 74 (line 213)
TP_LXOR = 75 (line 214)
TP_MATH = 38 (line 177)
TP_MOD = 72 (line 211)
TP_NONEIDENTITY = 71 (line 210)
TP_NOT = 54 (line 193)
TP_NOTEQUALS = 65 (line 204)
TP_OPENB = 62 (line 201)
TP_OPENP = 36 (line 175)
TP_OTHER = 10 (line 149)
TP_PHPENDTAG = 5 (line 144)
TP_PHPSTARTTAG = 4 (line 143)
TP_PTR = 20 (line 159)
TP_QMARK = 53 (line 192)
TP_QUOTE = 76 (line 215)
TP_RDEL = 16 (line 155)
TP_SEMICOLON = 23 (line 162)
TP_SINGLEQUOTESTRING = 58 (line 197)
TP_SMARTYBLOCKCHILD = 32 (line 171)
TP_SPACE = 28 (line 167)
TP_STEP = 26 (line 165)
TP_TO = 25 (line 164)
TP_TYPECAST = 55 (line 194)
TP_UNIMATH = 39 (line 178)
TP_VERT = 1 (line 140)
TP_XMLTAG = 9 (line 148)
YYERRORSYMBOL = 79 (line 1196)
YYERRSYMDT = 'yy0' (line 1197)
YYFALLBACK = 0 (line 1198)
YYNOCODE = 122 (line 1192)
YYNRULE = 201 (line 1195)
YYNSTATE = 387 (line 1194)
YYSTACKDEPTH = 100 (line 1193)
YY_ACCEPT_ACTION = 589 (line 219)
YY_ERROR_ACTION = 588 (line 220)
YY_NO_ACTION = 590 (line 218)
YY_REDUCE_MAX = 204 (line 738)
YY_REDUCE_USE_DFLT = -86 (line 737)
YY_SHIFT_MAX = 252 (line 708)
YY_SHIFT_USE_DFLT = -5 (line 707)
YY_SZ_ACTTAB = 2393 (line 222)

Documentation generated on Sat, 24 Sep 2011 20:24:05 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Elseif.html0000644000175000017500000001541411637420324030147 0ustar mikemike Docs For Class Smarty_Internal_Compile_Elseif

Class Smarty_Internal_Compile_Elseif

Description

Smarty Internal Plugin Compile ElseIf Class

Located in /libs/sysplugins/smarty_internal_compile_if.php (line 94)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Elseif
Method Summary
string compile (array $args, object $compiler, array $parameter)
Methods
compile (line 104)

Compiles code for the {elseif} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler, array $parameter)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:44 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_eval.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_e0000644000175000017500000000411211637420324032142 0ustar mikemike Docs for page smarty_internal_compile_eval.php

/libs/sysplugins/smarty_internal_compile_eval.php

Description

Smarty Internal Plugin Compile Eval

Compiles the {eval} tag.

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Eval Smarty Internal Plugin Compile Eval Class

Documentation generated on Sat, 24 Sep 2011 20:23:41 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Whileclose.html0000644000175000017500000001471511637420324031041 0ustar mikemike Docs For Class Smarty_Internal_Compile_Whileclose

Class Smarty_Internal_Compile_Whileclose

Description

Smarty Internal Plugin Compile Whileclose Class

Located in /libs/sysplugins/smarty_internal_compile_while.php (line 69)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Whileclose
Method Summary
string compile (array $args, object $compiler)
Methods
compile (line 78)

Compiles code for the {/while} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler)
  • array $args: array with attributes from parser
  • object $compiler: compiler object

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:49 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Sectionclose.html0000644000175000017500000001473411637420324031376 0ustar mikemike Docs For Class Smarty_Internal_Compile_Sectionclose

Class Smarty_Internal_Compile_Sectionclose

Description

Smarty Internal Plugin Compile Sectionclose Class

Located in /libs/sysplugins/smarty_internal_compile_section.php (line 173)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Sectionclose
Method Summary
string compile (array $args, object $compiler)
Methods
compile (line 182)

Compiles code for the {/section} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler)
  • array $args: array with attributes from parser
  • object $compiler: compiler object

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:48 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Config_Load.html0000644000175000017500000002406511637420324031106 0ustar mikemike Docs For Class Smarty_Internal_Compile_Config_Load

Class Smarty_Internal_Compile_Config_Load

Description

Smarty Internal Plugin Compile Config Load Class

Located in /libs/sysplugins/smarty_internal_compile_config_load.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Config_Load
Method Summary
string compile (array $args, object $compiler)
Variables
array $optional_attributes = array('section', 'scope') (line 40)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$optional_attributes
Array of names of optional attribute required by tag use array('_any') if there is no restriction of attributes names
array $required_attributes = array('file') (line 26)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$required_attributes
Array of names of required attribute required by tag
array $shorttag_order = array('file','section') (line 33)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$shorttag_order
Shorttag attribute order defined by its names

Inherited Variables

Inherited from Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::$option_flags
Methods
compile (line 49)

Compiles code for the {config_load} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler)
  • array $args: array with attributes from parser
  • object $compiler: compiler object

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:40 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Eval.html0000644000175000017500000002376711637420324027641 0ustar mikemike Docs For Class Smarty_Internal_Compile_Eval

Class Smarty_Internal_Compile_Eval

Description

Smarty Internal Plugin Compile Eval Class

Located in /libs/sysplugins/smarty_internal_compile_eval.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Eval
Method Summary
string compile (array $args, object $compiler)
Variables
array $optional_attributes = array('assign') (line 33)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$optional_attributes
Array of names of optional attribute required by tag use array('_any') if there is no restriction of attributes names
array $required_attributes = array('var') (line 26)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$required_attributes
Array of names of required attribute required by tag
array $shorttag_order = array('var','assign') (line 40)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$shorttag_order
Shorttag attribute order defined by its names

Inherited Variables

Inherited from Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::$option_flags
Methods
compile (line 49)

Compiles code for the {eval} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler)
  • array $args: array with attributes from parser
  • object $compiler: compiler object

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:41 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_While.html0000644000175000017500000001541311637420324030007 0ustar mikemike Docs For Class Smarty_Internal_Compile_While

Class Smarty_Internal_Compile_While

Description

Smarty Internal Plugin Compile While Class

Located in /libs/sysplugins/smarty_internal_compile_while.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_While
Method Summary
string compile (array $args, object $compiler, array $parameter)
Methods
compile (line 28)

Compiles code for the {while} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler, array $parameter)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:49 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Private_Special_Variable.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Private_Special_Variab0000644000175000017500000001546411637420324032340 0ustar mikemike Docs For Class Smarty_Internal_Compile_Private_Special_Variable

Class Smarty_Internal_Compile_Private_Special_Variable

Description

Smarty Internal Plugin Compile special Smarty Variable Class

Located in /libs/sysplugins/smarty_internal_compile_private_special_variable.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Private_Special_Variable
Method Summary
string compile (array $args, object $compiler,  $parameter)
Methods
compile (line 27)

Compiles code for the speical $smarty variables

  • return: compiled code
  • access: public
string compile (array $args, object $compiler,  $parameter)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • $parameter

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:48 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_templateparser.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_templatep0000644000175000017500000000442111637420324032204 0ustar mikemike Docs for page smarty_internal_templateparser.php

/libs/sysplugins/smarty_internal_templateparser.php

Description
Classes
Class Description
TP_yyToken Smarty Internal Plugin Templateparser
TP_yyStackEntry
Smarty_Internal_Templateparser

Documentation generated on Sat, 24 Sep 2011 20:24:05 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Functionclose.html0000644000175000017500000001546011637420324031554 0ustar mikemike Docs For Class Smarty_Internal_Compile_Functionclose

Class Smarty_Internal_Compile_Functionclose

Description

Smarty Internal Plugin Compile Functionclose Class

Located in /libs/sysplugins/smarty_internal_compile_function.php (line 98)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Functionclose
Method Summary
boolean compile (array $args, object $compiler, array $parameter)
Methods
compile (line 108)

Compiles code for the {/function} tag

  • return: true
  • access: public
boolean compile (array $args, object $compiler, array $parameter)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:43 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Setfilterclose.html0000644000175000017500000001512211637420324031723 0ustar mikemike Docs For Class Smarty_Internal_Compile_Setfilterclose

Class Smarty_Internal_Compile_Setfilterclose

Description

Smarty Internal Plugin Compile Setfilterclose Class

Located in /libs/sysplugins/smarty_internal_compile_setfilter.php (line 45)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Setfilterclose
Method Summary
string compile (array $args, object $compiler)
Methods
compile (line 56)

Compiles code for the {/setfilter} tag

This tag does not generate compiled output. It resets variable filter.

  • return: compiled code
  • access: public
string compile (array $args, object $compiler)
  • array $args: array with attributes from parser
  • object $compiler: compiler object

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:49 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_append.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_a0000644000175000017500000000412711637420324032144 0ustar mikemike Docs for page smarty_internal_compile_append.php

/libs/sysplugins/smarty_internal_compile_append.php

Description

Smarty Internal Plugin Compile Append

Compiles the {append} tag

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Append Smarty Internal Plugin Compile Append Class

Documentation generated on Sat, 24 Sep 2011 20:23:38 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_extends.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_e0000644000175000017500000000413411637420324032146 0ustar mikemike Docs for page smarty_internal_compile_extends.php

/libs/sysplugins/smarty_internal_compile_extends.php

Description

Smarty Internal Plugin Compile extend

Compiles the {extends} tag

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Extends Smarty Internal Plugin Compile extend Class

Documentation generated on Sat, 24 Sep 2011 20:23:41 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_nocache_insert.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_nocache_i0000644000175000017500000000415311637420324032123 0ustar mikemike Docs for page smarty_internal_nocache_insert.php

/libs/sysplugins/smarty_internal_nocache_insert.php

Description

Smarty Internal Plugin Nocache Insert

Compiles the {insert} tag into the cache file

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Nocache_Insert Smarty Internal Plugin Compile Insert Class

Documentation generated on Sat, 24 Sep 2011 20:23:56 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Sectionelse.html0000644000175000017500000001473411637420324031221 0ustar mikemike Docs For Class Smarty_Internal_Compile_Sectionelse

Class Smarty_Internal_Compile_Sectionelse

Description

Smarty Internal Plugin Compile Sectionelse Class

Located in /libs/sysplugins/smarty_internal_compile_section.php (line 145)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Sectionelse
Method Summary
string compile (array $args, object $compiler)
Methods
compile (line 154)

Compiles code for the {sectionelse} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler)
  • array $args: array with attributes from parser
  • object $compiler: compiler object

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:49 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Blockclose.html0000644000175000017500000001471711637420324031025 0ustar mikemike Docs For Class Smarty_Internal_Compile_Blockclose

Class Smarty_Internal_Compile_Blockclose

Description

Smarty Internal Plugin Compile BlockClose Class

Located in /libs/sysplugins/smarty_internal_compile_block.php (line 199)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Blockclose
Method Summary
string compile (array $args, object $compiler)
Methods
compile (line 208)

Compiles code for the {/block} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler)
  • array $args: array with attributes from parser
  • object $compiler: compiler object

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:39 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Nocacheclose.html0000644000175000017500000001500411637420324031321 0ustar mikemike Docs For Class Smarty_Internal_Compile_Nocacheclose

Class Smarty_Internal_Compile_Nocacheclose

Description

Smarty Internal Plugin Compile Nocacheclose Class

Located in /libs/sysplugins/smarty_internal_compile_nocache.php (line 50)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Nocacheclose
Method Summary
bool compile (array $args, object $compiler)
Methods
compile (line 61)

Compiles code for the {/nocache} tag

This tag does not generate compiled output. It only sets a compiler flag.

  • access: public
bool compile (array $args, object $compiler)
  • array $args: array with attributes from parser
  • object $compiler: compiler object

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:46 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_insert.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_i0000644000175000017500000000412711637420324032154 0ustar mikemike Docs for page smarty_internal_compile_insert.php

/libs/sysplugins/smarty_internal_compile_insert.php

Description

Smarty Internal Plugin Compile Insert

Compiles the {insert} tag

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Insert Smarty Internal Plugin Compile Insert Class

Documentation generated on Sat, 24 Sep 2011 20:23:45 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Private_Registered_Function.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Private_Registered_Fun0000644000175000017500000002153211637420324032372 0ustar mikemike Docs For Class Smarty_Internal_Compile_Private_Registered_Function

Class Smarty_Internal_Compile_Private_Registered_Function

Description

Smarty Internal Plugin Compile Registered Function Class

Located in /libs/sysplugins/smarty_internal_compile_private_registered_function.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Private_Registered_Function
Variable Summary
Method Summary
string compile (array $args, object $compiler, array $parameter, string $tag)
Variables
array $optional_attributes = array('_any') (line 26)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$optional_attributes
Array of names of optional attribute required by tag use array('_any') if there is no restriction of attributes names

Inherited Variables

Inherited from Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::$option_flags
Smarty_Internal_CompileBase::$required_attributes
Smarty_Internal_CompileBase::$shorttag_order
Methods
compile (line 37)

Compiles code for the execution of a registered function

  • return: compiled code
  • access: public
string compile (array $args, object $compiler, array $parameter, string $tag)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter
  • string $tag: name of function

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:47 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_block.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_b0000644000175000017500000000457711637420324032156 0ustar mikemike Docs for page smarty_internal_compile_block.php

/libs/sysplugins/smarty_internal_compile_block.php

Description

Smarty Internal Plugin Compile Block

Compiles the {block}{/block} tags

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Block Smarty Internal Plugin Compile Block Class
Smarty_Internal_Compile_Blockclose Smarty Internal Plugin Compile BlockClose Class

Documentation generated on Sat, 24 Sep 2011 20:23:39 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_ldelim.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_l0000644000175000017500000000412711637420324032157 0ustar mikemike Docs for page smarty_internal_compile_ldelim.php

/libs/sysplugins/smarty_internal_compile_ldelim.php

Description

Smarty Internal Plugin Compile Ldelim

Compiles the {ldelim} tag

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Ldelim Smarty Internal Plugin Compile Ldelim Class

Documentation generated on Sat, 24 Sep 2011 20:23:45 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Templatelexer.html0000644000175000017500000037454111637420324030114 0ustar mikemike Docs For Class Smarty_Internal_Templatelexer

Class Smarty_Internal_Templatelexer

Description

Smarty Internal Plugin Templatelexer

Located in /libs/sysplugins/smarty_internal_templatelexer.php (line 13)


	
			
Class Constant Summary
Variable Summary
mixed $counter
mixed $data
mixed $line
mixed $node
mixed $state
mixed $strip
mixed $taglineno
mixed $token
mixed $value
Method Summary
Smarty_Internal_Templatelexer __construct ( $data,  $compiler)
void yybegin ( $state)
void yylex ()
void yylex1 ()
void yylex2 ()
void yylex3 ()
void yylex4 ()
void yypopstate ()
void yypushstate ( $state)
void yy_r1_1 ( $yy_subpatterns)
void yy_r1_2 ( $yy_subpatterns)
void yy_r1_3 ( $yy_subpatterns)
void yy_r1_5 ( $yy_subpatterns)
void yy_r1_6 ( $yy_subpatterns)
void yy_r1_7 ( $yy_subpatterns)
void yy_r1_8 ( $yy_subpatterns)
void yy_r1_9 ( $yy_subpatterns)
void yy_r1_10 ( $yy_subpatterns)
void yy_r1_11 ( $yy_subpatterns)
void yy_r1_12 ( $yy_subpatterns)
void yy_r1_14 ( $yy_subpatterns)
void yy_r1_15 ( $yy_subpatterns)
void yy_r1_16 ( $yy_subpatterns)
void yy_r1_17 ( $yy_subpatterns)
void yy_r1_18 ( $yy_subpatterns)
void yy_r1_19 ( $yy_subpatterns)
void yy_r1_20 ( $yy_subpatterns)
void yy_r1_21 ( $yy_subpatterns)
void yy_r1_22 ( $yy_subpatterns)
void yy_r1_23 ( $yy_subpatterns)
void yy_r1_24 ( $yy_subpatterns)
void yy_r1_27 ( $yy_subpatterns)
void yy_r1_28 ( $yy_subpatterns)
void yy_r2_1 ( $yy_subpatterns)
void yy_r2_2 ( $yy_subpatterns)
void yy_r2_3 ( $yy_subpatterns)
void yy_r2_5 ( $yy_subpatterns)
void yy_r2_6 ( $yy_subpatterns)
void yy_r2_7 ( $yy_subpatterns)
void yy_r2_8 ( $yy_subpatterns)
void yy_r2_9 ( $yy_subpatterns)
void yy_r2_10 ( $yy_subpatterns)
void yy_r2_11 ( $yy_subpatterns)
void yy_r2_12 ( $yy_subpatterns)
void yy_r2_13 ( $yy_subpatterns)
void yy_r2_14 ( $yy_subpatterns)
void yy_r2_15 ( $yy_subpatterns)
void yy_r2_16 ( $yy_subpatterns)
void yy_r2_17 ( $yy_subpatterns)
void yy_r2_18 ( $yy_subpatterns)
void yy_r2_19 ( $yy_subpatterns)
void yy_r2_20 ( $yy_subpatterns)
void yy_r2_22 ( $yy_subpatterns)
void yy_r2_24 ( $yy_subpatterns)
void yy_r2_26 ( $yy_subpatterns)
void yy_r2_27 ( $yy_subpatterns)
void yy_r2_28 ( $yy_subpatterns)
void yy_r2_29 ( $yy_subpatterns)
void yy_r2_30 ( $yy_subpatterns)
void yy_r2_31 ( $yy_subpatterns)
void yy_r2_32 ( $yy_subpatterns)
void yy_r2_33 ( $yy_subpatterns)
void yy_r2_34 ( $yy_subpatterns)
void yy_r2_35 ( $yy_subpatterns)
void yy_r2_36 ( $yy_subpatterns)
void yy_r2_37 ( $yy_subpatterns)
void yy_r2_38 ( $yy_subpatterns)
void yy_r2_39 ( $yy_subpatterns)
void yy_r2_40 ( $yy_subpatterns)
void yy_r2_41 ( $yy_subpatterns)
void yy_r2_42 ( $yy_subpatterns)
void yy_r2_43 ( $yy_subpatterns)
void yy_r2_47 ( $yy_subpatterns)
void yy_r2_48 ( $yy_subpatterns)
void yy_r2_49 ( $yy_subpatterns)
void yy_r2_50 ( $yy_subpatterns)
void yy_r2_51 ( $yy_subpatterns)
void yy_r2_52 ( $yy_subpatterns)
void yy_r2_53 ( $yy_subpatterns)
void yy_r2_54 ( $yy_subpatterns)
void yy_r2_55 ( $yy_subpatterns)
void yy_r2_57 ( $yy_subpatterns)
void yy_r2_59 ( $yy_subpatterns)
void yy_r2_60 ( $yy_subpatterns)
void yy_r2_61 ( $yy_subpatterns)
void yy_r2_62 ( $yy_subpatterns)
void yy_r2_63 ( $yy_subpatterns)
void yy_r2_64 ( $yy_subpatterns)
void yy_r2_65 ( $yy_subpatterns)
void yy_r2_66 ( $yy_subpatterns)
void yy_r2_67 ( $yy_subpatterns)
void yy_r2_68 ( $yy_subpatterns)
void yy_r2_69 ( $yy_subpatterns)
void yy_r2_70 ( $yy_subpatterns)
void yy_r2_71 ( $yy_subpatterns)
void yy_r2_72 ( $yy_subpatterns)
void yy_r2_73 ( $yy_subpatterns)
void yy_r2_74 ( $yy_subpatterns)
void yy_r2_75 ( $yy_subpatterns)
void yy_r2_76 ( $yy_subpatterns)
void yy_r3_1 ( $yy_subpatterns)
void yy_r3_2 ( $yy_subpatterns)
void yy_r3_3 ( $yy_subpatterns)
void yy_r3_4 ( $yy_subpatterns)
void yy_r3_5 ( $yy_subpatterns)
void yy_r3_6 ( $yy_subpatterns)
void yy_r3_7 ( $yy_subpatterns)
void yy_r3_8 ( $yy_subpatterns)
void yy_r3_11 ( $yy_subpatterns)
void yy_r4_1 ( $yy_subpatterns)
void yy_r4_2 ( $yy_subpatterns)
void yy_r4_4 ( $yy_subpatterns)
void yy_r4_5 ( $yy_subpatterns)
void yy_r4_6 ( $yy_subpatterns)
void yy_r4_7 ( $yy_subpatterns)
void yy_r4_8 ( $yy_subpatterns)
void yy_r4_9 ( $yy_subpatterns)
void yy_r4_10 ( $yy_subpatterns)
void yy_r4_11 ( $yy_subpatterns)
void yy_r4_12 ( $yy_subpatterns)
void yy_r4_13 ( $yy_subpatterns)
void yy_r4_17 ( $yy_subpatterns)
void yy_r4_18 ( $yy_subpatterns)
Variables
mixed $counter (line 16)
  • access: public
mixed $data (line 15)
  • access: public
mixed $line (line 20)
  • access: public
mixed $node (line 19)
  • access: public
mixed $smarty_token_names = array ( // Text for parser error messages
'IDENTITY' => '===',
'NONEIDENTITY' => '!==',
'EQUALS' => '==',
'NOTEQUALS' => '!=',
'GREATEREQUAL' => '(>=,ge)',
'LESSEQUAL' => '(<=,le)',
'GREATERTHAN' => '(>,gt)',
'LESSTHAN' => '(<,lt)',
'MOD' => '(%,mod)',
'NOT' => '(!,not)',
'LAND' => '(&&,and)',
'LOR' => '(||,or)',
'LXOR' => 'xor',
'OPENP' => '(',
'CLOSEP' => ')',
'OPENB' => '[',
'CLOSEB' => ']',
'PTR' => '->',
'APTR' => '=>',
'EQUAL' => '=',
'NUMBER' => 'number',
'UNIMATH' => '+" , "-',
'MATH' => '*" , "/" , "%',
'INCDEC' => '++" , "--',
'SPACE' => ' ',
'DOLLAR' => '$',
'SEMICOLON' => ';',
'COLON' => ':',
'DOUBLECOLON' => '::',
'AT' => '@',
'HATCH' => '#',
'QUOTE' => '"',
'BACKTICK' => '`',
'VERT' => '|',
'DOT' => '.',
'COMMA' => '","',
'ANDSYM' => '"&"',
'QMARK' => '"?"',
'ID' => 'identifier',
'OTHER' => 'text',
'LINEBREAK' => 'newline',
'FAKEPHPSTARTTAG' => 'Fake PHP start tag',
'PHPSTARTTAG' => 'PHP start tag',
'PHPENDTAG' => 'PHP end tag',
'LITERALSTART' => 'Literal start',
'LITERALEND' => 'Literal end',
'LDELSLASH' => 'closing tag',
'COMMENT' => 'comment',
'AS' => 'as',
'TO' => 'to',
)
(line 25)
  • access: public
mixed $state = 1 (line 22)
  • access: public
mixed $strip = false (line 23)
  • access: public
mixed $taglineno (line 21)
  • access: public
mixed $token (line 17)
  • access: public
mixed $value (line 18)
  • access: public
Methods
Constructor __construct (line 79)
Smarty_Internal_Templatelexer __construct ( $data,  $compiler)
  • $data
  • $compiler
yybegin (line 114)
void yybegin ( $state)
  • $state
yylex (line 98)
void yylex ()
yylex1 (line 121)
void yylex1 ()
yylex2 (line 388)
void yylex2 ()
yylex3 (line 888)
void yylex3 ()
yylex4 (line 1008)
void yylex4 ()
yypopstate (line 109)
void yypopstate ()
yypushstate (line 103)
void yypushstate ( $state)
  • $state
yy_r1_1 (line 202)
void yy_r1_1 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_2 (line 207)
void yy_r1_2 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_3 (line 212)
void yy_r1_3 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_5 (line 217)
void yy_r1_5 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_6 (line 226)
void yy_r1_6 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_7 (line 232)
void yy_r1_7 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_8 (line 242)
void yy_r1_8 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_9 (line 248)
void yy_r1_9 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_10 (line 258)
void yy_r1_10 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_11 (line 264)
void yy_r1_11 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_12 (line 275)
void yy_r1_12 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_14 (line 286)
void yy_r1_14 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_15 (line 297)
void yy_r1_15 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_16 (line 308)
void yy_r1_16 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_17 (line 319)
void yy_r1_17 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_18 (line 330)
void yy_r1_18 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_19 (line 337)
void yy_r1_19 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_20 (line 344)
void yy_r1_20 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_21 (line 356)
void yy_r1_21 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_22 (line 361)
void yy_r1_22 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_23 (line 366)
void yy_r1_23 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_24 (line 371)
void yy_r1_24 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_27 (line 376)
void yy_r1_27 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r1_28 (line 381)
void yy_r1_28 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_1 (line 512)
void yy_r2_1 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_2 (line 517)
void yy_r2_2 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_3 (line 528)
void yy_r2_3 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_5 (line 539)
void yy_r2_5 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_6 (line 550)
void yy_r2_6 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_7 (line 561)
void yy_r2_7 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_8 (line 572)
void yy_r2_8 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_9 (line 578)
void yy_r2_9 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_10 (line 585)
void yy_r2_10 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_11 (line 592)
void yy_r2_11 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_12 (line 598)
void yy_r2_12 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_13 (line 603)
void yy_r2_13 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_14 (line 608)
void yy_r2_14 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_15 (line 613)
void yy_r2_15 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_16 (line 618)
void yy_r2_16 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_17 (line 623)
void yy_r2_17 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_18 (line 628)
void yy_r2_18 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_19 (line 633)
void yy_r2_19 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_20 (line 638)
void yy_r2_20 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_22 (line 643)
void yy_r2_22 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_24 (line 648)
void yy_r2_24 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_26 (line 653)
void yy_r2_26 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_27 (line 658)
void yy_r2_27 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_28 (line 663)
void yy_r2_28 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_29 (line 668)
void yy_r2_29 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_30 (line 673)
void yy_r2_30 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_31 (line 678)
void yy_r2_31 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_32 (line 683)
void yy_r2_32 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_33 (line 688)
void yy_r2_33 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_34 (line 693)
void yy_r2_34 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_35 (line 698)
void yy_r2_35 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_36 (line 703)
void yy_r2_36 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_37 (line 708)
void yy_r2_37 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_38 (line 713)
void yy_r2_38 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_39 (line 718)
void yy_r2_39 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_40 (line 723)
void yy_r2_40 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_41 (line 728)
void yy_r2_41 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_42 (line 733)
void yy_r2_42 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_43 (line 738)
void yy_r2_43 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_47 (line 743)
void yy_r2_47 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_48 (line 748)
void yy_r2_48 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_49 (line 753)
void yy_r2_49 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_50 (line 758)
void yy_r2_50 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_51 (line 763)
void yy_r2_51 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_52 (line 768)
void yy_r2_52 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_53 (line 773)
void yy_r2_53 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_54 (line 778)
void yy_r2_54 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_55 (line 783)
void yy_r2_55 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_57 (line 788)
void yy_r2_57 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_59 (line 793)
void yy_r2_59 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_60 (line 798)
void yy_r2_60 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_61 (line 803)
void yy_r2_61 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_62 (line 808)
void yy_r2_62 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_63 (line 813)
void yy_r2_63 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_64 (line 818)
void yy_r2_64 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_65 (line 823)
void yy_r2_65 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_66 (line 829)
void yy_r2_66 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_67 (line 835)
void yy_r2_67 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_68 (line 840)
void yy_r2_68 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_69 (line 845)
void yy_r2_69 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_70 (line 850)
void yy_r2_70 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_71 (line 855)
void yy_r2_71 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_72 (line 860)
void yy_r2_72 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_73 (line 865)
void yy_r2_73 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_74 (line 870)
void yy_r2_74 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_75 (line 875)
void yy_r2_75 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r2_76 (line 880)
void yy_r2_76 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r3_1 (line 954)
void yy_r3_1 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r3_2 (line 960)
void yy_r3_2 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r3_3 (line 966)
void yy_r3_3 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r3_4 (line 971)
void yy_r3_4 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r3_5 (line 981)
void yy_r3_5 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r3_6 (line 986)
void yy_r3_6 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r3_7 (line 991)
void yy_r3_7 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r3_8 (line 996)
void yy_r3_8 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r3_11 (line 1001)
void yy_r3_11 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r4_1 (line 1079)
void yy_r4_1 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r4_2 (line 1090)
void yy_r4_2 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r4_4 (line 1101)
void yy_r4_4 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r4_5 (line 1112)
void yy_r4_5 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r4_6 (line 1123)
void yy_r4_6 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r4_7 (line 1134)
void yy_r4_7 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r4_8 (line 1141)
void yy_r4_8 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r4_9 (line 1148)
void yy_r4_9 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r4_10 (line 1154)
void yy_r4_10 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r4_11 (line 1162)
void yy_r4_11 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r4_12 (line 1167)
void yy_r4_12 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r4_13 (line 1172)
void yy_r4_13 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r4_17 (line 1177)
void yy_r4_17 ( $yy_subpatterns)
  • $yy_subpatterns
yy_r4_18 (line 1182)
void yy_r4_18 ( $yy_subpatterns)
  • $yy_subpatterns
Class Constants
DOUBLEQUOTEDSTRING = 4 (line 1078)
LITERAL = 3 (line 953)
SMARTY = 2 (line 511)
TEXT = 1 (line 201)

Documentation generated on Sat, 24 Sep 2011 20:24:03 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_while.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_w0000644000175000017500000000456611637420324032201 0ustar mikemike Docs for page smarty_internal_compile_while.php

/libs/sysplugins/smarty_internal_compile_while.php

Description

Smarty Internal Plugin Compile While

Compiles the {while} tag

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_While Smarty Internal Plugin Compile While Class
Smarty_Internal_Compile_Whileclose Smarty Internal Plugin Compile Whileclose Class

Documentation generated on Sat, 24 Sep 2011 20:23:49 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_templatelexer.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_templatel0000644000175000017500000000415411637420324032203 0ustar mikemike Docs for page smarty_internal_templatelexer.php

/libs/sysplugins/smarty_internal_templatelexer.php

Description

Smarty Internal Plugin Templatelexer

This is the lexer to break the template source into tokens

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Templatelexer Smarty Internal Plugin Templatelexer

Documentation generated on Sat, 24 Sep 2011 20:24:03 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Include_Php.html0000644000175000017500000002404411637420324031131 0ustar mikemike Docs For Class Smarty_Internal_Compile_Include_Php

Class Smarty_Internal_Compile_Include_Php

Description

Smarty Internal Plugin Compile Insert Class

Located in /libs/sysplugins/smarty_internal_compile_include_php.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Include_Php
Method Summary
string compile (array $args, object $compiler)
Variables
array $optional_attributes = array('once', 'assign') (line 40)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$optional_attributes
Array of names of optional attribute required by tag use array('_any') if there is no restriction of attributes names
array $required_attributes = array('file') (line 26)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$required_attributes
Array of names of required attribute required by tag
array $shorttag_order = array('file') (line 33)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$shorttag_order
Shorttag attribute order defined by its names

Inherited Variables

Inherited from Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::$option_flags
Methods
compile (line 49)

Compiles code for the {include_php} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler)
  • array $args: array with attributes from parser
  • object $compiler: compiler object

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:45 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Nocache.html0000644000175000017500000001476111637420324030304 0ustar mikemike Docs For Class Smarty_Internal_Compile_Nocache

Class Smarty_Internal_Compile_Nocache

Description

Smarty Internal Plugin Compile Nocache Classv

Located in /libs/sysplugins/smarty_internal_compile_nocache.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Nocache
Method Summary
bool compile (array $args, object $compiler)
Methods
compile (line 29)

Compiles code for the {nocache} tag

This tag does not generate compiled output. It only sets a compiler flag.

  • access: public
bool compile (array $args, object $compiler)
  • array $args: array with attributes from parser
  • object $compiler: compiler object

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:45 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000020500000000000011562 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_private_registered_block.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_p0000644000175000017500000000433011637420324032157 0ustar mikemike Docs for page smarty_internal_compile_private_registered_block.php

/libs/sysplugins/smarty_internal_compile_private_registered_block.php

Description

Smarty Internal Plugin Compile Registered Block

Compiles code for the execution of a registered block function

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Private_Registered_Block Smarty Internal Plugin Compile Registered Block Class

Documentation generated on Sat, 24 Sep 2011 20:23:47 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Include.html0000644000175000017500000003253311637420324030324 0ustar mikemike Docs For Class Smarty_Internal_Compile_Include

Class Smarty_Internal_Compile_Include

Description

Smarty Internal Plugin Compile Include Class

Located in /libs/sysplugins/smarty_internal_compile_include.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Include
Class Constant Summary
Method Summary
string compile (array $args, object $compiler, array $parameter)
Variables
array $optional_attributes = array('_any') (line 51)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$optional_attributes
Array of names of optional attribute required by tag use array('_any') if there is no restriction of attributes names
array $option_flags = array('nocache', 'inline', 'caching') (line 44)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$option_flags
Array of names of valid option flags
array $required_attributes = array('file') (line 30)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$required_attributes
Array of names of required attribute required by tag
array $shorttag_order = array('file') (line 37)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$shorttag_order
Shorttag attribute order defined by its names
Methods
compile (line 61)

Compiles code for the {include} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler, array $parameter)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()
Class Constants
CACHING_NOCACHE_CODE = 9999 (line 23)

caching mode to create nocache code but no cache file

Documentation generated on Sat, 24 Sep 2011 20:23:44 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Private_Print_Expression.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Private_Print_Expressi0000644000175000017500000002273311637420324032447 0ustar mikemike Docs For Class Smarty_Internal_Compile_Private_Print_Expression

Class Smarty_Internal_Compile_Private_Print_Expression

Description

Smarty Internal Plugin Compile Print Expression Class

Located in /libs/sysplugins/smarty_internal_compile_private_print_expression.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Private_Print_Expression
Variable Summary
Method Summary
string compile (array $args, object $compiler, array $parameter)
Variables
array $optional_attributes = array('assign') (line 26)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$optional_attributes
Array of names of optional attribute required by tag use array('_any') if there is no restriction of attributes names
array $option_flags = array('nocache', 'nofilter') (line 33)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$option_flags
Array of names of valid option flags

Inherited Variables

Inherited from Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::$required_attributes
Smarty_Internal_CompileBase::$shorttag_order
Methods
compile (line 43)

Compiles code for gererting output from any expression

  • return: compiled code
  • access: public
string compile (array $args, object $compiler, array $parameter)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:47 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Assign.html0000644000175000017500000002024111637420324030156 0ustar mikemike Docs For Class Smarty_Internal_Compile_Assign

Class Smarty_Internal_Compile_Assign

Description

Smarty Internal Plugin Compile Assign Class

Located in /libs/sysplugins/smarty_internal_compile_assign.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Assign
Direct descendents
Class Description
Smarty_Internal_Compile_Append Smarty Internal Plugin Compile Append Class
Method Summary
string compile (array $args, object $compiler, array $parameter)
Methods
compile (line 28)

Compiles code for the {assign} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler, array $parameter)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter

Redefined in descendants as:

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:39 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_configfileparser.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_configfil0000644000175000017500000000443711637420324032160 0ustar mikemike Docs for page smarty_internal_configfileparser.php

/libs/sysplugins/smarty_internal_configfileparser.php

Description
Classes
Class Description
TPC_yyToken Smarty Internal Plugin Configfileparser
TPC_yyStackEntry
Smarty_Internal_Configfileparser

Documentation generated on Sat, 24 Sep 2011 20:23:51 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Function.html0000644000175000017500000002452711637420324030532 0ustar mikemike Docs For Class Smarty_Internal_Compile_Function

Class Smarty_Internal_Compile_Function

Description

Smarty Internal Plugin Compile Function Class

Located in /libs/sysplugins/smarty_internal_compile_function.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Function
Method Summary
boolean compile (array $args, object $compiler, array $parameter)
Variables
array $optional_attributes = array('_any') (line 40)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$optional_attributes
Array of names of optional attribute required by tag use array('_any') if there is no restriction of attributes names
array $required_attributes = array('name') (line 26)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$required_attributes
Array of names of required attribute required by tag
array $shorttag_order = array('name') (line 33)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$shorttag_order
Shorttag attribute order defined by its names

Inherited Variables

Inherited from Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::$option_flags
Methods
compile (line 50)

Compiles code for the {function} tag

  • return: true
  • access: public
boolean compile (array $args, object $compiler, array $parameter)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:43 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Section.html0000644000175000017500000002405311637420324030343 0ustar mikemike Docs For Class Smarty_Internal_Compile_Section

Class Smarty_Internal_Compile_Section

Description

Smarty Internal Plugin Compile Section Class

Located in /libs/sysplugins/smarty_internal_compile_section.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Section
Method Summary
string compile (array $args, object $compiler)
Variables
array $optional_attributes = array('start', 'step', 'max', 'show') (line 40)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$optional_attributes
Array of names of optional attribute required by tag use array('_any') if there is no restriction of attributes names
array $required_attributes = array('name', 'loop') (line 26)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$required_attributes
Array of names of required attribute required by tag
array $shorttag_order = array('name', 'loop') (line 33)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$shorttag_order
Shorttag attribute order defined by its names

Inherited Variables

Inherited from Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::$option_flags
Methods
compile (line 49)

Compiles code for the {section} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler)
  • array $args: array with attributes from parser
  • object $compiler: compiler object

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:48 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Capture.html0000644000175000017500000002205411637420324030341 0ustar mikemike Docs For Class Smarty_Internal_Compile_Capture

Class Smarty_Internal_Compile_Capture

Description

Smarty Internal Plugin Compile Capture Class

Located in /libs/sysplugins/smarty_internal_compile_capture.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Capture
Variable Summary
Method Summary
string compile (array $args, object $compiler)
Variables
array $optional_attributes = array('name', 'assign', 'append') (line 33)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$optional_attributes
Array of names of optional attribute required by tag use array('_any') if there is no restriction of attributes names
array $shorttag_order = array('name') (line 26)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$shorttag_order
Shorttag attribute order defined by its names

Inherited Variables

Inherited from Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::$option_flags
Smarty_Internal_CompileBase::$required_attributes
Methods
compile (line 42)

Compiles code for the {capture} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler)
  • array $args: array with attributes from parser
  • object $compiler: compiler object

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:40 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000020400000000000011561 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_private_function_plugin.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_p0000644000175000017500000000430611637420324032162 0ustar mikemike Docs for page smarty_internal_compile_private_function_plugin.php

/libs/sysplugins/smarty_internal_compile_private_function_plugin.php

Description

Smarty Internal Plugin Compile Function Plugin

Compiles code for the execution of function plugin

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Private_Function_Plugin Smarty Internal Plugin Compile Function Plugin Class

Documentation generated on Sat, 24 Sep 2011 20:23:46 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Private_Registered_Block.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Private_Registered_Blo0000644000175000017500000002151111637420324032353 0ustar mikemike Docs For Class Smarty_Internal_Compile_Private_Registered_Block

Class Smarty_Internal_Compile_Private_Registered_Block

Description

Smarty Internal Plugin Compile Registered Block Class

Located in /libs/sysplugins/smarty_internal_compile_private_registered_block.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Private_Registered_Block
Variable Summary
Method Summary
string compile (array $args, object $compiler, array $parameter, string $tag)
Variables
array $optional_attributes = array('_any') (line 26)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$optional_attributes
Array of names of optional attribute required by tag use array('_any') if there is no restriction of attributes names

Inherited Variables

Inherited from Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::$option_flags
Smarty_Internal_CompileBase::$required_attributes
Smarty_Internal_CompileBase::$shorttag_order
Methods
compile (line 37)

Compiles code for the execution of a block function

  • return: compiled code
  • access: public
string compile (array $args, object $compiler, array $parameter, string $tag)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter
  • string $tag: name of block function

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:47 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Foreach.html0000644000175000017500000002457211637420324030314 0ustar mikemike Docs For Class Smarty_Internal_Compile_Foreach

Class Smarty_Internal_Compile_Foreach

Description

Smarty Internal Plugin Compile Foreach Class

Located in /libs/sysplugins/smarty_internal_compile_foreach.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Foreach
Method Summary
string compile (array $args, object $compiler, array $parameter)
Variables
array $optional_attributes = array('name', 'key') (line 32)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$optional_attributes
Array of names of optional attribute required by tag use array('_any') if there is no restriction of attributes names
array $required_attributes = array('from', 'item') (line 25)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$required_attributes
Array of names of required attribute required by tag
array $shorttag_order = array('from','item','key','name') (line 39)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$shorttag_order
Shorttag attribute order defined by its names

Inherited Variables

Inherited from Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::$option_flags
Methods
compile (line 49)

Compiles code for the {foreach} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler, array $parameter)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:42 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/TPC_yyToken.html0000644000175000017500000002630611637420324024247 0ustar mikemike Docs For Class TPC_yyToken

Class TPC_yyToken

Description

Implements interfaces:

  • ArrayAccess (internal interface)

Smarty Internal Plugin Configfileparser

This is the config file parser. It is generated from the internal.configfileparser.y file

  • author: Uwe Tews

Located in /libs/sysplugins/smarty_internal_configfileparser.php (line 12)


	
			
Variable Summary
mixed $metadata
mixed $string
Method Summary
TPC_yyToken __construct ( $s, [ $m = array()])
void offsetExists ( $offset)
void offsetGet ( $offset)
void offsetSet ( $offset,  $value)
void offsetUnset ( $offset)
void __toString ()
Variables
mixed $metadata = array() (line 15)
  • access: public
mixed $string = '' (line 14)
  • access: public
Methods
Constructor __construct (line 17)
TPC_yyToken __construct ( $s, [ $m = array()])
  • $s
  • $m
offsetExists (line 37)
void offsetExists ( $offset)
  • $offset

Implementation of:
ArrayAccess::offsetExists
offsetGet (line 42)
void offsetGet ( $offset)
  • $offset

Implementation of:
ArrayAccess::offsetGet
offsetSet (line 47)
void offsetSet ( $offset,  $value)
  • $offset
  • $value

Implementation of:
ArrayAccess::offsetSet
offsetUnset (line 70)
void offsetUnset ( $offset)
  • $offset

Implementation of:
ArrayAccess::offsetUnset
__toString (line 32)
void __toString ()

Documentation generated on Sat, 24 Sep 2011 20:23:52 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Foreachelse.html0000644000175000017500000001545711637420324031167 0ustar mikemike Docs For Class Smarty_Internal_Compile_Foreachelse

Class Smarty_Internal_Compile_Foreachelse

Description

Smarty Internal Plugin Compile Foreachelse Class

Located in /libs/sysplugins/smarty_internal_compile_foreach.php (line 176)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Foreachelse
Method Summary
string compile (array $args, object $compiler, array $parameter)
Methods
compile (line 186)

Compiles code for the {foreachelse} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler, array $parameter)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:43 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Rdelim.html0000644000175000017500000001501311637420324030147 0ustar mikemike Docs For Class Smarty_Internal_Compile_Rdelim

Class Smarty_Internal_Compile_Rdelim

Description

Smarty Internal Plugin Compile Rdelim Class

Located in /libs/sysplugins/smarty_internal_compile_rdelim.php (line 17)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Rdelim
Method Summary
string compile (array $args, object $compiler)
Methods
compile (line 28)

Compiles code for the {rdelim} tag

This tag does output the right delimiter.

  • return: compiled code
  • access: public
string compile (array $args, object $compiler)
  • array $args: array with attributes from parser
  • object $compiler: compiler object

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:48 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_capture.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_c0000644000175000017500000000461211637420324032145 0ustar mikemike Docs for page smarty_internal_compile_capture.php

/libs/sysplugins/smarty_internal_compile_capture.php

Description

Smarty Internal Plugin Compile Capture

Compiles the {capture} tag

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Capture Smarty Internal Plugin Compile Capture Class
Smarty_Internal_Compile_CaptureClose Smarty Internal Plugin Compile Captureclose Class

Documentation generated on Sat, 24 Sep 2011 20:23:40 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Private_Object_Function.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Private_Object_Functio0000644000175000017500000002220011637420324032353 0ustar mikemike Docs For Class Smarty_Internal_Compile_Private_Object_Function

Class Smarty_Internal_Compile_Private_Object_Function

Description

Smarty Internal Plugin Compile Object Function Class

Located in /libs/sysplugins/smarty_internal_compile_private_object_function.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Private_Object_Function
Variable Summary
Method Summary
string compile (array $args, object $compiler, array $parameter, string $tag, string $method)
Variables
array $optional_attributes = array('_any') (line 26)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$optional_attributes
Array of names of optional attribute required by tag use array('_any') if there is no restriction of attributes names

Inherited Variables

Inherited from Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::$option_flags
Smarty_Internal_CompileBase::$required_attributes
Smarty_Internal_CompileBase::$shorttag_order
Methods
compile (line 38)

Compiles code for the execution of function plugin

  • return: compiled code
  • access: public
string compile (array $args, object $compiler, array $parameter, string $tag, string $method)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter
  • string $tag: name of function
  • string $method: name of method to call

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:47 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Setfilter.html0000644000175000017500000001544111637420324030701 0ustar mikemike Docs For Class Smarty_Internal_Compile_Setfilter

Class Smarty_Internal_Compile_Setfilter

Description

Smarty Internal Plugin Compile Setfilter Class

Located in /libs/sysplugins/smarty_internal_compile_setfilter.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Setfilter
Method Summary
string compile (array $args, object $compiler, array $parameter)
Methods
compile (line 28)

Compiles code for setfilter tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler, array $parameter)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:49 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_private_modifier.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_p0000644000175000017500000000421611637420324032162 0ustar mikemike Docs for page smarty_internal_compile_private_modifier.php

/libs/sysplugins/smarty_internal_compile_private_modifier.php

Description

Smarty Internal Plugin Compile Modifier

Compiles code for modifier execution

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Private_Modifier Smarty Internal Plugin Compile Modifier Class

Documentation generated on Sat, 24 Sep 2011 20:23:46 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_for.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_f0000644000175000017500000000522111637420324032145 0ustar mikemike Docs for page smarty_internal_compile_for.php

/libs/sysplugins/smarty_internal_compile_for.php

Description

Smarty Internal Plugin Compile For

Compiles the {for} {forelse} {/for} tags

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_For Smarty Internal Plugin Compile For Class
Smarty_Internal_Compile_Forelse Smarty Internal Plugin Compile Forelse Class
Smarty_Internal_Compile_Forclose Smarty Internal Plugin Compile Forclose Class

Documentation generated on Sat, 24 Sep 2011 20:23:42 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Private_Modifier.html0000644000175000017500000001551011637420324032165 0ustar mikemike Docs For Class Smarty_Internal_Compile_Private_Modifier

Class Smarty_Internal_Compile_Private_Modifier

Description

Smarty Internal Plugin Compile Modifier Class

Located in /libs/sysplugins/smarty_internal_compile_private_modifier.php (line 19)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Private_Modifier
Method Summary
string compile (array $args, object $compiler, array $parameter)
Methods
compile (line 29)

Compiles code for modifier execution

  • return: compiled code
  • access: public
string compile (array $args, object $compiler, array $parameter)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:46 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/TP_yyToken.html0000644000175000017500000002626711637420324024152 0ustar mikemike Docs For Class TP_yyToken

Class TP_yyToken

Description

Implements interfaces:

  • ArrayAccess (internal interface)

Smarty Internal Plugin Templateparser

This is the template parser. It is generated from the internal.templateparser.y file

  • author: Uwe Tews

Located in /libs/sysplugins/smarty_internal_templateparser.php (line 12)


	
			
Variable Summary
mixed $metadata
mixed $string
Method Summary
TP_yyToken __construct ( $s, [ $m = array()])
void offsetExists ( $offset)
void offsetGet ( $offset)
void offsetSet ( $offset,  $value)
void offsetUnset ( $offset)
void __toString ()
Variables
mixed $metadata = array() (line 15)
  • access: public
mixed $string = '' (line 14)
  • access: public
Methods
Constructor __construct (line 17)
TP_yyToken __construct ( $s, [ $m = array()])
  • $s
  • $m
offsetExists (line 37)
void offsetExists ( $offset)
  • $offset

Implementation of:
ArrayAccess::offsetExists
offsetGet (line 42)
void offsetGet ( $offset)
  • $offset

Implementation of:
ArrayAccess::offsetGet
offsetSet (line 47)
void offsetSet ( $offset,  $value)
  • $offset
  • $value

Implementation of:
ArrayAccess::offsetSet
offsetUnset (line 70)
void offsetUnset ( $offset)
  • $offset

Implementation of:
ArrayAccess::offsetUnset
__toString (line 32)
void __toString ()

Documentation generated on Sat, 24 Sep 2011 20:24:06 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_debug.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_d0000644000175000017500000000420611637420324032145 0ustar mikemike Docs for page smarty_internal_compile_debug.php

/libs/sysplugins/smarty_internal_compile_debug.php

Description

Smarty Internal Plugin Compile Debug

Compiles the {debug} tag. It opens a window the the Smarty Debugging Console.

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Debug Smarty Internal Plugin Compile Debug Class

Documentation generated on Sat, 24 Sep 2011 20:23:41 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000021000000000000011556 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_private_registered_function.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_p0000644000175000017500000000434411637420324032164 0ustar mikemike Docs for page smarty_internal_compile_private_registered_function.php

/libs/sysplugins/smarty_internal_compile_private_registered_function.php

Description

Smarty Internal Plugin Compile Registered Function

Compiles code for the execution of a registered function

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Private_Registered_Function Smarty Internal Plugin Compile Registered Function Class

Documentation generated on Sat, 24 Sep 2011 20:23:47 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Ifclose.html0000644000175000017500000001541611637420324030326 0ustar mikemike Docs For Class Smarty_Internal_Compile_Ifclose

Class Smarty_Internal_Compile_Ifclose

Description

Smarty Internal Plugin Compile Ifclose Class

Located in /libs/sysplugins/smarty_internal_compile_if.php (line 172)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Ifclose
Method Summary
string compile (array $args, object $compiler, array $parameter)
Methods
compile (line 182)

Compiles code for the {/if} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler, array $parameter)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:44 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Continue.html0000644000175000017500000002256711637420324030533 0ustar mikemike Docs For Class Smarty_Internal_Compile_Continue

Class Smarty_Internal_Compile_Continue

Description

Smarty Internal Plugin Compile Continue Class

Located in /libs/sysplugins/smarty_internal_compile_continue.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Continue
Variable Summary
Method Summary
string compile (array $args, object $compiler, array $parameter)
Variables
array $optional_attributes = array('levels') (line 26)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$optional_attributes
Array of names of optional attribute required by tag use array('_any') if there is no restriction of attributes names
array $shorttag_order = array('levels') (line 33)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$shorttag_order
Shorttag attribute order defined by its names

Inherited Variables

Inherited from Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::$option_flags
Smarty_Internal_CompileBase::$required_attributes
Methods
compile (line 43)

Compiles code for the {continue} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler, array $parameter)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:41 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_setfilter.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_s0000644000175000017500000000464111637420324032167 0ustar mikemike Docs for page smarty_internal_compile_setfilter.php

/libs/sysplugins/smarty_internal_compile_setfilter.php

Description

Smarty Internal Plugin Compile Setfilter

Compiles code for setfilter tag

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Setfilter Smarty Internal Plugin Compile Setfilter Class
Smarty_Internal_Compile_Setfilterclose Smarty Internal Plugin Compile Setfilterclose Class

Documentation generated on Sat, 24 Sep 2011 20:23:49 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/TPC_yyStackEntry.html0000644000175000017500000000740511637420324025255 0ustar mikemike Docs For Class TPC_yyStackEntry

Class TPC_yyStackEntry

Description
Variable Summary
mixed $major
mixed $minor
mixed $stateno
Variables
mixed $major (line 79)
  • access: public
mixed $minor (line 81)
  • access: public
mixed $stateno (line 78)
  • access: public

Documentation generated on Sat, 24 Sep 2011 20:23:52 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Append.html0000644000175000017500000001712211637420324030145 0ustar mikemike Docs For Class Smarty_Internal_Compile_Append

Class Smarty_Internal_Compile_Append

Description

Smarty Internal Plugin Compile Append Class

Located in /libs/sysplugins/smarty_internal_compile_append.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Assign
      |
      --Smarty_Internal_Compile_Append
Method Summary
string compile (array $args, object $compiler, array $parameter)
Methods
compile (line 28)

Compiles code for the {append} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler, array $parameter)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter

Redefinition of:
Smarty_Internal_Compile_Assign::compile()
Compiles code for the {assign} tag

Inherited Methods

Inherited From Smarty_Internal_Compile_Assign

Smarty_Internal_Compile_Assign::compile()

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:38 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Forelse.html0000644000175000017500000001542211637420324030336 0ustar mikemike Docs For Class Smarty_Internal_Compile_Forelse

Class Smarty_Internal_Compile_Forelse

Description

Smarty Internal Plugin Compile Forelse Class

Located in /libs/sysplugins/smarty_internal_compile_for.php (line 93)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Forelse
Method Summary
string compile (array $args, object $compiler, array $parameter)
Methods
compile (line 103)

Compiles code for the {forelse} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler, array $parameter)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:42 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000020500000000000011562 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_private_print_expression.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_p0000644000175000017500000000432611637420324032164 0ustar mikemike Docs for page smarty_internal_compile_private_print_expression.php

/libs/sysplugins/smarty_internal_compile_private_print_expression.php

Description

Smarty Internal Plugin Compile Print Expression

Compiles any tag which will output an expression or variable

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Private_Print_Expression Smarty Internal Plugin Compile Print Expression Class

Documentation generated on Sat, 24 Sep 2011 20:23:47 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Insert.html0000644000175000017500000002377411637420324030214 0ustar mikemike Docs For Class Smarty_Internal_Compile_Insert

Class Smarty_Internal_Compile_Insert

Description

Smarty Internal Plugin Compile Insert Class

Located in /libs/sysplugins/smarty_internal_compile_insert.php (line 19)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Insert
Method Summary
string compile (array $args, object $compiler)
Variables
array $optional_attributes = array('_any') (line 41)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$optional_attributes
Array of names of optional attribute required by tag use array('_any') if there is no restriction of attributes names
array $required_attributes = array('name') (line 27)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$required_attributes
Array of names of required attribute required by tag
array $shorttag_order = array('name') (line 34)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$shorttag_order
Shorttag attribute order defined by its names

Inherited Variables

Inherited from Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::$option_flags
Methods
compile (line 50)

Compiles code for the {insert} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler)
  • array $args: array with attributes from parser
  • object $compiler: compiler object

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:45 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Ldelim.html0000644000175000017500000001501011637420324030136 0ustar mikemike Docs For Class Smarty_Internal_Compile_Ldelim

Class Smarty_Internal_Compile_Ldelim

Description

Smarty Internal Plugin Compile Ldelim Class

Located in /libs/sysplugins/smarty_internal_compile_ldelim.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Ldelim
Method Summary
string compile (array $args, object $compiler)
Methods
compile (line 28)

Compiles code for the {ldelim} tag

This tag does output the left delimiter

  • return: compiled code
  • access: public
string compile (array $args, object $compiler)
  • array $args: array with attributes from parser
  • object $compiler: compiler object

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:45 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_templatecompilerbase.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_templatec0000644000175000017500000000427011637420324032171 0ustar mikemike Docs for page smarty_internal_templatecompilerbase.php

/libs/sysplugins/smarty_internal_templatecompilerbase.php

Description

Smarty Internal Plugin Smarty Template Compiler Base

This file contains the basic classes and methodes for compiling Smarty templates with lexer/parser

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_TemplateCompilerBase Main abstract compiler class

Documentation generated on Sat, 24 Sep 2011 20:24:03 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Foreachclose.html0000644000175000017500000001546111637420324031337 0ustar mikemike Docs For Class Smarty_Internal_Compile_Foreachclose

Class Smarty_Internal_Compile_Foreachclose

Description

Smarty Internal Plugin Compile Foreachclose Class

Located in /libs/sysplugins/smarty_internal_compile_foreach.php (line 205)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Foreachclose
Method Summary
string compile (array $args, object $compiler, array $parameter)
Methods
compile (line 215)

Compiles code for the {/foreach} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler, array $parameter)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:43 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000021200000000000011560 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_private_object_block_function.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_p0000644000175000017500000000435611637420324032167 0ustar mikemike Docs for page smarty_internal_compile_private_object_block_function.php

/libs/sysplugins/smarty_internal_compile_private_object_block_function.php

Description

Smarty Internal Plugin Compile Object Block Function

Compiles code for registered objects as block function

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Private_Object_Block_Function Smarty Internal Plugin Compile Object Block Function Class

Documentation generated on Sat, 24 Sep 2011 20:23:46 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_smartytemplatecompiler.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_smartytem0000644000175000017500000000430011637420324032232 0ustar mikemike Docs for page smarty_internal_smartytemplatecompiler.php

/libs/sysplugins/smarty_internal_smartytemplatecompiler.php

Description

Smarty Internal Plugin Smarty Template Compiler Base

This file contains the basic classes and methodes for compiling Smarty templates with lexer/parser

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_SmartyTemplateCompiler Class SmartyTemplateCompiler

Documentation generated on Sat, 24 Sep 2011 20:23:59 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_function.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_f0000644000175000017500000000464111637420324032152 0ustar mikemike Docs for page smarty_internal_compile_function.php

/libs/sysplugins/smarty_internal_compile_function.php

Description

Smarty Internal Plugin Compile Function

Compiles the {function} {/function} tags

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Function Smarty Internal Plugin Compile Function Class
Smarty_Internal_Compile_Functionclose Smarty Internal Plugin Compile Functionclose Class

Documentation generated on Sat, 24 Sep 2011 20:23:43 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_parsetree.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_parsetree0000644000175000017500000000254511637420324032210 0ustar mikemike Docs for page smarty_internal_parsetree.php

/libs/sysplugins/smarty_internal_parsetree.php

Description

Smarty Internal Plugin Templateparser Parsetrees

These are classes to build parsetrees in the template parser

  • author: Thue Kristensen
  • author: Uwe Tews

Documentation generated on Sat, 24 Sep 2011 20:23:56 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compilebase.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compileba0000644000175000017500000000402411637420324032143 0ustar mikemike Docs for page smarty_internal_compilebase.php

/libs/sysplugins/smarty_internal_compilebase.php

Description

Smarty Internal Plugin CompileBase

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_CompileBase This class does extend all internal compile plugins

Documentation generated on Sat, 24 Sep 2011 20:23:37 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Forclose.html0000644000175000017500000001542511637420324030516 0ustar mikemike Docs For Class Smarty_Internal_Compile_Forclose

Class Smarty_Internal_Compile_Forclose

Description

Smarty Internal Plugin Compile Forclose Class

Located in /libs/sysplugins/smarty_internal_compile_for.php (line 121)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Forclose
Method Summary
string compile (array $args, object $compiler, array $parameter)
Methods
compile (line 131)

Compiles code for the {/for} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler, array $parameter)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:42 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_call.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_c0000644000175000017500000000420111637420324032137 0ustar mikemike Docs for page smarty_internal_compile_call.php

/libs/sysplugins/smarty_internal_compile_call.php

Description

Smarty Internal Plugin Compile Function_Call

Compiles the calls of user defined tags defined by {function}

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Call Smarty Internal Plugin Compile Function_Call Class

Documentation generated on Sat, 24 Sep 2011 20:23:40 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_CompileBase.html0000644000175000017500000011063211637420324027451 0ustar mikemike Docs For Class Smarty_Internal_CompileBase

Class Smarty_Internal_CompileBase

Description

This class does extend all internal compile plugins

  • abstract:

Located in /libs/sysplugins/smarty_internal_compilebase.php (line 16)


	
			
Direct descendents
Class Description
Smarty_Internal_Compile_Assign Smarty Internal Plugin Compile Assign Class
Smarty_Internal_Compile_Block Smarty Internal Plugin Compile Block Class
Smarty_Internal_Compile_Blockclose Smarty Internal Plugin Compile BlockClose Class
Smarty_Internal_Compile_Break Smarty Internal Plugin Compile Break Class
Smarty_Internal_Compile_Call Smarty Internal Plugin Compile Function_Call Class
Smarty_Internal_Compile_Capture Smarty Internal Plugin Compile Capture Class
Smarty_Internal_Compile_CaptureClose Smarty Internal Plugin Compile Captureclose Class
Smarty_Internal_Compile_Config_Load Smarty Internal Plugin Compile Config Load Class
Smarty_Internal_Compile_Continue Smarty Internal Plugin Compile Continue Class
Smarty_Internal_Compile_Debug Smarty Internal Plugin Compile Debug Class
Smarty_Internal_Compile_Eval Smarty Internal Plugin Compile Eval Class
Smarty_Internal_Compile_Extends Smarty Internal Plugin Compile extend Class
Smarty_Internal_Compile_For Smarty Internal Plugin Compile For Class
Smarty_Internal_Compile_Forelse Smarty Internal Plugin Compile Forelse Class
Smarty_Internal_Compile_Forclose Smarty Internal Plugin Compile Forclose Class
Smarty_Internal_Compile_Foreach Smarty Internal Plugin Compile Foreach Class
Smarty_Internal_Compile_Foreachelse Smarty Internal Plugin Compile Foreachelse Class
Smarty_Internal_Compile_Foreachclose Smarty Internal Plugin Compile Foreachclose Class
Smarty_Internal_Compile_Function Smarty Internal Plugin Compile Function Class
Smarty_Internal_Compile_Functionclose Smarty Internal Plugin Compile Functionclose Class
Smarty_Internal_Compile_If Smarty Internal Plugin Compile If Class
Smarty_Internal_Compile_Else Smarty Internal Plugin Compile Else Class
Smarty_Internal_Compile_Elseif Smarty Internal Plugin Compile ElseIf Class
Smarty_Internal_Compile_Ifclose Smarty Internal Plugin Compile Ifclose Class
Smarty_Internal_Compile_Include Smarty Internal Plugin Compile Include Class
Smarty_Internal_Compile_Include_Php Smarty Internal Plugin Compile Insert Class
Smarty_Internal_Compile_Insert Smarty Internal Plugin Compile Insert Class
Smarty_Internal_Compile_Ldelim Smarty Internal Plugin Compile Ldelim Class
Smarty_Internal_Compile_Nocache Smarty Internal Plugin Compile Nocache Classv
Smarty_Internal_Compile_Nocacheclose Smarty Internal Plugin Compile Nocacheclose Class
Smarty_Internal_Compile_Private_Block_Plugin Smarty Internal Plugin Compile Block Plugin Class
Smarty_Internal_Compile_Private_Function_Plugin Smarty Internal Plugin Compile Function Plugin Class
Smarty_Internal_Compile_Private_Modifier Smarty Internal Plugin Compile Modifier Class
Smarty_Internal_Compile_Private_Object_Block_Function Smarty Internal Plugin Compile Object Block Function Class
Smarty_Internal_Compile_Private_Object_Function Smarty Internal Plugin Compile Object Function Class
Smarty_Internal_Compile_Private_Print_Expression Smarty Internal Plugin Compile Print Expression Class
Smarty_Internal_Compile_Private_Registered_Block Smarty Internal Plugin Compile Registered Block Class
Smarty_Internal_Compile_Private_Registered_Function Smarty Internal Plugin Compile Registered Function Class
Smarty_Internal_Compile_Private_Special_Variable Smarty Internal Plugin Compile special Smarty Variable Class
Smarty_Internal_Compile_Rdelim Smarty Internal Plugin Compile Rdelim Class
Smarty_Internal_Compile_Section Smarty Internal Plugin Compile Section Class
Smarty_Internal_Compile_Sectionelse Smarty Internal Plugin Compile Sectionelse Class
Smarty_Internal_Compile_Sectionclose Smarty Internal Plugin Compile Sectionclose Class
Smarty_Internal_Compile_Setfilter Smarty Internal Plugin Compile Setfilter Class
Smarty_Internal_Compile_Setfilterclose Smarty Internal Plugin Compile Setfilterclose Class
Smarty_Internal_Compile_While Smarty Internal Plugin Compile While Class
Smarty_Internal_Compile_Whileclose Smarty Internal Plugin Compile Whileclose Class
Method Summary
mixed closeTag (object $compiler, array|string $expectedTag)
array getAttributes (object $compiler, array $attributes)
void openTag (object $compiler, string $openTag, [mixed $data = null])
Variables
array $optional_attributes = array() (line 30)

Array of names of optional attribute required by tag use array('_any') if there is no restriction of attributes names

  • access: public

Redefined in descendants as:
array $option_flags = array('nocache') (line 42)

Array of names of valid option flags

  • access: public

Redefined in descendants as:
array $required_attributes = array() (line 23)

Array of names of required attribute required by tag

  • access: public

Redefined in descendants as:
array $shorttag_order = array() (line 36)

Shorttag attribute order defined by its names

  • access: public

Redefined in descendants as:
Methods
closeTag (line 150)

Pop closing tag

Raise an error if this stack-top doesn't match with expected opening tags

  • return: any type the opening tag's name or saved data
  • access: public
mixed closeTag (object $compiler, array|string $expectedTag)
  • object $compiler: compiler object
  • array|string $expectedTag: the expected opening tag names
getAttributes (line 56)

This function checks if the attributes passed are valid

The attributes passed for the tag to compile are checked against the list of required and optional attributes. Required attributes must be present. Optional attributes are check against the corresponding list. The keyword '_any' specifies that any attribute will be accepted as valid

  • return: of mapped attributes for further processing
  • access: public
array getAttributes (object $compiler, array $attributes)
  • object $compiler: compiler object
  • array $attributes: attributes applied to the tag
openTag (line 136)

Push opening tag name on stack

Optionally additional data can be saved on stack

  • access: public
void openTag (object $compiler, string $openTag, [mixed $data = null])
  • object $compiler: compiler object
  • string $openTag: the opening tag's name
  • mixed $data: optional data saved

Documentation generated on Sat, 24 Sep 2011 20:23:37 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_continue.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_c0000644000175000017500000000414511637420324032146 0ustar mikemike Docs for page smarty_internal_compile_continue.php

/libs/sysplugins/smarty_internal_compile_continue.php

Description

Smarty Internal Plugin Compile Continue

Compiles the {continue} tag

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Continue Smarty Internal Plugin Compile Continue Class

Documentation generated on Sat, 24 Sep 2011 20:23:41 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_rdelim.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_r0000644000175000017500000000412711637420324032165 0ustar mikemike Docs for page smarty_internal_compile_rdelim.php

/libs/sysplugins/smarty_internal_compile_rdelim.php

Description

Smarty Internal Plugin Compile Rdelim

Compiles the {rdelim} tag

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Rdelim Smarty Internal Plugin Compile Rdelim Class

Documentation generated on Sat, 24 Sep 2011 20:23:48 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Private_Object_Block_Function.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Private_Object_Block_F0000644000175000017500000002224511637420324032254 0ustar mikemike Docs For Class Smarty_Internal_Compile_Private_Object_Block_Function

Class Smarty_Internal_Compile_Private_Object_Block_Function

Description

Smarty Internal Plugin Compile Object Block Function Class

Located in /libs/sysplugins/smarty_internal_compile_private_object_block_function.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Private_Object_Block_Function
Variable Summary
Method Summary
string compile (array $args, object $compiler, array $parameter, string $tag, string $method)
Variables
array $optional_attributes = array('_any') (line 26)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$optional_attributes
Array of names of optional attribute required by tag use array('_any') if there is no restriction of attributes names

Inherited Variables

Inherited from Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::$option_flags
Smarty_Internal_CompileBase::$required_attributes
Smarty_Internal_CompileBase::$shorttag_order
Methods
compile (line 38)

Compiles code for the execution of block plugin

  • return: compiled code
  • access: public
string compile (array $args, object $compiler, array $parameter, string $tag, string $method)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter
  • string $tag: name of block object
  • string $method: name of method to call

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:46 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000020500000000000011562 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_private_special_variable.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_p0000644000175000017500000000431611637420324032163 0ustar mikemike Docs for page smarty_internal_compile_private_special_variable.php

/libs/sysplugins/smarty_internal_compile_private_special_variable.php

Description

Smarty Internal Plugin Compile Special Smarty Variable

Compiles the special $smarty variables

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Private_Special_Variable Smarty Internal Plugin Compile special Smarty Variable Class

Documentation generated on Sat, 24 Sep 2011 20:23:48 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_include_php.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_i0000644000175000017500000000416511637420324032156 0ustar mikemike Docs for page smarty_internal_compile_include_php.php

/libs/sysplugins/smarty_internal_compile_include_php.php

Description

Smarty Internal Plugin Compile Include PHP

Compiles the {include_php} tag

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Include_Php Smarty Internal Plugin Compile Insert Class

Documentation generated on Sat, 24 Sep 2011 20:23:45 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Else.html0000644000175000017500000001540011637420324027623 0ustar mikemike Docs For Class Smarty_Internal_Compile_Else

Class Smarty_Internal_Compile_Else

Description

Smarty Internal Plugin Compile Else Class

Located in /libs/sysplugins/smarty_internal_compile_if.php (line 68)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Else
Method Summary
string compile (array $args, object $compiler, array $parameter)
Methods
compile (line 78)

Compiles code for the {else} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler, array $parameter)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:43 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_If.html0000644000175000017500000001536611637420324027304 0ustar mikemike Docs For Class Smarty_Internal_Compile_If

Class Smarty_Internal_Compile_If

Description

Smarty Internal Plugin Compile If Class

Located in /libs/sysplugins/smarty_internal_compile_if.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_If
Method Summary
string compile (array $args, object $compiler, array $parameter)
Methods
compile (line 28)

Compiles code for the {if} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler, array $parameter)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:44 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Private_Function_Plugin.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Private_Function_Plugi0000644000175000017500000002415611637420324032417 0ustar mikemike Docs For Class Smarty_Internal_Compile_Private_Function_Plugin

Class Smarty_Internal_Compile_Private_Function_Plugin

Description

Smarty Internal Plugin Compile Function Plugin Class

Located in /libs/sysplugins/smarty_internal_compile_private_function_plugin.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Private_Function_Plugin
Variable Summary
Method Summary
string compile (array $args, object $compiler, array $parameter, string $tag, string $function)
Variables
array $optional_attributes = array('_any') (line 33)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$optional_attributes
Array of names of optional attribute required by tag use array('_any') if there is no restriction of attributes names
array $required_attributes = array() (line 26)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$required_attributes
Array of names of required attribute required by tag

Inherited Variables

Inherited from Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::$option_flags
Smarty_Internal_CompileBase::$shorttag_order
Methods
compile (line 45)

Compiles code for the execution of function plugin

  • return: compiled code
  • access: public
string compile (array $args, object $compiler, array $parameter, string $tag, string $function)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter
  • string $tag: name of function plugin
  • string $function: PHP function name

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:46 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000020400000000000011561 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_private_object_function.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_p0000644000175000017500000000430311637420324032157 0ustar mikemike Docs for page smarty_internal_compile_private_object_function.php

/libs/sysplugins/smarty_internal_compile_private_object_function.php

Description

Smarty Internal Plugin Compile Object Funtion

Compiles code for registered objects as function

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Private_Object_Function Smarty Internal Plugin Compile Object Function Class

Documentation generated on Sat, 24 Sep 2011 20:23:47 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_section.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_s0000644000175000017500000000531511637420324032166 0ustar mikemike Docs for page smarty_internal_compile_section.php

/libs/sysplugins/smarty_internal_compile_section.php

Description

Smarty Internal Plugin Compile Section

Compiles the {section} {sectionelse} {/section} tags

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Section Smarty Internal Plugin Compile Section Class
Smarty_Internal_Compile_Sectionelse Smarty Internal Plugin Compile Sectionelse Class
Smarty_Internal_Compile_Sectionclose Smarty Internal Plugin Compile Sectionclose Class

Documentation generated on Sat, 24 Sep 2011 20:23:48 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Block.html0000644000175000017500000003356011637420324027774 0ustar mikemike Docs For Class Smarty_Internal_Compile_Block

Class Smarty_Internal_Compile_Block

Description

Smarty Internal Plugin Compile Block Class

Located in /libs/sysplugins/smarty_internal_compile_block.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Block
Method Summary
static string compileChildBlock (object $compiler, [string $_name = null])
static void saveBlockData (string $block_content, string $block_tag, object $template, string $filepath)
boolean compile (array $args, object $compiler)
Variables
array $optional_attributes = array('hide') (line 40)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$optional_attributes
Array of names of optional attribute required by tag use array('_any') if there is no restriction of attributes names
array $required_attributes = array('name') (line 26)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$required_attributes
Array of names of required attribute required by tag
array $shorttag_order = array('name', 'hide') (line 33)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$shorttag_order
Shorttag attribute order defined by its names

Inherited Variables

Inherited from Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::$option_flags
Methods
static method compileChildBlock (line 128)

Compile saved child block source

  • return: compiled code of schild block
  • access: public
static string compileChildBlock (object $compiler, [string $_name = null])
  • object $compiler: compiler object
  • string $_name: optional name of child block
static method saveBlockData (line 76)

Save or replace child block source by block name during parsing

  • access: public
static void saveBlockData (string $block_content, string $block_tag, object $template, string $filepath)
  • string $block_content: block source content
  • string $block_tag: opening block tag
  • object $template: template object
  • string $filepath: filepath of template source
compile (line 49)

Compiles code for the {block} tag

  • return: true
  • access: public
boolean compile (array $args, object $compiler)
  • array $args: array with attributes from parser
  • object $compiler: compiler object

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:39 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Break.html0000644000175000017500000002254111637420324027763 0ustar mikemike Docs For Class Smarty_Internal_Compile_Break

Class Smarty_Internal_Compile_Break

Description

Smarty Internal Plugin Compile Break Class

Located in /libs/sysplugins/smarty_internal_compile_break.php (line 17)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Break
Variable Summary
Method Summary
string compile (array $args, object $compiler, array $parameter)
Variables
array $optional_attributes = array('levels') (line 25)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$optional_attributes
Array of names of optional attribute required by tag use array('_any') if there is no restriction of attributes names
array $shorttag_order = array('levels') (line 32)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$shorttag_order
Shorttag attribute order defined by its names

Inherited Variables

Inherited from Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::$option_flags
Smarty_Internal_CompileBase::$required_attributes
Methods
compile (line 42)

Compiles code for the {break} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler, array $parameter)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:40 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Configfileparser.html0000644000175000017500000020474011637420324030554 0ustar mikemike Docs For Class Smarty_Internal_Configfileparser

Class Smarty_Internal_Configfileparser

Description
Variable Summary
static mixed $yyExpectedTokens
static mixed $yyFallback
static mixed $yyReduceMap
static mixed $yyRuleInfo
static mixed $yyRuleName
static mixed $yyTraceFILE
static mixed $yyTracePrompt
static mixed $yy_action
static mixed $yy_default
static mixed $yy_lookahead
static mixed $yy_reduce_ofst
static mixed $yy_shift_ofst
mixed $retvalue
mixed $successful
mixed $yyerrcnt
mixed $yyidx
mixed $yystack
mixed $yyTokenName
Method Summary
static void &instance ([ $new_instance = null])
static void PrintTrace ()
static void Trace ( $TraceFILE,  $zTracePrompt)
static void yy_destructor ( $yymajor,  $yypminor)
Smarty_Internal_Configfileparser __construct ( $lex,  $compiler)
void __destruct ()
void doParse ( $yymajor,  $yytokenvalue)
void tokenName ( $tokenType)
void yy_accept ()
void yy_find_reduce_action ( $stateno,  $iLookAhead)
void yy_find_shift_action ( $iLookAhead)
void yy_get_expected_tokens ( $token)
void yy_is_expected_token ( $token)
void yy_parse_failed ()
void yy_r0 ()
void yy_r1 ()
void yy_r4 ()
void yy_r5 ()
void yy_r6 ()
void yy_r7 ()
void yy_r8 ()
void yy_r9 ()
void yy_r10 ()
void yy_r11 ()
void yy_r12 ()
void yy_r13 ()
void yy_r14 ()
void yy_r15 ()
void yy_r16 ()
void yy_reduce ( $yyruleno)
void yy_shift ( $yyNewState,  $yyMajor,  $yypMinor)
void yy_syntax_error ( $yymajor,  $TOKEN)
Variables
static mixed $yyExpectedTokens = array(
/* 0 */ array(),/* 1 */array(5,14,15,),/* 2 */array(5,14,15,),/* 3 */array(5,14,15,),/* 4 */array(7,8,9,10,11,12,13,),/* 5 */array(14,15,),/* 6 */array(14,15,),/* 7 */array(1,),/* 8 */array(),/* 9 */array(),/* 10 */array(),/* 11 */array(13,14,),/* 12 */array(2,4,),/* 13 */array(14,),/* 14 */array(2,),/* 15 */array(3,),/* 16 */array(6,),/* 17 */array(3,),/* 18 */array(),/* 19 */array(),/* 20 */array(),/* 21 */array(),/* 22 */array(),/* 23 */array(),/* 24 */array(),/* 25 */array(),/* 26 */array(),/* 27 */array(),/* 28 */array(),/* 29 */array(),/* 30 */array(),/* 31 */array(),)
(line 227)
  • access: public
static mixed $yyFallback = array(
)
(line 274)
  • access: public
static mixed $yyReduceMap = array(
0 => 0,
2 => 0,
3 => 0,
17 => 0,
18 => 0,
19 => 0,
1 => 1,
4 => 4,
5 => 5,
6 => 6,
7 => 7,
8 => 8,
9 => 9,
10 => 10,
11 => 11,
12 => 12,
13 => 13,
14 => 14,
15 => 15,
16 => 16,
)
(line 632)
  • access: public
static mixed $yyRuleInfo = array(
array( 'lhs' => 17, 'rhs' => 2 ),array('lhs'=>18,'rhs'=>1),array('lhs'=>19,'rhs'=>2),array('lhs'=>19,'rhs'=>0),array('lhs'=>21,'rhs'=>5),array('lhs'=>21,'rhs'=>6),array('lhs'=>20,'rhs'=>2),array('lhs'=>20,'rhs'=>2),array('lhs'=>20,'rhs'=>0),array('lhs'=>23,'rhs'=>3),array('lhs'=>24,'rhs'=>1),array('lhs'=>24,'rhs'=>1),array('lhs'=>24,'rhs'=>1),array('lhs'=>24,'rhs'=>1),array('lhs'=>24,'rhs'=>1),array('lhs'=>24,'rhs'=>1),array('lhs'=>24,'rhs'=>1),array('lhs'=>22,'rhs'=>1),array('lhs'=>22,'rhs'=>2),array('lhs'=>22,'rhs'=>3),)
(line 609)
  • access: public
static mixed $yyRuleName = array(
/* 0 */ "start ::= global_vars sections",
/* 1 */ "global_vars ::= var_list",
/* 2 */ "sections ::= sections section",
/* 3 */ "sections ::=",
/* 4 */ "section ::= OPENB SECTION CLOSEB newline var_list",
/* 5 */ "section ::= OPENB DOT SECTION CLOSEB newline var_list",
/* 6 */ "var_list ::= var_list newline",
/* 7 */ "var_list ::= var_list var",
/* 8 */ "var_list ::=",
/* 9 */ "var ::= ID EQUAL value",
/* 10 */ "value ::= FLOAT",
/* 11 */ "value ::= INT",
/* 12 */ "value ::= BOOL",
/* 13 */ "value ::= SINGLE_QUOTED_STRING",
/* 14 */ "value ::= DOUBLE_QUOTED_STRING",
/* 15 */ "value ::= TRIPPLE_DOUBLE_QUOTED_STRING",
/* 16 */ "value ::= NAKED_STRING",
/* 17 */ "newline ::= NEWLINE",
/* 18 */ "newline ::= COMMENTSTART NEWLINE",
/* 19 */ "newline ::= COMMENTSTART NAKED_STRING NEWLINE",
)
(line 309)
  • access: public
static mixed $yyTraceFILE (line 293)
  • access: public
static mixed $yyTracePrompt (line 294)
  • access: public
static mixed $yy_action = array(
/* 0 */ 26, 27, 21, 30, 29, 28, 31, 16, 53, 8,
/* 10 */ 19, 2, 20, 11, 24, 23, 20, 11, 17, 15,
/* 20 */ 3, 14, 13, 18, 4, 6, 5, 1, 12, 22,
/* 30 */ 9, 47, 10, 25, 7,
)
(line 203)
  • access: public
static mixed $yy_default = array(
/* 0 */ 40, 36, 33, 37, 52, 52, 52, 32, 35, 40,
/* 10 */ 40, 52, 52, 52, 52, 52, 52, 52, 50, 51,
/* 20 */ 49, 44, 41, 39, 38, 34, 42, 43, 47, 46,
/* 30 */ 45, 48,
)
(line 261)
  • access: public
static mixed $yy_lookahead = array(
/* 0 */ 7, 8, 9, 10, 11, 12, 13, 5, 17, 18,
/* 10 */ 14, 20, 14, 15, 22, 23, 14, 15, 2, 2,
/* 20 */ 20, 4, 13, 14, 6, 3, 3, 20, 1, 24,
/* 30 */ 22, 25, 22, 21, 19,
)
(line 209)
  • access: public
static mixed $yy_reduce_ofst = array(
/* 0 */ -9, -8, -8, -8, 5, 10, 8, 12, 15, 0,
/* 10 */ 7,
)
(line 223)
  • access: public
static mixed $yy_shift_ofst = array(
/* 0 */ -8, 2, 2, 2, -7, -2, -2, 27, -8, -8,
/* 10 */ -8, 9, 17, -4, 16, 23, 18, 22,
)
(line 217)
  • access: public
mixed $retvalue = 0 (line 93)
  • access: public
mixed $successful = true (line 92)
  • access: public
mixed $yyerrcnt (line 296)
  • access: public
mixed $yyidx (line 295)
  • access: public
mixed $yystack = array() (line 297)
  • access: public
mixed $yyTokenName = array(
'$', 'OPENB', 'SECTION', 'CLOSEB',
'DOT', 'ID', 'EQUAL', 'FLOAT',
'INT', 'BOOL', 'SINGLE_QUOTED_STRING', 'DOUBLE_QUOTED_STRING',
'TRIPPLE_DOUBLE_QUOTED_STRING', 'NAKED_STRING', 'NEWLINE', 'COMMENTSTART',
'error', 'start', 'global_vars', 'sections',
'var_list', 'section', 'newline', 'var',
'value',
)
(line 299)
  • access: public
Methods
static method instance (line 104)
  • access: public
static void &instance ([ $new_instance = null])
  • $new_instance
static method PrintTrace (line 287)
static void PrintTrace ()
static method Trace (line 276)
static void Trace ( $TraceFILE,  $zTracePrompt)
  • $TraceFILE
  • $zTracePrompt
static method yy_destructor (line 344)
static void yy_destructor ( $yymajor,  $yypminor)
  • $yymajor
  • $yypminor
Constructor __construct (line 97)
Smarty_Internal_Configfileparser __construct ( $lex,  $compiler)
  • $lex
  • $compiler
Destructor __destruct (line 368)
void __destruct ()
doParse (line 814)
void doParse ( $yymajor,  $yytokenvalue)
  • $yymajor
  • $yytokenvalue
tokenName (line 332)
void tokenName ( $tokenType)
  • $tokenType
yy_accept (line 797)
void yy_accept ()
yy_find_reduce_action (line 551)
void yy_find_reduce_action ( $stateno,  $iLookAhead)
  • $stateno
  • $iLookAhead
yy_find_shift_action (line 517)
void yy_find_shift_action ( $iLookAhead)
  • $iLookAhead
yy_get_expected_tokens (line 378)
void yy_get_expected_tokens ( $token)
  • $token
yy_is_expected_token (line 446)
void yy_is_expected_token ( $token)
  • $token
yy_parse_failed (line 777)
void yy_parse_failed ()
yy_pop_parser_stack (line 351)
void yy_pop_parser_stack ()
yy_r0 (line 655)
void yy_r0 ()
yy_r1 (line 660)
void yy_r1 ()
yy_r4 (line 665)
void yy_r4 ()
yy_r5 (line 671)
void yy_r5 ()
yy_r6 (line 679)
void yy_r6 ()
yy_r7 (line 684)
void yy_r7 ()
yy_r8 (line 689)
void yy_r8 ()
yy_r9 (line 694)
void yy_r9 ()
yy_r10 (line 699)
void yy_r10 ()
yy_r11 (line 704)
void yy_r11 ()
yy_r12 (line 709)
void yy_r12 ()
yy_r13 (line 714)
void yy_r13 ()
yy_r14 (line 719)
void yy_r14 ()
yy_r15 (line 724)
void yy_r15 ()
yy_r16 (line 729)
void yy_r16 ()
yy_reduce (line 736)
void yy_reduce ( $yyruleno)
  • $yyruleno
yy_shift (line 574)
void yy_shift ( $yyNewState,  $yyMajor,  $yypMinor)
  • $yyNewState
  • $yyMajor
  • $yypMinor
yy_syntax_error (line 787)
void yy_syntax_error ( $yymajor,  $TOKEN)
  • $yymajor
  • $TOKEN
Class Constants
TPC_BOOL = 9 (line 191)
TPC_CLOSEB = 3 (line 185)
TPC_COMMENTSTART = 15 (line 197)
TPC_DOT = 4 (line 186)
TPC_DOUBLE_QUOTED_STRING = 11 (line 193)
TPC_EQUAL = 6 (line 188)
TPC_FLOAT = 7 (line 189)
TPC_ID = 5 (line 187)
TPC_INT = 8 (line 190)
TPC_NAKED_STRING = 13 (line 195)
TPC_NEWLINE = 14 (line 196)
TPC_OPENB = 1 (line 183)
TPC_SECTION = 2 (line 184)
TPC_SINGLE_QUOTED_STRING = 10 (line 192)
TPC_TRIPPLE_DOUBLE_QUOTED_STRING = 12 (line 194)
YYERRORSYMBOL = 16 (line 271)
YYERRSYMDT = 'yy0' (line 272)
YYFALLBACK = 0 (line 273)
YYNOCODE = 26 (line 267)
YYNRULE = 20 (line 270)
YYNSTATE = 32 (line 269)
YYSTACKDEPTH = 100 (line 268)
YY_ACCEPT_ACTION = 53 (line 199)
YY_ERROR_ACTION = 52 (line 200)
YY_NO_ACTION = 54 (line 198)
YY_REDUCE_MAX = 10 (line 222)
YY_REDUCE_USE_DFLT = -10 (line 221)
YY_SHIFT_MAX = 17 (line 216)
YY_SHIFT_USE_DFLT = -8 (line 215)
YY_SZ_ACTTAB = 35 (line 202)

Documentation generated on Sat, 24 Sep 2011 20:23:51 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_config_load.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_c0000644000175000017500000000417211637420324032146 0ustar mikemike Docs for page smarty_internal_compile_config_load.php

/libs/sysplugins/smarty_internal_compile_config_load.php

Description

Smarty Internal Plugin Compile Config Load

Compiles the {config load} tag

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Config_Load Smarty Internal Plugin Compile Config Load Class

Documentation generated on Sat, 24 Sep 2011 20:23:40 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000020100000000000011556 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_private_block_plugin.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_p0000644000175000017500000000426111637420324032162 0ustar mikemike Docs for page smarty_internal_compile_private_block_plugin.php

/libs/sysplugins/smarty_internal_compile_private_block_plugin.php

Description

Smarty Internal Plugin Compile Block Plugin

Compiles code for the execution of block plugin

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Private_Block_Plugin Smarty Internal Plugin Compile Block Plugin Class

Documentation generated on Sat, 24 Sep 2011 20:23:46 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_if.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_i0000644000175000017500000000563511637420324032161 0ustar mikemike Docs for page smarty_internal_compile_if.php

/libs/sysplugins/smarty_internal_compile_if.php

Description

Smarty Internal Plugin Compile If

Compiles the {if} {else} {elseif} {/if} tags

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_If Smarty Internal Plugin Compile If Class
Smarty_Internal_Compile_Else Smarty Internal Plugin Compile Else Class
Smarty_Internal_Compile_Elseif Smarty Internal Plugin Compile ElseIf Class
Smarty_Internal_Compile_Ifclose Smarty Internal Plugin Compile Ifclose Class

Documentation generated on Sat, 24 Sep 2011 20:23:43 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Call.html0000644000175000017500000002455011637420324027614 0ustar mikemike Docs For Class Smarty_Internal_Compile_Call

Class Smarty_Internal_Compile_Call

Description

Smarty Internal Plugin Compile Function_Call Class

Located in /libs/sysplugins/smarty_internal_compile_call.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Call
Method Summary
string compile (array $args, object $compiler, array $parameter)
Variables
array $optional_attributes = array('_any') (line 40)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$optional_attributes
Array of names of optional attribute required by tag use array('_any') if there is no restriction of attributes names
array $required_attributes = array('name') (line 26)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$required_attributes
Array of names of required attribute required by tag
array $shorttag_order = array('name') (line 33)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$shorttag_order
Shorttag attribute order defined by its names

Inherited Variables

Inherited from Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::$option_flags
Methods
compile (line 50)

Compiles the calls of user defined tags defined by {function}

  • return: compiled code
  • access: public
string compile (array $args, object $compiler, array $parameter)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:40 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_For.html0000644000175000017500000001613311637420324027465 0ustar mikemike Docs For Class Smarty_Internal_Compile_For

Class Smarty_Internal_Compile_For

Description

Smarty Internal Plugin Compile For Class

Located in /libs/sysplugins/smarty_internal_compile_for.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_For
Method Summary
string compile (array $args, object $compiler, array $parameter)
Methods
compile (line 39)

Compiles code for the {for} tag

Smarty 3 does implement two different sytaxes:

  • {for $var in $array}
For looping over arrays or iterators

  • {for $x=0; $x<$y; $x++}
For general loops

The parser is gereration different sets of attribute by which this compiler can determin which syntax is used.

  • return: compiled code
  • access: public
string compile (array $args, object $compiler, array $parameter)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:42 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Private_Block_Plugin.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_Private_Block_Plugin.h0000644000175000017500000002216011637420324032261 0ustar mikemike Docs For Class Smarty_Internal_Compile_Private_Block_Plugin

Class Smarty_Internal_Compile_Private_Block_Plugin

Description

Smarty Internal Plugin Compile Block Plugin Class

Located in /libs/sysplugins/smarty_internal_compile_private_block_plugin.php (line 18)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_Private_Block_Plugin
Variable Summary
Method Summary
string compile (array $args, object $compiler, array $parameter, string $tag, string $function)
Variables
array $optional_attributes = array('_any') (line 26)

Attribute definition: Overwrites base class.


Redefinition of:
Smarty_Internal_CompileBase::$optional_attributes
Array of names of optional attribute required by tag use array('_any') if there is no restriction of attributes names

Inherited Variables

Inherited from Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::$option_flags
Smarty_Internal_CompileBase::$required_attributes
Smarty_Internal_CompileBase::$shorttag_order
Methods
compile (line 38)

Compiles code for the execution of block plugin

  • return: compiled code
  • access: public
string compile (array $args, object $compiler, array $parameter, string $tag, string $function)
  • array $args: array with attributes from parser
  • object $compiler: compiler object
  • array $parameter: array with compilation parameter
  • string $tag: name of block plugin
  • string $function: PHP function name

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:46 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Nocache_Insert.html0000644000175000017500000001205411660225534030153 0ustar mikemike Docs For Class Smarty_Internal_Nocache_Insert

Class Smarty_Internal_Nocache_Insert

Description

Smarty Internal Plugin Compile Insert Class

Located in /libs/sysplugins/smarty_internal_nocache_insert.php (line 18)


	
			
Method Summary
static string compile (string $_function, array $_attr, Smarty_Internal_Template $_template, string $_script, [string $_assign = null])
Methods
static method compile (line 30)

Compiles code for the {insert} tag into cache file

  • return: compiled code
  • access: public
static string compile (string $_function, array $_attr, Smarty_Internal_Template $_template, string $_script, [string $_assign = null])
  • string $_function: insert function name
  • array $_attr: array with parameter
  • Smarty_Internal_Template $_template: template object
  • string $_script: script name to load or 'null'
  • string $_assign: optional variable name

Documentation generated on Sat, 24 Sep 2011 20:23:56 +0200 by phpDocumentor 1.4.1

././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_break.php.htmlsmarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/_libs---sysplugins---smarty_internal_compile_b0000644000175000017500000000412011637420324032136 0ustar mikemike Docs for page smarty_internal_compile_break.php

/libs/sysplugins/smarty_internal_compile_break.php

Description

Smarty Internal Plugin Compile Break

Compiles the {break} tag

  • author: Uwe Tews
Classes
Class Description
Smarty_Internal_Compile_Break Smarty Internal Plugin Compile Break Class

Documentation generated on Sat, 24 Sep 2011 20:23:40 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/Smarty3Doc/Smarty/Compiler/Smarty_Internal_Compile_CaptureClose.html0000644000175000017500000001473211637420324031333 0ustar mikemike Docs For Class Smarty_Internal_Compile_CaptureClose

Class Smarty_Internal_Compile_CaptureClose

Description

Smarty Internal Plugin Compile Captureclose Class

Located in /libs/sysplugins/smarty_internal_compile_capture.php (line 67)

Smarty_Internal_CompileBase
   |
   --Smarty_Internal_Compile_CaptureClose
Method Summary
string compile (array $args, object $compiler)
Methods
compile (line 76)

Compiles code for the {/capture} tag

  • return: compiled code
  • access: public
string compile (array $args, object $compiler)
  • array $args: array with attributes from parser
  • object $compiler: compiler object

Inherited Methods

Inherited From Smarty_Internal_CompileBase

Smarty_Internal_CompileBase::closeTag()
Smarty_Internal_CompileBase::getAttributes()
Smarty_Internal_CompileBase::openTag()

Documentation generated on Sat, 24 Sep 2011 20:23:40 +0200 by phpDocumentor 1.4.1

smarty3-3.1.13/development/PHPunit/0000755000175000017500000000000012141655571015515 5ustar mikemikesmarty3-3.1.13/development/PHPunit/CacheResourceCustomMemcacheTests.php0000644000175000017500000000444511635364174024614 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->caching_type = 'memcachetest'; $this->smarty->addPluginsDir(dirname(__FILE__)."/PHPunitplugins/"); } public static function isRunnable() { return class_exists('Memcache'); } protected function doClearCacheAssertion($a, $b) { $this->assertEquals(-1, $b); } public function testGetCachedFilepathSubDirs() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('helloworld.tpl'); $sha1 = $tpl->source->uid . '#helloworld_tpl##'; $this->assertEquals($sha1, $tpl->cached->filepath); } /** * test getCachedFilepath with cache_id */ public function testGetCachedFilepathCacheId() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar'); $sha1 = $tpl->source->uid . '#helloworld_tpl#foo|bar#'; $this->assertEquals($sha1, $tpl->cached->filepath); } /** * test getCachedFilepath with compile_id */ public function testGetCachedFilepathCompileId() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('helloworld.tpl', null, 'blar'); $sha1 = $tpl->source->uid . '#helloworld_tpl##blar'; $this->assertEquals($sha1, $tpl->cached->filepath); } /** * test getCachedFilepath with cache_id and compile_id */ public function testGetCachedFilepathCacheIdCompileId() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar'); $sha1 = $tpl->source->uid . '#helloworld_tpl#foo|bar#blar'; $this->assertEquals($sha1, $tpl->cached->filepath); } } ?>smarty3-3.1.13/development/PHPunit/CompileDebugTests.php0000644000175000017500000000206311467061362021610 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test debug tag */ public function testDebugTag() { $tpl = $this->smarty->createTemplate("eval:{debug}"); $_contents = $this->smarty->fetch($tpl); $this->assertContains("Smarty Debug Console", $_contents); } /** * test debug property */ public function testDebugProperty() { $this->smarty->debugging = true; $tpl = $this->smarty->createTemplate("eval:hello world"); ob_start(); $this->smarty->display($tpl); $_contents = ob_get_clean(); $this->assertContains("Smarty Debug Console", $_contents); } } ?> smarty3-3.1.13/development/PHPunit/CompileEvalTests.php0000644000175000017500000000202211467061362021444 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test eval tag */ public function testEval1() { $tpl = $this->smarty->createTemplate("eval:{eval var='hello world'}"); $this->assertEquals("hello world", $this->smarty->fetch($tpl)); } public function testEval2() { $tpl = $this->smarty->createTemplate("eval:{eval var='hello world' assign=foo}{\$foo}"); $this->assertEquals("hello world", $this->smarty->fetch($tpl)); } public function testEval3() { $tpl = $this->smarty->createTemplate("eval:{eval var='hello world' assign=foo}"); $this->assertEquals("", $this->smarty->fetch($tpl)); } } ?> smarty3-3.1.13/development/PHPunit/TernaryTests.php0000644000175000017500000001247511467061362020705 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test output on boolean constant */ public function testTernaryOutputBoolean1() { $tpl = $this->smarty->createTemplate("eval:{(true) ? 'yes' : 'no'}"); $this->assertEquals('yes', $this->smarty->fetch($tpl)); } public function testTernaryOutputBoolean2() { $tpl = $this->smarty->createTemplate("eval:{(false) ? 'yes' : 'no'}"); $this->assertEquals('no', $this->smarty->fetch($tpl)); } /** * test result expressions */ public function testTernaryExpression1() { $tpl = $this->smarty->createTemplate("eval:{\$x=1}{(true) ? \$x : 'no'}"); $this->assertEquals(1, $this->smarty->fetch($tpl)); } public function testTernaryExpression2() { $tpl = $this->smarty->createTemplate("eval:{\$x=1}{(false) ? 'no' : \$x}"); $this->assertEquals(1, $this->smarty->fetch($tpl)); } public function testTernaryExpression3() { $tpl = $this->smarty->createTemplate("eval:{\$x=1}{(true) ? \$x+1 : 'no'}"); $this->assertEquals(2, $this->smarty->fetch($tpl)); } public function testTernaryExpression4() { $tpl = $this->smarty->createTemplate("eval:{\$x=1}{(false) ? 'no' : \$x+1}"); $this->assertEquals(2, $this->smarty->fetch($tpl)); } /** * test output on variable */ public function testTernaryOutputVariable1() { $tpl = $this->smarty->createTemplate("eval:{\$foo=true}{(\$foo) ? 'yes' : 'no'}"); $this->assertEquals('yes', $this->smarty->fetch($tpl)); } public function testTernaryOutputVariable2() { $tpl = $this->smarty->createTemplate("eval:{\$foo=false}{(\$foo) ? 'yes' : 'no'}"); $this->assertEquals('no', $this->smarty->fetch($tpl)); } /** * test output on array element */ public function testTernaryOutputArray1() { $tpl = $this->smarty->createTemplate("eval:{\$foo[1][2]=true}{(\$foo.1.2) ? 'yes' : 'no'}"); $this->assertEquals('yes', $this->smarty->fetch($tpl)); } public function testTernaryOutputArray2() { $tpl = $this->smarty->createTemplate("eval:{\$foo[1][2]=true}{(\$foo[1][2]) ? 'yes' : 'no'}"); $this->assertEquals('yes', $this->smarty->fetch($tpl)); } public function testTernaryOutputArray3() { $tpl = $this->smarty->createTemplate("eval:{\$foo[1][2]=false}{(\$foo.1.2) ? 'yes' : 'no'}"); $this->assertEquals('no', $this->smarty->fetch($tpl)); } public function testTernaryOutputArray4() { $tpl = $this->smarty->createTemplate("eval:{\$foo[1][2]=false}{(\$foo[1][2]) ? 'yes' : 'no'}"); $this->assertEquals('no', $this->smarty->fetch($tpl)); } /** * test output on condition */ public function testTernaryOutputCondition1() { $tpl = $this->smarty->createTemplate("eval:{\$foo=true}{(\$foo === true) ? 'yes' : 'no'}"); $this->assertEquals('yes', $this->smarty->fetch($tpl)); } public function testTernaryOutputCondition2() { $tpl = $this->smarty->createTemplate("eval:{\$foo=true}{(\$foo === false) ? 'yes' : 'no'}"); $this->assertEquals('no', $this->smarty->fetch($tpl)); } /** * test output on function */ public function testTernaryOutputFunction1() { $tpl = $this->smarty->createTemplate("eval:{(time()) ? 'yes' : 'no'}"); $this->assertEquals('yes', $this->smarty->fetch($tpl)); } /** * test output on template function */ public function testTernaryOutputTemplateFunction1() { $tpl = $this->smarty->createTemplate("eval:{({counter start=1} == 1) ? 'yes' : 'no'}"); $this->assertEquals('yes', $this->smarty->fetch($tpl)); } /** * test output on expression */ public function testTernaryOutputExpression1() { $tpl = $this->smarty->createTemplate("eval:{(1 + 2 === 3) ? 'yes' : 'no'}"); $this->assertEquals('yes', $this->smarty->fetch($tpl)); } public function testTernaryOutputExpression2() { $tpl = $this->smarty->createTemplate("eval:{((1 + 2) === 3) ? 'yes' : 'no'}"); $this->assertEquals('yes', $this->smarty->fetch($tpl)); } /** * test assignment on boolean constant */ public function testTernaryAssignBoolean1() { $tpl = $this->smarty->createTemplate("eval:{\$foo=(true) ? 'yes' : 'no'}{\$foo}"); $this->assertEquals('yes', $this->smarty->fetch($tpl)); } public function testTernaryAssignBoolean2() { $tpl = $this->smarty->createTemplate("eval:{\$foo[1][2]=(true) ? 'yes' : 'no'}{\$foo[1][2]}"); $this->assertEquals('yes', $this->smarty->fetch($tpl)); } /** * test attribute on boolean constant */ public function testTernaryAttributeBoolean1() { $tpl = $this->smarty->createTemplate("eval:{assign var=foo value=(true) ? 'yes' : 'no'}{\$foo}"); $this->assertEquals('yes', $this->smarty->fetch($tpl)); } } ?>smarty3-3.1.13/development/PHPunit/RegisterCompilerFunctionTests.php0000644000175000017500000000777511764653431024261 0ustar mikemikecompilerFunction / unregister->compilerFunction methods * * @package PHPunit * @author Uwe Tews */ /** * class for register->compilerFunction / unregister->compilerFunction methods tests */ class RegisterCompilerFunctionTests extends PHPUnit_Framework_TestCase { public function setUp() { $this->smarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test register->compilerFunction method for function */ public function testRegisterCompilerFunction() { $this->smarty->registerPlugin(Smarty::PLUGIN_COMPILER,'testcompilerfunction', 'mycompilerfunction'); $this->assertEquals('mycompilerfunction', $this->smarty->registered_plugins['compiler']['testcompilerfunction'][0]); $this->assertEquals('hello world 1', $this->smarty->fetch('eval:{testcompilerfunction var=1}')); } /** * test register->compilerFunction method for blocks */ public function testRegisterCompilerFunctionBlock() { $this->smarty->registerPlugin(Smarty::PLUGIN_COMPILER,'foo', 'mycompilerfunctionopen'); $this->smarty->registerPlugin(Smarty::PLUGIN_COMPILER,'fooclose', 'mycompilerfunctionclose'); $result = $this->smarty->fetch('eval:{foo} hallo {/foo}'); $this->assertEquals('open tag hallo close tag', $result); } /** * test register->compilerFunction method for static class */ public function testRegisterCompilerFunctionClass() { $this->smarty->registerPlugin(Smarty::PLUGIN_COMPILER,'testcompilerfunction', array('mycompilerfunctionclass', 'execute')); $this->assertEquals('hello world 2', $this->smarty->fetch('eval:{testcompilerfunction var1=2}')); } /** * test register->compilerFunction method for objects */ public function testRegisterCompilerFunctionObject() { $obj = new mycompilerfunctionclass; $this->smarty->registerPlugin(Smarty::PLUGIN_COMPILER,'testcompilerfunction', array($obj, 'compile')); $this->assertEquals('hello world 3', $this->smarty->fetch('eval:{testcompilerfunction var2=3}')); } /** * test unregister->compilerFunction method */ public function testUnregisterCompilerFunction() { $this->smarty->registerPlugin(Smarty::PLUGIN_COMPILER,'testcompilerfunction', 'mycompilerfunction'); $this->smarty->unregisterPlugin(Smarty::PLUGIN_COMPILER,'testcompilerfunction'); $this->assertFalse(isset($this->smarty->registered_plugins[Smarty::PLUGIN_COMPILER]['testcompilerfunction'])); } /** * test unregister->compilerFunction method not registered */ public function testUnregisterCompilerFunctionNotRegistered() { $this->smarty->unregisterPlugin(Smarty::PLUGIN_COMPILER,'testcompilerfunction'); $this->assertFalse(isset($this->smarty->registered_plugins[Smarty::PLUGIN_COMPILER]['testcompilerfunction'])); } /** * test unregister->compilerFunction method other registered */ public function testUnregisterCompilerFunctionOtherRegistered() { $this->smarty->registerPlugin(Smarty::PLUGIN_BLOCK,'testcompilerfunction', 'mycompilerfunction'); $this->smarty->unregisterPlugin(Smarty::PLUGIN_COMPILER,'testcompilerfunction'); $this->assertTrue(isset($this->smarty->registered_plugins[Smarty::PLUGIN_BLOCK]['testcompilerfunction'])); } } function mycompilerfunction($params, $smarty) { return ""; } function mycompilerfunctionopen($params, $smarty) { return ""; } function mycompilerfunctionclose($params, $smarty) { return ""; } class mycompilerfunctionclass { static function execute($params, $smarty) { return ""; } function compile($params, $smarty) { return ""; } } ?>smarty3-3.1.13/development/PHPunit/PluginFunctionHtmlSelectDateTests.php0000644000175000017500000007435712075100344025005 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); $this->now = mktime( 15, 0, 0, 2, 20, 2013 ); } public static function isRunnable() { return true; } protected $now = null; protected $years = array( 'start_2005' => ' ', 'start_+5' => ' ', 'start_-5' => ' ', 'end_2005' => ' ', 'end_+5' => ' ', 'end_-5' => ' ', 'default' => '', 'none' => '', ); protected $months = array( 'none' => ' ', 'default' => ' ', 'format_%b' => ' ', 'format_value_%b' => ' ', 'names' => ' ', ); protected $days = array( 'none' => ' ', 'default' => ' ', 'format_%03d' => ' ', 'format_value_%03d' => ' ', ); protected function reverse($string) { $t = explode( "\n", $string ); $t = array_reverse($t); return join("\n", $t); } public function testDefault() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .'}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testPrefix() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' prefix="foobar_"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testFieldArray() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' field_array="namorized"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' field_array="namorized" prefix="foobar_"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testExtra() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' all_extra="data-foo=\"xy\""}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' day_extra="data-foo=\"day\"" month_extra="data-foo=\"month\"" year_extra="data-foo=\"year\""}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' data_foo="foo"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testFieldOrder() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' field_order="DMY"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' field_order="YMD"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testFieldSeparator() { $n = "\n"; $result = '' .' - ' .' - '; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' field_order="DMY" field_separator=" - "}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .' / ' .' / '; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' field_order="YMD" field_separator=" / "}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testEmpty() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' all_empty=""}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' all_empty="all"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' year_empty=""}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' year_empty="year" month_empty="month" day_empty="day"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testEmptyUnset() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time=null all_empty=""}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time=null all_empty="all"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time=null year_empty=""}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time=null year_empty="year" month_empty="month" day_empty="day"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testId() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' all_id=""}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' all_id="all-"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' year_id="year" month_id="month" day_id="day"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testStartYearAbsolute() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' start_year=2005}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testStartYearRelative() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' start_year="+5"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testStartYearRelativeNegative() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' start_year="-5"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testEndYearAbsolute() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' end_year=2005}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testEndYearRelative() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' end_year="+5"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testEndYearRelativeNegative() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' end_year="-5"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testDisplayDaysMonthYear() { $n = "\n"; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' display_days=false}'); $result = '' .$n.''; $this->assertEquals($result, $this->smarty->fetch($tpl)); $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' display_months=false}'); $result = '' .$n.''; $this->assertEquals($result, $this->smarty->fetch($tpl)); $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' display_years=false}'); $result = '' .$n.''; $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testYearsReversed() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' start_year=2005 reverse_years=true}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' start_year="+5" reverse_years=true}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testYearText() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' year_as_text=true}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' year_as_text=true prefix="foo_"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testMonthFormat() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' month_format="%b"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testMonthFormatValue() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' month_value_format="%b"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testMonthNames() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{$names = [1 => "alpha","bravo","charlie","delta","echo","foxtrot","golf","hotel","india","juliet","kilo","lima"]}{html_select_date time='. $this->now .' month_names=$names}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testDayFormat() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' day_format="%03d"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testDayFormatValue() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_date time='. $this->now .' day_value_format="%03d"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testTimeArray() { $n = "\n"; $result = '' .$n.'' .$n.''; $date_array = array( 'namorized' => array( 'foobar_Month' => '02', 'foobar_Day' => '20', 'foobar_Year' => '2013', ), ); $tpl = $this->smarty->createTemplate('eval:{html_select_date time=$date_array.namorized field_array="namorized" prefix="foobar_"}'); $tpl->assign('date_array', $date_array); $this->assertEquals($result, $this->smarty->fetch($tpl)); $tpl = $this->smarty->createTemplate('eval:{html_select_date time=$date_array field_array="namorized" prefix="foobar_"}'); $tpl->assign('date_array', $date_array); $this->assertEquals($result, $this->smarty->fetch($tpl)); } } ?>smarty3-3.1.13/development/PHPunit/AppendTests.php0000644000175000017500000000427311467061362020465 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test append */ public function testAppend() { $this->smarty->assign('foo','bar'); $this->smarty->append('foo','bar2'); $this->assertEquals('bar bar2', $this->smarty->fetch('eval:{$foo[0]} {$foo[1]}')); } /** * test append to unassigned variable */ public function testAppendUnassigned() { $this->smarty->append('foo','bar'); $this->assertEquals('bar', $this->smarty->fetch('eval:{$foo[0]}')); } /** * test append merge */ public function testAppendMerge() { $this->smarty->assign('foo',array('a'=>'a','b'=>'b','c'=>'c')); $this->smarty->append('foo',array('b'=>'d'),true); $this->assertEquals('a d c', $this->smarty->fetch('eval:{$foo["a"]} {$foo["b"]} {$foo["c"]}')); } /** * test append array merge */ public function testAppendArrayMerge() { $this->smarty->assign('foo',array('b'=>'d')); $this->smarty->append('foo',array('a'=>'a','b'=>'b','c'=>'c'),true); $this->assertEquals('a b c', $this->smarty->fetch('eval:{$foo["a"]} {$foo["b"]} {$foo["c"]}')); } /** * test array append */ public function testArrayAppend() { $this->smarty->assign('foo','foo'); $this->smarty->append(array('bar'=>'bar2','foo'=>'foo2')); $this->assertEquals('foo foo2 bar2', $this->smarty->fetch('eval:{$foo[0]} {$foo[1]} {$bar[0]}')); } /** * test array append array merge */ public function testArrayAppendArrayMerge() { $this->smarty->assign('foo',array('b'=>'d')); $this->smarty->append(array('bar'=>'bar','foo'=>array('a'=>'a','b'=>'b','c'=>'c')),null,true); $this->assertEquals('a b c bar', $this->smarty->fetch('eval:{$foo["a"]} {$foo["b"]} {$foo["c"]} {$bar[0]}')); } } ?> smarty3-3.1.13/development/PHPunit/PluginFunctionHtmlImageTests.php0000644000175000017500000000075311673730300024003 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } public function testFoo() { // TODO: UnitTests for {html_image} } } ?>smarty3-3.1.13/development/PHPunit/PluginModifierCapitalizeTests.php0000644000175000017500000001456211673427331024204 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } public function testDefault() { $tpl = $this->smarty->createTemplate('eval:{"next x-men fiLm, x3, delayed. ümlauts äre cööl."|capitalize}'); $this->assertEquals("Next X-Men FiLm, x3, Delayed. Ümlauts Äre Cööl.", $this->smarty->fetch($tpl)); } public function testDigits() { $tpl = $this->smarty->createTemplate('eval:{"next x-men fiLm, x3, delayed. ümlauts äre cööl."|capitalize:true}'); $this->assertEquals("Next X-Men FiLm, X3, Delayed. Ümlauts Äre Cööl.", $this->smarty->fetch($tpl)); } public function testTrueCaptials() { $tpl = $this->smarty->createTemplate('eval:{"next x-men fiLm, x3, delayed. ümlauts äre cööl."|capitalize:true:true}'); $this->assertEquals("Next X-Men Film, X3, Delayed. Ümlauts Äre Cööl.", $this->smarty->fetch($tpl)); } public function testDefaultWithoutMbstring() { Smarty::$_MBSTRING = false; $tpl = $this->smarty->createTemplate('eval:{"next x-men fiLm, x3, delayed."|capitalize}'); $this->assertEquals("Next X-Men FiLm, x3, Delayed.", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testDigitsWithoutMbstring() { Smarty::$_MBSTRING = false; $tpl = $this->smarty->createTemplate('eval:{"next x-men fiLm, x3, delayed."|capitalize:true}'); $this->assertEquals("Next X-Men FiLm, X3, Delayed.", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testTrueCaptialsWithoutMbstring() { Smarty::$_MBSTRING = false; $tpl = $this->smarty->createTemplate('eval:{"next x-men fiLm, x3, delayed."|capitalize:true:true}'); $this->assertEquals("Next X-Men Film, X3, Delayed.", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testQuotes() { $tpl = $this->smarty->createTemplate('eval:{"next x-men fiLm, x3, \"delayed. umlauts\" foo."|capitalize}'); $this->assertEquals("Next X-Men FiLm, x3, \"Delayed. Umlauts\" Foo.", $this->smarty->fetch($tpl)); $tpl = $this->smarty->createTemplate('eval:{"next x-men fiLm, x3, \'delayed. umlauts\' foo."|capitalize}'); $this->assertEquals("Next X-Men FiLm, x3, 'Delayed. Umlauts' Foo.", $this->smarty->fetch($tpl)); } public function testQuotesWithoutMbstring() { Smarty::$_MBSTRING = false; $tpl = $this->smarty->createTemplate('eval:{"next x-men fiLm, x3, \"delayed. umlauts\" foo."|capitalize}'); $this->assertEquals("Next X-Men FiLm, x3, \"Delayed. Umlauts\" Foo.", $this->smarty->fetch($tpl)); $tpl = $this->smarty->createTemplate('eval:{"next x-men fiLm, x3, \'delayed. umlauts\' foo."|capitalize}'); $this->assertEquals("Next X-Men FiLm, x3, 'Delayed. Umlauts' Foo.", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testQuotesDigits() { $tpl = $this->smarty->createTemplate('eval:{"next x-men fiLm, x3, \"delayed. umlauts\" foo."|capitalize:true}'); $this->assertEquals("Next X-Men FiLm, X3, \"Delayed. Umlauts\" Foo.", $this->smarty->fetch($tpl)); $tpl = $this->smarty->createTemplate('eval:{"next x-men fiLm, x3, \'delayed. umlauts\' foo."|capitalize:true}'); $this->assertEquals("Next X-Men FiLm, X3, 'Delayed. Umlauts' Foo.", $this->smarty->fetch($tpl)); } public function testQuotesDigitsWithoutMbstring() { Smarty::$_MBSTRING = false; $tpl = $this->smarty->createTemplate('eval:{"next x-men fiLm, x3, \"delayed. umlauts\" foo."|capitalize:true}'); $this->assertEquals("Next X-Men FiLm, X3, \"Delayed. Umlauts\" Foo.", $this->smarty->fetch($tpl)); $tpl = $this->smarty->createTemplate('eval:{"next x-men fiLm, x3, \'delayed. umlauts\' foo."|capitalize:true}'); $this->assertEquals("Next X-Men FiLm, X3, 'Delayed. Umlauts' Foo.", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testQuotesTrueCapitals() { $tpl = $this->smarty->createTemplate('eval:{"next x-men fiLm, x3, \"delayed. umlauts\" foo."|capitalize:true:true}'); $this->assertEquals("Next X-Men Film, X3, \"Delayed. Umlauts\" Foo.", $this->smarty->fetch($tpl)); $tpl = $this->smarty->createTemplate('eval:{"next x-men fiLm, x3, \'delayed. umlauts\' foo."|capitalize:true:true}'); $this->assertEquals("Next X-Men Film, X3, 'Delayed. Umlauts' Foo.", $this->smarty->fetch($tpl)); } public function testQuotesTrueCapitalsWithoutMbstring() { Smarty::$_MBSTRING = false; $tpl = $this->smarty->createTemplate('eval:{"next x-men fiLm, x3, \"delayed. umlauts\" foo."|capitalize:true:true}'); $this->assertEquals("Next X-Men Film, X3, \"Delayed. Umlauts\" Foo.", $this->smarty->fetch($tpl)); $tpl = $this->smarty->createTemplate('eval:{"next x-men fiLm, x3, \'delayed. umlauts\' foo."|capitalize:true:true}'); $this->assertEquals("Next X-Men Film, X3, 'Delayed. Umlauts' Foo.", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testQuotesBeginning() { $tpl = $this->smarty->createTemplate('eval:{"\"delayed. umlauts\" foo."|capitalize}'); $this->assertEquals("\"Delayed. Umlauts\" Foo.", $this->smarty->fetch($tpl)); $tpl = $this->smarty->createTemplate('eval:{"\'delayed. umlauts\' foo."|capitalize}'); $this->assertEquals("'Delayed. Umlauts' Foo.", $this->smarty->fetch($tpl)); } public function testQuotesBeginningWithoutMbstring() { Smarty::$_MBSTRING = false; $tpl = $this->smarty->createTemplate('eval:{"\"delayed. umlauts\" foo."|capitalize}'); $this->assertEquals("\"Delayed. Umlauts\" Foo.", $this->smarty->fetch($tpl)); $tpl = $this->smarty->createTemplate('eval:{"\'delayed. umlauts\' foo."|capitalize}'); $this->assertEquals("'Delayed. Umlauts' Foo.", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } } ?>smarty3-3.1.13/development/PHPunit/CacheResourceCustomRegisteredTests.php0000644000175000017500000000135011636466763025207 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); if (!class_exists('Smarty_CacheResource_Mysqltest', false)) { require_once( dirname(__FILE__) . "/PHPunitplugins/CacheResource.Mysqltest.php" ); } $this->smarty->caching_type = 'foobar'; $this->smarty->registerCacheResource('foobar', new Smarty_CacheResource_Mysqltest()); } } ?>smarty3-3.1.13/development/PHPunit/SpacingTests.php0000644000175000017500000000603011467061362020633 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->assign('foo','bar'); } public static function isRunnable() { return true; } /** * test variable output */ public function testVariableSpacing1() { $tpl = $this->smarty->createTemplate("eval:{\$foo}", null, null, $this->smarty); $this->assertEquals("bar", $this->smarty->fetch($tpl)); } public function testVariableSpacing2() { $tpl = $this->smarty->createTemplate("eval:{\$foo}{\$foo}", null, null, $this->smarty); $this->assertEquals("barbar", $this->smarty->fetch($tpl)); } public function testVariableSpacing3() { $tpl = $this->smarty->createTemplate("eval:{\$foo} {\$foo}", null, null, $this->smarty); $this->assertEquals("bar bar", $this->smarty->fetch($tpl)); } /** * test variable text combinations */ public function testVariableText1() { $tpl = $this->smarty->createTemplate("eval:A{\$foo}B", null, null, $this->smarty); $this->assertEquals("AbarB", $this->smarty->fetch($tpl)); } public function testVariableText2() { $tpl = $this->smarty->createTemplate("eval:A {\$foo}B", null, null, $this->smarty); $this->assertEquals("A barB", $this->smarty->fetch($tpl)); } public function testVariableText3() { $tpl = $this->smarty->createTemplate("eval:A{\$foo} B", null, null, $this->smarty); $this->assertEquals("Abar B", $this->smarty->fetch($tpl)); } public function testVariableText4() { $tpl = $this->smarty->createTemplate("eval:A{\$foo}\nB", null, null, $this->smarty); $this->assertEquals("Abar\nB", $this->smarty->fetch($tpl)); } public function testVariableText5() { $tpl = $this->smarty->createTemplate("eval:A{\$foo}B\nC", null, null, $this->smarty); $this->assertEquals("AbarB\nC", $this->smarty->fetch($tpl)); } /** * test tag text combinations */ public function testTagText1() { $tpl = $this->smarty->createTemplate("eval:A{assign var=zoo value='blah'}B"); $this->assertEquals("AB", $this->smarty->fetch($tpl)); } public function testTagText2() { $tpl = $this->smarty->createTemplate("eval:A\n{assign var=zoo value='blah'}\nB"); $this->assertEquals("A\nB", $this->smarty->fetch($tpl)); } public function testTagText3() { $tpl = $this->smarty->createTemplate("eval:E{assign var=zoo value='blah'}\nF"); $this->assertEquals("EF", $this->smarty->fetch($tpl)); } public function testTagText4() { $tpl = $this->smarty->createTemplate("eval:G\n{assign var=zoo value='blah'}H"); $this->assertEquals("G\nH", $this->smarty->fetch($tpl)); } } ?>smarty3-3.1.13/development/PHPunit/ClearCompiledTests.php0000644000175000017500000003467511650571647022000 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->addTemplateDir('./templates_2/'); } public static function isRunnable() { return true; } // helpers /** * clear $smarty->compile_dir * * @return void */ protected function clearFiles() { $directory = realpath($this->smarty->getCompileDir()); if (!$directory) { return; } $di = new RecursiveDirectoryIterator($directory); // $it = new RecursiveIteratorIterator($di, RecursiveIteratorIterator::CHILD_FIRST | FilesystemIterator::SKIP_DOTS); $it = new RecursiveIteratorIterator($di, RecursiveIteratorIterator::CHILD_FIRST); foreach ($it as $file) { $_file = $file->__toString(); if (preg_match("#[\\\\/]\.#", $_file)) { continue; } if ($file->isDir()) { rmdir($_file); } else { unlink($_file); } } } /** * list of compiled files * @var array */ protected $_files = array(); /** * generate compiled files * @uses $_files to store references * @return array list of files array( id => path ) */ protected function makeFiles() { $this->_files = array(); $directory_length = strlen($this->smarty->getCompileDir()); $templates = array( 'helloworld.tpl' => array(null, 'compile1', 'compile2'), 'helloworld2.tpl' => array(null, 'compile1', 'compile2'), 'ambiguous/case1/foobar.tpl' => array(null, 'compile1', 'compile2'), '[1]ambiguous/case1/foobar.tpl' => array(null, 'compile1', 'compile2'), ); foreach ($templates as $template => $compile_ids) { foreach ($compile_ids as $compile_id) { $tpl = $this->smarty->createTemplate($template, null, $compile_id); $tpl->fetch(); $this->_files[$template . '#' . $compile_id] = substr($tpl->compiled->filepath, $directory_length - 1); } } Smarty_Resource::$sources = array(); $this->smarty->template_objects = array(); return $this->_files; } /** * Transform $id to $path * * @param array $keys IDs like "template#compile_id" * @return array list of (sorted) compiled file paths */ protected function expectFiles($keys) { $files = array(); foreach ($keys as $key) { if (isset($this->_files[$key])) { $files[] = $this->_files[$key]; } } sort($files); return $files; } /** * update mtime of compiled files * * @param array $keys IDs like "template#compile_id" * @param string $offset time offset added to time() * @return void */ protected function touchFiles($keys, $offset=0) { $base = rtrim($this->smarty->getCompileDir(), "\\/"); $time = time(); foreach ($keys as $key) { if (isset($this->_files[$key])) { touch($base . $this->_files[$key], $time + $offset); } } } /** * find all compiled files * * @return array list of (sorted) compiled file paths */ protected function getFiles() { $directory = realpath($this->smarty->getCompileDir()); if (!$directory) { return array(); } $directory_length = strlen($directory); $files = array(); $di = new RecursiveDirectoryIterator($directory); $it = new RecursiveIteratorIterator($di); foreach ($it as $file) { $_file = $file->__toString(); // skip anything with a /. in it. if (preg_match("#[\\\\/]\.#", $_file) || !$file->isFile()) { continue; } $files[] = substr($file->__toString(), $directory_length); } sort($files); return $files; } // Smarty::clearCompiledTemplate(null, null, null) public function testClearAll() { $this->runClearAll(false); } public function testSubsClearAll() { $this->runClearAll(true); } public function runClearAll($use_sub_dirs) { $this->smarty->use_sub_dirs = $use_sub_dirs; $this->clearFiles(); $this->makeFiles(); $expected = array(); $this->assertEquals(12, $this->smarty->clearCompiledTemplate()); $this->assertEquals($this->expectFiles($expected), $this->getFiles()); $this->clearFiles(); } // Smarty::clearCompiledTemplate($template, null, null) public function testClearTemplate() { $this->runClearTemplate(false); } public function testSubsClearTemplate() { $this->runClearTemplate(true); } public function testClearOtherTemplate() { $this->runClearOtherTemplate(false); } public function testSubsClearOtherTemplate() { $this->runClearOtherTemplate(true); } public function runClearTemplate($use_sub_dirs) { $this->smarty->use_sub_dirs = $use_sub_dirs; $this->clearFiles(); $this->makeFiles(); $expected = array( 'helloworld2.tpl#', 'helloworld2.tpl#compile1', 'helloworld2.tpl#compile2', 'ambiguous/case1/foobar.tpl#', 'ambiguous/case1/foobar.tpl#compile1', 'ambiguous/case1/foobar.tpl#compile2', '[1]ambiguous/case1/foobar.tpl#', '[1]ambiguous/case1/foobar.tpl#compile1', '[1]ambiguous/case1/foobar.tpl#compile2', ); $this->assertEquals(3, $this->smarty->clearCompiledTemplate('helloworld.tpl')); $this->assertEquals($this->expectFiles($expected), $this->getFiles()); $this->clearFiles(); } public function runClearOtherTemplate($use_sub_dirs) { $this->smarty->use_sub_dirs = $use_sub_dirs; $this->clearFiles(); $this->makeFiles(); $expected = array_keys($this->_files); $this->assertEquals(0, $this->smarty->clearCompiledTemplate('foobar.tpl')); $this->assertEquals($this->expectFiles($expected), $this->getFiles()); $this->clearFiles(); } // Smarty::clearCompiledTemplate(null, $cache_id, null) public function testClearCompileid() { $this->runClearCompileid(false); } public function testSubsClearCompileid() { $this->runClearCompileid(true); } public function testClearOtherCompileid() { $this->runClearOtherCompileid(false); } public function testSubsClearOtherCompileid() { $this->runClearOtherCompileid(true); } public function runClearCompileid($use_sub_dirs) { $this->smarty->use_sub_dirs = $use_sub_dirs; $this->clearFiles(); $this->makeFiles(); $expected = array( 'helloworld.tpl#', 'helloworld.tpl#compile2', 'helloworld2.tpl#', 'helloworld2.tpl#compile2', 'ambiguous/case1/foobar.tpl#', 'ambiguous/case1/foobar.tpl#compile2', '[1]ambiguous/case1/foobar.tpl#', '[1]ambiguous/case1/foobar.tpl#compile2', ); $this->assertEquals(4, $this->smarty->clearCompiledTemplate(null, 'compile1')); $this->assertEquals($this->expectFiles($expected), $this->getFiles()); $this->clearFiles(); } public function runClearOtherCompileid($use_sub_dirs) { $this->smarty->use_sub_dirs = $use_sub_dirs; $this->clearFiles(); $this->makeFiles(); $expected = array_keys($this->_files); $this->assertEquals(0, $this->smarty->clearCompiledTemplate(null, 'other')); $this->assertEquals($this->expectFiles($expected), $this->getFiles()); $this->clearFiles(); } // Smarty::clearCompiledTemplate(null, null, $expired) public function testClearExpired() { $this->runClearExpired(false); } public function testSubsClearExpired() { $this->runClearExpired(true); } public function runClearExpired($use_sub_dirs) { $this->smarty->use_sub_dirs = $use_sub_dirs; $this->clearFiles(); $this->makeFiles(); $expected = array('helloworld.tpl#', 'helloworld2.tpl#'); $this->touchFiles(array_diff(array_keys($this->_files), $expected), -1000); $this->assertEquals(10, $this->smarty->clearCompiledTemplate(null, null, 500)); $this->assertEquals($this->expectFiles($expected), $this->getFiles()); $this->clearFiles(); } // Smarty::clearCompiledTemplate($template, null, $expired) public function testClearTemplateExpired() { $this->runClearTemplateExpired(false); } public function testSubsClearTemplateExpired() { $this->runClearTemplateExpired(true); } public function runClearTemplateExpired($use_sub_dirs) { $this->smarty->use_sub_dirs = $use_sub_dirs; $this->clearFiles(); $this->makeFiles(); $expected = array( 'helloworld.tpl#', 'helloworld.tpl#compile2', 'helloworld2.tpl#', 'helloworld2.tpl#compile1', 'helloworld2.tpl#compile2', 'ambiguous/case1/foobar.tpl#', 'ambiguous/case1/foobar.tpl#compile1', 'ambiguous/case1/foobar.tpl#compile2', '[1]ambiguous/case1/foobar.tpl#', '[1]ambiguous/case1/foobar.tpl#compile1', '[1]ambiguous/case1/foobar.tpl#compile2', ); $this->touchFiles(array('helloworld.tpl#compile1'), -1000); $this->assertEquals(1, $this->smarty->clearCompiledTemplate("helloworld.tpl", null, 500)); $this->assertEquals($this->expectFiles($expected), $this->getFiles()); $this->clearFiles(); } // Smarty::clearCompiledTemplate($template, $cache_id, $expired) public function testClearTemplateCacheidExpired() { $this->runClearTemplateCacheidExpired(false); } public function testSubsClearTemplateCacheidExpired() { $this->runClearTemplateCacheidExpired(true); } public function runClearTemplateCacheidExpired($use_sub_dirs) { $this->smarty->use_sub_dirs = $use_sub_dirs; $this->clearFiles(); $this->makeFiles(); $expected = array( 'helloworld.tpl#', 'helloworld.tpl#compile2', 'helloworld2.tpl#', 'helloworld2.tpl#compile1', 'helloworld2.tpl#compile2', 'ambiguous/case1/foobar.tpl#', 'ambiguous/case1/foobar.tpl#compile1', 'ambiguous/case1/foobar.tpl#compile2', '[1]ambiguous/case1/foobar.tpl#', '[1]ambiguous/case1/foobar.tpl#compile1', '[1]ambiguous/case1/foobar.tpl#compile2', ); $this->touchFiles(array('helloworld.tpl#compile1', 'helloworld.tpl#compile2'), -1000); $this->assertEquals(1, $this->smarty->clearCompiledTemplate("helloworld.tpl", "compile1", 500)); $this->assertEquals($this->expectFiles($expected), $this->getFiles()); $this->clearFiles(); } // Smarty::clearCompiledTemplate(null, $cache_id, $expired) public function testClearCacheidExpired() { $this->runClearCacheidExpired(false); } public function testSubsClearCacheidExpired() { $this->runClearCacheidExpired(true); } public function runClearCacheidExpired($use_sub_dirs) { $this->smarty->use_sub_dirs = $use_sub_dirs; $this->clearFiles(); $this->makeFiles(); $expected = array( 'helloworld.tpl#', 'helloworld.tpl#compile2', 'helloworld2.tpl#', 'helloworld2.tpl#compile1', 'helloworld2.tpl#compile2', 'ambiguous/case1/foobar.tpl#', 'ambiguous/case1/foobar.tpl#compile1', 'ambiguous/case1/foobar.tpl#compile2', '[1]ambiguous/case1/foobar.tpl#', '[1]ambiguous/case1/foobar.tpl#compile1', '[1]ambiguous/case1/foobar.tpl#compile2', ); $this->touchFiles(array('helloworld.tpl#compile1'), -1000); $this->assertEquals(1, $this->smarty->clearCompiledTemplate(null, "compile1", 500)); $this->assertEquals($this->expectFiles($expected), $this->getFiles()); $this->clearFiles(); } // Smarty::clearCompiledTemplate($template, $cache_id, null) public function testClearTemplateCacheid() { $this->runClearTemplateCacheid(false); } public function testSubsClearTemplateCacheid() { $this->runClearTemplateCacheid(true); } public function runClearTemplateCacheid($use_sub_dirs) { $this->smarty->use_sub_dirs = $use_sub_dirs; $this->clearFiles(); $this->makeFiles(); $expected = array( 'helloworld.tpl#', 'helloworld.tpl#compile2', 'helloworld2.tpl#', 'helloworld2.tpl#compile1', 'helloworld2.tpl#compile2', 'ambiguous/case1/foobar.tpl#', 'ambiguous/case1/foobar.tpl#compile1', 'ambiguous/case1/foobar.tpl#compile2', '[1]ambiguous/case1/foobar.tpl#', '[1]ambiguous/case1/foobar.tpl#compile1', '[1]ambiguous/case1/foobar.tpl#compile2', ); $this->assertEquals(1, $this->smarty->clearCompiledTemplate("helloworld.tpl", "compile1")); $this->assertEquals($this->expectFiles($expected), $this->getFiles()); $this->clearFiles(); } public function testClearAmbiguousTemplate() { $this->runClearAmbiguousTemplate(false); } public function testSubsAmbiguousTemplate() { $this->runClearAmbiguousTemplate(true); } public function runClearAmbiguousTemplate($use_sub_dirs) { $this->smarty->use_sub_dirs = $use_sub_dirs; $this->clearFiles(); $this->makeFiles(); // TODO: uwe.tews - shouldn't clearCompiledTemplate("foo.tpl") remove "{$template_dir[0]}/foo.tpl" AND "{$template_dir[1]}/foo.tpl"? // currently it kills only the first one found (through regular template file identification methods) $expected = array( 'helloworld.tpl#', 'helloworld.tpl#compile1', 'helloworld.tpl#compile2', 'helloworld2.tpl#', 'helloworld2.tpl#compile1', 'helloworld2.tpl#compile2', '[1]ambiguous/case1/foobar.tpl#', '[1]ambiguous/case1/foobar.tpl#compile1', '[1]ambiguous/case1/foobar.tpl#compile2', ); $this->assertEquals(3, $this->smarty->clearCompiledTemplate("ambiguous/case1/foobar.tpl")); $this->assertEquals($this->expectFiles($expected), $this->getFiles()); $this->clearFiles(); } } ?> smarty3-3.1.13/development/PHPunit/CacheResourceFileTests.php0000644000175000017500000005073511646262153022575 0ustar mikemikesmarty = SmartyTests::$smarty; $this->smartyBC = SmartyTests::$smartyBC; // reset cache for unit test Smarty_CacheResource::$resources = array(); SmartyTests::init(); } public static function isRunnable() { return true; } protected function relative($path) { $path = str_replace( dirname(__FILE__), '.', $path ); if (DS == "\\") { $path = str_replace( "\\", "/", $path ); } return $path; } /** * test getCachedFilepath with use_sub_dirs enabled */ public function testGetCachedFilepathSubDirs() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->use_sub_dirs = true; $tpl = $this->smarty->createTemplate('helloworld.tpl'); $sha1 = sha1($this->smarty->getTemplateDir(0) . 'helloworld.tpl'); $expected = sprintf('./cache/%s/%s/%s/%s.helloworld.tpl.php', substr($sha1, 0, 2), substr($sha1, 2, 2), substr($sha1, 4, 2), $sha1 ); $this->assertEquals($expected, $this->relative($tpl->cached->filepath)); } /** * test getCachedFilepath with cache_id */ public function testGetCachedFilepathCacheId() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->use_sub_dirs = true; $tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar'); $sha1 = sha1($this->smarty->getTemplateDir(0) . 'helloworld.tpl'); $expected = sprintf('./cache/foo/bar/%s/%s/%s/%s.helloworld.tpl.php', substr($sha1, 0, 2), substr($sha1, 2, 2), substr($sha1, 4, 2), $sha1 ); $this->assertEquals($expected, $this->relative($tpl->cached->filepath)); } /** * test getCachedFilepath with compile_id */ public function testGetCachedFilepathCompileId() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->use_sub_dirs = true; $tpl = $this->smarty->createTemplate('helloworld.tpl', null, 'blar'); $sha1 = sha1($this->smarty->getTemplateDir(0) . 'helloworld.tpl'); $expected = sprintf('./cache/blar/%s/%s/%s/%s.helloworld.tpl.php', substr($sha1, 0, 2), substr($sha1, 2, 2), substr($sha1, 4, 2), $sha1 ); $this->assertEquals($expected, $this->relative($tpl->cached->filepath)); } /** * test getCachedFilepath with cache_id and compile_id */ public function testGetCachedFilepathCacheIdCompileId() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->use_sub_dirs = true; $tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar'); $sha1 = sha1($this->smarty->getTemplateDir(0) . 'helloworld.tpl'); $expected = sprintf('./cache/foo/bar/blar/%s/%s/%s/%s.helloworld.tpl.php', substr($sha1, 0, 2), substr($sha1, 2, 2), substr($sha1, 4, 2), $sha1 ); $this->assertEquals($expected, $this->relative($tpl->cached->filepath)); } /** * test cache->clear_all with cache_id and compile_id */ public function testClearCacheAllCacheIdCompileId() { $this->smarty->clearAllCache(); $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->use_sub_dirs = true; $tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar'); $tpl->writeCachedContent('hello world'); $this->assertTrue(file_exists($tpl->cached->filepath)); $this->assertEquals(1, $this->smarty->clearAllCache()); } /** * test cache->clear with cache_id and compile_id */ public function testClearCacheCacheIdCompileId() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->clearAllCache(); $this->smarty->use_sub_dirs = false; $tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar'); $tpl->writeCachedContent('hello world'); $tpl2 = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar2', 'blar'); $tpl2->writeCachedContent('hello world'); $tpl3 = $this->smarty->createTemplate('helloworld2.tpl', 'foo|bar', 'blar'); $tpl3->writeCachedContent('hello world'); $this->assertTrue(file_exists($tpl->cached->filepath)); $this->assertTrue(file_exists($tpl2->cached->filepath)); $this->assertTrue(file_exists($tpl3->cached->filepath)); $this->assertEquals(2, $this->smarty->clearCache(null, 'foo|bar')); $this->assertFalse(file_exists($tpl->cached->filepath)); $this->assertTrue(file_exists($tpl2->cached->filepath)); $this->assertFalse(file_exists($tpl3->cached->filepath)); } public function testSmarty2ClearCacheCacheIdCompileId() { $this->smartyBC->caching = true; $this->smartyBC->cache_lifetime = 1000; $this->smartyBC->clearAllCache(); $this->smartyBC->use_sub_dirs = false; $tpl = $this->smartyBC->createTemplate('helloworld.tpl', 'foo|bar', 'blar'); $tpl->writeCachedContent('hello world'); $tpl2 = $this->smartyBC->createTemplate('helloworld.tpl', 'foo|bar2', 'blar'); $tpl2->writeCachedContent('hello world'); $tpl3 = $this->smartyBC->createTemplate('helloworld2.tpl', 'foo|bar', 'blar'); $tpl3->writeCachedContent('hello world'); $this->assertTrue(file_exists($tpl->cached->filepath)); $this->assertTrue(file_exists($tpl2->cached->filepath)); $this->assertTrue(file_exists($tpl3->cached->filepath)); $this->smartyBC->clear_cache(null, 'foo|bar'); $this->assertFalse(file_exists($tpl->cached->filepath)); $this->assertTrue(file_exists($tpl2->cached->filepath)); $this->assertFalse(file_exists($tpl3->cached->filepath)); } public function testSmarty2ClearCacheCacheIdCompileIdSub() { $this->smartyBC->caching = true; $this->smartyBC->cache_lifetime = 1000; $this->smartyBC->clearAllCache(); $this->smartyBC->use_sub_dirs = true; $tpl = $this->smartyBC->createTemplate('helloworld.tpl', 'foo|bar', 'blar'); $tpl->writeCachedContent('hello world'); $tpl2 = $this->smartyBC->createTemplate('helloworld.tpl', 'foo|bar2', 'blar'); $tpl2->writeCachedContent('hello world'); $tpl3 = $this->smartyBC->createTemplate('helloworld2.tpl', 'foo|bar', 'blar'); $tpl3->writeCachedContent('hello world'); $this->assertTrue(file_exists($tpl->cached->filepath)); $this->assertTrue(file_exists($tpl2->cached->filepath)); $this->assertTrue(file_exists($tpl3->cached->filepath)); $this->smartyBC->clear_cache(null, 'foo|bar'); $this->assertFalse(file_exists($tpl->cached->filepath)); $this->assertTrue(file_exists($tpl2->cached->filepath)); $this->assertFalse(file_exists($tpl3->cached->filepath)); } public function testClearCacheCacheIdCompileId2() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->use_sub_dirs = false; $this->smarty->clearAllCache(); $tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar'); $tpl->writeCachedContent('hello world'); $tpl2 = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar2', 'blar'); $tpl2->writeCachedContent('hello world'); $tpl3 = $this->smarty->createTemplate('helloworld2.tpl', 'foo|bar', 'blar'); $tpl3->writeCachedContent('hello world'); $this->assertTrue(file_exists($tpl->cached->filepath)); $this->assertTrue(file_exists($tpl2->cached->filepath)); $this->assertTrue(file_exists($tpl3->cached->filepath)); $this->assertEquals(2, $this->smarty->clearCache('helloworld.tpl')); $this->assertFalse(file_exists($tpl->cached->filepath)); $this->assertFalse(file_exists($tpl2->cached->filepath)); $this->assertTrue(file_exists($tpl3->cached->filepath)); } public function testSmarty2ClearCacheCacheIdCompileId2() { $this->smartyBC->caching = true; $this->smartyBC->cache_lifetime = 1000; $this->smartyBC->use_sub_dirs = false; $this->smartyBC->clearAllCache(); $tpl = $this->smartyBC->createTemplate('helloworld.tpl', 'foo|bar', 'blar'); $tpl->writeCachedContent('hello world'); $tpl2 = $this->smartyBC->createTemplate('helloworld.tpl', 'foo|bar2', 'blar'); $tpl2->writeCachedContent('hello world'); $tpl3 = $this->smartyBC->createTemplate('helloworld2.tpl', 'foo|bar', 'blar'); $tpl3->writeCachedContent('hello world'); $this->assertTrue(file_exists($tpl->cached->filepath)); $this->assertTrue(file_exists($tpl2->cached->filepath)); $this->assertTrue(file_exists($tpl3->cached->filepath)); $this->smartyBC->clear_cache('helloworld.tpl'); $this->assertFalse(file_exists($tpl->cached->filepath)); $this->assertFalse(file_exists($tpl2->cached->filepath)); $this->assertTrue(file_exists($tpl3->cached->filepath)); } public function testClearCacheCacheIdCompileId2Sub() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->use_sub_dirs = true; $this->smarty->clearAllCache(); $tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar'); $tpl->writeCachedContent('hello world'); $tpl2 = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar2', 'blar'); $tpl2->writeCachedContent('hello world'); $tpl3 = $this->smarty->createTemplate('helloworld2.tpl', 'foo|bar', 'blar'); $tpl3->writeCachedContent('hello world'); $this->assertTrue(file_exists($tpl->cached->filepath)); $this->assertTrue(file_exists($tpl2->cached->filepath)); $this->assertTrue(file_exists($tpl3->cached->filepath)); $this->assertEquals(2, $this->smarty->clearCache('helloworld.tpl')); $this->assertFalse(file_exists($tpl->cached->filepath)); $this->assertFalse(file_exists($tpl2->cached->filepath)); $this->assertTrue(file_exists($tpl3->cached->filepath)); } public function testClearCacheCacheIdCompileId3() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->clearAllCache(); $this->smarty->use_sub_dirs = false; $tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar'); $tpl->writeCachedContent('hello world'); $tpl2 = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar2'); $tpl2->writeCachedContent('hello world'); $tpl3 = $this->smarty->createTemplate('helloworld2.tpl', 'foo|bar', 'blar'); $tpl3->writeCachedContent('hello world'); $this->assertTrue(file_exists($tpl->cached->filepath)); $this->assertTrue(file_exists($tpl2->cached->filepath)); $this->assertTrue(file_exists($tpl3->cached->filepath)); $this->assertEquals(1, $this->smarty->clearCache('helloworld.tpl', null, 'blar2')); $this->assertTrue(file_exists($tpl->cached->filepath)); $this->assertFalse(file_exists($tpl2->cached->filepath)); $this->assertTrue(file_exists($tpl3->cached->filepath)); } public function testClearCacheCacheIdCompileId3Sub() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->clearAllCache(); $this->smarty->use_sub_dirs = true; $tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar'); $tpl->writeCachedContent('hello world'); $tpl2 = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar2'); $tpl2->writeCachedContent('hello world'); $tpl3 = $this->smarty->createTemplate('helloworld2.tpl', 'foo|bar', 'blar'); $tpl3->writeCachedContent('hello world'); $this->assertTrue(file_exists($tpl->cached->filepath)); $this->assertTrue(file_exists($tpl2->cached->filepath)); $this->assertTrue(file_exists($tpl3->cached->filepath)); $this->assertEquals(1, $this->smarty->clearCache('helloworld.tpl', null, 'blar2')); $this->assertTrue(file_exists($tpl->cached->filepath)); $this->assertFalse(file_exists($tpl2->cached->filepath)); $this->assertTrue(file_exists($tpl3->cached->filepath)); } public function testClearCacheCacheIdCompileId4() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->use_sub_dirs = false; $this->smarty->clearAllCache(); $tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar'); $tpl->writeCachedContent('hello world'); $tpl2 = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar2'); $tpl2->writeCachedContent('hello world'); $tpl3 = $this->smarty->createTemplate('helloworld2.tpl', 'foo|bar', 'blar'); $tpl3->writeCachedContent('hello world'); $this->assertTrue(file_exists($tpl->cached->filepath)); $this->assertTrue(file_exists($tpl2->cached->filepath)); $this->assertTrue(file_exists($tpl3->cached->filepath)); $this->assertEquals(1, $this->smarty->clearCache('helloworld.tpl', null, 'blar2')); $this->assertTrue(file_exists($tpl->cached->filepath)); $this->assertFalse(file_exists($tpl2->cached->filepath)); $this->assertTrue(file_exists($tpl3->cached->filepath)); } public function testClearCacheCacheIdCompileId4Sub() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->use_sub_dirs = true; $this->smarty->clearAllCache(); $tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar'); $tpl->writeCachedContent('hello world'); $tpl2 = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar2'); $tpl2->writeCachedContent('hello world'); $tpl3 = $this->smarty->createTemplate('helloworld2.tpl', 'foo|bar', 'blar'); $tpl3->writeCachedContent('hello world'); $this->assertTrue(file_exists($tpl->cached->filepath)); $this->assertTrue(file_exists($tpl2->cached->filepath)); $this->assertTrue(file_exists($tpl3->cached->filepath)); $this->assertEquals(1, $this->smarty->clearCache('helloworld.tpl', null, 'blar2')); $this->assertTrue(file_exists($tpl->cached->filepath)); $this->assertFalse(file_exists($tpl2->cached->filepath)); $this->assertTrue(file_exists($tpl3->cached->filepath)); } public function testClearCacheCacheIdCompileId5() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->use_sub_dirs = false; $this->smarty->clearAllCache(); $tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar'); $tpl->writeCachedContent('hello world'); $tpl2 = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar2'); $tpl2->writeCachedContent('hello world'); $tpl3 = $this->smarty->createTemplate('helloworld2.tpl', 'foo|bar', 'blar'); $tpl3->writeCachedContent('hello world'); $this->assertTrue(file_exists($tpl->cached->filepath)); $this->assertTrue(file_exists($tpl2->cached->filepath)); $this->assertTrue(file_exists($tpl3->cached->filepath)); $this->assertEquals(2, $this->smarty->clearCache(null, null, 'blar')); $this->assertFalse(file_exists($tpl->cached->filepath)); $this->assertTrue(file_exists($tpl2->cached->filepath)); $this->assertFalse(file_exists($tpl3->cached->filepath)); } public function testClearCacheCacheIdCompileId5Sub() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->use_sub_dirs = true; $this->smarty->clearAllCache(); $tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar'); $tpl->writeCachedContent('hello world'); $tpl2 = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar2'); $tpl2->writeCachedContent('hello world'); $tpl3 = $this->smarty->createTemplate('helloworld2.tpl', 'foo|bar', 'blar'); $tpl3->writeCachedContent('hello world'); $this->assertTrue(file_exists($tpl->cached->filepath)); $this->assertTrue(file_exists($tpl2->cached->filepath)); $this->assertTrue(file_exists($tpl3->cached->filepath)); $this->assertEquals(2, $this->smarty->clearCache(null, null, 'blar')); $this->assertFalse(file_exists($tpl->cached->filepath)); $this->assertTrue(file_exists($tpl2->cached->filepath)); $this->assertFalse(file_exists($tpl3->cached->filepath)); } public function testClearCacheCacheFile() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->use_sub_dirs = false; $this->smarty->clearAllCache(); $tpl = $this->smarty->createTemplate('helloworld.tpl'); $tpl->writeCachedContent('hello world'); $tpl2 = $this->smarty->createTemplate('helloworld.tpl',null,'bar'); $tpl2->writeCachedContent('hello world'); $tpl3 = $this->smarty->createTemplate('helloworld.tpl','buh|blar'); $tpl3->writeCachedContent('hello world'); $tpl4 = $this->smarty->createTemplate('helloworld2.tpl'); $tpl4->writeCachedContent('hello world'); $this->assertTrue(file_exists($tpl->cached->filepath)); $this->assertTrue(file_exists($tpl2->cached->filepath)); $this->assertTrue(file_exists($tpl3->cached->filepath)); $this->assertTrue(file_exists($tpl4->cached->filepath)); $this->assertEquals(3, $this->smarty->clearCache('helloworld.tpl')); $this->assertFalse(file_exists($tpl->cached->filepath)); $this->assertFalse(file_exists($tpl2->cached->filepath)); $this->assertFalse(file_exists($tpl3->cached->filepath)); $this->assertTrue(file_exists($tpl4->cached->filepath)); } public function testClearCacheCacheFileSub() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->use_sub_dirs = true; $this->smarty->clearAllCache(); $tpl = $this->smarty->createTemplate('helloworld.tpl'); $tpl->writeCachedContent('hello world'); $tpl2 = $this->smarty->createTemplate('helloworld.tpl',null,'bar'); $tpl2->writeCachedContent('hello world'); $tpl3 = $this->smarty->createTemplate('helloworld.tpl','buh|blar'); $tpl3->writeCachedContent('hello world'); $tpl4 = $this->smarty->createTemplate('helloworld2.tpl'); $tpl4->writeCachedContent('hello world'); $this->assertTrue(file_exists($tpl->cached->filepath)); $this->assertTrue(file_exists($tpl2->cached->filepath)); $this->assertTrue(file_exists($tpl3->cached->filepath)); $this->assertTrue(file_exists($tpl4->cached->filepath)); $this->assertEquals(3, $this->smarty->clearCache('helloworld.tpl')); $this->assertFalse(file_exists($tpl->cached->filepath)); $this->assertFalse(file_exists($tpl2->cached->filepath)); $this->assertFalse(file_exists($tpl3->cached->filepath)); $this->assertTrue(file_exists($tpl4->cached->filepath)); } public function testSharing() { $smarty = new Smarty(); $smarty->caching = true; $_smarty = clone $smarty; $smarty->fetch('string:foo'); $_smarty->fetch('string:foo'); $this->assertTrue($smarty->_cacheresource_handlers['file'] === $_smarty->_cacheresource_handlers['file']); } public function testExplicit() { $smarty = new Smarty(); $smarty->caching = true; $_smarty = clone $smarty; $smarty->fetch('string:foo'); $_smarty->registerCacheResource('file', new Smarty_Internal_CacheResource_File()); $_smarty->fetch('string:foo'); $this->assertFalse($smarty->_cacheresource_handlers['file'] === $_smarty->_cacheresource_handlers['file']); } /** * final cleanup */ public function testFinalCleanup2() { $this->smarty->clearCompiledTemplate(); $this->smarty->clearAllCache(); } } ?>smarty3-3.1.13/development/PHPunit/AppendByRefTests.php0000644000175000017500000000451611634664106021416 0ustar mikemikesmarty = SmartyTests::$smarty; $this->smartyBC = SmartyTests::$smartyBC; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test appendByRef */ public function testAppendByRef() { $bar = 'bar'; $bar2 = 'bar2'; $this->smarty->appendByRef('foo', $bar); $this->smarty->appendByRef('foo', $bar2); $bar = 'newbar'; $bar2 = 'newbar2'; $this->assertEquals('newbar newbar2', $this->smarty->fetch('eval:{$foo[0]} {$foo[1]}')); } public function testSmarty2AppendByRef() { $bar = 'bar'; $bar2 = 'bar2'; $this->smartyBC->append_by_ref('foo', $bar); $this->smartyBC->append_by_ref('foo', $bar2); $bar = 'newbar'; $bar2 = 'newbar2'; $this->assertEquals('newbar newbar2', $this->smartyBC->fetch('eval:{$foo[0]} {$foo[1]}')); } /** * test appendByRef to unassigned variable */ public function testAppendByRefUnassigned() { $bar2 = 'bar2'; $this->smarty->appendByRef('foo', $bar2); $bar2 = 'newbar2'; $this->assertEquals('newbar2', $this->smarty->fetch('eval:{$foo[0]}')); } public function testSmarty2AppendByRefUnassigned() { $bar2 = 'bar2'; $this->smartyBC->append_by_ref('foo', $bar2); $bar2 = 'newbar2'; $this->assertEquals('newbar2', $this->smartyBC->fetch('eval:{$foo[0]}')); } /** * test appendByRef merge * * @todo fix testAppendByRefMerge */ public function testAppendByRefMerge() { $foo = array('a' => 'a', 'b' => 'b', 'c' => 'c'); $bar = array('b' => 'd'); $this->smarty->assignByRef('foo', $foo); $this->smarty->appendByRef('foo', $bar, true); $this->assertEquals('a d c', $this->smarty->fetch('eval:{$foo["a"]} {$foo["b"]} {$foo["c"]}')); $bar = array('b' => 'newd'); $this->smarty->appendByRef('foo', $bar, true); $this->assertEquals('a newd c', $this->smarty->fetch('eval:{$foo["a"]} {$foo["b"]} {$foo["c"]}')); } } ?> smarty3-3.1.13/development/PHPunit/PrintNocacheTests.php0000644000175000017500000000325511275032024021620 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test print nocache caching disabled */ public function testPrintNocacheCachingNo1() { $this->smarty->caching = 0; $this->smarty->assign('foo', 0); $this->smarty->assign('bar', 'A'); $this->assertEquals("0A", $this->smarty->fetch('test_print_nocache.tpl')); } public function testPrintNocacheCachingNo2() { $this->smarty->caching = 0; $this->smarty->assign('foo', 2); $this->smarty->assign('bar', 'B'); $this->assertEquals("2B", $this->smarty->fetch('test_print_nocache.tpl')); } /** * test print nocache caching enabled */ public function testPrintNocacheCachingYes1() { $this->smarty->caching = 1; $this->smarty->cache_lifetime = 5; $this->smarty->assign('foo', 0); $this->smarty->assign('bar', 'A'); $this->assertEquals("0A", $this->smarty->fetch('test_print_nocache.tpl')); } public function testPrintNocacheCachingYes2() { $this->smarty->caching = 1; $this->smarty->cache_lifetime = 5; $this->smarty->assign('foo', 2); $this->smarty->assign('bar', 'B'); $this->assertEquals("2A", $this->smarty->fetch('test_print_nocache.tpl')); } } ?> smarty3-3.1.13/development/PHPunit/CompileBlockPluginTests.php0000644000175000017500000000653511634664106023004 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->force_compile = true; $this->smarty->disableSecurity(); } public static function isRunnable() { return true; } /** * test block plugin tag */ public function testBlockPluginNoAssign() { $tpl = $this->smarty->createTemplate("eval:{textformat}hello world{/textformat}"); $this->assertEquals("hello world", $this->smarty->fetch($tpl)); } /** * test block plugin tag with assign attribute */ public function testBlockPluginAssign() { $tpl = $this->smarty->createTemplate("eval:{textformat assign=foo}hello world{/textformat}{\$foo}"); $this->assertEquals("hello world", $this->smarty->fetch($tpl)); } /** * test block plugin tag in template file */ public function testBlockPluginFromTemplateFile() { $tpl = $this->smarty->createTemplate('blockplugintest.tpl'); $this->assertEquals("abc", $this->smarty->fetch($tpl)); } /** * test block plugin tag in compiled template file */ public function testBlockPluginFromCompiledTemplateFile() { $this->smarty->force_compile = false; $tpl = $this->smarty->createTemplate('blockplugintest.tpl'); $this->assertEquals("abc", $this->smarty->fetch($tpl)); } /** * test block plugin tag in template file */ public function testBlockPluginFromTemplateFileCache() { $this->smarty->force_compile = false; $this->smarty->caching = 1; $this->smarty->cache_lifetime = 10; $tpl = $this->smarty->createTemplate('blockplugintest.tpl'); $this->assertEquals("abc", $this->smarty->fetch($tpl)); } /** * test block plugin function definition in script */ public function testBlockPluginRegisteredFunction() { $this->smarty->registerPlugin(Smarty::PLUGIN_BLOCK,'blockplugintest', 'myblockplugintest'); $tpl = $this->smarty->createTemplate('eval:{blockplugintest}hello world{/blockplugintest}'); $this->assertEquals('block test', $this->smarty->fetch($tpl)); } /** * test block plugin repeat function */ public function testBlockPluginRepeat() { $this->smarty->addPluginsDir(dirname(__FILE__)."/PHPunitplugins/"); $this->assertEquals('12345', $this->smarty->fetch('eval:{testblock}{/testblock}')); } public function testBlockPluginRepeatModidier1() { $this->smarty->addPluginsDir(dirname(__FILE__)."/PHPunitplugins/"); $this->assertEquals('11111', $this->smarty->fetch('eval:{testblock}{/testblock|strlen}')); } public function testBlockPluginRepeatModidier2() { $this->smarty->addPluginsDir(dirname(__FILE__)."/PHPunitplugins/"); $this->assertEquals('11111', $this->smarty->fetch('eval:{testblock}{/testblock|strlen|default:""}')); } } function myblockplugintest($params, $content, &$smarty_tpl, &$repeat) { if (!$repeat) { $output = str_replace('hello world', 'block test', $content); return $output; } } ?> smarty3-3.1.13/development/PHPunit/FunctionTests.php0000644000175000017500000000154212044502270021025 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test unknown function error */ public function testUnknownFunction() { $this->smarty->enableSecurity(); try { $this->smarty->fetch('eval:{unknown()}'); } catch (Exception $e) { $this->assertContains(htmlentities("PHP function 'unknown' not allowed by security setting"), $e->getMessage()); return; } $this->fail('Exception for unknown function has not been raised.'); } } ?>smarty3-3.1.13/development/PHPunit/RegisterBlockTests.php0000644000175000017500000002303211634664106022010 0ustar mikemikeblock / unregister->block methods * * @package PHPunit * @author Uwe Tews */ /** * class for register->block / unregister->block methods tests */ class RegisterBlockTests extends PHPUnit_Framework_TestCase { public function setUp() { $this->smarty = SmartyTests::$smarty; $this->smartyBC = SmartyTests::$smartyBC; SmartyTests::init(); $this->smarty->disableSecurity(); $this->smartyBC->disableSecurity(); } public static function isRunnable() { return true; } /** * test registerPlugin method for block function */ public function testRegisterBlockFunction() { $this->smarty->registerPlugin(Smarty::PLUGIN_BLOCK,'testblock', 'myblock'); $this->smarty->assign('value', 1); $this->assertEquals('function hello world 1 1 function hello world 1 2 function hello world 1 3 ', $this->smarty->fetch('eval:{testblock}hello world {$value}{/testblock}')); } public function testRegisterBlockFunctionModifier1() { $this->smarty->registerPlugin(Smarty::PLUGIN_BLOCK,'testblock', 'myblock'); $this->smarty->assign('value', 1); $this->assertEquals(strtoupper('function hello world 1 1 function hello world 1 2 function hello world 1 3 '), $this->smarty->fetch('eval:{testblock}hello world {$value}{/testblock|strtoupper}')); } public function testRegisterBlockFunctionModifier2() { $this->smarty->registerPlugin(Smarty::PLUGIN_BLOCK,'testblock', 'myblock'); $this->smarty->assign('value', 1); $this->assertEquals(strtoupper('function hello world 1 1 function hello world 1 2 function hello world 1 3 '), $this->smarty->fetch('eval:{testblock}hello world {$value}{/testblock|default:""|strtoupper}')); } public function testRegisterBlockFunctionWrapper() { $this->smartyBC->register_block('testblock', 'myblock'); $this->smartyBC->assign('value', 1); $this->assertEquals('function hello world 1 1 function hello world 1 2 function hello world 1 3 ', $this->smartyBC->fetch('eval:{testblock}hello world {$value}{/testblock}')); } /** * test registerPlugin method for block class */ public function testRegisterBlockClass() { $this->smarty->registerPlugin(Smarty::PLUGIN_BLOCK,'testblock', array('myblockclass', 'static_method')); $this->smarty->assign('value', 2); $this->assertEquals('static hello world 2 1 static hello world 2 2 static hello world 2 3 ', $this->smarty->fetch('eval:{testblock}hello world {$value}{/testblock}')); } public function testRegisterBlockClassWrapper() { $this->smartyBC->register_block('testblock', array('myblockclass', 'static_method')); $this->smartyBC->assign('value', 2); $this->assertEquals('static hello world 2 1 static hello world 2 2 static hello world 2 3 ', $this->smartyBC->fetch('eval:{testblock}hello world {$value}{/testblock}')); } /** * test registerPlugin method for block object */ public function testRegisterBlockObject() { $myblock_object = new myblockclass; $this->smarty->registerPlugin(Smarty::PLUGIN_BLOCK,'testblock', array($myblock_object, 'object_method')); $this->smarty->assign('value', 3); $this->assertEquals('object hello world 3 1 object hello world 3 2 object hello world 3 3 ', $this->smarty->fetch('eval:{testblock}hello world {$value}{/testblock}')); } public function testRegisterBlockObjectWrapper() { $myblock_object = new myblockclass; $this->smartyBC->register_block('testblock', array($myblock_object, 'object_method')); $this->smartyBC->assign('value', 3); $this->assertEquals('object hello world 3 1 object hello world 3 2 object hello world 3 3 ', $this->smartyBC->fetch('eval:{testblock}hello world {$value}{/testblock}')); } /** * test registerPlugin method for block with caching */ public function testRegisterBlockCaching1() { $this->smarty->caching = 1; $this->smarty->cache_lifetime = 10; $this->smarty->force_compile = true; $this->smarty->assign('x', 1); $this->smarty->assign('y', 10); $this->smarty->assign('z', 100); $this->smarty->registerPlugin(Smarty::PLUGIN_BLOCK,'testblock', 'myblockcache'); $this->assertEquals('1 10 100', $this->smarty->fetch('test_register_block.tpl')); } public function testRegisterBlockCaching2() { $this->smarty->caching = 1; $this->smarty->cache_lifetime = 10; $this->smarty->assign('x', 2); $this->smarty->assign('y', 20); $this->smarty->assign('z', 200); $this->smarty->registerPlugin(Smarty::PLUGIN_BLOCK,'testblock', 'myblockcache'); $this->assertEquals('1 10 100', $this->smarty->fetch('test_register_block.tpl')); } public function testRegisterBlockCaching3() { $this->smarty->caching = 1; $this->smarty->cache_lifetime = 10; $this->smarty->force_compile = true; $this->smarty->assign('x', 3); $this->smarty->assign('y', 30); $this->smarty->assign('z', 300); $this->smarty->registerPlugin(Smarty::PLUGIN_BLOCK,'testblock', 'myblockcache', false); $this->assertEquals('3 30 300', $this->smarty->fetch('test_register_block.tpl')); } public function testRegisterBlockCaching4() { $this->smarty->caching = 1; $this->smarty->cache_lifetime = 10; $this->smarty->assign('x', 4); $this->smarty->assign('y', 40); $this->smarty->assign('z', 400); $this->smarty->registerPlugin(Smarty::PLUGIN_BLOCK,'testblock', 'myblockcache', false); $this->assertEquals('3 40 300', $this->smarty->fetch('test_register_block.tpl')); } public function testRegisterBlockCaching1Wrapper() { $this->smartyBC->caching = 1; $this->smartyBC->cache_lifetime = 10; $this->smartyBC->force_compile = true; $this->smartyBC->assign('x', 1); $this->smartyBC->assign('y', 10); $this->smartyBC->assign('z', 100); $this->smartyBC->register_block('testblock', 'myblockcache'); $this->assertEquals('1 10 100', $this->smartyBC->fetch('test_register_block.tpl')); } public function testRegisterBlockCaching2Wrapper() { $this->smartyBC->caching = 1; $this->smartyBC->cache_lifetime = 10; $this->smartyBC->assign('x', 2); $this->smartyBC->assign('y', 20); $this->smartyBC->assign('z', 200); $this->smartyBC->register_block('testblock', 'myblockcache'); $this->assertEquals('1 10 100', $this->smartyBC->fetch('test_register_block.tpl')); } public function testRegisterBlockCaching3Wrapper() { $this->smartyBC->caching = 1; $this->smartyBC->cache_lifetime = 10; $this->smartyBC->force_compile = true; $this->smartyBC->assign('x', 3); $this->smartyBC->assign('y', 30); $this->smartyBC->assign('z', 300); $this->smartyBC->register_block('testblock', 'myblockcache', false); $this->assertEquals('3 30 300', $this->smartyBC->fetch('test_register_block.tpl')); } public function testRegisterBlockCaching4Wrapper() { $this->smartyBC->caching = 1; $this->smartyBC->cache_lifetime = 10; $this->smartyBC->assign('x', 4); $this->smartyBC->assign('y', 40); $this->smartyBC->assign('z', 400); $this->smartyBC->register_block('testblock', 'myblockcache', false); $this->assertEquals('3 40 300', $this->smartyBC->fetch('test_register_block.tpl')); } /** * test unregister->block method */ public function testUnregisterBlock() { $this->smarty->registerPlugin(Smarty::PLUGIN_BLOCK,'testblock', 'myblock'); $this->smarty->unregisterPlugin(Smarty::PLUGIN_BLOCK,'testblock'); $this->assertFalse(isset($this->smarty->registered_plugins[Smarty::PLUGIN_BLOCK]['testblock'])); } public function testUnregisterBlockWrapper() { $this->smartyBC->register_block('testblock', 'myblock'); $this->smartyBC->unregister_block('testblock'); $this->assertFalse(isset($this->smartyBC->registered_plugins[Smarty::PLUGIN_BLOCK]['testblock'])); } /** * test unregister->block method not registered */ public function testUnregisterBlockNotRegistered() { $this->smarty->unregisterPlugin(Smarty::PLUGIN_BLOCK,'testblock'); $this->assertFalse(isset($this->smarty->registered_plugins[Smarty::PLUGIN_BLOCK]['testblock'])); } } function myblock($params, $content, &$smarty_tpl, &$repeat) { static $loop = 0; if ($content == null) { $loop = 0; return; } $loop ++; if ($loop < 3) { $repeat = true; } return "function $content $loop "; } function myblockcache($params, $content, &$smarty_tpl, &$repeat) { return $content; } class myblockclass { static function static_method($params, $content, &$smarty_tpl, &$repeat) { static $loop = 0; if ($content == null) { $loop = 0; return; } $loop ++; if ($loop < 3) { $repeat = true; } return "static $content $loop "; } function object_method($params, $content, &$smarty_tpl, &$repeat) { static $loop = 0; if ($content == null) { $loop = 0; return; } $loop ++; if ($loop < 3) { $repeat = true; } return "object $content $loop "; } } ?>smarty3-3.1.13/development/PHPunit/CompileSectionTests.php0000644000175000017500000000433411471273555022175 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test {section} tag */ public function testSection1() { $tpl = $this->smarty->createTemplate('eval:{assign var=foo value=[0,1,2,3,4,5,6,7,8,9]}{section name=bar loop=$foo}{$foo[bar]}{/section}'); $this->assertEquals("0123456789", $this->smarty->fetch($tpl)); } public function testSection2() { $tpl = $this->smarty->createTemplate('eval:{assign var=foo value=[0,1,2,3,4,5,6,7,8,9]}{section name=bar loop=$foo}{$foo[bar]}{sectionelse}else{/section}'); $this->assertEquals("0123456789", $this->smarty->fetch($tpl)); } public function testSection3() { $this->smarty->error_reporting = error_reporting() & ~(E_NOTICE|E_USER_NOTICE); $tpl = $this->smarty->createTemplate('eval:{section name=bar loop=$foo}{$foo[bar]}{sectionelse}else{/section}'); $this->assertEquals("else", $this->smarty->fetch($tpl)); } public function testSection4() { $tpl = $this->smarty->createTemplate('eval:{assign var=foo value=[0,1,2,3,4,5,6,7,8,9]}{section name=bar loop=$foo}{$foo[bar]}{sectionelse}else{/section}'); $this->assertEquals("0123456789", $this->smarty->fetch($tpl)); } public function testSection6() { $tpl = $this->smarty->createTemplate('eval:{assign var=foo value=[0,1,2,3,4,5,6,7,8,9]}{section name=bar loop=$foo}{$foo[bar]}{sectionelse}else{/section}total{$smarty.section.bar.total}'); $this->assertEquals("0123456789total10", $this->smarty->fetch($tpl)); } public function testSection7() { $tpl = $this->smarty->createTemplate('eval:{assign var=foo value=[0,1,2,3,4,5,6,7,8,9]}{section name=bar loop=$foo}{$smarty.section.bar.index}{$smarty.section.bar.iteration}{sectionelse}else{/section}'); $this->assertEquals("011223344556677889910", $this->smarty->fetch($tpl)); } } ?> smarty3-3.1.13/development/PHPunit/MuteExpectedErrorsTests.php0000644000175000017500000000615311757450017023047 0ustar mikemikesmarty = SmartyTests::$smarty; $this->smartyBC = SmartyTests::$smartyBC; SmartyTests::init(); } public static function isRunnable() { return true; } protected $_errors = array(); public function error_handler($errno, $errstr, $errfile, $errline, $errcontext) { $this->_errors[] = $errfile .' line ' . $errline; } public function testMuted() { $this->_errors = array(); set_error_handler(array($this, 'error_handler')); Smarty::muteExpectedErrors(); $this->smarty->clearCache('default.tpl'); $this->smarty->clearCompiledTemplate('default.tpl'); $this->smarty->fetch('default.tpl'); $this->assertEquals($this->_errors, array()); @filemtime('ckxladanwijicajscaslyxck'); $error = array( __FILE__ . ' line ' . (__LINE__ -1)); $this->assertEquals($this->_errors, $error); Smarty::unmuteExpectedErrors(); restore_error_handler(); } public function testUnmuted() { $this->_errors = array(); set_error_handler(array($this, 'error_handler')); $this->smarty->clearCache('default.tpl'); $this->smarty->clearCompiledTemplate('default.tpl'); $this->smarty->fetch('default.tpl'); $this->assertEquals(Smarty::$_IS_WINDOWS ? 5 : 4, count($this->_errors)); @filemtime('ckxladanwijicajscaslyxck'); $error = array( __FILE__ . ' line ' . (__LINE__ -1)); $this->assertEquals(Smarty::$_IS_WINDOWS ? 6 : 5, count($this->_errors)); restore_error_handler(); } public function testMutedCaching() { $this->_errors = array(); set_error_handler(array($this, 'error_handler')); Smarty::muteExpectedErrors(); $this->smarty->caching = true; $this->smarty->clearCache('default.tpl'); $this->smarty->clearCompiledTemplate('default.tpl'); $this->smarty->fetch('default.tpl'); $this->assertEquals($this->_errors, array()); @filemtime('ckxladanwijicajscaslyxck'); $error = array( __FILE__ . ' line ' . (__LINE__ -1)); $this->assertEquals($error,$this->_errors); Smarty::unmuteExpectedErrors(); restore_error_handler(); } public function testUnmutedCaching() { $this->_errors = array(); set_error_handler(array($this, 'error_handler')); $this->smarty->caching = true; $this->smarty->clearCache('default.tpl'); $this->smarty->clearCompiledTemplate('default.tpl'); $this->smarty->fetch('default.tpl'); $this->assertEquals(Smarty::$_IS_WINDOWS ? 7 : 5, count($this->_errors)); @filemtime('ckxladanwijicajscaslyxck'); $error = array( __FILE__ . ' line ' . (__LINE__ -1)); $this->assertEquals(Smarty::$_IS_WINDOWS ? 8 : 6, count($this->_errors)); restore_error_handler(); } } smarty3-3.1.13/development/PHPunit/CompileSetfilterTests.php0000644000175000017500000000154411634664106022527 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test nested setfilter */ public function testNestedSetfilter() { $tpl = $this->smarty->createTemplate('eval:{$foo}{setfilter htmlspecialchars} {$foo}{setfilter escape:"mail"} {$foo}{/setfilter} {$foo}{/setfilter} {$foo}'); $tpl->assign('foo',''); $this->assertEquals(" <a@b.c> <a@b.c> ", $this->smarty->fetch($tpl)); } } ?> smarty3-3.1.13/development/PHPunit/ClearAllAssignTests.php0000644000175000017500000000503011634664106022073 0ustar mikemikesmarty = SmartyTests::$smarty; $this->smartyBC = SmartyTests::$smartyBC; SmartyTests::init(); $this->smarty->assign('foo','foo'); $this->_data = new Smarty_Data($this->smarty); $this->_data->assign('bar','bar'); $this->_tpl = $this->smarty->createTemplate('eval:{$foo}{$bar}{$blar}', null, null, $this->_data); $this->_tpl->assign('blar','blar'); $this->smartyBC->assign('foo','foo'); $this->_dataBC = new Smarty_Data($this->smartyBC); $this->_dataBC->assign('bar','bar'); $this->_tplBC = $this->smartyBC->createTemplate('eval:{$foo}{$bar}{$blar}', null, null, $this->_dataBC); $this->_tplBC->assign('blar','blar'); } public static function isRunnable() { return true; } /** * test all variables accessable */ public function testAllVariablesAccessable() { $this->assertEquals('foobarblar', $this->smarty->fetch($this->_tpl)); } /** * test clear all assign in template */ public function testClearAllAssignInTemplate() { $this->smarty->error_reporting = error_reporting() & ~(E_NOTICE|E_USER_NOTICE); $this->_tpl->clearAllAssign(); $this->assertEquals('foobar', $this->smarty->fetch($this->_tpl)); } /** * test clear all assign in data */ public function testClearAllAssignInData() { $this->smarty->error_reporting = error_reporting() & ~(E_NOTICE|E_USER_NOTICE); $this->_data->clearAllAssign(); $this->assertEquals('fooblar', $this->smarty->fetch($this->_tpl)); } /** * test clear all assign in Smarty object */ public function testClearAllAssignInSmarty() { $this->smarty->error_reporting = error_reporting() & ~(E_NOTICE|E_USER_NOTICE); $this->smarty->clearAllAssign(); $this->assertEquals('barblar', $this->smarty->fetch($this->_tpl)); } public function testSmarty2ClearAllAssignInSmarty() { $this->smartyBC->error_reporting = error_reporting() & ~(E_NOTICE|E_USER_NOTICE); $this->smartyBC->clear_all_assign(); $this->assertEquals('barblar', $this->smartyBC->fetch($this->_tplBC)); } } ?> smarty3-3.1.13/development/PHPunit/RegisterModifierTests.php0000644000175000017500000000645611467061362022526 0ustar mikemikemodifier / unregister->modifier methods * * @package PHPunit * @author Uwe Tews */ /** * class for register->modifier / unregister->modifier methods tests */ class RegisterModifierTests extends PHPUnit_Framework_TestCase { public function setUp() { $this->smarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test register->modifier method for function */ public function testRegisterModifier() { $this->smarty->registerPlugin(Smarty::PLUGIN_MODIFIER,'testmodifier', 'mymodifier'); $this->assertEquals('mymodifier', $this->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER]['testmodifier'][0]); $this->smarty->assign('foo', 'foo'); $this->smarty->assign('bar', 'bar'); $this->assertEquals('foo function blar bar', $this->smarty->fetch('eval:{$foo|testmodifier:blar:$bar}')); } /** * test register->modifier method for classes */ public function testRegisterModifierClass() { $this->smarty->registerPlugin(Smarty::PLUGIN_MODIFIER,'testmodifier', array('mymodifierclass', 'static_method')); $this->smarty->assign('foo', 'foo'); $this->smarty->assign('bar', 'bar'); $this->assertEquals('foo static blar bar', $this->smarty->fetch('eval:{$foo|testmodifier:blar:$bar}')); } /** * test register->modifier method for objects */ public function testRegisterModifierObject() { $obj = new mymodifierclass; $this->smarty->registerPlugin(Smarty::PLUGIN_MODIFIER,'testmodifier', array($obj, 'object_method')); $this->smarty->assign('foo', 'foo'); $this->smarty->assign('bar', 'bar'); $this->assertEquals('foo object blar bar', $this->smarty->fetch('eval:{$foo|testmodifier:blar:$bar}')); } /** * test unregister->modifier method */ public function testUnregisterModifier() { $this->smarty->registerPlugin(Smarty::PLUGIN_MODIFIER,'testmodifier', 'mymodifier'); $this->smarty->unregisterPlugin(Smarty::PLUGIN_MODIFIER,'testmodifier'); $this->assertFalse(isset($this->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER]['testmodifier'])); } /** * test unregister->modifier method not registered */ public function testUnregisterModifierNotRegistered() { $this->smarty->unregisterPlugin(Smarty::PLUGIN_MODIFIER,'testmodifier'); $this->assertFalse(isset($this->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER]['testmodifier'])); } /** * test unregister->modifier method other registered */ public function testUnregisterModifierOtherRegistered() { $this->smarty->registerPlugin(Smarty::PLUGIN_BLOCK,'testmodifier', 'mymodifier'); $this->smarty->unregisterPlugin(Smarty::PLUGIN_MODIFIER,'testmodifier'); $this->assertTrue(isset($this->smarty->registered_plugins[Smarty::PLUGIN_BLOCK]['testmodifier'])); } } function mymodifier($a, $b, $c) { return "$a function $b $c"; } class mymodifierclass { static function static_method($a, $b, $c) { return "$a static $b $c"; } function object_method($a, $b, $c) { return "$a object $b $c"; } } ?>smarty3-3.1.13/development/PHPunit/CompileIncludeTests.php0000644000175000017500000001163211634664106022150 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->force_compile = true; } public static function isRunnable() { return true; } /** * test standard output */ public function testIncludeStandard() { $tpl = $this->smarty->createTemplate('eval:{include file="helloworld.tpl"}'); $content = $this->smarty->fetch($tpl); $this->assertEquals("hello world", $content); } /** * Test that assign attribute does not create standard output */ public function testIncludeAssign1() { $tpl = $this->smarty->createTemplate('eval:{include file="helloworld.tpl" assign=foo}'); $this->assertEquals("", $this->smarty->fetch($tpl)); } /** * Test that assign attribute does load variable */ public function testIncludeAssign2() { $tpl = $this->smarty->createTemplate('eval:{assign var=foo value=bar}{include file="helloworld.tpl" assign=foo}{$foo}'); $this->assertEquals("hello world", $this->smarty->fetch($tpl)); } /** * Test passing local vars */ public function testIncludePassVars() { $tpl = $this->smarty->createTemplate("eval:{include file='eval:{\$myvar1}{\$myvar2}' myvar1=1 myvar2=2}"); $this->assertEquals("12", $this->smarty->fetch($tpl)); } /** * Test local scope */ public function testIncludeLocalScope() { $this->smarty->assign('foo',1); $tpl = $this->smarty->createTemplate('eval: befor include {$foo} {include file=\'eval:{$foo=2} in include {$foo}\'} after include {$foo}', null, null, $this->smarty); $content = $this->smarty->fetch($tpl); $this->assertContains('befor include 1', $content); $this->assertContains('in include 2', $content); $this->assertContains('after include 1', $content); } /** * Test parent scope */ public function testIncludeParentScope() { $this->smarty->assign('foo',1); $tpl = $this->smarty->createTemplate('eval: befor include {$foo} {include file=\'eval:{$foo=2} in include {$foo}\' scope = parent} after include {$foo}', null, null, $this->smarty); $content = $this->smarty->fetch($tpl); $content2 = $this->smarty->fetch('eval: root value {$foo}' ); $this->assertContains('befor include 1', $content); $this->assertContains('in include 2', $content); $this->assertContains('after include 2', $content); $this->assertContains('root value 1', $content2); } /** * Test root scope */ public function testIncludeRootScope() { $this->smarty->error_reporting = error_reporting() & ~(E_NOTICE|E_USER_NOTICE); $this->smarty->assign('foo',1); $tpl = $this->smarty->createTemplate('eval: befor include {$foo} {include file=\'eval:{$foo=2} in include {$foo}\' scope = root} after include {$foo}'); $content = $this->smarty->fetch($tpl); $content2 = $this->smarty->fetch('eval: smarty value {$foo}' ); $this->assertNotContains('befor include 1', $content); $this->assertContains('in include 2', $content); $this->assertContains('after include 2', $content); $this->assertContains('smarty value 1', $content2); } /** * Test root scope */ public function testIncludeRootScope2() { $this->smarty->assign('foo',1); $tpl = $this->smarty->createTemplate('eval: befor include {$foo} {include file=\'eval:{$foo=2} in include {$foo}\' scope = root} after include {$foo}', null, null, $this->smarty); $content = $this->smarty->fetch($tpl); $content2 = $this->smarty->fetch('eval: smarty value {$foo}' ); $this->assertContains('befor include 1', $content); $this->assertContains('in include 2', $content); $this->assertContains('after include 1', $content); $this->assertContains('smarty value 2', $content2); } /** * Test recursive includes */ public function testRecursiveIncludes1() { $this->smarty->assign('foo',1); $this->smarty->assign('bar','bar'); $content = $this->smarty->fetch('test_recursive_includes.tpl'); $this->assertContains("before 1 bar
\nbefore 2 bar
\nbefore 3 bar
\nafter 3 bar
\nafter 2 bar
\nafter 1 bar
", $content); } public function testRecursiveIncludes2() { $this->smarty->assign('foo',1); $this->smarty->assign('bar','bar'); $content = $this->smarty->fetch('test_recursive_includes2.tpl'); $this->assertContains("before 1 bar
\nbefore 3 bar
\nbefore 5 bar
\nafter 5 bar
\nafter 3 bar
\nafter 1 bar
", $content); } } ?> smarty3-3.1.13/development/PHPunit/PluginModifierWordwrapTests.php0000644000175000017500000001653211673427331023723 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } public function testDefault() { $tpl = $this->smarty->createTemplate('eval:{"Blind woman gets new kidney from dad she hasn\'t seen in years."|wordwrap}'); $this->assertEquals("Blind woman gets new kidney from dad she hasn't seen in years.", $this->smarty->fetch($tpl)); } public function testDefaultWithoutMbstring() { Smarty::$_MBSTRING = false; $tpl = $this->smarty->createTemplate('eval:{"Blind woman gets new kidney from dad she hasn\'t seen in years."|wordwrap}'); $this->assertEquals("Blind woman gets new kidney from dad she hasn't seen in years.", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testDefaultUmlauts() { $tpl = $this->smarty->createTemplate('eval:{"äöüßñ woman ñsä new kidney from dad she hasn\'t seen in years."|wordwrap:30}'); $this->assertEquals("äöüßñ woman ñsä new kidney\nfrom dad she hasn't seen in\nyears.", $this->smarty->fetch($tpl)); } public function testLength() { $tpl = $this->smarty->createTemplate('eval:{"Blind woman gets new kidney from dad she hasn\'t seen in years."|wordwrap:30}'); $this->assertEquals("Blind woman gets new kidney\nfrom dad she hasn't seen in\nyears.", $this->smarty->fetch($tpl)); } public function testLengthWithoutMbstring() { Smarty::$_MBSTRING = false; $tpl = $this->smarty->createTemplate('eval:{"Blind woman gets new kidney from dad she hasn\'t seen in years."|wordwrap:30}'); $this->assertEquals("Blind woman gets new kidney\nfrom dad she hasn't seen in\nyears.", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testBreak() { $tpl = $this->smarty->createTemplate('eval:{"Blind woman gets new kidney from dad she hasn\'t seen in years."|wordwrap:30:"
\n"}'); $this->assertEquals("Blind woman gets new kidney
\nfrom dad she hasn't seen in
\nyears.", $this->smarty->fetch($tpl)); } public function testBreakWithoutMbstring() { Smarty::$_MBSTRING = false; $tpl = $this->smarty->createTemplate('eval:{"Blind woman gets new kidney from dad she hasn\'t seen in years."|wordwrap:30:"
\n"}'); $this->assertEquals("Blind woman gets new kidney
\nfrom dad she hasn't seen in
\nyears.", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testLong() { $tpl = $this->smarty->createTemplate('eval:{"Blind woman withaverylongandunpronoucablenameorso gets new kidney from dad she hasn\'t seen in years."|wordwrap:26:"\n"}'); $this->assertEquals("Blind woman\nwithaverylongandunpronoucablenameorso\ngets new kidney from dad\nshe hasn't seen in years.", $this->smarty->fetch($tpl)); } public function testLongWithoutMbstring() { Smarty::$_MBSTRING = false; $tpl = $this->smarty->createTemplate('eval:{"Blind woman withaverylongandunpronoucablenameorso gets new kidney from dad she hasn\'t seen in years."|wordwrap:26:"\n"}'); $this->assertEquals("Blind woman\nwithaverylongandunpronoucablenameorso\ngets new kidney from dad\nshe hasn't seen in years.", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testLongUmlauts() { $tpl = $this->smarty->createTemplate('eval:{"äöüßñ woman ñsääöüßñameorsoäöüßñäöüßñäöüßñäöüßñßñ gets new kidney from dad she hasn\'t seen in years."|wordwrap:26}'); $this->assertEquals("äöüßñ woman\nñsääöüßñameorsoäöüßñäöüßñäöüßñäöüßñßñ\ngets new kidney from dad\nshe hasn't seen in years.", $this->smarty->fetch($tpl)); } public function testLongCut() { $tpl = $this->smarty->createTemplate('eval:{"Blind woman withaverylongandunpronoucablenameorso gets new kidney from dad she hasn\'t seen in years."|wordwrap:26:"\n":true}'); $this->assertEquals("Blind woman\nwithaverylongandunpronouca\nblenameorso gets new\nkidney from dad she hasn't\nseen in years.", $this->smarty->fetch($tpl)); } public function testLongCutWithoutMbstring() { Smarty::$_MBSTRING = false; $tpl = $this->smarty->createTemplate('eval:{"Blind woman withaverylongandunpronoucablenameorso gets new kidney from dad she hasn\'t seen in years."|wordwrap:26:"\n":true}'); $this->assertEquals("Blind woman\nwithaverylongandunpronouca\nblenameorso gets new\nkidney from dad she hasn't\nseen in years.", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testLongCutUmlauts() { $tpl = $this->smarty->createTemplate('eval:{"äöüßñ woman ñsääöüßñameorsoäöüßñäöüßñäöüßñäöüßñßñ gets new kidney from dad she hasn\'t seen in years."|wordwrap:26:"\n":true}'); $this->assertEquals("äöüßñ woman\nñsääöüßñameorsoäöüßñäöüßñä\nöüßñäöüßñßñ gets new\nkidney from dad she hasn't\nseen in years.", $this->smarty->fetch($tpl)); } public function testLinebreaks() { $tpl = $this->smarty->createTemplate('eval:{"Blind woman\ngets new kidney from dad she hasn\'t seen in years."|wordwrap:30}'); $this->assertEquals("Blind woman\ngets new kidney from dad she\nhasn't seen in years.", $this->smarty->fetch($tpl)); } public function testLinebreaksWithoutMbstring() { Smarty::$_MBSTRING = false; $tpl = $this->smarty->createTemplate('eval:{"Blind woman\ngets new kidney from dad she hasn\'t seen in years."|wordwrap:30}'); $this->assertEquals("Blind woman\ngets new kidney from dad she\nhasn't seen in years.", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testLinebreaks2() { $tpl = $this->smarty->createTemplate('eval:{"Blind woman gets new kidney from dad she hasn\'t seen in years."|wordwrap:30}'); $this->assertEquals("Blind woman gets new kidney from\ndad she hasn't seen in years.", $this->smarty->fetch($tpl)); } public function testLinebreaks2WithoutMbstring() { Smarty::$_MBSTRING = false; $tpl = $this->smarty->createTemplate('eval:{"Blind woman gets new kidney from dad she hasn\'t seen in years."|wordwrap:30}'); $this->assertEquals("Blind woman gets new kidney from\ndad she hasn't seen in years.", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } /* public function testUnicodeSpaces() { // Some Unicode Spaces $string = " hello spaced       words "; $string = mb_convert_encoding($string, 'UTF-8', "HTML-ENTITIES"); $tpl = $this->smarty->createTemplate('eval:{"' . $string . '"|strip}'); $this->assertEquals(" hello spaced words ", $this->smarty->fetch($tpl)); } */ } ?>smarty3-3.1.13/development/PHPunit/StaticClassAccessTests.php0000644000175000017500000000740611634664106022617 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->disableSecurity(); } public static function isRunnable() { return true; } /** * test static class variable */ public function testStaticClassVariable() { $tpl = $this->smarty->createTemplate('eval:{mystaticclass::$static_var}'); $this->assertEquals('5', $this->smarty->fetch($tpl)); } /** * test registered static class variable */ public function testStaticRegisteredClassVariable() { $this->smarty->registerClass('registeredclass','mystaticclass'); $tpl = $this->smarty->createTemplate('eval:{registeredclass::$static_var}'); $this->assertEquals('5', $this->smarty->fetch($tpl)); } /** * test static class constant */ public function testStaticClassConstant() { $tpl = $this->smarty->createTemplate('eval:{mystaticclass::STATIC_CONSTANT_VALUE}'); $this->assertEquals('3', $this->smarty->fetch($tpl)); } /** * test static class constant */ public function testRegisteredStaticClassConstant() { $this->smarty->registerClass('registeredclass','mystaticclass'); $tpl = $this->smarty->createTemplate('eval:{registeredclass::STATIC_CONSTANT_VALUE}'); $this->assertEquals('3', $this->smarty->fetch($tpl)); } /** * test static class methode */ public function testStaticClassMethode() { $tpl = $this->smarty->createTemplate('eval:{mystaticclass::square(5)}'); $this->assertEquals('25', $this->smarty->fetch($tpl)); } /** * test static class methode */ public function testRegisteredStaticClassMethode() { $this->smarty->registerClass('registeredclass','mystaticclass'); $tpl = $this->smarty->createTemplate('eval:{registeredclass::square(5)}'); $this->assertEquals('25', $this->smarty->fetch($tpl)); } /** * test static class variable methode */ public function testStaticClassVariableMethode() { $tpl = $this->smarty->createTemplate('eval:{$foo=\'square\'}{mystaticclass::$foo(5)}'); $this->assertEquals('25', $this->smarty->fetch($tpl)); } /** * test registered static class variable methode */ public function testRegisteredStaticClassVariableMethode() { $this->smarty->registerClass('registeredclass','mystaticclass'); $tpl = $this->smarty->createTemplate('eval:{$foo=\'square\'}{registeredclass::$foo(5)}'); $this->assertEquals('25', $this->smarty->fetch($tpl)); } /** * test static class variable methode */ public function testStaticClassVariableMethode2() { $tpl = $this->smarty->createTemplate('eval:{mystaticclass::$foo(5)}'); $tpl->assign('foo','square'); $this->assertEquals('25', $this->smarty->fetch($tpl)); } /** * test registered static class variable methode */ public function testRegisteredStaticClassVariableMethode2() { $this->smarty->registerClass('registeredclass','mystaticclass'); $tpl = $this->smarty->createTemplate('eval:{registeredclass::$foo(5)}'); $tpl->assign('foo','square'); $this->assertEquals('25', $this->smarty->fetch($tpl)); } } class mystaticclass { const STATIC_CONSTANT_VALUE = 3; public static $static_var = 5; static function square($i) { return $i*$i; } } ?>smarty3-3.1.13/development/PHPunit/RegisterFilterTests.php0000644000175000017500000001222711467061362022206 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test register->preFilter method for function */ public function testRegisterPrefilterFunction() { $this->smarty->registerFilter(Smarty::FILTER_PRE,'myfilter'); $this->assertTrue(is_callable($this->smarty->registered_filters['pre']['myfilter'])); } /** * test register->preFilter method for class methode */ public function testRegisterPrefilterMethode() { $this->smarty->registerFilter(Smarty::FILTER_PRE,array('myfilterclass','execute')); $this->assertTrue(is_callable($this->smarty->registered_filters['pre']['myfilterclass_execute'])); } /** * test register->preFilter method for class object */ public function testRegisterPrefilterObject() { $this->smarty->registerFilter(Smarty::FILTER_PRE,array(new myfilterclass,'execute')); $this->assertTrue(is_callable($this->smarty->registered_filters['pre']['myfilterclass_execute'])); } /** * test unregister->preFilter method for function */ public function testUnegisterPrefilterFunction() { $this->smarty->registerFilter(Smarty::FILTER_PRE,'myfilter'); $this->smarty->unregisterFilter(Smarty::FILTER_PRE,'myfilter'); $this->assertFalse(isset($this->smarty->registered_filters['pre']['myfilter'])); } /** * test unregister->preFilter method for class methode */ public function testUnregisterPrefilterMethode() { $this->smarty->registerFilter(Smarty::FILTER_PRE,array('myfilterclass','execute')); $this->smarty->unregisterFilter(Smarty::FILTER_PRE,array('myfilterclass','execute')); $this->assertFalse(isset($this->smarty->registered_filters['pre']['myfilterclass_execute'])); } /** * test register->postFilter method for function */ public function testRegisterPostfilterFunction() { $this->smarty->registerFilter(Smarty::FILTER_POST,'myfilter'); $this->assertTrue(is_callable($this->smarty->registered_filters['post']['myfilter'])); } /** * test register->postFilter method for class methode */ public function testRegisterPostfilterMethode() { $this->smarty->registerFilter(Smarty::FILTER_POST,array('myfilterclass','execute')); $this->assertTrue(is_callable($this->smarty->registered_filters['post']['myfilterclass_execute'])); } /** * test unregister->postFilter method for function */ public function testUnegisterPostfilterFunction() { $this->smarty->registerFilter(Smarty::FILTER_POST,'myfilter'); $this->smarty->unregisterFilter(Smarty::FILTER_POST,'myfilter'); $this->assertFalse(isset($this->smarty->registered_filters['post']['myfilter'])); } /** * test unregister->postFilter method for class methode */ public function testUnregisterPostfilterMethode() { $this->smarty->registerFilter(Smarty::FILTER_POST,array('myfilterclass','execute')); $this->smarty->unregisterFilter(Smarty::FILTER_POST,array('myfilterclass','execute')); $this->assertFalse(isset($this->smarty->registered_filters['post']['myfilterclass_execute'])); } /** * test register->outputFilter method for function */ public function testRegisterOutputfilterFunction() { $this->smarty->registerFilter(Smarty::FILTER_OUTPUT,'myfilter'); $this->assertTrue(is_callable($this->smarty->registered_filters['output']['myfilter'])); } /** * test register->outputFilter method for class methode */ public function testRegisterOutputfilterMethode() { $this->smarty->registerFilter(Smarty::FILTER_OUTPUT,array('myfilterclass','execute')); $this->assertTrue(is_callable($this->smarty->registered_filters['output']['myfilterclass_execute'])); } /** * test unregister->outputFilter method for function */ public function testUnegisterOutputfilterFunction() { $this->smarty->registerFilter(Smarty::FILTER_OUTPUT,'myfilter'); $this->smarty->unregisterFilter(Smarty::FILTER_OUTPUT,'myfilter'); $this->assertFalse(isset($this->smarty->registered_filters['output']['myfilter'])); } /** * test unregister->outputFilter method for class methode */ public function testUnregisterOutputfilterMethode() { $this->smarty->registerFilter(Smarty::FILTER_OUTPUT,array('myfilterclass','execute')); $this->smarty->unregisterFilter(Smarty::FILTER_OUTPUT,array('myfilterclass','execute')); $this->assertFalse(isset($this->smarty->registered_filters['output']['myfilterclass_execute'])); } } function myfilter($input) { return $input; } class myfilterclass { static function execute($input) { return $input; } } ?> smarty3-3.1.13/development/PHPunit/PluginModifierLowerTests.php0000644000175000017500000000321711673427331023202 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } public function testDefault() { $result = "two convicts evade noose, jury hung."; $tpl = $this->smarty->createTemplate('eval:{"Two Convicts Evade Noose, Jury Hung."|lower}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testDefaultWithoutMbstring() { Smarty::$_MBSTRING = false; $result = "two convicts evade noose, jury hung."; $tpl = $this->smarty->createTemplate('eval:{"Two Convicts Evade Noose, Jury Hung."|lower}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testUmlauts() { $result = "two convicts eväde nööse, jury hung."; $tpl = $this->smarty->createTemplate('eval:{"Two Convicts Eväde NöÖse, Jury Hung."|lower}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testUmlautsWithoutMbstring() { Smarty::$_MBSTRING = false; $result = "two convicts eväde nööse, jury hung."; $tpl = $this->smarty->createTemplate('eval:{"Two Convicts Eväde NöÖse, Jury Hung."|lower}'); $this->assertNotEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } } ?>smarty3-3.1.13/development/PHPunit/PluginFunctionHtmlCheckboxesTests.php0000644000175000017500000004577112050511024025036 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } public function testAssociativeArray() { $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_checkboxes name="id" options=$cust_radios selected=$customer_id separator="
"}'); $tpl->assign('customer_id', 1001); $tpl->assign('cust_radios', array( 1000 => 'Joe Schmoe', 1001 => 'Jack Smith', 1002 => 'Jane Johnson', 1003 => 'Charlie Brown', )); $this->assertEquals($expected, $tpl->fetch()); } public function testSeparateArrays() { $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_checkboxes name="id" values=$cust_ids output=$cust_names selected=$customer_id separator="
"}'); $tpl->assign('customer_id', 1001); $tpl->assign('cust_ids', array(1000,1001,1002,1003)); $tpl->assign('cust_names', array( 'Joe Schmoe', 'Jack Smith', 'Jane Johnson', 'Charlie Brown', )); $this->assertEquals($expected, $tpl->fetch()); } public function testIterator() { $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_checkboxes name="id" values=$cust_ids output=$cust_names selected=$customer_id separator="
"}'); $tpl->assign('customer_id', 1001); $tpl->assign('cust_ids', array(1000,1001,1002,1003)); $tpl->assign('cust_names', new ArrayIterator(array( 'Joe Schmoe', 'Jack Smith', 'Jane Johnson', 'Charlie Brown', ))); $this->assertEquals($expected, $tpl->fetch()); } public function testNoLabels() { $n = "\n"; $expected = 'Joe Schmoe
' . $n . 'Jack Smith
' . $n . 'Jane Johnson
' . $n . 'Charlie Brown
'; $tpl = $this->smarty->createTemplate('eval:{html_checkboxes name="id" options=$cust_radios labels=false selected=$customer_id separator="
"}'); $tpl->assign('customer_id', 1001); $tpl->assign('cust_radios', array( 1000 => 'Joe Schmoe', 1001 => 'Jack Smith', 1002 => 'Jane Johnson', 1003 => 'Charlie Brown', )); $this->assertEquals($expected, $tpl->fetch()); } public function testWithId() { $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_checkboxes name="id" options=$cust_radios selected=$customer_id label_ids=true separator="
"}'); $tpl->assign('customer_id', 1001); $tpl->assign('cust_radios', array( 1000 => 'Joe Schmoe', 1001 => 'Jack Smith', 1002 => 'Jane Johnson', 'work s ä' => 'Charlie Brown', )); $this->assertEquals($expected, $tpl->fetch()); } public function testNullString() { $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_checkboxes name="id" options=$options selected=$selected separator="
"}'); $tpl->assign('selected', "null"); $tpl->assign('options', array( "null" => 'null', '' => 'empty string', 0 => 'zero', 1 => 'one', 2 => 'two', )); $this->assertEquals($expected, $tpl->fetch()); } public function testNullValue() { $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_checkboxes name="id" options=$options selected=$selected separator="
"}'); $tpl->assign('selected', null); $tpl->assign('options', array( "null" => 'null', '' => 'empty string', 0 => 'zero', 1 => 'one', 2 => 'two', )); $this->assertEquals($expected, $tpl->fetch()); } public function testZeroValue() { $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_checkboxes name="id" options=$options selected=$selected separator="
"}'); $tpl->assign('selected', 0); $tpl->assign('options', array( "null" => 'null', '' => 'empty string', 0 => 'zero', 1 => 'one', 2 => 'two', )); $this->assertEquals($expected, $tpl->fetch()); } public function testZeroStringValue() { $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_checkboxes name="id" options=$options selected=$selected separator="
"}'); $tpl->assign('selected', "0"); $tpl->assign('options', array( "null" => 'null', '' => 'empty string', 0 => 'zero', 1 => 'one', 2 => 'two', )); $this->assertEquals($expected, $tpl->fetch()); } public function testEmptyStringValue() { $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_checkboxes name="id" options=$options selected=$selected separator="
"}'); $tpl->assign('selected', ""); $tpl->assign('options', array( "null" => 'null', '' => 'empty string', 0 => 'zero', 1 => 'one', 2 => 'two', )); $this->assertEquals($expected, $tpl->fetch()); } public function testObject() { $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_checkboxes name="id" options=$cust_radios selected=$customer_id separator="
"}'); $tpl->assign('customer_id', new _object_toString(1001)); $tpl->assign('cust_radios', array( 1000 => 'Joe Schmoe', 1001 => 'Jack Smith', 1002 => 'Jane Johnson', 1003 => 'Charlie Brown', )); $this->assertEquals($expected, $tpl->fetch()); } public function testObjectList() { $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_checkboxes name="id" options=$cust_radios selected=$customer_id separator="
"}'); $tpl->assign('customer_id', 1001); $tpl->assign('cust_radios', array( 1000 => new _object_toString('Joe Schmoe'), 1001 => new _object_toString('Jack Smith'), 1002 => new _object_toString('Jane Johnson'), 1003 => new _object_toString('Charlie Brown'), )); $this->assertEquals($expected, $tpl->fetch()); } protected $_errors = array(); public function error_handler($errno, $errstr, $errfile, $errline, $errcontext) { $this->_errors[] = $errstr; } public function testObjectNoString() { $this->_errors = array(); set_error_handler(array($this, 'error_handler')); $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_checkboxes name="id" options=$cust_radios selected=$customer_id separator="
"}'); $tpl->assign('customer_id', new _object_noString(1001)); $tpl->assign('cust_radios', array( 1000 => 'Joe Schmoe', 1001 => 'Jack Smith', 1002 => 'Jane Johnson', 1003 => 'Charlie Brown', )); $tpl->fetch(); $this->assertEquals(1, count($this->_errors)); $this->assertStringEndsWith("without __toString() method", $this->_errors[0]); restore_error_handler(); } public function testObjectListNoString() { $this->_errors = array(); set_error_handler(array($this, 'error_handler')); $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_checkboxes name="id" options=$cust_radios selected=$customer_id separator="
"}'); $tpl->assign('customer_id', 1001); $tpl->assign('cust_radios', array( 1000 => new _object_toString('Joe Schmoe'), 1001 => new _object_noString('Jack Smith'), 1002 => new _object_toString('Jane Johnson'), 1003 => new _object_toString('Charlie Brown'), )); $tpl->fetch(); $this->assertEquals(1, count($this->_errors)); $this->assertStringEndsWith("without __toString() method", $this->_errors[0]); restore_error_handler(); } public function testDisabled() { $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_checkboxes name="id" options=$cust_radios selected=$customer_id separator="
" disabled="1"}'); $tpl->assign('customer_id', new _object_toString(1001)); $tpl->assign('cust_radios', array( 1000 => 'Joe Schmoe', 1001 => 'Jack Smith', 1002 => 'Jane Johnson', 1003 => 'Charlie Brown', )); $this->assertEquals($expected, $tpl->fetch()); } public function testDisabledStrict() { $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_checkboxes name="id" options=$cust_radios selected=$customer_id separator="
" disabled=true strict=true}'); $tpl->assign('customer_id', new _object_toString(1001)); $tpl->assign('cust_radios', array( 1000 => 'Joe Schmoe', 1001 => 'Jack Smith', 1002 => 'Jane Johnson', 1003 => 'Charlie Brown', )); $this->assertEquals($expected, $tpl->fetch()); $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_checkboxes name="id" options=$cust_radios selected=$customer_id separator="
" disabled=1 strict=true}'); $tpl->assign('customer_id', new _object_toString(1001)); $tpl->assign('cust_radios', array( 1000 => 'Joe Schmoe', 1001 => 'Jack Smith', 1002 => 'Jane Johnson', 1003 => 'Charlie Brown', )); $this->assertEquals($expected, $tpl->fetch()); $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_checkboxes name="id" options=$cust_radios selected=$customer_id separator="
" disabled="disabled" strict=true}'); $tpl->assign('customer_id', new _object_toString(1001)); $tpl->assign('cust_radios', array( 1000 => 'Joe Schmoe', 1001 => 'Jack Smith', 1002 => 'Jane Johnson', 1003 => 'Charlie Brown', )); $this->assertEquals($expected, $tpl->fetch()); } } ?>smarty3-3.1.13/development/PHPunit/ClearAssignTests.php0000644000175000017500000000414211634664106021445 0ustar mikemikesmarty = SmartyTests::$smarty; $this->smartyBC = SmartyTests::$smartyBC; SmartyTests::init(); $this->smarty->assign('foo','foo'); $this->smarty->assign('bar','bar'); $this->smarty->assign('blar','blar'); $this->smartyBC->assign('foo','foo'); $this->smartyBC->assign('bar','bar'); $this->smartyBC->assign('blar','blar'); } public static function isRunnable() { return true; } /** * test all variables accessable */ public function testAllVariablesAccessable() { $this->assertEquals('foobarblar', $this->smarty->fetch('eval:{$foo}{$bar}{$blar}')); } /** * test simple clear assign */ public function testClearAssign() { $this->smarty->error_reporting = error_reporting() & ~(E_NOTICE|E_USER_NOTICE); $this->smarty->clearAssign('blar'); $this->assertEquals('foobar', $this->smarty->fetch('eval:{$foo}{$bar}{$blar}')); } public function testSmarty2ClearAssign() { $this->smartyBC->error_reporting = error_reporting() & ~(E_NOTICE|E_USER_NOTICE); $this->smartyBC->clear_assign('blar'); $this->assertEquals('foobar', $this->smartyBC->fetch('eval:{$foo}{$bar}{$blar}')); } /** * test clear assign array of variables */ public function testArrayClearAssign() { $this->smarty->error_reporting = error_reporting() & ~(E_NOTICE|E_USER_NOTICE); $this->smarty->clearAssign(array('blar','foo')); $this->assertEquals('bar', $this->smarty->fetch('eval:{$foo}{$bar}{$blar}')); } public function testSmarty2ArrayClearAssign() { $this->smartyBC->error_reporting = error_reporting() & ~(E_NOTICE|E_USER_NOTICE); $this->smartyBC->clear_assign(array('blar','foo')); $this->assertEquals('bar', $this->smartyBC->fetch('eval:{$foo}{$bar}{$blar}')); } } ?> smarty3-3.1.13/development/PHPunit/AssignTests.php0000644000175000017500000000151111467061362020472 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test simple assign */ public function testSimpleAssign() { $this->smarty->assign('foo','bar'); $this->assertEquals('bar', $this->smarty->fetch('eval:{$foo}')); } /** * test assign array of variables */ public function testArrayAssign() { $this->smarty->assign(array('foo'=>'bar','foo2'=>'bar2')); $this->assertEquals('bar bar2', $this->smarty->fetch('eval:{$foo} {$foo2}')); } } ?> smarty3-3.1.13/development/PHPunit/configs/0000755000175000017500000000000012141655570017144 5ustar mikemikesmarty3-3.1.13/development/PHPunit/configs/test_error.conf0000644000175000017500000000031711332103316022167 0ustar mikemiketitle = Welcome to Smarty! overwrite = Overwrite1 overwrite = Overwrite2 [section1=]] # Here is an error sec1 = "Hello Section1" [section2] sec2 = 'Hello Section2' [.hidden] hiddentext = Hidden Section smarty3-3.1.13/development/PHPunit/configs/test.conf0000644000175000017500000000133011535717756021002 0ustar mikemiketitle = Welcome to Smarty! overwrite = Overwrite1 overwrite = Overwrite2 booleanon = on Intro = """This is a value that spans more than one line. you must enclose it in triple quotes.""" Number = 123.4 text = 123bvc line = 123 This is a line sec1 = Global Section1 sec2 = Global Section2 sec = Global char [/] sec = special char [foo/bar] sec = section foo/bar [section1] sec1 = Hello Section1 [section2] sec2 = 'Hello Section2' [.hidden] hiddentext = Hidden Section #Comment # Comment with a space first line first #Comment line starting with space # Space before and after # #The line below only contains a # # # # title = This is not the correct title #[section1] #sec1 = Wrong text smarty3-3.1.13/development/PHPunit/configs/test2.conf0000644000175000017500000000003011306060673021041 0ustar mikemike overwrite = Overwrite3 smarty3-3.1.13/development/PHPunit/PluginModifierUnescapeTests.php0000644000175000017500000000537711714034403023654 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } public function testHtml() { $encoded = "aäЗдра><&amp;ääвсствуйте"; $result = "aäЗдра><&ääвсствуйте"; $tpl = $this->smarty->createTemplate('eval:{"' . $encoded . '"|unescape:"html"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testHtmlWithoutMbstring() { Smarty::$_MBSTRING = false; $encoded = "aäЗдра><&amp;ääвсствуйте"; $result = "aäЗдра><&ääвсствуйте"; $tpl = $this->smarty->createTemplate('eval:{"' . $encoded . '"|unescape:"html"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testHtmlall() { $encoded = "aäЗдра><&amp;ääвсствуйте"; $result = "aäЗдра><&ääвсствуйте"; $tpl = $this->smarty->createTemplate('eval:{"' . $encoded . '"|unescape:"htmlall"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testHtmlallWithoutMbstring() { Smarty::$_MBSTRING = false; $encoded = "aäЗдра><&amp;ääвсствуйте"; $result = "aäЗдра><&ääвсствуйте"; $tpl = $this->smarty->createTemplate('eval:{"' . $encoded . '"|unescape:"htmlall"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testUrl() { $encoded = "a%C3%A4%D0%97%D0%B4%D1%80%D0%B0%3E%3C%26amp%3B%C3%A4%C3%A4%D0%B2%D1%81%D1%81%D1%82%D0%B2%3F%3D%2B%D1%83%D0%B9%D1%82%D0%B5"; $result = "aäЗдра><&ääвсств?=+уйте"; $tpl = $this->smarty->createTemplate('eval:{"' . $encoded . '"|unescape:"url"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } } ?>smarty3-3.1.13/development/PHPunit/CompileStripTests.php0000644000175000017500000000120611467061362021661 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test strip tag */ public function testStrip() { $tpl = $this->smarty->createTemplate("eval:{strip}\n
{/strip}"); $this->assertEquals('
', $this->smarty->fetch($tpl)); } } ?> smarty3-3.1.13/development/PHPunit/AssignByRefTests.php0000644000175000017500000000243211734371724021430 0ustar mikemikesmarty = SmartyTests::$smarty; $this->smartyBC = SmartyTests::$smartyBC; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test simple assignByRef */ public function testSimpleAssignByRef() { $bar = 'bar'; $this->smarty->assignByRef('foo', $bar); $bar = 'newbar'; $this->assertEquals('newbar', $this->smarty->fetch('eval:{$foo}')); } /** * test Smarty2 assign_By_Ref */ public function testSmarty2AssignByRef() { $bar = 'bar'; $this->smartyBC->assign_by_ref('foo', $bar); $bar = 'newbar'; $this->assertEquals('newbar', $this->smartyBC->fetch('eval:{$foo}')); } /** * test Smarty2's behaviour of assign_By_Ref (Issue 88) */ public function testSmarty2AssignByRef2() { $bar = 'bar'; $this->smartyBC->assign_by_ref('foo', $bar); $this->smartyBC->fetch('eval:{$foo = "newbar"}'); $this->assertEquals('newbar', $bar); } } ?> smarty3-3.1.13/development/PHPunit/PluginModifierEscapeTests.php0000644000175000017500000002242311673427331023312 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } public function testHtml() { $tpl = $this->smarty->createTemplate('eval:{"I\'m some to ä be \"escaped\" or ©"|escape:"html"}'); $this->assertEquals("I'm some <html> to ä be "escaped" or &copy;", $this->smarty->fetch($tpl)); } public function testHtmlWithoutMbstring() { Smarty::$_MBSTRING = false; $tpl = $this->smarty->createTemplate('eval:{"I\'m some to ä be \"escaped\" or ©"|escape:"html"}'); $this->assertEquals("I'm some <html> to ä be "escaped" or &copy;", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testHtmlDouble() { $tpl = $this->smarty->createTemplate('eval:{"I\'m some to ä be \"escaped\" or ©"|escape:"html":null:false}'); $this->assertEquals("I'm some <html> to ä be "escaped" or ©", $this->smarty->fetch($tpl)); } public function testHtmlDoubleWithoutMbstring() { Smarty::$_MBSTRING = false; $tpl = $this->smarty->createTemplate('eval:{"I\'m some to ä be \"escaped\" or ©"|escape:"html":null:false}'); $this->assertEquals("I'm some <html> to ä be "escaped" or ©", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testHtmlall() { $tpl = $this->smarty->createTemplate('eval:{"I\'m some to ä be \"escaped\" or ©"|escape:"htmlall"}'); $this->assertEquals("I'm some <html> to ä be "escaped" or &copy;", $this->smarty->fetch($tpl)); } public function testHtmlallWithoutMbstring() { Smarty::$_MBSTRING = false; $tpl = $this->smarty->createTemplate('eval:{"I\'m some to ä be \"escaped\" or ©"|escape:"htmlall"}'); $this->assertEquals("I'm some <html> to ä be "escaped" or &copy;", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testHtmlallDouble() { $tpl = $this->smarty->createTemplate('eval:{"I\'m some to ä be \"escaped\" or ©"|escape:"htmlall":null:false}'); $this->assertEquals("I'm some <html> to ä be "escaped" or ©", $this->smarty->fetch($tpl)); } public function testHtmlallDoubleWithoutMbstring() { Smarty::$_MBSTRING = false; $tpl = $this->smarty->createTemplate('eval:{"I\'m some to ä be \"escaped\" or ©"|escape:"htmlall":null:false}'); $this->assertEquals("I'm some <html> to ä be "escaped" or ©", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testUrl() { $tpl = $this->smarty->createTemplate('eval:{"http://some.encoded.com/url?parts#foo"|escape:"url"}'); $this->assertEquals("http%3A%2F%2Fsome.encoded.com%2Furl%3Fparts%23foo", $this->smarty->fetch($tpl)); } public function testUrlWithoutMbstring() { Smarty::$_MBSTRING = false; $tpl = $this->smarty->createTemplate('eval:{"http://some.encoded.com/url?parts#foo"|escape:"url"}'); $this->assertEquals("http%3A%2F%2Fsome.encoded.com%2Furl%3Fparts%23foo", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testUrlpathinfo() { $tpl = $this->smarty->createTemplate('eval:{"http://some.encoded.com/url?parts#foo"|escape:"urlpathinfo"}'); $this->assertEquals("http%3A//some.encoded.com/url%3Fparts%23foo", $this->smarty->fetch($tpl)); } public function testUrlpathinfoWithoutMbstring() { Smarty::$_MBSTRING = false; $tpl = $this->smarty->createTemplate('eval:{"http://some.encoded.com/url?parts#foo"|escape:"urlpathinfo"}'); $this->assertEquals("http%3A//some.encoded.com/url%3Fparts%23foo", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testHex() { $tpl = $this->smarty->createTemplate('eval:{"a/cäa"|escape:"hex"}'); $this->assertEquals("%61%2f%63%c3%a4%61", $this->smarty->fetch($tpl)); } public function testHexWithoutMbstring() { Smarty::$_MBSTRING = false; $tpl = $this->smarty->createTemplate('eval:{"a/cäa"|escape:"hex"}'); $this->assertEquals("%61%2f%63%c3%a4%61", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testHexentity() { $q = "aäЗдравсствуйте"; $r = html_entity_decode($q, ENT_NOQUOTES, 'UTF-8'); $tpl = $this->smarty->createTemplate('eval:{"' . $r . '"|escape:"hexentity"}'); $this->assertEquals("aäЗдравсствуйте", $this->smarty->fetch($tpl)); $tpl = $this->smarty->createTemplate('eval:{"abc"|escape:"hexentity"}'); $this->assertEquals("abc", $this->smarty->fetch($tpl)); } public function testHexentityWithoutMbstring() { Smarty::$_MBSTRING = false; $q = "aäЗдравсствуйте"; $r = html_entity_decode($q, ENT_NOQUOTES, 'UTF-8'); $tpl = $this->smarty->createTemplate('eval:{"' . $r . '"|escape:"hexentity"}'); $this->assertNotEquals("aäЗдравсствуйте", $this->smarty->fetch($tpl)); $tpl = $this->smarty->createTemplate('eval:{"abc"|escape:"hexentity"}'); $this->assertEquals("abc", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testDecentity() { $q = "aäЗдравсствуйте"; $r = html_entity_decode($q, ENT_NOQUOTES, 'UTF-8'); $tpl = $this->smarty->createTemplate('eval:{"' . $r . '"|escape:"decentity"}'); $this->assertEquals("aäЗдравсствуйте", $this->smarty->fetch($tpl)); $tpl = $this->smarty->createTemplate('eval:{"abc"|escape:"decentity"}'); $this->assertEquals("abc", $this->smarty->fetch($tpl)); } public function testDecentityWithoutMbstring() { Smarty::$_MBSTRING = false; $q = "aäЗдравсствуйте"; $r = html_entity_decode($q, ENT_NOQUOTES, 'UTF-8'); $tpl = $this->smarty->createTemplate('eval:{"' . $r . '"|escape:"decentity"}'); $this->assertNotEquals("aäЗдравсствуйте", $this->smarty->fetch($tpl)); $tpl = $this->smarty->createTemplate('eval:{"abc"|escape:"decentity"}'); $this->assertEquals("abc", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testJavascript() { $tpl = $this->smarty->createTemplate('eval:{"var x = { foo : \"bar\n\" };"|escape:"javascript"}'); $this->assertEquals("var x = { foo : \\\"bar\\n\\\" };", $this->smarty->fetch($tpl)); } public function testJavascriptWithoutMbstring() { Smarty::$_MBSTRING = false; $tpl = $this->smarty->createTemplate('eval:{"var x = { foo : \"bar\n\" };"|escape:"javascript"}'); $this->assertEquals("var x = { foo : \\\"bar\\n\\\" };", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testMail() { $tpl = $this->smarty->createTemplate('eval:{"smarty@example.com"|escape:"mail"}'); $this->assertEquals("smarty [AT] example [DOT] com", $this->smarty->fetch($tpl)); } public function testMailWithoutMbstring() { Smarty::$_MBSTRING = false; $tpl = $this->smarty->createTemplate('eval:{"smarty@example.com"|escape:"mail"}'); $this->assertEquals("smarty [AT] example [DOT] com", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testNonstd() { $tpl = $this->smarty->createTemplate('eval:{"sma\'rty|»example«.com"|escape:"nonstd"}'); $this->assertEquals("sma'rty|»example«.com", $this->smarty->fetch($tpl)); } public function testNonstdWithoutMbstring() { Smarty::$_MBSTRING = false; $tpl = $this->smarty->createTemplate('eval:{"' . utf8_decode('sma\'rty@»example«.com') . '"|escape:"nonstd"}'); $this->assertEquals("sma'rty@»example«.com", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } } ?>smarty3-3.1.13/development/PHPunit/templates_4/0000755000175000017500000000000012141655567017743 5ustar mikemikesmarty3-3.1.13/development/PHPunit/templates_4/extendsall.tpl0000644000175000017500000000017111634664106022621 0ustar mikemike{block name="alpha"}templates_4{/block} {block name="bravo"}templates_4{/block} {block name="charlie"}templates_4{/block}smarty3-3.1.13/development/PHPunit/templates_4/dirname.tpl0000644000175000017500000000001311634664106022070 0ustar mikemiketemplates_4smarty3-3.1.13/development/PHPunit/smartytests.php0000644000175000017500000001147011757464743020646 0ustar mikemikesetTemplateDir('.' . DS . 'templates' . DS); $smarty->setCompileDir('.' . DS . 'templates_c' . DS); $smarty->setPluginsDir(SMARTY_PLUGINS_DIR); $smarty->setCacheDir('.' . DS . 'cache' . DS); $smarty->setConfigDir('.' . DS . 'configs' . DS); $smarty->template_objects = array(); $smarty->config_vars = array(); Smarty::$global_tpl_vars = array(); $smarty->template_functions = array(); $smarty->tpl_vars = array(); $smarty->force_compile = false; $smarty->force_cache = false; $smarty->auto_literal = true; $smarty->caching = false; $smarty->debugging = false; Smarty::$_smarty_vars = array(); $smarty->registered_plugins = array(); $smarty->default_plugin_handler_func = null; $smarty->registered_objects = array(); $smarty->default_modifiers = array(); $smarty->registered_filters = array(); $smarty->autoload_filters = array(); $smarty->escape_html = false; $smarty->use_sub_dirs = false; $smarty->config_overwrite = true; $smarty->config_booleanize = true; $smarty->config_read_hidden = true; $smarty->security_policy = null; $smarty->left_delimiter = '{'; $smarty->right_delimiter = '}'; $smarty->php_handling = Smarty::PHP_PASSTHRU; $smarty->enableSecurity(); $smarty->error_reporting = null; $smarty->error_unassigned = true; $smarty->caching_type = 'file'; $smarty->cache_locking = false; $smarty->cache_id = null; $smarty->compile_id = null; $smarty->default_resource_type = 'file'; } public static function init() { error_reporting(E_ALL | E_STRICT); self::_init(SmartyTests::$smarty); self::_init(SmartyTests::$smartyBC); Smarty_Resource::$sources = array(); Smarty_Resource::$compileds = array(); // Smarty_Resource::$resources = array(); SmartyTests::$smartyBC->registerPlugin('block','php','smarty_php_tag'); } /** * look for test units and run them */ public static function suite() { $testorder = array('CoreTests', 'ClearCompiledTests', 'ClearCacheTests', 'StringResourceTests', 'FileResourceTests' ,'DoubleQuotedStringTests', 'CompileAssignTests', 'AttributeTests'); $smarty_libs_dir = dirname(__FILE__) . '/../../distribution/libs'; if (method_exists('PHPUnit_Util_Filter', $smarty_libs_dir)) { // Older versions of PHPUnit did not have this function, // which is used when determining which PHP files are // included in the PHPUnit code coverage result. PHPUnit_Util_Filter::addDirectoryToWhitelist($smarty_libs_dir); PHPUnit_Util_Filter::removeDirectoryFromWhitelist('./'); // PHPUnit_Util_Filter::addDirectoryToWhitelist('../libs/plugins'); } $suite = new self('Smarty 3 - Unit Tests Report'); // load test which should run in specific order foreach ($testorder as $class) { require_once $class . '.php'; $suite->addTestSuite($class); } $_classes = array(); foreach (new DirectoryIterator(dirname(__FILE__)) as $file) { if (!$file->isDot() && !$file->isDir() && (string) $file !== 'smartytests.php' && (string) $file !== 'smartytestssingle.php' && (string) $file !== 'smartytestsfile.php' && substr((string) $file, -4) === '.php') { $class = basename($file, '.php'); if (!in_array($class, $testorder)) { require_once $file->getPathname(); // to have an optional test suite, it should implement a public static function isRunnable // that returns true only if all the conditions are met to run it successfully, for example // it can check that an external library is present if (!method_exists($class, 'isRunnable') || call_user_func(array($class, 'isRunnable'))) { $_classes[] = $class; } } } } sort($_classes); foreach ($_classes as $class) { $suite->addTestSuite($class); } return $suite; } } ?>smarty3-3.1.13/development/PHPunit/ArrayTests.php0000644000175000017500000000756011467061362020336 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test simple array definition */ public function testSimpleArrayDefinition() { $tpl = $this->smarty->createTemplate('eval:{$foo=[1,2,3,4,5]}{foreach $foo as $bar}{$bar}{/foreach}'); $this->assertEquals('12345', $this->smarty->fetch($tpl)); } /** * test smarty2 array access */ public function testSmarty2ArrayAccess() { $tpl = $this->smarty->createTemplate('eval:{$foo=[1,2,3,4,5]}{$foo.0}{$foo.1}{$foo.2}'); $this->assertEquals('123', $this->smarty->fetch($tpl)); } /** * test smarty3 array access */ public function testSmarty3ArrayAccess() { $tpl = $this->smarty->createTemplate('eval:{$foo=[1,2,3,4,5]}{$foo[0]}{$foo[1]}{$foo[2]}'); $this->assertEquals('123', $this->smarty->fetch($tpl)); } /** * test indexed array definition */ public function testIndexedArrayDefinition() { $tpl = $this->smarty->createTemplate('eval:{$x=\'d\'}{$foo=[a=>1,\'b\'=>2,"c"=>3,$x=>4]}{$foo[\'a\']}{$foo[\'b\']}{$foo[\'c\']}{$foo[\'d\']}'); $this->assertEquals('1234', $this->smarty->fetch($tpl)); } /** * test nested array */ public function testNestedArray() { $tpl = $this->smarty->createTemplate('eval:{$foo=[1,2,[a,b,c],4,5]}{$foo[2][1]}'); $this->assertEquals('b', $this->smarty->fetch($tpl)); } /** * test array math */ public function testArrayMath1() { $tpl = $this->smarty->createTemplate('eval:{$foo=[1,2,[7,8,9],4,5]}{$foo[2][1]+1}'); $this->assertEquals('9', $this->smarty->fetch($tpl)); } public function testArrayMath2() { $tpl = $this->smarty->createTemplate('eval:{$foo=[1,2,[7,8,9],4,5]}{$foo.2.1+1}'); $this->assertEquals('9', $this->smarty->fetch($tpl)); } public function testArrayMath3() { $tpl = $this->smarty->createTemplate('eval:{$foo=[1,2,[7,8,9],4,5]}{2+$foo[2][1]}'); $this->assertEquals('10', $this->smarty->fetch($tpl)); } public function testArrayMath4() { $tpl = $this->smarty->createTemplate('eval:{$foo=[1,2,[7,8,9],4,5]}{2+$foo.2.1}'); $this->assertEquals('10', $this->smarty->fetch($tpl)); } public function testArrayMath5() { $tpl = $this->smarty->createTemplate('eval:{$foo=[1,2,[7,8,9],4,5]}{$foo[2][0]+$foo[2][1]}'); $this->assertEquals('15', $this->smarty->fetch($tpl)); } public function testArrayMath6() { $tpl = $this->smarty->createTemplate('eval:{$foo=[1,2,[7,8,9],4,5]}{$foo.2.0+$foo.2.1}'); $this->assertEquals('15', $this->smarty->fetch($tpl)); } public function testArrayVariableIndex1() { $tpl = $this->smarty->createTemplate('eval:{$foo=[1,2,[7,8,9],4,5]}{$x=2}{$y=0}{$foo.$x.$y}'); $this->assertEquals('7', $this->smarty->fetch($tpl)); } public function testArrayVariableIndex2() { $tpl = $this->smarty->createTemplate('eval:{$foo=[1,2,[7,8,9],4,5]}{$x=2}{$foo.$x.0}'); $this->assertEquals('7', $this->smarty->fetch($tpl)); } public function testArrayVariableIndex3() { $tpl = $this->smarty->createTemplate('eval:{$foo=[1,2,[7,8,9],4,5]}{$x=0}{$foo.2.$x}'); $this->assertEquals('7', $this->smarty->fetch($tpl)); } public function testArrayVariableIndex4() { $tpl = $this->smarty->createTemplate('eval:{$foo=[1,2,[7,8,9],4,5]}{$x=[1,0]}{$foo.2.{$x.1}}'); $this->assertEquals('7', $this->smarty->fetch($tpl)); } } ?> smarty3-3.1.13/development/PHPunit/scripts/0000755000175000017500000000000012141655567017211 5ustar mikemikesmarty3-3.1.13/development/PHPunit/scripts/script_compiler_function_tag.php0000644000175000017500000000024011634664106025647 0ustar mikemike"; } ?> smarty3-3.1.13/development/PHPunit/scripts/script_default_static_modifier.php0000644000175000017500000000026412001634534026143 0ustar mikemike smarty3-3.1.13/development/PHPunit/scripts/script_block_tag.php0000644000175000017500000000025011634664106023223 0ustar mikemike smarty3-3.1.13/development/PHPunit/scripts/script_function_tag.php0000644000175000017500000000017311634664106023762 0ustar mikemike smarty3-3.1.13/development/PHPunit/scripts/script_modifier.php0000644000175000017500000000014211724226376023077 0ustar mikemike smarty3-3.1.13/development/PHPunit/scripts/test_include_php.php0000644000175000017500000000004311277263300023235 0ustar mikemike smarty3-3.1.13/development/PHPunit/cache/0000755000175000017500000000000012141655567016565 5ustar mikemikesmarty3-3.1.13/development/PHPunit/RegisteredResourceTests.php0000644000175000017500000000603711757464743023077 0ustar mikemikeresource * * @package PHPunit * @author Uwe Tews */ /** * class for register->resource tests */ class RegisteredResourceTests extends PHPUnit_Framework_TestCase { public function setUp() { $this->smarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->registerResource("rr", array("rr_get_template", "rr_get_timestamp", "rr_get_secure", "rr_get_trusted")); } public static function isRunnable() { return true; } /** * test resource plugin rendering */ public function testResourcePlugin() { $this->assertEquals('hello world', $this->smarty->fetch('rr:test')); } public function testClearCompiledResourcePlugin() { $this->assertEquals(1, $this->smarty->clearCompiledTemplate('rr:test')); } /** * test resource plugin timesatmp */ public function testResourcePluginTimestamp() { $tpl = $this->smarty->createTemplate('rr:test'); $this->assertTrue(is_integer($tpl->source->timestamp)); $this->assertEquals(10, strlen($tpl->source->timestamp)); } /** * test compile_id change */ public function testResourceCompileIdChange() { $this->smarty->registerResource('myresource', array('getSource','getTimestamp','getSecure','getTrusted')); $this->smarty->compile_id = 'a'; $this->assertEquals('this is template 1', $this->smarty->fetch('myresource:some')); $this->assertEquals('this is template 1', $this->smarty->fetch('myresource:some')); $this->smarty->compile_id = 'b'; $this->assertEquals('this is template 2', $this->smarty->fetch('myresource:some')); $this->assertEquals('this is template 2', $this->smarty->fetch('myresource:some')); } } /** * resource functions */ function rr_get_template ($tpl_name, &$tpl_source, $smarty_obj) { // populating $tpl_source $tpl_source = '{$x="hello world"}{$x}'; return true; } function rr_get_timestamp($tpl_name, &$tpl_timestamp, $smarty_obj) { // $tpl_timestamp. $tpl_timestamp = (int)floor(time() / 100) * 100; return true; } function rr_get_secure($tpl_name, $smarty_obj) { // assume all templates are secure return true; } function rr_get_trusted($tpl_name, $smarty_obj) { // not used for templates } // resource functions for compile_id change test function getSecure($name, $smarty) { return true; } function getTrusted($name, $smarty) { } function getSource($name, &$source, $smarty) { // we update a counter, so that we return a new source for every call static $counter = 0; $counter++; // construct a new source $source = "this is template $counter"; return true; } function getTimestamp($name, &$timestamp, $smarty) { // always pretend the template is brand new $timestamp = time(); return true; } ?>smarty3-3.1.13/development/PHPunit/CompileRegisteredObjectFunctionTests.php0000644000175000017500000000457411634664106025526 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->force_compile = true; $this->smarty->disableSecurity(); $this->object = new RegObject; $this->smarty->registerObject('objecttest', $this->object, 'myhello', true, 'myblock'); } public static function isRunnable() { return true; } /** * test resgistered object as function */ public function testRegisteredObjectFunction() { $tpl = $this->smarty->createTemplate('eval:{objecttest->myhello}'); $this->assertEquals('hello world', $this->smarty->fetch($tpl)); } /** * test resgistered object as function with modifier */ public function testRegisteredObjectFunctionModifier() { $tpl = $this->smarty->createTemplate('eval:{objecttest->myhello|truncate:6}'); $this->assertEquals('hel...', $this->smarty->fetch($tpl)); } /** * test resgistered object as block function */ public function testRegisteredObjectBlockFunction() { $tpl = $this->smarty->createTemplate('eval:{objecttest->myblock}hello world{/objecttest->myblock}'); $this->assertEquals('block test', $this->smarty->fetch($tpl)); } public function testRegisteredObjectBlockFunctionModifier1() { $tpl = $this->smarty->createTemplate('eval:{objecttest->myblock}hello world{/objecttest->myblock|strtoupper}'); $this->assertEquals(strtoupper('block test'), $this->smarty->fetch($tpl)); } public function testRegisteredObjectBlockFunctionModifier2() { $tpl = $this->smarty->createTemplate('eval:{objecttest->myblock}hello world{/objecttest->myblock|default:""|strtoupper}'); $this->assertEquals(strtoupper('block test'), $this->smarty->fetch($tpl)); } } Class RegObject { function myhello($params) { return 'hello world'; } function myblock($params, $content, &$smarty_tpl, &$repeat) { if (isset($content)) { $output = str_replace('hello world', 'block test', $content); return $output; } } } ?>smarty3-3.1.13/development/PHPunit/CompileIncludePhpTests.php0000644000175000017500000000324411634664106022620 0ustar mikemikesmartyBC = SmartyTests::$smartyBC; SmartyTests::init(); $this->smartyBC->force_compile = true; } public static function isRunnable() { return true; } /** * test include_php string file_name function */ public function testIncludePhpStringFileName() { $this->smartyBC->disableSecurity(); $tpl = $this->smartyBC->createTemplate("eval:start {include_php file='scripts/test_include_php.php'} end"); $result= $this->smartyBC->fetch($tpl); $this->assertContains("test include php", $result); } /** * test include_php string file_name function */ public function testIncludePhpVariableFileName() { $this->smartyBC->disableSecurity(); $tpl = $this->smartyBC->createTemplate('eval:start {include_php file=$filename once=false} end'); $tpl->assign('filename','scripts/test_include_php.php'); $result= $this->smartyBC->fetch($tpl); $this->assertContains("test include php", $result); } public function testIncludePhpVariableFileNameShortag() { $this->smartyBC->disableSecurity(); $tpl = $this->smartyBC->createTemplate('eval:start {include_php $filename once=false} end'); $tpl->assign('filename','scripts/test_include_php.php'); $result= $this->smartyBC->fetch($tpl); $this->assertContains("test include php", $result); } } ?>smarty3-3.1.13/development/PHPunit/CompileInsertTests.php0000644000175000017500000001313312044502270022014 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->addPluginsDir(dirname(__FILE__)."/PHPunitplugins/"); } public static function isRunnable() { return true; } /** * test inserted function */ public function testInsertFunctionSingle() { $tpl = $this->smarty->createTemplate("eval:start {insert name='test' foo='bar'} end"); $this->assertEquals("start insert function parameter value bar end", $this->smarty->fetch($tpl)); } public function testInsertFunctionDouble() { $tpl = $this->smarty->createTemplate("eval:start {insert name=\"test\" foo='bar'} end"); $this->assertEquals("start insert function parameter value bar end", $this->smarty->fetch($tpl)); } public function testInsertFunctionVariableName() { $tpl = $this->smarty->createTemplate("eval:start {insert name=\$variable foo='bar'} end"); $tpl->assign('variable', 'test'); $this->assertEquals("start insert function parameter value bar end", $this->smarty->fetch($tpl)); } /** * test insert plugin */ public function testInsertPlugin() { global $insertglobal; $insertglobal = 'global'; $tpl = $this->smarty->createTemplate('insertplugintest.tpl'); $tpl->assign('foo', 'bar'); $this->assertEquals('param foo bar globalvar global', $this->smarty->fetch($tpl)); } /** * test insert plugin caching */ public function testInsertPluginCaching1() { global $insertglobal; $insertglobal = 'global'; $this->smarty->caching = true; $tpl = $this->smarty->createTemplate('insertplugintest.tpl'); $tpl->assign('foo', 'bar'); $this->assertEquals('param foo bar globalvar global', $this->smarty->fetch($tpl)); } public function testInsertPluginCaching2() { global $insertglobal; $insertglobal = 'changed global 2'; $this->smarty->caching = 1; $tpl = $this->smarty->createTemplate('insertplugintest.tpl'); $tpl->assign('foo', 'buh'); $this->assertTrue($tpl->isCached()); $this->assertEquals('param foo bar globalvar changed global 2', $this->smarty->fetch($tpl)); } public function testInsertPluginCaching3() { global $insertglobal; $insertglobal = 'changed global'; $this->smarty->caching = 1; $this->smarty->force_compile = true; $this->smarty->assign('foo', 'bar',true); $this->assertEquals('param foo bar globalvar changed global', $this->smarty->fetch('insertplugintest.tpl')); } public function testInsertPluginCaching4() { global $insertglobal; if (false) { //disabled $insertglobal = 'changed global 4'; $this->smarty->caching = 1; $this->smarty->assign('foo', 'buh',true); $this->assertTrue($this->smarty->isCached('insertplugintest.tpl')); $this->assertEquals('param foo buh globalvar changed global 4', $this->smarty->fetch('insertplugintest.tpl')); } } /** * test inserted function with assign */ public function testInsertFunctionAssign() { $tpl = $this->smarty->createTemplate("eval:start {insert name='test' foo='bar' assign=blar} end {\$blar}"); $this->assertEquals("start end insert function parameter value bar", $this->smarty->fetch($tpl)); } /** * test insertfunction with assign no output */ public function testInsertFunctionAssignNoOutput() { $tpl = $this->smarty->createTemplate("eval:start {insert name='test' foo='bar' assign=blar} end"); $this->assertEquals("start end", $this->smarty->fetch($tpl)); } /** * test insert plugin with assign */ public function testInsertPluginAssign() { global $insertglobal; $insertglobal = 'global'; $tpl = $this->smarty->createTemplate("eval:start {insert name='insertplugintest' foo='bar' assign=blar} end {\$blar}"); $tpl->assign('foo', 'bar'); $this->assertEquals('start end param foo bar globalvar global', $this->smarty->fetch($tpl)); } /** * test inserted function none existing function */ public function testInsertFunctionNoneExistingFunction() { $tpl = $this->smarty->createTemplate("eval:start {insert name='mustfail' foo='bar' assign=blar} end {\$blar}"); try { $this->smarty->fetch($tpl); } catch (Exception $e) { $this->assertContains(htmlentities("{insert} no function or plugin found for 'mustfail'"), $e->getMessage()); return; } $this->fail('Exception for "function is not callable" has not been raised.'); } /** * test inserted function none existing script */ public function testInsertFunctionNoneExistingScript() { $tpl = $this->smarty->createTemplate("eval:{insert name='mustfail' foo='bar' script='nofile.php'}"); try { $this->smarty->fetch($tpl); } catch (Exception $e) { $this->assertContains(htmlentities('missing script file'), $e->getMessage()); return; } $this->fail('Exception for "missing file" has not been raised.'); } } /** * test function */ function insert_test($params) { return "insert function parameter value $params[foo]"; } ?>smarty3-3.1.13/development/PHPunit/MathTests.php0000644000175000017500000000733211643123436020143 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test PHP function as modifier */ public function testSyntax() { $this->smarty->disableSecurity(); $expected = "20 -- 4"; $tpl = $this->smarty->createTemplate('eval:{$x = 4}{$y = 5}{$x * $y} -- {20 / 5}'); $this->assertEquals($expected, $this->smarty->fetch($tpl)); } public function testFunction() { $this->smarty->disableSecurity(); $expected = "20 -- 4"; $tpl = $this->smarty->createTemplate('eval:{$x = 4}{$y = 5}{math equation="x * y" x=$x y=$y} -- {math equation="20 / 5"}'); $this->assertEquals($expected, $this->smarty->fetch($tpl)); } public function testSyntaxSin() { $this->smarty->disableSecurity(); $expected = sin(4) . ' -- ' . sin(4); $tpl = $this->smarty->createTemplate('eval:{$x = 4}{$x|sin} -- {$y = sin($x)}{$y}'); $this->assertEquals($expected, $this->smarty->fetch($tpl)); } public function testFunctionSin() { $this->smarty->disableSecurity(); $expected = sin(4) . ' -- ' . sin(4); $tpl = $this->smarty->createTemplate('eval:{$x = 4}{math equation="sin(x)" x=$x} -- {math equation="sin(x)" x=$x assign="y"}{$y}'); $this->assertEquals($expected, $this->smarty->fetch($tpl)); } public function testSyntaxFloat() { $this->smarty->disableSecurity(); $expected = "22 -- 4.1"; $tpl = $this->smarty->createTemplate('eval:{$x = 4}{$y = 5.5}{$x * $y} -- {20.5 / 5}'); $this->assertEquals($expected, $this->smarty->fetch($tpl)); } public function testFunctionFloat() { $this->smarty->disableSecurity(); $expected = "22 -- 4.1"; $tpl = $this->smarty->createTemplate('eval:{$x = 4}{$y = 5.5}{math equation="x * y" x=$x y=$y} -- {math equation="20.5 / 5"}'); $this->assertEquals($expected, $this->smarty->fetch($tpl)); } public function testSyntaxFormat() { $this->smarty->disableSecurity(); $expected = "22.00 -- 4.10"; $tpl = $this->smarty->createTemplate('eval:{$x = 4}{$y = 5.5}{$z = $x * $y}{"%0.2f"|sprintf:$z} -- {$x = 20.5}{$y = 5}{$z = $x / $y}{"%0.2f"|sprintf:$z}'); $this->assertEquals($expected, $this->smarty->fetch($tpl)); } public function testFunctionFormat() { $this->smarty->disableSecurity(); $expected = "22.00 -- 4.10"; $tpl = $this->smarty->createTemplate('eval:{$x = 4}{$y = 5.5}{math equation="x * y" x=$x y=$y format="%0.2f"} -- {math equation="20.5 / 5" format="%0.2f"}'); $this->assertEquals($expected, $this->smarty->fetch($tpl)); } public function testSyntaxString() { $this->smarty->disableSecurity(); $expected = "22.00 -- 4.10"; $tpl = $this->smarty->createTemplate('eval:{$x = "4"}{$y = "5.5"}{$z = $x * $y}{"%0.2f"|sprintf:$z} -- {$x = "20.5"}{$y = "5"}{$z = $x / $y}{"%0.2f"|sprintf:$z}'); $this->assertEquals($expected, $this->smarty->fetch($tpl)); } public function testFunctionString() { $this->smarty->disableSecurity(); $expected = "22.00 -- 4.10"; $tpl = $this->smarty->createTemplate('eval:{$x = "4"}{$y = "5.5"}{math equation="x * y" x=$x y=$y format="%0.2f"} -- {math equation="20.5 / 5" format="%0.2f"}'); $this->assertEquals($expected, $this->smarty->fetch($tpl)); } } ?>smarty3-3.1.13/development/PHPunit/CompileForeachTests.php0000644000175000017500000002227311471273555022142 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test {foreach} tag */ public function testForeach() { $tpl = $this->smarty->createTemplate('eval:{assign var=foo value=[0,1,2,3,4,5,6,7,8,9]}{foreach item=x from=$foo}{$x}{/foreach}'); $this->assertEquals("0123456789", $this->smarty->fetch($tpl)); } public function testForeachBreak() { $tpl = $this->smarty->createTemplate('eval:{assign var=foo value=[0,1,2,3,4,5,6,7,8,9]}{foreach item=x from=$foo}{if $x == 2}{break}{/if}{$x}{/foreach}'); $this->assertEquals("01", $this->smarty->fetch($tpl)); } public function testForeachContinue() { $tpl = $this->smarty->createTemplate('eval:{assign var=foo value=[0,1,2,3,4,5,6,7,8,9]}{foreach item=x from=$foo}{if $x == 2}{continue}{/if}{$x}{/foreach}'); $this->assertEquals("013456789", $this->smarty->fetch($tpl)); } public function testForeachNotElse() { $tpl = $this->smarty->createTemplate('eval:{assign var=foo value=[0,1,2,3,4,5,6,7,8,9]}{foreach item=x from=$foo}{$x}{foreachelse}else{/foreach}'); $this->assertEquals("0123456789", $this->smarty->fetch($tpl)); } public function testForeachElse() { $this->smarty->error_reporting = error_reporting() & ~(E_NOTICE|E_USER_NOTICE); $tpl = $this->smarty->createTemplate('eval:{foreach item=x from=$foo}{$x}{foreachelse}else{/foreach}'); $this->assertEquals("else", $this->smarty->fetch($tpl)); } public function testForeachKey() { $tpl = $this->smarty->createTemplate('eval:{foreach item=x key=y from=[9,8,7,6,5,4,3,2,1,0]}{$y}{$x}{foreachelse}else{/foreach}'); $this->assertEquals("09182736455463728190", $this->smarty->fetch($tpl)); } public function testForeachKeyProperty() { $tpl = $this->smarty->createTemplate('eval:{foreach item=x from=[9,8,7,6,5,4,3,2,1,0]}{$x@key}{$x}{foreachelse}else{/foreach}'); $this->assertEquals("09182736455463728190", $this->smarty->fetch($tpl)); } public function testForeachTotal() { $tpl = $this->smarty->createTemplate('eval:{foreach item=x name=foo from=[0,1,2,3,4,5,6,7,8,9]}{$x}{foreachelse}else{/foreach}total{$smarty.foreach.foo.total}'); $this->assertEquals("0123456789total10", $this->smarty->fetch($tpl)); } public function testForeachTotalProperty() { $tpl = $this->smarty->createTemplate('eval:{foreach item=x from=[0,1,2,3,4,5,6,7,8,9]}{$x}{foreachelse}else{/foreach}total{$x@total}'); $this->assertEquals("0123456789total10", $this->smarty->fetch($tpl)); } public function testForeachIndexIteration() { $tpl = $this->smarty->createTemplate('eval:{foreach item=x name=foo from=[0,1,2,3,4,5,6,7,8,9]}{$smarty.foreach.foo.index}{$smarty.foreach.foo.iteration}{foreachelse}else{/foreach}'); $this->assertEquals("011223344556677889910", $this->smarty->fetch($tpl)); } public function testForeachIndexIterationProperty() { $tpl = $this->smarty->createTemplate('eval:{foreach item=x from=[0,1,2,3,4,5,6,7,8,9]}{$x@index}{$x@iteration}{foreachelse}else{/foreach}'); $this->assertEquals("011223344556677889910", $this->smarty->fetch($tpl)); } public function testForeachFirstLast() { $tpl = $this->smarty->createTemplate('eval:{foreach item=x name=foo from=[0,1,2,3,4,5,6,7,8,9]}{if $smarty.foreach.foo.first}first{/if}{if $smarty.foreach.foo.last}last{/if}{$x}{foreachelse}else{/foreach}'); $this->assertEquals("first012345678last9", $this->smarty->fetch($tpl)); } public function testForeachFirstLastProperty() { $tpl = $this->smarty->createTemplate('eval:{foreach item=x name=foo from=[0,1,2,3,4,5,6,7,8,9]}{if $x@first}first{/if}{if $x@last}last{/if}{$x}{foreachelse}else{/foreach}'); $this->assertEquals("first012345678last9", $this->smarty->fetch($tpl)); } public function testForeachShowTrue() { $tpl = $this->smarty->createTemplate('eval:{foreach item=x name=foo from=[0,1]}{$x}{foreachelse}else{/foreach}{if $smarty.foreach.foo.show}show{else}noshow{/if}'); $this->assertEquals("01show", $this->smarty->fetch($tpl)); } public function testForeachShowTrueProperty() { $tpl = $this->smarty->createTemplate('eval:{foreach item=x name=foo from=[0,1]}{$x}{foreachelse}else{/foreach}{if $x@show}show{else}noshow{/if}'); $this->assertEquals("01show", $this->smarty->fetch($tpl)); } public function testForeachShowFalse() { $tpl = $this->smarty->createTemplate('eval:{foreach item=x name=foo from=[]}{$x}{foreachelse}else{/foreach}{if $smarty.foreach.foo.show}show{else} noshow{/if}'); $this->assertEquals("else noshow", $this->smarty->fetch($tpl)); } public function testForeachShowFalseProperty() { $tpl = $this->smarty->createTemplate('eval:{foreach item=x name=foo from=[]}{$x}{foreachelse}else{/foreach}{if $x@show}show{else} noshow{/if}'); $this->assertEquals("else noshow", $this->smarty->fetch($tpl)); } public function testForeachShorttags() { $tpl = $this->smarty->createTemplate('eval:{foreach [9,8,7,6,5,4,3,2,1,0] x y foo}{$y}{$x}{foreachelse}else{/foreach}total{$smarty.foreach.foo.total}'); $this->assertEquals("09182736455463728190total10", $this->smarty->fetch($tpl)); } /** * test {foreach $foo as $x} tag */ public function testNewForeach() { $tpl = $this->smarty->createTemplate('eval:{assign var=foo value=[0,1,2,3,4,5,6,7,8,9]}{foreach $foo as $x}{$x}{/foreach}'); $this->assertEquals("0123456789", $this->smarty->fetch($tpl)); } public function testNewForeachNotElse() { $tpl = $this->smarty->createTemplate('eval:{assign var=foo value=[0,1,2,3,4,5,6,7,8,9]}{foreach $foo as $x}{$x}{foreachelse}else{/foreach}'); $this->assertEquals("0123456789", $this->smarty->fetch($tpl)); } public function testNewForeachElse() { $this->smarty->error_reporting = error_reporting() & ~(E_NOTICE|E_USER_NOTICE); $tpl = $this->smarty->createTemplate('eval:{foreach $foo as $x}{$x}{foreachelse}else{/foreach}'); $this->assertEquals("else", $this->smarty->fetch($tpl)); } public function testNewForeachKey() { $tpl = $this->smarty->createTemplate('eval:{assign var=foo value=[9,8,7,6,5,4,3,2,1,0]}{foreach $foo as $y=>$x}{$y}{$x}{foreachelse}else{/foreach}'); $this->assertEquals("09182736455463728190", $this->smarty->fetch($tpl)); } public function testNewForeachKeyProperty() { $tpl = $this->smarty->createTemplate('eval:{assign var=foo value=[9,8,7,6,5,4,3,2,1,0]}{foreach $foo as $x}{$x@key}{$x}{foreachelse}else{/foreach}'); $this->assertEquals("09182736455463728190", $this->smarty->fetch($tpl)); } /* * test foreach and nocache */ public function testForeachNocacheVar1() { $this->smarty->caching = true; $tpl = $this->smarty->createTemplate('string:{foreach $foo as $x}{$x} {/foreach}'); $tpl->assign('foo',array(1,2),true); $this->assertFalse($this->smarty->isCached($tpl)); $this->assertEquals("1 2 ", $this->smarty->fetch($tpl)); } public function testForeachNocacheVar2() { $this->smarty->caching = true; $tpl = $this->smarty->createTemplate('string:{foreach $foo as $x}{$x} {/foreach}'); $tpl->assign('foo',array(9,8),true); $this->assertTrue($this->smarty->isCached($tpl)); $this->assertEquals("9 8 ", $this->smarty->fetch($tpl)); } public function testForeachNocacheTag1() { $this->smarty->caching = true; $tpl = $this->smarty->createTemplate('string:{foreach $foo as $x nocache}{$x} {/foreach}'); $tpl->assign('foo',array(1,2)); $this->assertFalse($this->smarty->isCached($tpl)); $this->assertEquals("1 2 ", $this->smarty->fetch($tpl)); } public function testForeachNocacheTag2() { $this->smarty->caching = true; $tpl = $this->smarty->createTemplate('string:{foreach $foo as $x nocache}{$x} {/foreach}'); $tpl->assign('foo',array(9,8)); $this->assertTrue($this->smarty->isCached($tpl)); $this->assertEquals("9 8 ", $this->smarty->fetch($tpl)); } public function testForeachCache1() { $this->smarty->caching = true; $tpl = $this->smarty->createTemplate('string:{foreach $foo as $x name=bar}{$x} {/foreach}'); $tpl->assign('foo',array(1,2)); $this->assertFalse($this->smarty->isCached($tpl)); $this->assertEquals("1 2 ", $this->smarty->fetch($tpl)); } public function testForeachCache2() { $this->smarty->caching = true; $tpl = $this->smarty->createTemplate('string:{foreach $foo as $x name=bar}{$x} {/foreach}'); $tpl->assign('foo',array(9,8)); $this->assertTrue($this->smarty->isCached($tpl)); $this->assertEquals("1 2 ", $this->smarty->fetch($tpl)); } } ?> smarty3-3.1.13/development/PHPunit/FilterTests.php0000644000175000017500000001111111634664106020471 0ustar mikemikesmarty = SmartyTests::$smarty; $this->smartyBC = SmartyTests::$smartyBC; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test autoload output filter */ public function testAutoloadOutputFilter() { $this->smarty->autoload_filters['output'] = 'trimwhitespace'; $tpl = $this->smarty->createTemplate('eval:{"
hello world"}'); $this->assertEquals("
hello world", $this->smarty->fetch($tpl)); } /** * test autoload variable filter */ public function testAutoloadVariableFilter() { $this->smarty->autoload_filters['variable'] = 'htmlspecialchars'; $tpl = $this->smarty->createTemplate('eval:{""}'); $this->assertEquals("<test>", $this->smarty->fetch($tpl)); } /** * test loaded filter */ public function testLoadedOutputFilter() { $this->smarty->loadFilter(Smarty::FILTER_OUTPUT, 'trimwhitespace'); $tpl = $this->smarty->createTemplate('eval:{"
hello world"}'); $this->assertEquals("
hello world", $this->smarty->fetch($tpl)); } public function testLoadedOutputFilterWrapper() { $this->smartyBC->load_filter(Smarty::FILTER_OUTPUT, 'trimwhitespace'); $tpl = $this->smartyBC->createTemplate('eval:{"
hello world"}'); $this->assertEquals("
hello world", $this->smartyBC->fetch($tpl)); } /** * test registered output filter */ public function testRegisteredOutputFilter() { $this->smarty->registerFilter(Smarty::FILTER_OUTPUT,'myoutputfilter'); $tpl = $this->smarty->createTemplate('eval:{"hello world"}'); $this->assertEquals("hello world", $this->smarty->fetch($tpl)); } public function testRegisteredOutputFilterWrapper() { $this->smartyBC->register_outputfilter('myoutputfilter'); $tpl = $this->smartyBC->createTemplate('eval:{"hello world"}'); $this->assertEquals("hello world", $this->smartyBC->fetch($tpl)); } /** * test registered pre filter */ public function testRegisteredPreFilter() { function myprefilter($input) { return '{$foo}' . $input; } $this->smarty->registerFilter(Smarty::FILTER_PRE,'myprefilter'); $tpl = $this->smarty->createTemplate('eval:{" hello world"}'); $tpl->assign('foo', 'bar'); $this->assertEquals("bar hello world", $this->smarty->fetch($tpl)); } /** * test registered pre filter class */ public function testRegisteredPreFilterClass() { $this->smarty->registerFilter(Smarty::FILTER_PRE,array('myprefilterclass', 'myprefilter')); $tpl = $this->smarty->createTemplate('eval:{" hello world"}'); $tpl->assign('foo', 'bar'); $this->assertEquals("bar hello world", $this->smarty->fetch($tpl)); } /** * test registered post filter */ public function testRegisteredPostFilter() { function mypostfilter($input) { return '{$foo}' . $input; } $this->smarty->registerFilter(Smarty::FILTER_POST,'mypostfilter'); $tpl = $this->smarty->createTemplate('eval:{" hello world"}'); $tpl->assign('foo', 'bar'); $this->assertEquals('{$foo} hello world', $this->smarty->fetch($tpl)); } /** * test variable filter */ public function testLoadedVariableFilter() { $this->smarty->loadFilter("variable", "htmlspecialchars"); $tpl = $this->smarty->createTemplate('eval:{$foo}'); $tpl->assign('foo', ''); $this->assertEquals('<?php ?>', $this->smarty->fetch($tpl)); } /** * test registered post filter */ public function testRegisteredVariableFilter() { function myvariablefilter($input, $smarty) { return 'var{$foo}' . $input; } $this->smarty->registerFilter(Smarty::FILTER_VARIABLE,'myvariablefilter'); $tpl = $this->smarty->createTemplate('eval:{$foo}'); $tpl->assign('foo', 'bar'); $this->assertEquals('var{$foo}bar', $this->smarty->fetch($tpl)); } } function myoutputfilter($input) { return str_replace(' ', ' ', $input); } class myprefilterclass { static function myprefilter($input) { return '{$foo}' . $input; } } ?>smarty3-3.1.13/development/PHPunit/templates_3/0000755000175000017500000000000012141655567017742 5ustar mikemikesmarty3-3.1.13/development/PHPunit/templates_3/extendsall.tpl0000644000175000017500000000023111634664106022615 0ustar mikemike{block name="alpha"}templates_3{/block} {block name="bravo"} {block name="bravo_1"}templates_3{/block} {block name="bravo_2"}templates_3{/block} {/block}smarty3-3.1.13/development/PHPunit/templates_3/dirname.tpl0000644000175000017500000000001311634664106022067 0ustar mikemiketemplates_3smarty3-3.1.13/development/PHPunit/SmartyBcTests.php0000644000175000017500000000114711634664106021000 0ustar mikemikesmartyBC = SmartyTests::$smartyBC; } public static function isRunnable() { return true; } /** * test {php} tag */ public function testSmartyPhpTag() { $this->assertEquals('hello world', $this->smartyBC->fetch('eval:{php} echo "hello world"; {/php}')); } } ?> smarty3-3.1.13/development/PHPunit/OutputFilterTrimWhitespaceTests.php0000644000175000017500000000320711634664106024572 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->clearAllCache(); $this->smarty->clearCompiledTemplate(); $this->smarty->loadFilter('output', 'trimwhitespace'); } public static function isRunnable() { return true; } public function testWhitespace() { $expected = << whitespace
		foobar
	
		foobar
	

EOT; $this->assertEquals($expected, $this->smarty->fetch('whitespace.tpl')); } public function teardown() { $this->smarty->clearAllCache(); $this->smarty->clearCompiledTemplate(); } } ?>smarty3-3.1.13/development/PHPunit/VariableScopeTests.php0000644000175000017500000001542311636153436021776 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->assign('foo', 'bar'); } public static function isRunnable() { return true; } /** * test root variable */ public function testVariableScope1() { $tpl = $this->smarty->createTemplate("eval:{\$foo}", null, null, $this->smarty); $this->assertEquals("bar", $this->smarty->fetch($tpl)); } public function testVariableScope12() { $tpl = $this->smarty->createTemplate("eval:{\$foo}", $this->smarty); $this->assertEquals("bar", $this->smarty->fetch($tpl)); } public function testVariableScope13() { $tpl = $this->smarty->createTemplate("eval:{\$foo}", $this->smarty); $this->assertEquals("bar", $tpl->fetch()); } /** * test root variable with data object chain */ public function testVariableScope2() { $data1 = new Smarty_Data($this->smarty); $data2 = new Smarty_Data($data1); $tpl = $this->smarty->createTemplate("eval:{\$foo}", null, null, $data2); $this->assertEquals("bar", $this->smarty->fetch($tpl)); } public function testVariableScope22() { $data1 = new Smarty_Data($this->smarty); $data2 = new Smarty_Data($data1); $tpl = $this->smarty->createTemplate("eval:{\$foo}", $data2); $this->assertEquals("bar", $this->smarty->fetch($tpl)); } public function testVariableScope23() { $data1 = new Smarty_Data($this->smarty); $data2 = new Smarty_Data($data1); $tpl = $this->smarty->createTemplate("eval:{\$foo}", $data2); $this->assertEquals("bar", $tpl->fetch()); } /** * test overwrite variable with data object chain */ public function testVariableScope3() { $data1 = new Smarty_Data($this->smarty); $data1->assign('foo','newvalue'); $data2 = new Smarty_Data($data1); $tpl = $this->smarty->createTemplate("eval:{\$foo}", null, null, $data2); // must see the new value $this->assertEquals("newvalue", $this->smarty->fetch($tpl)); } public function testVariableScope32() { $data1 = new Smarty_Data($this->smarty); $data2 = new Smarty_Data($data1); $tpl = $this->smarty->createTemplate("eval:{\$foo}", $data2); // must see the old value at root $this->assertEquals("bar", $this->smarty->fetch($tpl)); } /** * test local variable not seen global */ public function testVariableScope4() { $this->smarty->error_reporting = error_reporting() & ~(E_NOTICE|E_USER_NOTICE); $tpl = $this->smarty->createTemplate("eval:{\$foo2='localvar'}{\$foo2}", null, null, $this->smarty); // must see local value $this->assertEquals("localvar", $this->smarty->fetch($tpl)); // must see $foo2 $tpl2 = $this->smarty->createTemplate("eval:{\$foo2}", null, null, $this->smarty); $this->assertEquals("", $this->smarty->fetch($tpl2)); } public function testVariableScope42() { $this->smarty->error_reporting = error_reporting() & ~(E_NOTICE|E_USER_NOTICE); $tpl = $this->smarty->createTemplate("eval:{\$foo2='localvar'}{\$foo2}", null, null, $this->smarty); // must see local value $this->assertEquals("localvar", $this->smarty->fetch($tpl)); // must see $foo2 $tpl2 = $this->smarty->createTemplate("eval:{\$foo2}", $this->smarty); $this->assertEquals("", $this->smarty->fetch($tpl2)); } /** * test overwriting by global variable */ public function testVariableScope5() { // create variable $foo2 $this->smarty->assign('foo2','oldvalue'); $tpl = $this->smarty->createTemplate("eval:{assign var=foo2 value='newvalue' scope=parent}{\$foo2}", null, null, $this->smarty); // must see the new value $this->assertEquals("newvalue", $this->smarty->fetch($tpl)); $tpl2 = $this->smarty->createTemplate("eval:{\$foo2}", null, null, $this->smarty); // must see the new value at root $this->assertEquals("newvalue", $this->smarty->fetch($tpl2)); } public function testVariableScope52() { // create variable $foo2 $this->smarty->assign('foo2','oldvalue'); $tpl = $this->smarty->createTemplate("eval:{assign var=foo2 value='newvalue' scope=parent}{\$foo2}", null, null, $this->smarty); // must see the new value $this->assertEquals("newvalue", $this->smarty->fetch($tpl)); $tpl2 = $this->smarty->createTemplate("eval:{\$foo2}", $this->smarty); // must see the new value at root $this->assertEquals("newvalue", $this->smarty->fetch($tpl2)); } /** * test creation of global variable in outerscope */ public function testVariableScope6() { // create global variable $foo2 in template $tpl = $this->smarty->createTemplate("eval:{assign var=foo2 value='newvalue' scope=parent}{\$foo2}", null, null, $this->smarty); // must see the new value $this->assertEquals("newvalue", $this->smarty->fetch($tpl)); $tpl2 = $this->smarty->createTemplate("eval:{\$foo2}", null, null, $this->smarty); // must see the new value at root $this->assertEquals("newvalue", $this->smarty->fetch($tpl2)); } public function testVariableScope62() { // create global variable $foo2 in template $tpl = $this->smarty->createTemplate("eval:{assign var=foo2 value='newvalue' scope=parent}{\$foo2}", null, null, $this->smarty); // must see the new value $this->assertEquals("newvalue", $this->smarty->fetch($tpl)); $tpl2 = $this->smarty->createTemplate("eval:{\$foo2}", $this->smarty); // must see the new value at root $this->assertEquals("newvalue", $this->smarty->fetch($tpl2)); } public function testDataArray() { // create global variable $foo2 in template $tpl = $this->smarty->createTemplate("eval:{\$foo} {\$foo2}",array('foo'=>'bar','foo2'=>'bar2')); $this->assertEquals("bar bar2", $this->smarty->fetch($tpl)); } public function testDataArray2() { // create global variable $foo2 in template $this->assertEquals("bar bar2", $this->smarty->fetch("eval:{\$foo} {\$foo2}",array('foo'=>'bar','foo2'=>'bar2'))); } public function testAssigns() { $expected = " local local local parent root global parent root global parent root global"; $result = $this->smarty->fetch('assign.tpl'); $this->assertEquals($expected, $result); } } ?> smarty3-3.1.13/development/PHPunit/PluginModifierStripTests.php0000644000175000017500000000235111634664106023211 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } public function testDefault() { $tpl = $this->smarty->createTemplate('eval:{" hello spaced words "|strip}'); $this->assertEquals(" hello spaced words ", $this->smarty->fetch($tpl)); } public function testUnicodeSpaces() { // Some Unicode Spaces $string = " hello spaced       words "; $string = mb_convert_encoding($string, 'UTF-8', "HTML-ENTITIES"); $tpl = $this->smarty->createTemplate('eval:{"' . $string . '"|strip}'); $this->assertEquals(" hello spaced words ", $this->smarty->fetch($tpl)); } public function testLinebreak() { $tpl = $this->smarty->createTemplate('eval:{" hello spaced words "|strip}'); $this->assertEquals(" hello spaced words ", $this->smarty->fetch($tpl)); } } ?>smarty3-3.1.13/development/PHPunit/phpunit-tests-coverage.sh0000755000175000017500000000016011634664106022471 0ustar mikemike#!/bin/sh php -d asp_tags=On /usr/local/bin/phpunit --coverage-html coverage SmartyTests.php > test_results.txt smarty3-3.1.13/development/PHPunit/CompileIfTests.php0000644000175000017500000003321211467061362021120 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test {if} tag */ public function testIf1() { $tpl = $this->smarty->createTemplate('eval:{if 0<1}yes{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testElseif1() { $tpl = $this->smarty->createTemplate('eval:{if false}false{elseif 0<1}yes{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIf2() { $tpl = $this->smarty->createTemplate('eval:{if 2<1}yes{else}no{/if}'); $this->assertEquals("no", $this->smarty->fetch($tpl)); } public function testIf3() { $tpl = $this->smarty->createTemplate('eval:{if 2<1}yes{elseif 4<5}yes1{else}no{/if}'); $this->assertEquals("yes1", $this->smarty->fetch($tpl)); } public function testIf4() { $tpl = $this->smarty->createTemplate('eval:{if 2<1}yes{elseif 6<5}yes1{else}no{/if}'); $this->assertEquals("no", $this->smarty->fetch($tpl)); } public function testIfTrue() { $tpl = $this->smarty->createTemplate('eval:{if true}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfFalse() { $tpl = $this->smarty->createTemplate('eval:{if false}yes{else}no{/if}'); $this->assertEquals("no", $this->smarty->fetch($tpl)); } public function testIfNot1() { $tpl = $this->smarty->createTemplate('eval:{if !(1<2)}yes{else}no{/if}'); $this->assertEquals("no", $this->smarty->fetch($tpl)); } public function testIfNot2() { $tpl = $this->smarty->createTemplate('eval:{if not (true)}yes{else}no{/if}'); $this->assertEquals("no", $this->smarty->fetch($tpl)); } public function testIfEQ1() { $tpl = $this->smarty->createTemplate('eval:{if 1 == 1}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfEQ2() { $tpl = $this->smarty->createTemplate('eval:{if 1==1}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfEQ3() { $tpl = $this->smarty->createTemplate('eval:{if 1 EQ 1}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfEQ4() { $tpl = $this->smarty->createTemplate('eval:{if 1 eq 1}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfIdentity1() { $tpl = $this->smarty->createTemplate('eval:{$foo=true}{if $foo===true}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfIdentity2() { $tpl = $this->smarty->createTemplate('eval:{$foo=true}{if $foo === true}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfNotIdentity1() { $tpl = $this->smarty->createTemplate('eval:{$foo=true}{if $foo!==true}yes{else}no{/if}'); $this->assertEquals("no", $this->smarty->fetch($tpl)); } public function testIfNotIdentity2() { $tpl = $this->smarty->createTemplate('eval:{$foo=true}{if $foo !== true}yes{else}no{/if}'); $this->assertEquals("no", $this->smarty->fetch($tpl)); } public function testIfGT1() { $tpl = $this->smarty->createTemplate('eval:{if 1 > 0}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfGT2() { $tpl = $this->smarty->createTemplate('eval:{if 0>1}yes{else}no{/if}'); $this->assertEquals("no", $this->smarty->fetch($tpl)); } public function testIfGT3() { $tpl = $this->smarty->createTemplate('eval:{if 1 GT 0}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfGT4() { $tpl = $this->smarty->createTemplate('eval:{if 0 gt 1}yes{else}no{/if}'); $this->assertEquals("no", $this->smarty->fetch($tpl)); } public function testIfGE1() { $tpl = $this->smarty->createTemplate('eval:{if 1 >= 0}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfGE2() { $tpl = $this->smarty->createTemplate('eval:{if 1>=1}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfGE3() { $tpl = $this->smarty->createTemplate('eval:{if 1 GE 1}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfGE4() { $tpl = $this->smarty->createTemplate('eval:{if 0 ge 1}yes{else}no{/if}'); $this->assertEquals("no", $this->smarty->fetch($tpl)); } public function testIfLT1() { $tpl = $this->smarty->createTemplate('eval:{if 0 < 0}yes{else}no{/if}'); $this->assertEquals("no", $this->smarty->fetch($tpl)); } public function testIfLT2() { $tpl = $this->smarty->createTemplate('eval:{if 0<1}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfLT3() { $tpl = $this->smarty->createTemplate('eval:{if 0 LT 1}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfLT4() { $tpl = $this->smarty->createTemplate('eval:{if 0 lt 1}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfLE1() { $tpl = $this->smarty->createTemplate('eval:{if 0 <= 0}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfLE2() { $tpl = $this->smarty->createTemplate('eval:{if 0<=1}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfLE3() { $tpl = $this->smarty->createTemplate('eval:{if 1 LE 0}yes{else}no{/if}'); $this->assertEquals("no", $this->smarty->fetch($tpl)); } public function testIfLE4() { $tpl = $this->smarty->createTemplate('eval:{if 0 le 1}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfNE1() { $tpl = $this->smarty->createTemplate('eval:{if 1 != 1}yes{else}no{/if}'); $this->assertEquals("no", $this->smarty->fetch($tpl)); } public function testIfNE2() { $tpl = $this->smarty->createTemplate('eval:{if 1!=2}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfNE3() { $tpl = $this->smarty->createTemplate('eval:{if 1 NE 1}yes{else}no{/if}'); $this->assertEquals("no", $this->smarty->fetch($tpl)); } public function testIfNE4() { $tpl = $this->smarty->createTemplate('eval:{if 1 ne 2}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfIdent1() { $tpl = $this->smarty->createTemplate('eval:{if 1 === "1"}yes{else}no{/if}'); $this->assertEquals("no", $this->smarty->fetch($tpl)); } public function testIfIdent2() { $tpl = $this->smarty->createTemplate('eval:{if "1" === "1"}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfAnd1() { $tpl = $this->smarty->createTemplate('eval:{if 1 > 0 && 5 < 6}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfAnd2() { $tpl = $this->smarty->createTemplate('eval:{if 1 > 0&&5 < 6}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfAnd3() { $tpl = $this->smarty->createTemplate('eval:{if 1 > 0 AND 5 > 6}}yes{else}no{/if}'); $this->assertEquals("no", $this->smarty->fetch($tpl)); } public function testIfAnd4() { $tpl = $this->smarty->createTemplate('eval:{if (1 > 0) and (5 < 6)}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfOr1() { $tpl = $this->smarty->createTemplate('eval:{if 1 > 0 || 7 < 6}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfOr2() { $tpl = $this->smarty->createTemplate('eval:{if 1 > 0||5 < 6}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfOr3() { $tpl = $this->smarty->createTemplate('eval:{if 1 > 0 OR 5 > 6}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfOr4() { $tpl = $this->smarty->createTemplate('eval:{if (0 > 0) or (9 < 6)}yes{else}no{/if}'); $this->assertEquals("no", $this->smarty->fetch($tpl)); } public function testIfAndOR4() { $tpl = $this->smarty->createTemplate('eval:{if ((7>8)||(1 > 0)) and (5 < 6)}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfIsDivBy() { $tpl = $this->smarty->createTemplate('eval:{if 6 is div by 3}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfIsNotDivBy() { $tpl = $this->smarty->createTemplate('eval:{if 6 is not div by 3}yes{else}no{/if}'); $this->assertEquals("no", $this->smarty->fetch($tpl)); } public function testIfIsEven() { $tpl = $this->smarty->createTemplate('eval:{if 6 is even}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfIsNotEven() { $tpl = $this->smarty->createTemplate('eval:{if 6 is not even}yes{else}no{/if}'); $this->assertEquals("no", $this->smarty->fetch($tpl)); } public function testIfIsOdd() { $tpl = $this->smarty->createTemplate('eval:{if 3 is odd}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfIsNotOdd() { $tpl = $this->smarty->createTemplate('eval:{if 3 is not odd}yes{else}no{/if}'); $this->assertEquals("no", $this->smarty->fetch($tpl)); } public function testIfIsOddBy() { $tpl = $this->smarty->createTemplate('eval:{if 3 is odd by 3}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfIsNotOddBy() { $tpl = $this->smarty->createTemplate('eval:{if 6 is odd by 3}yes{else}no{/if}'); $this->assertEquals("no", $this->smarty->fetch($tpl)); } public function testIfIsEvenBy() { $tpl = $this->smarty->createTemplate('eval:{if 6 is even by 3}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfIsNotEvenBy() { $tpl = $this->smarty->createTemplate('eval:{if 6 is not even by 3}yes{else}no{/if}'); $this->assertEquals("no", $this->smarty->fetch($tpl)); } public function testIfFunc1() { $this->smarty->security_policy->php_functions = array('strlen'); $tpl = $this->smarty->createTemplate('eval:{if strlen("hello world") == 11}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfFunc2() { $this->smarty->security_policy->php_functions = array('strlen'); $tpl = $this->smarty->createTemplate('eval:{if 3 ge strlen("foo")}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfFunc3() { $this->smarty->security_policy->php_functions = array('isset'); $tpl = $this->smarty->createTemplate('eval:{if isset($foo)}yes{else}no{/if}'); $this->assertEquals("no", $this->smarty->fetch($tpl)); } public function testIfFunc4() { $this->smarty->security_policy->php_functions = array('isset'); $tpl = $this->smarty->createTemplate('eval:{assign var=foo value=1}{if isset($foo)}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfStatement1() { $tpl = $this->smarty->createTemplate('eval:{if $x=true}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfStatement2() { $tpl = $this->smarty->createTemplate('eval:{if $x=false}yes{else}no{/if}'); $this->assertEquals("no", $this->smarty->fetch($tpl)); } public function testIfVariable1() { $tpl = $this->smarty->createTemplate('eval:{$x=1}{if $x}yes{else}no{/if}'); $this->assertEquals("yes", $this->smarty->fetch($tpl)); } public function testIfVariable2() { $tpl = $this->smarty->createTemplate('eval:{$x=0}{if $x}yes{else}no{/if}'); $this->assertEquals("no", $this->smarty->fetch($tpl)); } public function testIfVariableInc1() { $tpl = $this->smarty->createTemplate('eval:{$x=0}{if $x++}yes{else}no{/if} {$x}'); $this->assertEquals("no 1", $this->smarty->fetch($tpl)); } } ?> smarty3-3.1.13/development/PHPunit/AutoEscapeTests.php0000644000175000017500000000135611634664106021307 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->escape_html = true; } public static function isRunnable() { return true; } /** * test escape_html property */ public function testAutoEscape() { $tpl = $this->smarty->createTemplate('eval:{$foo}'); $tpl->assign('foo',''); $this->assertEquals("<a@b.c>", $this->smarty->fetch($tpl)); } } ?> smarty3-3.1.13/development/PHPunit/PluginModifierUpperTests.php0000644000175000017500000000342311673427331023204 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } public function testDefault() { $result = "IF STRIKE ISN'T SETTLED QUICKLY IT MAY LAST A WHILE."; $tpl = $this->smarty->createTemplate('eval:{"If Strike isn\'t Settled Quickly it may Last a While."|upper}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testDefaultWithoutMbstring() { Smarty::$_MBSTRING = false; $result = "IF STRIKE ISN'T SETTLED QUICKLY IT MAY LAST A WHILE."; $tpl = $this->smarty->createTemplate('eval:{"If Strike isn\'t Settled Quickly it may Last a While."|upper}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testUmlauts() { $result = "IF STRIKE ISN'T SÄTTLED ÜQUICKLY IT MAY LAST A WHILE."; $tpl = $this->smarty->createTemplate('eval:{"If Strike isn\'t Sättled ÜQuickly it may Last a While."|upper}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testUmlautsWithoutMbstring() { Smarty::$_MBSTRING = false; $result = "IF STRIKE ISN'T SÄTTLED ÜQUICKLY IT MAY LAST A WHILE."; $tpl = $this->smarty->createTemplate('eval:{"If Strike isn\'t Sättled ÜQuickly it may Last a While."|upper}'); $this->assertNotEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } } ?>smarty3-3.1.13/development/PHPunit/helpers/0000755000175000017500000000000012141655567017164 5ustar mikemikesmarty3-3.1.13/development/PHPunit/helpers/_object_tostring.php0000644000175000017500000000061111643600441023214 0ustar mikemikestring = (string) $string; } public function __toString() { return $this->string; } } class _object_noString { protected $string = null; public function __construct($string) { $this->string = (string) $string; } }smarty3-3.1.13/development/PHPunit/CompileAppendTests.php0000644000175000017500000000154611467061362021776 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test aappand tag */ public function testAppend1() { $this->assertEquals("12", $this->smarty->fetch('eval:{$foo=1}{append var=foo value=2}{foreach $foo as $bar}{$bar}{/foreach}')); } public function testAppend2() { $this->smarty->assign('foo',1); $this->assertEquals("12", $this->smarty->fetch('eval:{append var=foo value=2}{foreach $foo as $bar}{$bar}{/foreach}')); } } ?>smarty3-3.1.13/development/PHPunit/DefaultTemplateHandlerTests.php0000644000175000017500000000603212044502270023615 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->force_compile = true; $this->smarty->disableSecurity(); } public static function isRunnable() { return true; } /** * test error on unknow template */ public function testUnknownTemplate() { try { $this->smarty->fetch('foo.tpl'); } catch (Exception $e) { $this->assertContains(htmlentities('Unable to load template'), $e->getMessage()); return; } $this->fail('Exception for none existing template has not been raised.'); } /** * test error on registration on none existent handler function. */ public function testRegisterNoneExistentHandlerFunction() { try { $this->smarty->registerDefaultTemplateHandler('foo'); } catch (Exception $e) { $this->assertContains(htmlentities("Default template handler 'foo' not callable"), $e->getMessage()); return; } $this->fail('Exception for none callable function has not been raised.'); } /** * test replacement by default template handler */ /** public function testDefaultTemplateHandlerReplacement() { $this->smarty->register->defaultTemplateHandler('my_template_handler'); $this->assertEquals("Recsource foo.tpl of type file not found", $this->smarty->fetch('foo.tpl')); } */ public function testDefaultTemplateHandlerReplacementByTemplateFile() { $this->smarty->registerDefaultTemplateHandler('my_template_handler_file'); $this->assertEquals("hello world", $this->smarty->fetch('foo.tpl')); } /** * test default template handler returning fals */ public function testDefaultTemplateHandlerReturningFalse() { $this->smarty->registerDefaultTemplateHandler('my_false'); try { $this->smarty->fetch('foo.tpl'); } catch (Exception $e) { $this->assertContains(htmlentities('Unable to load template'), $e->getMessage()); return; } $this->fail('Exception for none existing template has not been raised.'); } } function my_template_handler ($resource_type, $resource_name, &$template_source, &$template_timestamp, Smarty $smarty) { $output = "Recsource $resource_name of type $resource_type not found"; $template_source = $output; $template_timestamp = time(); return true; } function my_template_handler_file ($resource_type, $resource_name, &$template_source, &$template_timestamp, Smarty $smarty) { return $smarty->getTemplateDir(0) . 'helloworld.tpl'; } function my_false ($resource_type, $resource_name, &$template_source, &$template_timestamp, Smarty $smarty) { return false; } ?>smarty3-3.1.13/development/PHPunit/PluginModifierCharsetTests.php0000644000175000017500000000602411673427331023502 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } public function testToLatin1() { $encoded = "hällö wörld 1"; $result = utf8_decode($encoded); $tpl = $this->smarty->createTemplate('eval:{"' . $encoded . '"|to_charset}'); $this->assertEquals($result, $tpl->fetch()); } public function testToLatin1WithoutMbstring() { Smarty::$_MBSTRING = false; $encoded = "hällö wörld 2"; $result = utf8_decode($encoded); $tpl = $this->smarty->createTemplate('eval:{"' . $encoded . '"|to_charset}'); $this->assertEquals($encoded, $tpl->fetch()); Smarty::$_MBSTRING = true; } public function testFromLatin1() { $result = "hällö wörld 3"; $encoded = utf8_decode($result); $tpl = $this->smarty->createTemplate('eval:{"' . $encoded . '"|from_charset}'); $this->assertEquals($result, $tpl->fetch()); } public function testFromLatin1WithoutMbstring() { Smarty::$_MBSTRING = false; $result = "hällö wörld 4"; $encoded = utf8_decode($result); $tpl = $this->smarty->createTemplate('eval:{"' . $encoded . '"|from_charset}'); $this->assertEquals($encoded, $tpl->fetch()); Smarty::$_MBSTRING = true; } public function testFromUtf32le() { $result = "hällö wörld 5"; $encoded = mb_convert_encoding($result, "UTF-32LE", "UTF-8"); $tpl = $this->smarty->createTemplate('eval:{"' . $encoded . '"|from_charset:"UTF-32LE"}'); $this->assertEquals($result, $tpl->fetch()); } public function testFromUtf32leWithoutMbstring() { Smarty::$_MBSTRING = false; $result = "hällö wörld 6"; $encoded = mb_convert_encoding($result, "UTF-32LE", "UTF-8"); $tpl = $this->smarty->createTemplate('eval:{"' . $encoded . '"|from_charset:"UTF-32LE"}'); $this->assertEquals($encoded, $tpl->fetch()); Smarty::$_MBSTRING = true; } public function testToUtf32le() { $encoded = "hällö wörld 7"; $result = mb_convert_encoding($encoded, "UTF-32LE", "UTF-8"); $tpl = $this->smarty->createTemplate('eval:{"' . $encoded . '"|to_charset:"UTF-32LE"}'); $this->assertEquals($result, $tpl->fetch()); } public function testToUtf32leWithoutMbstring() { Smarty::$_MBSTRING = false; $encoded = "hällö wörld 8"; $result = mb_convert_encoding($encoded, "UTF-32LE", "UTF-8"); $tpl = $this->smarty->createTemplate('eval:{"' . $encoded . '"|to_charset:"UTF-32LE"}'); $this->assertEquals($encoded, $tpl->fetch()); Smarty::$_MBSTRING = true; } } ?>smarty3-3.1.13/development/PHPunit/CompileFunctionTests.php0000644000175000017500000001016611467061362022352 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test simple function call tag */ public function testSimpleFunction() { $tpl = $this->smarty->createTemplate('test_template_function_tag1.tpl'); $this->assertEquals("default param", $this->smarty->fetch($tpl)); } /** * test simple function call tag 2 */ public function testSimpleFunction2() { $tpl = $this->smarty->createTemplate('test_template_function_tag2.tpl'); $this->assertEquals("default param default param2", $this->smarty->fetch($tpl)); } /** * test overwrite default function call tag */ public function testOverwriteDefaultFunction() { $tpl = $this->smarty->createTemplate('test_template_function_tag3.tpl'); $this->assertEquals("overwrite param default param2", $this->smarty->fetch($tpl)); } /** * test recursive function call tag */ public function testRecursiveFunction() { $tpl = $this->smarty->createTemplate('test_template_function_tag4.tpl'); $this->assertEquals("012345", $this->smarty->fetch($tpl)); } /** * test inherited function call tag */ public function testInheritedFunction() { $tpl = $this->smarty->createTemplate('test_template_function_tag5.tpl'); $this->assertEquals("012345", $this->smarty->fetch($tpl)); } /** * test function definition in include */ public function testDefineFunctionInclude() { $tpl = $this->smarty->createTemplate('test_template_function_tag6.tpl'); $this->assertEquals("012345", $this->smarty->fetch($tpl)); } /** * test external function definition */ public function testExternalDefinedFunction() { $tpl = $this->smarty->createTemplate('eval:{include file=\'template_function_lib.tpl\'}{call name=template_func1}'); $tpl->assign('foo', 'foo'); $this->assertContains('foo foo', $this->smarty->fetch($tpl)); } /** * test external function definition cached */ public function testExternalDefinedFunctionCached1() { $this->smarty->caching = 1; $this->smarty->cache_lifetime = 1000; $this->smarty->clearAllCache(); $tpl = $this->smarty->createTemplate('test_template_function.tpl'); $tpl->assign('foo', 'foo'); $this->assertContains('foo foo', $this->smarty->fetch($tpl)); } /** * test external function definition cached 2 */ public function testExternalDefinedFunctionCached2() { $this->smarty->caching = 1; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('test_template_function.tpl'); $this->assertTrue($this->smarty->isCached($tpl)); $tpl->assign('foo', 'bar'); $this->assertContains('foo bar', $this->smarty->fetch($tpl)); } /** * test external function definition nocache call */ public function testExternalDefinedFunctionNocachedCall1() { $this->smarty->caching = 1; $this->smarty->cache_lifetime = 1000; $this->smarty->clearAllCache(); $tpl = $this->smarty->createTemplate('test_template_function_nocache_call.tpl'); $tpl->assign('foo', 'foo'); $this->assertContains('foo foo', $this->smarty->fetch($tpl)); } /** * test external function definition nocache call 2 */ public function testExternalDefinedFunctionNocachedCall2() { $this->smarty->caching = 1; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('test_template_function_nocache_call.tpl'); $this->assertTrue($this->smarty->isCached($tpl)); $tpl->assign('foo', 'bar'); $this->assertContains('bar bar', $this->smarty->fetch($tpl)); } } ?>smarty3-3.1.13/development/PHPunit/RegisterFunctionTests.php0000644000175000017500000001227111634664106022546 0ustar mikemiketemplateFunction / unregister->templateFunction methods * * @package PHPunit * @author Uwe Tews */ /** * class for register->templateFunction / unregister->templateFunction methods tests */ class RegisterFunctionTests extends PHPUnit_Framework_TestCase { public function setUp() { $this->smarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test register->templateFunction method for function */ public function testRegisterFunction() { $this->smarty->registerPlugin(Smarty::PLUGIN_FUNCTION,'testfunction', 'myfunction'); $this->assertEquals('myfunction', $this->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['testfunction'][0]); $this->assertEquals('hello world 1', $this->smarty->fetch('eval:{testfunction value=1}')); } /** * test wrapper rfor egister_function method for function */ public function testRegisterFunctionWrapper() { $this->smarty->registerPlugin(Smarty::PLUGIN_FUNCTION,'testfunction', 'myfunction'); $this->assertEquals('myfunction', $this->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['testfunction'][0]); $this->assertEquals('hello world 1', $this->smarty->fetch('eval:{testfunction value=1}')); } /** * test register->templateFunction method for class */ public function testRegisterFunctionClass() { $this->smarty->registerPlugin(Smarty::PLUGIN_FUNCTION,'testfunction', array('myfunctionclass', 'execute')); $this->assertEquals('hello world 2', $this->smarty->fetch('eval:{testfunction value=2}')); } /** * test register->templateFunction method for object */ public function testRegisterFunctionObject() { $myfunction_object = new myfunctionclass; $this->smarty->registerPlugin(Smarty::PLUGIN_FUNCTION,'testfunction', array($myfunction_object, 'execute')); $this->assertEquals('hello world 3', $this->smarty->fetch('eval:{testfunction value=3}')); } public function testRegisterFunctionCaching1() { $this->smarty->caching = 1; $this->smarty->cache_lifetime = 10; $this->smarty->force_compile = true; $this->smarty->assign('x', 0); $this->smarty->assign('y', 10); $this->smarty->registerPlugin(Smarty::PLUGIN_FUNCTION,'testfunction', 'myfunction'); $this->assertEquals('hello world 0 10', $this->smarty->fetch('test_register_function.tpl')); } public function testRegisterFunctionCaching2() { $this->smarty->caching = 1; $this->smarty->cache_lifetime = 10; $this->smarty->assign('x', 1); $this->smarty->assign('y', 20); $this->smarty->registerPlugin(Smarty::PLUGIN_FUNCTION,'testfunction', 'myfunction'); $this->assertEquals('hello world 0 10', $this->smarty->fetch('test_register_function.tpl')); } public function testRegisterFunctionCaching3() { $this->smarty->caching = 1; $this->smarty->cache_lifetime = 10; $this->smarty->force_compile = true; $this->smarty->assign('x', 2); $this->smarty->assign('y', 30); $this->smarty->registerPlugin(Smarty::PLUGIN_FUNCTION,'testfunction', 'myfunction', false); $this->assertEquals('hello world 2 30', $this->smarty->fetch('test_register_function.tpl')); } public function testRegisterFunctionCaching4() { $this->smarty->caching = 1; $this->smarty->cache_lifetime = 10; $this->smarty->assign('x', 3); $this->smarty->assign('y', 40); $this->smarty->registerPlugin(Smarty::PLUGIN_FUNCTION,'testfunction', 'myfunction', false); $this->assertEquals('hello world 3 30', $this->smarty->fetch('test_register_function.tpl')); } /** * test unregister->templateFunction method */ public function testUnregisterFunction() { $this->smarty->registerPlugin(Smarty::PLUGIN_FUNCTION,'testfunction', 'myfunction'); $this->smarty->unregisterPlugin(Smarty::PLUGIN_FUNCTION,'testfunction'); $this->assertFalse(isset($this->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['testfunction'])); } /** * test unregister->templateFunction method not registered */ public function testUnregisterFunctionNotRegistered() { $this->smarty->unregisterPlugin(Smarty::PLUGIN_FUNCTION,'testfunction'); $this->assertFalse(isset($this->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['testfunction'])); } /** * test unregister->templateFunction method other registered */ public function testUnregisterFunctionOtherRegistered() { $this->smarty->registerPlugin(Smarty::PLUGIN_BLOCK,'testfunction', 'myfunction'); $this->smarty->unregisterPlugin(Smarty::PLUGIN_FUNCTION,'testfunction'); $this->assertTrue(isset($this->smarty->registered_plugins[Smarty::PLUGIN_BLOCK]['testfunction'])); } } function myfunction($params, &$smarty) { return "hello world $params[value]"; } class myfunctionclass { static function execute($params, &$smarty) { return "hello world $params[value]"; } } ?>smarty3-3.1.13/development/PHPunit/PluginFunctionHtmlRadiosTests.php0000644000175000017500000004505212050511024024171 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } public function testAssociativeArray() { $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_radios name="id" options=$cust_radios selected=$customer_id separator="
"}'); $tpl->assign('customer_id', 1001); $tpl->assign('cust_radios', array( 1000 => 'Joe Schmoe', 1001 => 'Jack Smith', 1002 => 'Jane Johnson', 1003 => 'Charlie Brown', )); $this->assertEquals($expected, $tpl->fetch()); } public function testSeparateArrays() { $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_radios name="id" values=$cust_ids output=$cust_names selected=$customer_id separator="
"}'); $tpl->assign('customer_id', 1001); $tpl->assign('cust_ids', array(1000,1001,1002,1003)); $tpl->assign('cust_names', array( 'Joe Schmoe', 'Jack Smith', 'Jane Johnson', 'Charlie Brown', )); $this->assertEquals($expected, $tpl->fetch()); } public function testIterator() { $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_radios name="id" values=$cust_ids output=$cust_names selected=$customer_id separator="
"}'); $tpl->assign('customer_id', 1001); $tpl->assign('cust_ids', array(1000,1001,1002,1003)); $tpl->assign('cust_names', new ArrayIterator(array( 'Joe Schmoe', 'Jack Smith', 'Jane Johnson', 'Charlie Brown', ))); $this->assertEquals($expected, $tpl->fetch()); } public function testNoLabels() { $n = "\n"; $expected = 'Joe Schmoe
' . $n . 'Jack Smith
' . $n . 'Jane Johnson
' . $n . 'Charlie Brown
'; $tpl = $this->smarty->createTemplate('eval:{html_radios name="id" options=$cust_radios labels=false selected=$customer_id separator="
"}'); $tpl->assign('customer_id', 1001); $tpl->assign('cust_radios', array( 1000 => 'Joe Schmoe', 1001 => 'Jack Smith', 1002 => 'Jane Johnson', 1003 => 'Charlie Brown', )); $this->assertEquals($expected, $tpl->fetch()); } public function testWithId() { $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_radios name="id" options=$cust_radios selected=$customer_id label_ids=true separator="
"}'); $tpl->assign('customer_id', 1001); $tpl->assign('cust_radios', array( 1000 => 'Joe Schmoe', 1001 => 'Jack Smith', 1002 => 'Jane Johnson', 'work s ä' => 'Charlie Brown', )); $this->assertEquals($expected, $tpl->fetch()); } public function testNullString() { $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_radios name="id" options=$options selected=$selected separator="
"}'); $tpl->assign('selected', "null"); $tpl->assign('options', array( "null" => 'null', '' => 'empty string', 0 => 'zero', 1 => 'one', 2 => 'two', )); $this->assertEquals($expected, $tpl->fetch()); } public function testNullValue() { $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_radios name="id" options=$options selected=$selected separator="
"}'); $tpl->assign('selected', null); $tpl->assign('options', array( "null" => 'null', '' => 'empty string', 0 => 'zero', 1 => 'one', 2 => 'two', )); $this->assertEquals($expected, $tpl->fetch()); } public function testZeroValue() { $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_radios name="id" options=$options selected=$selected separator="
"}'); $tpl->assign('selected', 0); $tpl->assign('options', array( "null" => 'null', '' => 'empty string', 0 => 'zero', 1 => 'one', 2 => 'two', )); $this->assertEquals($expected, $tpl->fetch()); } public function testZeroStringValue() { $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_radios name="id" options=$options selected=$selected separator="
"}'); $tpl->assign('selected', "0"); $tpl->assign('options', array( "null" => 'null', '' => 'empty string', 0 => 'zero', 1 => 'one', 2 => 'two', )); $this->assertEquals($expected, $tpl->fetch()); } public function testEmptyStringValue() { $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_radios name="id" options=$options selected=$selected separator="
"}'); $tpl->assign('selected', ""); $tpl->assign('options', array( "null" => 'null', '' => 'empty string', 0 => 'zero', 1 => 'one', 2 => 'two', )); $this->assertEquals($expected, $tpl->fetch()); } public function testObject() { $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_radios name="id" options=$cust_radios selected=$customer_id separator="
"}'); $tpl->assign('customer_id', new _object_toString(1001)); $tpl->assign('cust_radios', array( 1000 => 'Joe Schmoe', 1001 => 'Jack Smith', 1002 => 'Jane Johnson', 1003 => 'Charlie Brown', )); $this->assertEquals($expected, $tpl->fetch()); } public function testObjectList() { $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_radios name="id" options=$cust_radios selected=$customer_id separator="
"}'); $tpl->assign('customer_id', 1001); $tpl->assign('cust_radios', array( 1000 => new _object_toString('Joe Schmoe'), 1001 => new _object_toString('Jack Smith'), 1002 => new _object_toString('Jane Johnson'), 1003 => new _object_toString('Charlie Brown'), )); $this->assertEquals($expected, $tpl->fetch()); } protected $_errors = array(); public function error_handler($errno, $errstr, $errfile, $errline, $errcontext) { $this->_errors[] = $errstr; } public function testObjectNoString() { $this->_errors = array(); set_error_handler(array($this, 'error_handler')); $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_radios name="id" options=$cust_radios selected=$customer_id separator="
"}'); $tpl->assign('customer_id', new _object_noString(1001)); $tpl->assign('cust_radios', array( 1000 => 'Joe Schmoe', 1001 => 'Jack Smith', 1002 => 'Jane Johnson', 1003 => 'Charlie Brown', )); $tpl->fetch(); $this->assertEquals(1, count($this->_errors)); $this->assertStringEndsWith("without __toString() method", $this->_errors[0]); restore_error_handler(); } public function testObjectListNoString() { $this->_errors = array(); set_error_handler(array($this, 'error_handler')); $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_radios name="id" options=$cust_radios selected=$customer_id separator="
"}'); $tpl->assign('customer_id', 1001); $tpl->assign('cust_radios', array( 1000 => new _object_toString('Joe Schmoe'), 1001 => new _object_noString('Jack Smith'), 1002 => new _object_toString('Jane Johnson'), 1003 => new _object_toString('Charlie Brown'), )); $tpl->fetch(); $this->assertEquals(1, count($this->_errors)); $this->assertStringEndsWith("without __toString() method", $this->_errors[0]); restore_error_handler(); } public function testDisabled() { $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_radios name="id" options=$cust_radios selected=$customer_id separator="
" disabled=1}'); $tpl->assign('customer_id', new _object_toString(1001)); $tpl->assign('cust_radios', array( 1000 => 'Joe Schmoe', 1001 => 'Jack Smith', 1002 => 'Jane Johnson', 1003 => 'Charlie Brown', )); $this->assertEquals($expected, $tpl->fetch()); } public function testDisabledStrict() { $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_radios name="id" options=$cust_radios selected=$customer_id separator="
" disabled=true strict=true}'); $tpl->assign('customer_id', new _object_toString(1001)); $tpl->assign('cust_radios', array( 1000 => 'Joe Schmoe', 1001 => 'Jack Smith', 1002 => 'Jane Johnson', 1003 => 'Charlie Brown', )); $this->assertEquals($expected, $tpl->fetch()); $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_radios name="id" options=$cust_radios selected=$customer_id separator="
" disabled=1 strict=true}'); $tpl->assign('customer_id', new _object_toString(1001)); $tpl->assign('cust_radios', array( 1000 => 'Joe Schmoe', 1001 => 'Jack Smith', 1002 => 'Jane Johnson', 1003 => 'Charlie Brown', )); $this->assertEquals($expected, $tpl->fetch()); $n = "\n"; $expected = '
' . $n . '
' . $n . '
' . $n . '
'; $tpl = $this->smarty->createTemplate('eval:{html_radios name="id" options=$cust_radios selected=$customer_id separator="
" disabled="disabled" strict=true}'); $tpl->assign('customer_id', new _object_toString(1001)); $tpl->assign('cust_radios', array( 1000 => 'Joe Schmoe', 1001 => 'Jack Smith', 1002 => 'Jane Johnson', 1003 => 'Charlie Brown', )); $this->assertEquals($expected, $tpl->fetch()); } } ?>smarty3-3.1.13/development/PHPunit/CompilerPluginTests.php0000644000175000017500000000124011634664106022177 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test compiler plugin */ public function testCompilerPlugin() { $this->smarty->addPluginsDir(dirname(__FILE__)."/PHPunitplugins/"); $this->assertEquals('test output', $this->smarty->fetch('eval:{test data="test output"}{/test}')); } } ?> smarty3-3.1.13/development/PHPunit/coverage/0000755000175000017500000000000012141655567017315 5ustar mikemikesmarty3-3.1.13/development/PHPunit/CompileNocacheTests.php0000644000175000017500000000356511275032024022120 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test nocache tag caching disabled */ public function testNocacheCachingNo() { $this->smarty->caching = 0; $this->smarty->assign('foo', 0); $this->smarty->assign('bar', 'A'); $content = $this->smarty->fetch('test_nocache_tag.tpl'); $this->assertContains("root 2A", $content); $this->assertContains("include 4A", $content); $this->smarty->assign('foo', 2); $this->smarty->assign('bar', 'B'); $content = $this->smarty->fetch('test_nocache_tag.tpl'); $this->assertContains("root 4B", $content); $this->assertContains("include 6B", $content); } /** * test nocache tag caching enabled */ public function testNocacheCachingYes1() { $this->smarty->caching = 1; $this->smarty->cache_lifetime = 5; $this->smarty->assign('foo', 0); $this->smarty->assign('bar', 'A'); $content = $this->smarty->fetch('test_nocache_tag.tpl'); $this->assertContains("root 2A", $content); $this->assertContains("include 4A", $content); } public function testNocacheCachingYes2() { $this->smarty->caching = 1; $this->smarty->cache_lifetime = 5; $this->smarty->assign('foo', 2); $this->smarty->assign('bar', 'B'); $content = $this->smarty->fetch('test_nocache_tag.tpl'); $this->assertContains("root 4A", $content); $this->assertContains("include 6A", $content); } } ?> smarty3-3.1.13/development/PHPunit/PluginFunctionHtmlSelectTimeTests.php0000644000175000017500000013264111650021255025016 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); $this->now = mktime( 16, 15, 11, 2, 20, 2011 ); } public static function isRunnable() { return true; } protected $now = null; protected $hours = array( 'none' => ' ', 'default' => ' ', '12h' => ' ', 'format_%03d' => ' ', 'format_value_%03d' => ' ', ); protected $minutes = array( 'none' => ' ', 'default' => ' ', '30' => ' ', '15' => ' ', '10' => ' ', '5' => ' ', 'format_%03d' => ' ', 'format_value_%03d' => ' ', ); protected $seconds = array( 'none' => ' ', 'default' => ' ', '30' => ' ', '15' => ' ', '10' => ' ', '5' => ' ', 'format_%03d' => ' ', 'format_value_%03d' => ' ', ); protected $meridians = array( 'default' => ' ', ); public function testDefault() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .'}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testPrefix() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' prefix="foobar_"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testFieldArray() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' field_array="namorized"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' field_array="namorized" prefix="foobar_"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testExtra() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' all_extra="data-foo=\"xy\""}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' hour_extra="data-foo=\"hour\"" minute_extra="data-foo=\"minute\"" second_extra="data-foo=\"second\""}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' data_foo="foo"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testFieldSeparator() { $n = "\n"; $result = '' .' - ' .' - '; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' field_separator=" - "}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testEmpty() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' all_empty=""}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' all_empty="all"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' second_empty=""}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' hour_empty="hour" minute_empty="minute" second_empty="second"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testEmptyUnset() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time=null all_empty=""}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time=null all_empty="all"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time=null second_empty=""}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time=null hour_empty="hour" minute_empty="minute" second_empty="second"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testId() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' all_id=""}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' all_id="all-"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' hour_id="hour" minute_id="minute" second_id="second"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testDisplay() { $n = "\n"; $result = ''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' display_minutes=false display_seconds=false}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = ''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' display_hours=false display_seconds=false}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = ''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' display_hours=false display_minutes=false}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testMeridian() { $n = "\n"; $result = '' .$n.'' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' use_24_hours=false}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' use_24_hours=false display_meridian=false}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $time = mktime( 0, 15, 11, 2, 20, 2011 ); $result = ' '; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $time .' use_24_hours=false display_minutes=false display_seconds=false}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $time = mktime( 4, 15, 11, 2, 20, 2011 ); $result = ' '; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $time .' use_24_hours=false display_minutes=false display_seconds=false}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $time = mktime( 12, 15, 11, 2, 20, 2011 ); $result = ' '; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $time .' use_24_hours=false display_minutes=false display_seconds=false}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $time = mktime( 16, 15, 11, 2, 20, 2011 ); $result = ' '; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $time .' use_24_hours=false display_minutes=false display_seconds=false}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testMinuteInterval() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' minute_interval=30}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' minute_interval=15}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' minute_interval=10}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' minute_interval=5}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testSecondInterval() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' second_interval=30}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' second_interval=15}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' second_interval=10}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' second_interval=5}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testFormat() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' hour_format="%03d"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' minute_format="%03d"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' second_format="%03d"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testValueFormat() { $n = "\n"; $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' hour_value_format="%03d"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' minute_value_format="%03d"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); $result = '' .$n.'' .$n.''; $tpl = $this->smarty->createTemplate('eval:{html_select_time time='. $this->now .' second_value_format="%03d"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testTimeArray() { $n = "\n"; $result = '' .$n.'' .$n.''; $time_array = array( 'namorized' => array( 'foobar_Hour' => '16', 'foobar_Minute' => '15', 'foobar_Second' => '11', ), ); $tpl = $this->smarty->createTemplate('eval:{html_select_time time=$time_array.namorized field_array="namorized" prefix="foobar_"}'); $tpl->assign('time_array', $time_array); $this->assertEquals($result, $this->smarty->fetch($tpl)); $tpl = $this->smarty->createTemplate('eval:{html_select_time time=$time_array field_array="namorized" prefix="foobar_"}'); $tpl->assign('time_array', $time_array); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testTimeArrayMerdidian() { $n = "\n"; $result = '' .$n.'' .$n.'' .$n.''; $time_array = array( 'namorized' => array( 'foobar_Hour' => '04', 'foobar_Minute' => '15', 'foobar_Second' => '11', 'foobar_Meridian' => 'pm', ), ); $tpl = $this->smarty->createTemplate('eval:{html_select_time time=$time_array use_24_hours=false field_array="namorized" prefix="foobar_"}'); $tpl->assign('time_array', $time_array); $this->assertEquals($result, $this->smarty->fetch($tpl)); } } ?>smarty3-3.1.13/development/PHPunit/PluginBlockTextformatTests.php0000644000175000017500000002150011673427331023536 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } public function testDefault() { $result = "\n\nThis is foo. This is foo. This is foo.\nThis is foo. This is foo. This is foo.\n\nThis is bar.\n\nbar foo bar foo foo. bar foo bar foo\nfoo. bar foo bar foo foo. bar foo bar\nfoo foo. bar foo bar foo foo. bar foo\nbar foo foo. bar foo bar foo foo.\n\n"; $tpl = $this->smarty->createTemplate('eval:{textformat wrap=40}' . $this->string . '{/textformat}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testDefaultWithoutMbstring() { Smarty::$_MBSTRING = false; $result = "\n\nThis is foo. This is foo. This is foo.\nThis is foo. This is foo. This is foo.\n\nThis is bar.\n\nbar foo bar foo foo. bar foo bar foo\nfoo. bar foo bar foo foo. bar foo bar\nfoo foo. bar foo bar foo foo. bar foo\nbar foo foo. bar foo bar foo foo.\n\n"; $tpl = $this->smarty->createTemplate('eval:{textformat wrap=40}' . $this->string . '{/textformat}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testIndent() { $result = "\n\n This is foo. This is foo. This is\n foo. This is foo. This is foo. This\n is foo.\n\n This is bar.\n\n bar foo bar foo foo. bar foo bar foo\n foo. bar foo bar foo foo. bar foo\n bar foo foo. bar foo bar foo foo.\n bar foo bar foo foo. bar foo bar foo\n foo.\n\n"; $tpl = $this->smarty->createTemplate('eval:{textformat wrap=40 indent=4}' . $this->string . '{/textformat}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testIndentWithoutMbstring() { Smarty::$_MBSTRING = false; $result = "\n\n This is foo. This is foo. This is\n foo. This is foo. This is foo. This\n is foo.\n\n This is bar.\n\n bar foo bar foo foo. bar foo bar foo\n foo. bar foo bar foo foo. bar foo\n bar foo foo. bar foo bar foo foo.\n bar foo bar foo foo. bar foo bar foo\n foo.\n\n"; $tpl = $this->smarty->createTemplate('eval:{textformat wrap=40 indent=4}' . $this->string . '{/textformat}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testIndentFirst() { $result = "\n\n This is foo. This is foo. This\n is foo. This is foo. This is foo.\n This is foo.\n\n This is bar.\n\n bar foo bar foo foo. bar foo bar\n foo foo. bar foo bar foo foo. bar\n foo bar foo foo. bar foo bar foo\n foo. bar foo bar foo foo. bar foo\n bar foo foo.\n\n"; $tpl = $this->smarty->createTemplate('eval:{textformat wrap=40 indent=4 indent_first=4}' . $this->string . '{/textformat}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testIndentFirstWithoutMbstring() { Smarty::$_MBSTRING = false; $result = "\n\n This is foo. This is foo. This\n is foo. This is foo. This is foo.\n This is foo.\n\n This is bar.\n\n bar foo bar foo foo. bar foo bar\n foo foo. bar foo bar foo foo. bar\n foo bar foo foo. bar foo bar foo\n foo. bar foo bar foo foo. bar foo\n bar foo foo.\n\n"; $tpl = $this->smarty->createTemplate('eval:{textformat wrap=40 indent=4 indent_first=4}' . $this->string . '{/textformat}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testIndentchar() { $result = "\n\n####This is foo. This is foo. This is\n####foo. This is foo. This is foo. This\n####is foo.\n\n####This is bar.\n\n####bar foo bar foo foo. bar foo bar foo\n####foo. bar foo bar foo foo. bar foo\n####bar foo foo. bar foo bar foo foo.\n####bar foo bar foo foo. bar foo bar foo\n####foo.\n\n"; $tpl = $this->smarty->createTemplate('eval:{textformat wrap=40 indent=4 indent_char="#"}' . $this->string . '{/textformat}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testIndentcharWithoutMbstring() { Smarty::$_MBSTRING = false; $result = "\n\n####This is foo. This is foo. This is\n####foo. This is foo. This is foo. This\n####is foo.\n\n####This is bar.\n\n####bar foo bar foo foo. bar foo bar foo\n####foo. bar foo bar foo foo. bar foo\n####bar foo foo. bar foo bar foo foo.\n####bar foo bar foo foo. bar foo bar foo\n####foo.\n\n"; $tpl = $this->smarty->createTemplate('eval:{textformat wrap=40 indent=4 indent_char="#"}' . $this->string . '{/textformat}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testIndentcharFirst() { $result = "\n\n########This is foo. This is foo. This\n####is foo. This is foo. This is foo.\n####This is foo.\n\n########This is bar.\n\n########bar foo bar foo foo. bar foo bar\n####foo foo. bar foo bar foo foo. bar\n####foo bar foo foo. bar foo bar foo\n####foo. bar foo bar foo foo. bar foo\n####bar foo foo.\n\n"; $tpl = $this->smarty->createTemplate('eval:{textformat wrap=40 indent=4 indent_first=4 indent_char="#"}' . $this->string . '{/textformat}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testIndentcharFirstWithoutMbstring() { Smarty::$_MBSTRING = false; $result = "\n\n########This is foo. This is foo. This\n####is foo. This is foo. This is foo.\n####This is foo.\n\n########This is bar.\n\n########bar foo bar foo foo. bar foo bar\n####foo foo. bar foo bar foo foo. bar\n####foo bar foo foo. bar foo bar foo\n####foo. bar foo bar foo foo. bar foo\n####bar foo foo.\n\n"; $tpl = $this->smarty->createTemplate('eval:{textformat wrap=40 indent=4 indent_first=4 indent_char="#"}' . $this->string . '{/textformat}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testWrapchar() { $result = "## This is foo. This is foo. This is#foo. This is foo. This is foo. This#is foo.## This is bar.## bar foo bar foo foo. bar foo bar foo#foo. bar foo bar foo foo. bar foo#bar foo foo. bar foo bar foo foo.#bar foo bar foo foo. bar foo bar foo#foo.##"; $tpl = $this->smarty->createTemplate('eval:{textformat wrap=40 indent=4 wrap_char="#"}' . $this->string . '{/textformat}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testWrapcharWithoutMbstring() { Smarty::$_MBSTRING = false; $result = "## This is foo. This is foo. This is#foo. This is foo. This is foo. This#is foo.## This is bar.## bar foo bar foo foo. bar foo bar foo#foo. bar foo bar foo foo. bar foo#bar foo foo. bar foo bar foo foo.#bar foo bar foo foo. bar foo bar foo#foo.##"; $tpl = $this->smarty->createTemplate('eval:{textformat wrap=40 indent=4 wrap_char="#"}' . $this->string . '{/textformat}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testStyleEmail() { $result = "\n\nThis is foo. This is foo. This is foo. This is foo. This is foo. This is\nfoo.\n\nThis is bar.\n\nbar foo bar foo foo. bar foo bar foo foo. bar foo bar foo foo. bar foo\nbar foo foo. bar foo bar foo foo. bar foo bar foo foo. bar foo bar foo\nfoo.\n\n"; $tpl = $this->smarty->createTemplate('eval:{textformat style="email"}' . $this->string . '{/textformat}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testStyleEmailWithoutMbstring() { Smarty::$_MBSTRING = false; $result = "\n\nThis is foo. This is foo. This is foo. This is foo. This is foo. This is\nfoo.\n\nThis is bar.\n\nbar foo bar foo foo. bar foo bar foo foo. bar foo bar foo foo. bar foo\nbar foo foo. bar foo bar foo foo. bar foo bar foo foo. bar foo bar foo\nfoo.\n\n"; $tpl = $this->smarty->createTemplate('eval:{textformat style="email"}' . $this->string . '{/textformat}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } } ?>smarty3-3.1.13/development/PHPunit/phpunit-tests-single.bat0000644000175000017500000001343411467061362022317 0ustar mikemike@echo off REM PHPUnit REM REM Copyright (c) 2002-2008, Sebastian Bergmann . REM All rights reserved. REM REM Redistribution and use in source and binary forms, with or without REM modification, are permitted provided that the following conditions REM are met: REM REM * Redistributions of source code must retain the above copyright REM notice, this list of conditions and the following disclaimer. REM REM * Redistributions in binary form must reproduce the above copyright REM notice, this list of conditions and the following disclaimer in REM the documentation and/or other materials provided with the REM distribution. REM REM * Neither the name of Sebastian Bergmann nor the names of his REM contributors may be used to endorse or promote products derived REM from this software without specific prior written permission. REM REM THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS REM "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT REM LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS REM FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REM COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, REM INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, REM BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; REM LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER REM CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC REM LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN REM ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE REM POSSIBILITY OF SUCH DAMAGE. REM REM $Id: pear-phpunit.bat 2798 2008-04-14 16:48:33Z sb $ REM set PHPBIN="C:\wamp\bin\php\php5.2.9-1\.\php.exe" "C:\wamp\bin\php\php5.2.9-1\.\php.exe">test_results.txt "C:\wamp\bin\php\php5.2.9-1\phpunit" --verbose SmartyTestssingle.php @echo off REM PHPUnit REM REM Copyright (c) 2002-2008, Sebastian Bergmann . REM All rights reserved. REM REM Redistribution and use in source and binary forms, with or without REM modification, are permitted provided that the following conditions REM are met: REM REM * Redistributions of source code must retain the above copyright REM notice, this list of conditions and the following disclaimer. REM REM * Redistributions in binary form must reproduce the above copyright REM notice, this list of conditions and the following disclaimer in REM the documentation and/or other materials provided with the REM distribution. REM REM * Neither the name of Sebastian Bergmann nor the names of his REM contributors may be used to endorse or promote products derived REM from this software without specific prior written permission. REM REM THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS REM "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT REM LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS REM FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REM COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, REM INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, REM BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; REM LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER REM CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC REM LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN REM ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE REM POSSIBILITY OF SUCH DAMAGE. REM REM $Id: pear-phpunit.bat 2798 2008-04-14 16:48:33Z sb $ REM set PHPBIN="C:\wamp\bin\php\php5.2.9-1\.\php.exe" "C:\wamp\bin\php\php5.2.9-1\.\php.exe">test_results.txt "C:\wamp\bin\php\php5.2.9-1\phpunit" --verbose SmartyTestssingle.php @echo off REM PHPUnit REM REM Copyright (c) 2002-2008, Sebastian Bergmann . REM All rights reserved. REM REM Redistribution and use in source and binary forms, with or without REM modification, are permitted provided that the following conditions REM are met: REM REM * Redistributions of source code must retain the above copyright REM notice, this list of conditions and the following disclaimer. REM REM * Redistributions in binary form must reproduce the above copyright REM notice, this list of conditions and the following disclaimer in REM the documentation and/or other materials provided with the REM distribution. REM REM * Neither the name of Sebastian Bergmann nor the names of his REM contributors may be used to endorse or promote products derived REM from this software without specific prior written permission. REM REM THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS REM "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT REM LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS REM FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REM COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, REM INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, REM BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; REM LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER REM CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC REM LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN REM ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE REM POSSIBILITY OF SUCH DAMAGE. REM REM $Id: pear-phpunit.bat 2798 2008-04-14 16:48:33Z sb $ REM set PHPBIN="C:\wamp\bin\php\php5.2.9-1\.\php.exe" "C:\wamp\bin\php\php5.2.9-1\.\php.exe">test_results.txt "C:\wamp\bin\php\php5.2.9-1\phpunit" --verbose SmartyTestssingle.php smarty3-3.1.13/development/PHPunit/PluginModifierCountWordsTests.php0000644000175000017500000000414411673427331024221 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } public function testDefault() { $result = "7"; $tpl = $this->smarty->createTemplate('eval:{"Dealers Will Hear Car Talk at Noon."|count_words}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testDefaultWithoutMbstring() { Smarty::$_MBSTRING = false; $result = "7"; $tpl = $this->smarty->createTemplate('eval:{"Dealers Will Hear Car Talk at Noon."|count_words}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testDashes() { $result = "7"; $tpl = $this->smarty->createTemplate('eval:{"Smalltime-Dealers Will Hear Car Talk at Noon."|count_words}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testDashesWithoutMbstring() { Smarty::$_MBSTRING = false; $result = "7"; $tpl = $this->smarty->createTemplate('eval:{"Smalltime-Dealers Will Hear Car Talk at Noon."|count_words}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testUmlauts() { $result = "7"; $tpl = $this->smarty->createTemplate('eval:{"Dealers Will Hear Cär Talk at Nöön."|count_words}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testUmlautsWithoutMbstring() { Smarty::$_MBSTRING = false; $result = "7"; $tpl = $this->smarty->createTemplate('eval:{"Dealers Will Hear Cär Talk at Nöön."|count_words}'); $this->assertNotEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } } ?>smarty3-3.1.13/development/PHPunit/ModifierTests.php0000644000175000017500000001417512044502270021004 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test PHP function as modifier */ public function testPHPFunctionModifier() { $this->smarty->security_policy->php_modifiers = array('strlen'); $tpl = $this->smarty->createTemplate('eval:{"hello world"|strlen}'); $this->assertEquals("11", $this->smarty->fetch($tpl)); } public function testPHPFunctionModifier2() { $this->smarty->security_policy->php_modifiers = array('strlen'); $tpl = $this->smarty->createTemplate('eval:{assign var=foo value="hello world"}{$foo|strlen}'); $this->assertEquals("11", $this->smarty->fetch($tpl)); } /** * test plugin as modifier */ public function testPluginModifier() { $tpl = $this->smarty->createTemplate('eval:{"hello world"|truncate:6}'); $this->assertEquals("hel...", $this->smarty->fetch($tpl)); } /** * test plugin as modifier with variable */ public function testPluginModifierVar() { $tpl = $this->smarty->createTemplate('eval:{"hello world"|truncate:$foo}'); $tpl->assign('foo', 6); $this->assertEquals("hel...", $this->smarty->fetch($tpl)); } public function testPluginModifierVar2() { $tpl = $this->smarty->createTemplate('eval:{"hello world"|truncate:$foo:" "}'); $tpl->assign('foo', 6); $this->assertEquals("hel ", $this->smarty->fetch($tpl)); } public function testPluginModifierVar3() { $tpl = $this->smarty->createTemplate('eval:{"hello world"|truncate:$foo:$bar}'); $tpl->assign('foo', 6); $tpl->assign('bar', ' '); $this->assertEquals("hel ", $this->smarty->fetch($tpl)); } /** * test modifier chaining */ public function testModifierChaining() { $this->smarty->security_policy->php_modifiers = array('strlen'); $tpl = $this->smarty->createTemplate('eval:{"hello world"|truncate:6|strlen}'); $this->assertEquals("6", $this->smarty->fetch($tpl)); } /** * test modifier in {if} */ public function testModifierInsideIf() { $this->smarty->security_policy->php_modifiers = array('strlen'); $tpl = $this->smarty->createTemplate('eval:{if "hello world"|truncate:6|strlen == 6}okay{/if}'); $this->assertEquals("okay", $this->smarty->fetch($tpl)); } /** * test modifier in expressions */ public function testModifierInsideExpression() { $this->smarty->security_policy->php_modifiers = array('strlen'); $tpl = $this->smarty->createTemplate('eval:{"hello world"|truncate:6|strlen + ("hello world"|truncate:8|strlen)}'); $this->assertEquals("14", $this->smarty->fetch($tpl)); } public function testModifierInsideExpression2() { $this->smarty->security_policy->php_modifiers = array('round'); $tpl = $this->smarty->createTemplate('eval:{1.1*7.1|round}'); $this->assertEquals("7.7", $this->smarty->fetch($tpl)); } /** * test modifier at plugin result */ public function testModifierAtPluginResult() { $tpl = $this->smarty->createTemplate('eval:{counter|truncate:5 start=100000}'); $this->assertEquals("10...", $this->smarty->fetch($tpl)); } /** * test unqouted string as modifier parameter */ public function testModifierUnqoutedString() { $tpl = $this->smarty->createTemplate('eval:{"hello world"|replace:hello:xxxxx}'); $this->assertEquals("xxxxx world", $this->smarty->fetch($tpl)); } /** * test registered modifier function */ public function testModifierRegisteredFunction() { $this->smarty->registerPlugin(Smarty::PLUGIN_MODIFIER,'testmodifier','testmodifier'); $tpl = $this->smarty->createTemplate('eval:{$foo|testmodifier}'); $tpl->assign('foo',2); $this->assertEquals("mymodifier function 2", $this->smarty->fetch($tpl)); } /** * test registered modifier static class */ public function testModifierRegisteredStaticClass() { $this->smarty->registerPlugin(Smarty::PLUGIN_MODIFIER,'testmodifier',array('testmodifierclass','staticcall')); $tpl = $this->smarty->createTemplate('eval:{$foo|testmodifier}'); $tpl->assign('foo',1); $this->assertEquals("mymodifier static 1", $this->smarty->fetch($tpl)); } /** * test registered modifier methode call */ public function testModifierRegisteredMethodCall() { $obj= new testmodifierclass(); $this->smarty->registerPlugin(Smarty::PLUGIN_MODIFIER,'testmodifier',array($obj,'method')); $tpl = $this->smarty->createTemplate('eval:{$foo|testmodifier}'); $tpl->assign('foo',3); $this->assertEquals("mymodifier method 3", $this->smarty->fetch($tpl)); } /** * test unknown modifier error */ public function testUnknownModifier() { try { $this->smarty->fetch('eval:{"hello world"|unknown}'); } catch (Exception $e) { $this->assertContains(htmlentities('unknown modifier "unknown"'), $e->getMessage()); return; } $this->fail('Exception for unknown modifier has not been raised.'); } /** * test default modifier */ public function testDefaultModifier() { $this->smarty->default_modifiers = array('escape'); $tpl = $this->smarty->createTemplate('eval:{$foo}{$foo nofilter}'); $tpl->assign('foo',''); $this->assertEquals('<bar>', $this->smarty->fetch($tpl)); } } function testmodifier($value) { return "mymodifier function $value"; } class testmodifierclass { static function staticcall($value) { return "mymodifier static $value"; } public function method($value) { return "mymodifier method $value"; } } ?>smarty3-3.1.13/development/PHPunit/CompileAssignTests.php0000644000175000017500000001403111467061362022004 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test old style of assign tag */ public function testAssignOld1() { $this->assertEquals("1", $this->smarty->fetch('eval:{assign var=foo value=1}{$foo}')); $this->assertEquals("1", $this->smarty->fetch('eval:{assign var = foo value= 1}{$foo}')); } public function testAssignOld2() { $tpl = $this->smarty->createTemplate('eval:{assign var=\'foo\' value=1}{$foo}'); $this->assertEquals("1", $this->smarty->fetch($tpl)); } public function testAssignOld3() { $tpl = $this->smarty->createTemplate('eval:{assign var="foo" value=1}{$foo}'); $this->assertEquals("1", $this->smarty->fetch($tpl)); } public function testAssignOld4() { $tpl = $this->smarty->createTemplate('eval:{assign var=foo value=bar}{$foo}'); $this->assertEquals("bar", $this->smarty->fetch($tpl)); } public function testAssignOld5() { $tpl = $this->smarty->createTemplate('eval:{assign var=foo value=1+2}{$foo}'); $this->assertEquals("3", $this->smarty->fetch($tpl)); } public function testAssignOld6() { $this->smarty->security_policy->php_functions = array('strlen'); $tpl = $this->smarty->createTemplate('eval:{assign var=foo value=strlen(\'bar\')}{$foo}'); $this->assertEquals("3", $this->smarty->fetch($tpl)); } public function testAssignOld7() { $this->smarty->security_policy->php_modifiers = array('strlen'); $tpl = $this->smarty->createTemplate('eval:{assign var=foo value=\'bar\'|strlen}{$foo}'); $this->assertEquals("3", $this->smarty->fetch($tpl)); } public function testAssignOld8() { $tpl = $this->smarty->createTemplate('eval:{assign var=foo value=[9,8,7,6]}{foreach $foo as $x}{$x}{/foreach}'); $this->assertEquals("9876", $this->smarty->fetch($tpl)); } public function testAssignOld9() { $tpl = $this->smarty->createTemplate('eval:{assign var=foo value=[\'a\'=>9,\'b\'=>8,\'c\'=>7,\'d\'=>6]}{foreach $foo as $x}{$x@key}{$x}{/foreach}'); $this->assertEquals("a9b8c7d6", $this->smarty->fetch($tpl)); } /** * test assign tag shorthands */ public function testAssignShort1() { $this->assertEquals("1", $this->smarty->fetch('string:{assign foo value=1}{$foo}')); } public function testAssignShort2() { $this->assertEquals("1", $this->smarty->fetch('string:{assign foo 1}{$foo}')); } /** * test new style of assign tag */ public function testAssignNew1() { $this->assertEquals("1", $this->smarty->fetch('eval:{$foo=1}{$foo}')); $this->assertEquals("1", $this->smarty->fetch('eval:{$foo =1}{$foo}')); $this->assertEquals("1", $this->smarty->fetch('eval:{$foo = 1}{$foo}')); } public function testAssignNew2() { $tpl = $this->smarty->createTemplate('eval:{$foo=bar}{$foo}'); $this->assertEquals("bar", $this->smarty->fetch($tpl)); } public function testAssignNew3() { $this->assertEquals("3", $this->smarty->fetch('eval:{$foo=1+2}{$foo}')); $this->assertEquals("3", $this->smarty->fetch('eval:{$foo = 1+2}{$foo}')); $this->assertEquals("3", $this->smarty->fetch('eval:{$foo = 1 + 2}{$foo}')); } public function testAssignNew4() { $this->smarty->security_policy->php_functions = array('strlen'); $tpl = $this->smarty->createTemplate('eval:{$foo=strlen(\'bar\')}{$foo}'); $this->assertEquals("3", $this->smarty->fetch($tpl)); } public function testAssignNew5() { $this->smarty->security_policy->php_modifiers = array('strlen'); $tpl = $this->smarty->createTemplate("eval:{\$foo='bar'|strlen}{\$foo}"); $this->assertEquals("3", $this->smarty->fetch($tpl)); } public function testAssignNew6() { $tpl = $this->smarty->createTemplate("eval:{\$foo=[9,8,7,6]}{foreach \$foo as \$x}{\$x}{/foreach}"); $this->assertEquals("9876", $this->smarty->fetch($tpl)); } public function testAssignNew7() { $tpl = $this->smarty->createTemplate("eval:{\$foo=['a'=>9,'b'=>8,'c'=>7,'d'=>6]}{foreach \$foo as \$x}{\$x@key}{\$x}{/foreach}"); $this->assertEquals("a9b8c7d6", $this->smarty->fetch($tpl)); } public function testAssignArrayAppend() { $tpl = $this->smarty->createTemplate("eval:{\$foo =1}{\$foo[] = 2}{foreach \$foo as \$x}{\$x@key}{\$x}{/foreach}"); $this->assertEquals("0112", $this->smarty->fetch($tpl)); } public function testAssignArrayAppend2() { $this->smarty->assign('foo',1); $tpl = $this->smarty->createTemplate("eval:{\$foo[]=2}{foreach \$foo as \$x}{\$x@key}{\$x}{/foreach}", null, null, $this->smarty); $this->assertEquals("0112", $this->smarty->fetch($tpl)); $tpl2 = $this->smarty->createTemplate("eval:{\$foo}", null, null, $this->smarty); $this->assertEquals("1", $this->smarty->fetch($tpl2)); } public function testAssignArrayAppend3() { $this->smarty->assign('foo',1); $tpl = $this->smarty->createTemplate("eval:{\$foo[]=2 scope=root}{foreach \$foo as \$x}{\$x@key}{\$x}{/foreach}", null, null, $this->smarty); $this->assertEquals("0112", $this->smarty->fetch($tpl)); $tpl2 = $this->smarty->createTemplate("eval:{foreach \$foo as \$x}{\$x@key}{\$x}{/foreach}", null, null, $this->smarty); $this->assertEquals("0112", $this->smarty->fetch($tpl2)); } public function testAssignNestedArray() { $tpl = $this->smarty->createTemplate("eval:{\$foo['a'][4]=1}{\$foo['a'][4]}"); $this->assertEquals("1", $this->smarty->fetch($tpl)); } } ?>smarty3-3.1.13/development/PHPunit/PHPunitplugins/0000755000175000017500000000000012141655567020453 5ustar mikemikesmarty3-3.1.13/development/PHPunit/PHPunitplugins/cacheresource.mysqltest.php0000644000175000017500000000045311634664106026040 0ustar mikemike__construct(); } }smarty3-3.1.13/development/PHPunit/PHPunitplugins/resource.mysqlstest.php0000644000175000017500000000043411634664106025236 0ustar mikemike__construct(); } }smarty3-3.1.13/development/PHPunit/PHPunitplugins/cacheresource.apctest.php0000644000175000017500000000100311635721522025423 0ustar mikemikecontents = array(); $this->timestamps = array(); $t = $this->getContent($_template); return $t ? $t : null; } public function __sleep() { return array(); } public function __wakeup() { $this->__construct(); } }smarty3-3.1.13/development/PHPunit/PHPunitplugins/compiler.test.php0000644000175000017500000000110611634664106023745 0ustar mikemikerequired_attributes = array('data'); $_attr = $this->getAttributes($compiler, $args); $this->openTag($compiler, 'test'); return ""; } } // compiler.testclose.php class smarty_compiler_testclose extends Smarty_Internal_CompileBase { public function compile($args, $compiler) { $this->closeTag($compiler, 'test'); return ''; } } ?> smarty3-3.1.13/development/PHPunit/PHPunitplugins/resource.db2.php0000644000175000017500000000132211634664106023452 0ustar mikemikefilepath = 'db2:'; $source->uid = sha1($source->resource); $source->timestamp = 0; $source->exists = true; } public function getContent(Smarty_Template_Source $source) { return '{$x="hello world"}{$x}'; } } ?> smarty3-3.1.13/development/PHPunit/PHPunitplugins/function.chain1.php0000644000175000017500000000025111634664106024144 0ustar mikemikesmarty->loadPlugin('smarty_function_chain2'); return smarty_function_chain2($params,$tpl); } ?> smarty3-3.1.13/development/PHPunit/PHPunitplugins/resource.mysqltest.php0000644000175000017500000000043111634664106025050 0ustar mikemike__construct(); } }smarty3-3.1.13/development/PHPunit/PHPunitplugins/insert.insertplugintest.php0000644000175000017500000000024711467350652026112 0ustar mikemikesmarty3-3.1.13/development/PHPunit/PHPunitplugins/compiler.testclose.php0000644000175000017500000000035011634664106024773 0ustar mikemikecloseTag($compiler, 'test'); return ''; } } ?> smarty3-3.1.13/development/PHPunit/PHPunitplugins/block.testblock.php0000644000175000017500000000125111471607630024237 0ustar mikemike smarty3-3.1.13/development/PHPunit/PHPunitplugins/cacheresource.memcachetest.php0000644000175000017500000000102211634664106026426 0ustar mikemikecontents = array(); $this->timestamps = array(); $t = $this->getContent($_template); return $t ? $t : null; } public function __sleep() { return array(); } public function __wakeup() { $this->__construct(); } }smarty3-3.1.13/development/PHPunit/PHPunitplugins/function.chain3.php0000644000175000017500000000012711634664106024150 0ustar mikemike smarty3-3.1.13/development/PHPunit/PHPunitplugins/resource.db3.php0000644000175000017500000000147311634664106023462 0ustar mikemikefilepath = 'db3:'; $source->uid = sha1($source->resource); $source->timestamp = 0; $source->exists = true; } public function getContent(Smarty_Template_Source $source) { return '{$x="hello world"}{$x}'; } public function getCompiledFilepath(Smarty_Internal_Template $_template) { return false; } } ?> smarty3-3.1.13/development/PHPunit/PHPunitplugins/resource.ambiguous.php0000644000175000017500000000320711645561456025010 0ustar mikemikedirectory = rtrim($directory, "/\\") . DS; } public function setSegment($segment) { $this->segment = $segment; } /** * modify resource_name according to resource handlers specifications * * @param Smarty $smarty Smarty instance * @param string $resource_name resource_name to make unique * @return string unique resource name */ protected function buildUniqueResourceName(Smarty $smarty, $resource_name) { return get_class($this) . '#' . $this->segment . '#' . $resource_name; } /** * populate Source Object with meta data from Resource * * @param Smarty_Template_Source $source source object * @param Smarty_Internal_Template $_template template object */ public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null) { $segment = ''; if ($this->segment) { $segment = rtrim($this->segment, "/\\") . DS; } $source->filepath = $this->directory . $segment . $source->name; $source->uid = sha1($source->filepath); if ($source->smarty->compile_check && !isset($source->timestamp)) { $source->timestamp = @filemtime($source->filepath); $source->exists = !!$source->timestamp; } } } smarty3-3.1.13/development/PHPunit/PHPunitplugins/resource.db4.php0000644000175000017500000000145411634664106023462 0ustar mikemikefilepath = 'db4:'; $source->uid = sha1($source->resource); $source->timestamp = 0; $source->exists = true; } public function getContent(Smarty_Template_Source $source) { if ($source instanceof Smarty_Config_Source) { return "foo = 'bar'\n"; } return '{$x="hello world"}{$x}'; } } ?> smarty3-3.1.13/development/PHPunit/PHPunitplugins/resource.db.php0000644000175000017500000000156611634664106023402 0ustar mikemike smarty3-3.1.13/development/PHPunit/PHPunitplugins/function.chain2.php0000644000175000017500000000025111634664106024145 0ustar mikemikesmarty->loadPlugin('smarty_function_chain3'); return smarty_function_chain3($params,$tpl); } ?> smarty3-3.1.13/development/PHPunit/phpunit-tests-coverage.bat0000644000175000017500000000362511275032024022620 0ustar mikemike@echo off REM PHPUnit REM REM Copyright (c) 2002-2008, Sebastian Bergmann . REM All rights reserved. REM REM Redistribution and use in source and binary forms, with or without REM modification, are permitted provided that the following conditions REM are met: REM REM * Redistributions of source code must retain the above copyright REM notice, this list of conditions and the following disclaimer. REM REM * Redistributions in binary form must reproduce the above copyright REM notice, this list of conditions and the following disclaimer in REM the documentation and/or other materials provided with the REM distribution. REM REM * Neither the name of Sebastian Bergmann nor the names of his REM contributors may be used to endorse or promote products derived REM from this software without specific prior written permission. REM REM THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS REM "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT REM LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS REM FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REM COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, REM INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, REM BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; REM LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER REM CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC REM LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN REM ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE REM POSSIBILITY OF SUCH DAMAGE. REM REM $Id: pear-phpunit.bat 2798 2008-04-14 16:48:33Z sb $ REM set PHPBIN="C:\wamp\bin\php\php5.2.9-1\.\php.exe" "C:\wamp\bin\php\php5.2.9-1\.\php.exe">test_results.txt "C:\wamp\bin\php\php5.2.9-1\phpunit" --coverage-html coverage SmartyTests.php smarty3-3.1.13/development/PHPunit/CompileErrorTests.php0000644000175000017500000000451612044502270021646 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test none existing template file error */ public function testNoneExistingTemplateError() { try { $this->smarty->fetch('eval:{include file=\'no.tpl\'}'); } catch (Exception $e) { $this->assertContains(htmlentities('Unable to load template'), $e->getMessage()); return; } $this->fail('Exception for none existing template has not been raised.'); } /** * test unkown tag error */ public function testUnknownTagError() { try { $this->smarty->fetch('eval:{unknown}'); } catch (Exception $e) { $this->assertContains(htmlentities('unknown tag "unknown"'), $e->getMessage()); return; } $this->fail('Exception for unknown Smarty tag has not been raised.'); } /** * test unclosed tag error */ public function testUnclosedTagError() { try { $this->smarty->fetch('eval:{if true}'); } catch (Exception $e) { $this->assertContains(htmlentities('unclosed {if} tag'), $e->getMessage()); return; } $this->fail('Exception for unclosed Smarty tags has not been raised.'); } /** * test syntax error */ public function testSyntaxError() { try { $this->smarty->fetch('eval:{assign var=}'); } catch (Exception $e) { $this->assertContains(htmlentities('Syntax Error in template "599a9cf0e3623a3206bd02a0f5c151d5f5f3f69e"'), $e->getMessage()); $this->assertContains(htmlentities('Unexpected "}"'), $e->getMessage()); return; } $this->fail('Exception for syntax error has not been raised.'); } /** * test empty templates */ public function testEmptyTemplate() { $tpl = $this->smarty->createTemplate('eval:'); $this->assertEquals('', $this->smarty->fetch($tpl)); } } ?> smarty3-3.1.13/development/PHPunit/PluginFunctionFetchTests.php0000644000175000017500000000073711673463575023210 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } public function testTodo() { // TODO: UnitTests for {fetch} } } ?>smarty3-3.1.13/development/PHPunit/CacheResourceCustomApcTests.php0000644000175000017500000000125311636147133023602 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->caching_type = 'apctest'; $this->smarty->addPluginsDir(dirname(__FILE__)."/PHPunitplugins/"); } public static function isRunnable() { return function_exists('apc_cache_info') && ini_get('apc.enable_cli'); } } ?>smarty3-3.1.13/development/PHPunit/CompilePhpTests.php0000644000175000017500000002771711634664106021327 0ustar mikemike tag * * @package PHPunit * @author Uwe Tews */ /** * class for {php} and tag tests */ class CompilePhpTests extends PHPUnit_Framework_TestCase { public function setUp() { $this->smartyBC = SmartyTests::$smartyBC; SmartyTests::init(); $this->smartyBC->disableSecurity(); } public static function isRunnable() { return true; } /** * test tag * default is PASSTHRU */ public function testPhpTag() { $tpl = $this->smartyBC->createTemplate("eval:"); $content = $this->smartyBC->fetch($tpl); $this->assertEquals("", $content); } // ALLOW public function testPhpTagAllow() { $this->smartyBC->php_handling = Smarty::PHP_ALLOW; $this->smartyBC->disableSecurity(); $tpl = $this->smartyBC->createTemplate("eval:"); $content = $this->smartyBC->fetch($tpl); $this->assertEquals('hello world', $content); } /** * test shorttag * default is PASSTHRU */ public function testShortTag() { $this->smartyBC->assign('foo', 'bar'); $content = $this->smartyBC->fetch('eval:'); $this->assertEquals('', $content); } public function testEndTagInStrings1() { $str = <<< STR " => 3 ); \$b = Array("?>" => "?>"); \$c = Array("a" => Array("b" => 7)); class d_class { public \$d_attr = 8; } \$d = new d_class(); \$e = Array("f" => \$d); // '" # '" echo '{\$a["?>"]}'; echo "{\$a['?>']}"; echo '{\$a["{\$b["?>"]}"]}'; echo "{\$c['a']['b']}"; echo "a{\$e['f']->d_attr}a" ?> STR; $this->smartyBC->left_delimiter = '{{'; $this->smartyBC->right_delimiter = '}}'; $tpl = $this->smartyBC->createTemplate("eval:$str"); $content = $this->smartyBC->fetch($tpl); $this->assertEquals(str_replace("\r", '', $str), str_replace("\r", '', $content)); $this->smartyBC->php_handling = Smarty::PHP_ALLOW; $this->smartyBC->disableSecurity(); $tpl = $this->smartyBC->createTemplate("eval:$str"); $content = $this->smartyBC->fetch($tpl); $this->assertEquals('{$a["?>"]}3{$a["{$b["?>"]}"]}7a8a', $content); } public function testEndTagInStrings2() { $str = <<< STR " => 3 ); \$b = Array("?>" => "?>"); echo "{\$a["?>"]}"; echo "{\$a["{\$b["?>"]}"]}"; ?> STR; $this->smartyBC->left_delimiter = '{{'; $this->smartyBC->right_delimiter = '}}'; $tpl = $this->smartyBC->createTemplate("eval:$str"); $content = $this->smartyBC->fetch($tpl); $this->assertEquals(str_replace("\r", '', $str), str_replace("\r", '', $content)); $this->smartyBC->php_handling = Smarty::PHP_ALLOW; $this->smartyBC->disableSecurity(); $tpl = $this->smartyBC->createTemplate("eval:$str"); $content = $this->smartyBC->fetch($tpl); $this->assertEquals('33', $content); } public function testEndTagInStrings3() { $str = <<< STR a'; echo '?>\\\\'; echo '\\\\\\'?>a'; echo '/*'; // */ echo 1+1; ?> STR; $tpl = $this->smartyBC->createTemplate("eval:$str"); $content = $this->smartyBC->fetch($tpl); $this->assertEquals(str_replace("\r", '', $str), str_replace("\r", '', $content)); $this->smartyBC->php_handling = Smarty::PHP_ALLOW; $this->smartyBC->disableSecurity(); $tpl = $this->smartyBC->createTemplate("eval:$str"); $content = $this->smartyBC->fetch($tpl); $this->assertEquals('a?>a?>\\\\\'?>a/*2', $content); } public function testEndTagInStrings4() { $str = <<< STR a"; echo "?>\\\\"; echo "\\"?>"; echo "\\\\\\"?>a"; echo "/*"; echo 1+1; ?> STR; $tpl = $this->smartyBC->createTemplate("eval:$str"); $content = $this->smartyBC->fetch($tpl); $this->assertEquals(str_replace("\r", '', $str), str_replace("\r", '', $content)); $this->smartyBC->php_handling = Smarty::PHP_ALLOW; $this->smartyBC->disableSecurity(); $tpl = $this->smartyBC->createTemplate("eval:$str"); $content = $this->smartyBC->fetch($tpl); $this->assertEquals('a?>a?>\\"?>\\"?>a/*2', $content); } public function testEndTagInHEREDOC() { $str = <<< STR "! ?> /* LALA LALA ; LALA;1+1; LALA; echo << STR; // " Fix emacs highlighting which chokes on preceding open quote $tpl = $this->smartyBC->createTemplate("eval:$str"); $content = $this->smartyBC->fetch($tpl); $this->assertEquals(str_replace("\r", '', $str), str_replace("\r", '', $content)); $this->smartyBC->php_handling = Smarty::PHP_ALLOW; $this->smartyBC->disableSecurity(); $tpl = $this->smartyBC->createTemplate("eval:$str"); $content = $this->smartyBC->fetch($tpl); $this->assertEquals(" LALA\n ?>\n\n \"! ?> /*\n LALA\nLALA ;\nLALA;1+1;LALA2;1+1;", str_replace("\r", '', $content)); } public function testEmbeddingsInHEREDOC1() { $str = <<< STR '" => 1); echo <<< EOT {\$a["EOT?>'"]} EOT; ?> STR; // ' Fix emacs highlighting which chokes on preceding open quote $this->smartyBC->left_delimiter = '{{'; $this->smartyBC->right_delimiter = '}}'; $tpl = $this->smartyBC->createTemplate("eval:$str"); $content = $this->smartyBC->fetch($tpl); $this->assertEquals(str_replace("\r", '', $str), str_replace("\r", '', $content)); $this->smartyBC->php_handling = Smarty::PHP_ALLOW; $this->smartyBC->disableSecurity(); $tpl = $this->smartyBC->createTemplate("eval:$str"); $content = $this->smartyBC->fetch($tpl); $this->assertEquals("1", $content); } public function testEmbeddingsInHEREDOC2() { $str = <<< STR '" => 1); echo <<< EOT {\$a[<<' EOT2 ]} EOT ; ?> STR; // ' Fix emacs highlighting which chokes on preceding open quote $this->smartyBC->left_delimiter = '{{'; $this->smartyBC->right_delimiter = '}}'; $tpl = $this->smartyBC->createTemplate("eval:$str"); $content = $this->smartyBC->fetch($tpl); $this->assertEquals(str_replace("\r", '', $str), str_replace("\r", '', $content)); /* Disabled due to bug in PHP easiest illustrated by: http://bugs.php.net/bug.php?id=50654 1); echo << $this->smartyBC->left_delimiter = '{{'; $this->smartyBC->right_delimiter = '}}'; $this->smartyBC->php_handling = Smarty::PHP_ALLOW; $this->smartyBC->security = false; $tpl = $this->smartyBC->createTemplate("eval:$str"); $content = $this->smartyBC->fetch($tpl); $this->assertEquals("11", $content); */ } public function testEmbeddedHEREDOC() { $str = <<< STR 3); \$b = Array("aa\"?>" => 4); echo "{\$a[<<"]}" EOT ]}"; ?> STR; // " Fix emacs highlighting which chokes on preceding open quote $this->smartyBC->left_delimiter = '{{'; $this->smartyBC->right_delimiter = '}}'; $tpl = $this->smartyBC->createTemplate("eval:$str"); $content = $this->smartyBC->fetch($tpl); $this->assertEquals(str_replace("\r", '', $str), str_replace("\r", '', $content)); $this->smartyBC->php_handling = Smarty::PHP_ALLOW; $this->smartyBC->disableSecurity(); $tpl = $this->smartyBC->createTemplate("eval:$str"); $content = $this->smartyBC->fetch($tpl); $this->assertEquals("3", $content); } public function testEmbeddedNOWDOC() { $str = <<< STR " => 3); echo "{\$a[<<<'EOT' aa"?> EOT ]}"; ?> STR; // " Fix emacs highlighting which chokes on preceding open quote $this->smartyBC->left_delimiter = '{{'; $this->smartyBC->right_delimiter = '}}'; $tpl = $this->smartyBC->createTemplate("eval:$str"); $content = $this->smartyBC->fetch($tpl); $this->assertEquals(str_replace("\r", '', $str), str_replace("\r", '', $content)); if (version_compare(PHP_VERSION, '5.3.0') < 0) { return; } $this->smartyBC->php_handling = Smarty::PHP_ALLOW; $this->smartyBC->disableSecurity(); $tpl = $this->smartyBC->createTemplate("eval:$str"); $content = $this->smartyBC->fetch($tpl); $this->assertEquals("3", $content); } public function testEndTagInNOWDOC() { $str = <<< STR bb LALA; echo <<<'LALA2' LALA2;1+1;?> LALA2 ; ?> STR; $tpl = $this->smartyBC->createTemplate("eval:$str"); $content = $this->smartyBC->fetch($tpl); $this->assertEquals(str_replace("\r", '', $str), str_replace("\r", '', $content)); if (version_compare(PHP_VERSION, '5.3.0') < 0) { return; } $this->smartyBC->php_handling = Smarty::PHP_ALLOW; $this->smartyBC->disableSecurity(); $tpl = $this->smartyBC->createTemplate("eval:$str"); $content = $this->smartyBC->fetch($tpl); $this->assertEquals("aa ?> bbLALA2;1+1;?>", $content); } public function testNewlineHEREDOC() { $sprintf_str = ""; foreach (Array("\n", "\r\n") as $newline_chars) { $str = sprintf($sprintf_str, $newline_chars); $this->smartyBC->php_handling = Smarty::PHP_PASSTHRU; $this->smartyBC->enableSecurity(); $tpl = $this->smartyBC->createTemplate("eval:$str"); $content = $this->smartyBC->fetch($tpl); // For some reason $content doesn't preserve newline format. Not a big problem, I think. $this->assertEquals(preg_replace("/\r\n/", "\n", $str), preg_replace("/\r\n/", "\n", $content) ); $this->smartyBC->php_handling = Smarty::PHP_ALLOW; $this->smartyBC->disableSecurity(); $tpl = $this->smartyBC->createTemplate("eval:$str"); $content = $this->smartyBC->fetch($tpl); $this->assertEquals("a", $content); } } public function testNewlineNOWDOC() { $sprintf_str = ""; foreach (Array("\n", "\r\n") as $newline_chars) { $str = sprintf($sprintf_str, $newline_chars); $this->smartyBC->php_handling = Smarty::PHP_PASSTHRU; $this->smartyBC->enableSecurity(); $tpl = $this->smartyBC->createTemplate("eval:$str"); $content = $this->smartyBC->fetch($tpl); // For some reason $content doesn't preserve newline format. Not a big problem, I think. $this->assertEquals(preg_replace("/\r\n/", "\n", $str), preg_replace("/\r\n/", "\n", $content) ); if (version_compare(PHP_VERSION, '5.3.0') >= 0) { $this->smartyBC->php_handling = Smarty::PHP_ALLOW; $this->smartyBC->disableSecurity(); $tpl = $this->smartyBC->createTemplate("eval:$str"); $content = $this->smartyBC->fetch($tpl); $this->assertEquals("a", $content); } } } public function testEndTagInComment() { $str = <<< STR dd "' <<< EOT */ echo 1+1; ?> STR; $tpl = $this->smartyBC->createTemplate("eval:$str"); $content = $this->smartyBC->fetch($tpl); $this->assertEquals(str_replace("\r", '', $str), str_replace("\r", '', $content)); $this->smartyBC->php_handling = Smarty::PHP_ALLOW; $this->smartyBC->disableSecurity(); $tpl = $this->smartyBC->createTemplate("eval:$str"); $content = $this->smartyBC->fetch($tpl); $this->assertEquals('2', $content); } } ?>smarty3-3.1.13/development/PHPunit/PhpResourceTests.php0000644000175000017500000001736311665772477021541 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } protected function relative($path) { $path = str_replace( dirname(__FILE__), '.', $path ); if (DS == "\\") { $path = str_replace( "\\", "/", $path ); } return $path; } /** * test getTemplateFilepath */ public function testGetTemplateFilepath() { $tpl = $this->smarty->createTemplate('php:phphelloworld.php'); $this->assertEquals('./templates/phphelloworld.php', str_replace('\\', '/', $tpl->source->filepath)); } /** * test getTemplateTimestamp */ public function testGetTemplateTimestamp() { $tpl = $this->smarty->createTemplate('php:phphelloworld.php'); $this->assertTrue(is_integer($tpl->source->timestamp)); $this->assertEquals(10, strlen($tpl->source->timestamp)); } /** * test getTemplateSource *-/ public function testGetTemplateSource() { $tpl = $this->smarty->createTemplate('php:phphelloworld.php'); $this->assertContains('php hello world', $tpl->source->content); } /** * test usesCompiler */ public function testUsesCompiler() { $tpl = $this->smarty->createTemplate('php:phphelloworld.php'); $this->assertTrue($tpl->source->uncompiled); } /** * test isEvaluated */ public function testIsEvaluated() { $tpl = $this->smarty->createTemplate('php:phphelloworld.php'); $this->assertFalse($tpl->source->recompiled); } /** * test getCompiledFilepath */ public function testGetCompiledFilepath() { $tpl = $this->smarty->createTemplate('php:phphelloworld.php'); $this->assertFalse($tpl->compiled->filepath); } /** * test getCompiledTimestamp */ public function testGetCompiledTimestamp() { $tpl = $this->smarty->createTemplate('php:phphelloworld.php'); $this->assertFalse($tpl->compiled->timestamp); } /** * test mustCompile */ public function testMustCompile() { $tpl = $this->smarty->createTemplate('php:phphelloworld.php'); $this->assertFalse($tpl->mustCompile()); } /** * test getCachedFilepath */ public function testGetCachedFilepath() { $this->smarty->allow_php_templates = true; $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('php:phphelloworld.php'); $expected = './cache/'.sha1($this->smarty->getTemplateDir(0) . 'phphelloworld.php').'.phphelloworld.php.php'; $this->assertEquals($expected, $this->relative($tpl->cached->filepath)); } /** * test create cache file used by the following tests */ public function testCreateCacheFile() { // create dummy cache file $this->smarty->allow_php_templates = true; $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('php:phphelloworld.php'); $this->assertContains('php hello world', $this->smarty->fetch($tpl)); } /** * test getCachedTimestamp caching enabled */ public function testGetCachedTimestamp() { $this->smarty->allow_php_templates = true; $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('php:phphelloworld.php'); $this->assertTrue(is_integer($tpl->cached->timestamp)); $this->assertEquals(10, strlen($tpl->cached->timestamp)); } /** * test isCached */ public function testIsCached() { $this->smarty->allow_php_templates = true; $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('php:phphelloworld.php'); $this->assertTrue($tpl->isCached()); } /** * test isCached caching disabled */ public function testIsCachedCachingDisabled() { $this->smarty->allow_php_templates = true; $tpl = $this->smarty->createTemplate('php:phphelloworld.php'); $this->assertFalse($tpl->isCached()); } /** * test isCached on touched source */ public function testIsCachedTouchedSourcePrepare() { $this->smarty->allow_php_templates = true; $tpl = $this->smarty->createTemplate('php:phphelloworld.php'); sleep(1); touch ($tpl->source->filepath); } public function testIsCachedTouchedSource() { $this->smarty->allow_php_templates = true; $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('php:phphelloworld.php'); $this->assertFalse($tpl->isCached()); } /** * test is cache file is written */ public function testWriteCachedContent() { $this->smarty->allow_php_templates = true; $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->clearAllCache(); $tpl = $this->smarty->createTemplate('php:phphelloworld.php'); $this->smarty->fetch($tpl); $this->assertTrue(file_exists($tpl->cached->filepath)); } /** * test getRenderedTemplate */ public function testGetRenderedTemplate() { $this->smarty->allow_php_templates = true; $tpl = $this->smarty->createTemplate('php:phphelloworld.php'); $this->assertContains('php hello world', $tpl->fetch()); } /** * test $smarty->is_cached */ public function testSmartyIsCachedPrepare() { $this->smarty->allow_php_templates = true; // prepare files for next test $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; // clean up for next tests $this->smarty->clearAllCache(); $tpl = $this->smarty->createTemplate('php:phphelloworld.php'); $this->smarty->fetch($tpl); } public function testSmartyIsCached() { $this->smarty->allow_php_templates = true; $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('php:phphelloworld.php'); $this->assertTrue($this->smarty->isCached($tpl)); } /** * test $smarty->is_cached caching disabled */ public function testSmartyIsCachedCachingDisabled() { $this->smarty->allow_php_templates = true; $tpl = $this->smarty->createTemplate('php:phphelloworld.php'); $this->assertFalse($this->smarty->isCached($tpl)); } public function testGetTemplateFilepathName() { $this->smarty->addTemplateDir('./templates_2', 'foo'); $tpl = $this->smarty->createTemplate('php:[foo]helloworld.php'); $this->assertEquals('./templates_2/helloworld.php', $this->relative($tpl->source->filepath)); } public function testGetCachedFilepathName() { $this->smarty->addTemplateDir('./templates_2', 'foo'); $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('php:[foo]helloworld.php'); $expected = './cache/'.sha1($this->smarty->getTemplateDir('foo') .'helloworld.php').'.helloworld.php.php'; $this->assertEquals($expected, $this->relative($tpl->cached->filepath)); } /** * final cleanup */ public function testFinalCleanup() { $this->smarty->clearAllCache(); } } ?>smarty3-3.1.13/development/PHPunit/PluginModifierCountSentencesTests.php0000644000175000017500000000451611673427331025055 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } public function testDefault() { $tpl = $this->smarty->createTemplate('eval:{"hello world."|count_sentences}'); $this->assertEquals("1", $this->smarty->fetch($tpl)); $tpl = $this->smarty->createTemplate('eval:{"hello world. I\'m another? Sentence!"|count_sentences}'); $this->assertEquals("3", $this->smarty->fetch($tpl)); $tpl = $this->smarty->createTemplate('eval:{"hello world.wrong"|count_sentences}'); $this->assertEquals("0", $this->smarty->fetch($tpl)); } public function testDefaultWithoutMbstring() { Smarty::$_MBSTRING = false; $tpl = $this->smarty->createTemplate('eval:{"hello world."|count_sentences}'); $this->assertEquals("1", $this->smarty->fetch($tpl)); $tpl = $this->smarty->createTemplate('eval:{"hello world. I\'m another? Sentence!"|count_sentences}'); $this->assertEquals("3", $this->smarty->fetch($tpl)); $tpl = $this->smarty->createTemplate('eval:{"hello world.wrong"|count_sentences}'); $this->assertEquals("0", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testUmlauts() { $tpl = $this->smarty->createTemplate('eval:{"hello worldä."|count_sentences}'); $this->assertEquals("1", $this->smarty->fetch($tpl)); $tpl = $this->smarty->createTemplate('eval:{"hello worldü. ä\'m another? Sentence!"|count_sentences}'); $this->assertEquals("3", $this->smarty->fetch($tpl)); $tpl = $this->smarty->createTemplate('eval:{"hello worlä.ärong"|count_sentences}'); $this->assertEquals("0", $this->smarty->fetch($tpl)); $tpl = $this->smarty->createTemplate('eval:{"hello worlä.wrong"|count_sentences}'); $this->assertEquals("0", $this->smarty->fetch($tpl)); $tpl = $this->smarty->createTemplate('eval:{"hello world.ärong"|count_sentences}'); $this->assertEquals("0", $this->smarty->fetch($tpl)); } } ?>smarty3-3.1.13/development/PHPunit/ObjectVariableTests.php0000644000175000017500000000553211640641621022124 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->force_compile = true; } public static function isRunnable() { return true; } /** * test simple object variable */ public function testObjectVariableOutput() { $object = new VariableObject; $tpl = $this->smarty->createTemplate('string:{$object->hello}'); $tpl->assign('object', $object); $this->assertEquals('hello_world', $this->smarty->fetch($tpl)); } /** * test simple object variable with variable property */ public function testObjectVariableOutputVariableProperty() { $object = new VariableObject; $this->smarty->disableSecurity(); $tpl = $this->smarty->createTemplate('string:{$p=\'hello\'}{$object->$p}'); $tpl->assign('object', $object); $this->assertEquals('hello_world', $this->smarty->fetch($tpl)); } /** * test simple object variable with method */ public function testObjectVariableOutputMethod() { $object = new VariableObject; $tpl = $this->smarty->createTemplate('string:{$object->myhello()}'); $tpl->assign('object', $object); $this->assertEquals('hello world', $this->smarty->fetch($tpl)); } /** * test simple object variable with method */ public function testObjectVariableOutputVariableMethod() { $object = new VariableObject; $this->smarty->disableSecurity(); $tpl = $this->smarty->createTemplate('string:{$p=\'myhello\'}{$object->$p()}'); $tpl->assign('object', $object); $this->assertEquals('hello world', $this->smarty->fetch($tpl)); } /** * test object variable in double quoted string */ public function testObjectVariableOutputDoubleQuotes() { $object = new VariableObject; $tpl = $this->smarty->createTemplate('string:{"double quoted `$object->hello` okay"}'); $tpl->assign('object', $object); $this->assertEquals('double quoted hello_world okay', $this->smarty->fetch($tpl)); } /** * test object variable in double quoted string as include name */ public function testObjectVariableOutputDoubleQuotesInclude() { $object = new VariableObject; $tpl = $this->smarty->createTemplate('string:{include file="`$object->hello`_test.tpl"}'); $tpl->assign('object', $object); $this->assertEquals('hello world', $this->smarty->fetch($tpl)); } } Class VariableObject { public $hello = 'hello_world'; function myhello() { return 'hello world'; } } ?> smarty3-3.1.13/development/PHPunit/PluginModifierSpacifyTests.php0000644000175000017500000000156511634664106023514 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } public function testDefault() { $result = 'h e l l o w ö r l d'; $tpl = $this->smarty->createTemplate('eval:{"hello wörld"|spacify}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testCharacter() { $result = 'h##e##l##l##o## ##w##ö##r##l##d'; $tpl = $this->smarty->createTemplate('eval:{"hello wörld"|spacify:"##"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } } ?>smarty3-3.1.13/development/PHPunit/SecurityTests.php0000644000175000017500000002707612044502270021061 0ustar mikemikesmarty = SmartyTests::$smarty; $this->smartyBC = SmartyTests::$smartyBC; SmartyTests::init(); $this->smarty->force_compile = true; $this->smartyBC->force_compile = true; $this->smarty->clearCompiledTemplate(); $this->smarty->clearAllCache(); } public static function isRunnable() { return true; } /** * test that security is loaded */ public function testSecurityLoaded() { $this->assertTrue(is_object($this->smarty->security_policy)); } /** * test trusted PHP function */ public function testTrustedPHPFunction() { $this->assertEquals("5", $this->smarty->fetch('eval:{assign var=foo value=[1,2,3,4,5]}{count($foo)}')); } /** * test not trusted PHP function */ public function testNotTrustedPHPFunction() { $this->smarty->security_policy->php_functions = array('null'); try { $this->smarty->fetch('eval:{assign var=foo value=[1,2,3,4,5]}{count($foo)}'); } catch (Exception $e) { $this->assertContains(htmlentities("PHP function 'count' not allowed by security setting"), $e->getMessage()); return; } $this->fail('Exception for not trusted modifier has not been raised.'); } /** * test not trusted PHP function at disabled security */ public function testDisabledTrustedPHPFunction() { $this->smarty->security_policy->php_functions = array('null'); $this->smarty->disableSecurity(); $this->assertEquals("5", $this->smarty->fetch('eval:{assign var=foo value=[1,2,3,4,5]}{count($foo)}')); } /** * test trusted modifer */ public function testTrustedModifier() { $this->assertEquals("5", $this->smarty->fetch('eval:{assign var=foo value=[1,2,3,4,5]}{$foo|@count}')); } /** * test not trusted modifier */ public function testNotTrustedModifer() { $this->smarty->security_policy->php_modifiers = array('null'); try { $this->smarty->fetch('eval:{assign var=foo value=[1,2,3,4,5]}{$foo|@count}'); } catch (Exception $e) { $this->assertContains(htmlentities("modifier 'count' not allowed by security setting"), $e->getMessage()); return; } $this->fail('Exception for not trusted modifier has not been raised.'); } /** * test not trusted modifer at disabled security */ public function testDisabledTrustedMofifer() { $this->smarty->security_policy->php_modifiers = array('null'); $this->smarty->disableSecurity(); $this->assertEquals("5", $this->smarty->fetch('eval:{assign var=foo value=[1,2,3,4,5]}{$foo|@count}')); } /** * test allowed tags */ public function testAllowedTags1() { $this->smarty->security_policy->allowed_tags = array('counter'); $this->assertEquals("1", $this->smarty->fetch('eval:{counter start=1}')); } /** * test not allowed tag */ public function testNotAllowedTags2() { $this->smarty->security_policy->allowed_tags = array('counter'); try { $this->smarty->fetch('eval:{counter}{cycle values="1,2"}'); } catch (Exception $e) { $this->assertContains(htmlentities("tag 'cycle' not allowed by security setting"), $e->getMessage()); return; } $this->fail('Exception for not allowed tag has not been raised.'); } /** * test disabled tag */ public function testDisabledTags() { $this->smarty->security_policy->disabled_tags = array('cycle'); try { $this->smarty->fetch('eval:{counter}{cycle values="1,2"}'); } catch (Exception $e) { $this->assertContains(htmlentities("tag 'cycle' disabled by security setting"), $e->getMessage()); return; } $this->fail('Exception for disabled tag has not been raised.'); } /** * test allowed modifier */ public function testAllowedModifier1() { $this->smarty->security_policy->allowed_modifiers = array('capitalize'); $this->assertEquals("Hello World", $this->smarty->fetch('eval:{"hello world"|capitalize}')); } public function testAllowedModifier2() { $this->smarty->security_policy->allowed_modifiers = array('upper'); $this->assertEquals("HELLO WORLD", $this->smarty->fetch('eval:{"hello world"|upper}')); } /** * test not allowed modifier */ public function testNotAllowedModifier() { $this->smarty->security_policy->allowed_modifiers = array('upper'); try { $this->smarty->fetch('eval:{"hello"|upper}{"world"|lower}'); } catch (Exception $e) { $this->assertContains(htmlentities("modifier 'lower' not allowed by security setting"), $e->getMessage()); return; } $this->fail('Exception for not allowed tag has not been raised.'); } /** * test disabled modifier */ public function testDisabledModifier() { $this->smarty->security_policy->disabled_modifiers = array('lower'); try { $this->smarty->fetch('eval:{"hello"|upper}{"world"|lower}'); } catch (Exception $e) { $this->assertContains(htmlentities("modifier 'lower' disabled by security setting"), $e->getMessage()); return; } $this->fail('Exception for disabled tag has not been raised.'); } /** * test Smarty::PHP_QUOTE */ public function testSmartyPhpQuote() { $this->smarty->security_policy->php_handling = Smarty::PHP_QUOTE; $this->assertEquals('<?php echo "hello world"; ?>', $this->smarty->fetch('eval:')); } public function testSmartyPhpQuoteAsp() { $this->smarty->security_policy->php_handling = Smarty::PHP_QUOTE; $this->assertEquals('<% echo "hello world"; %>', $this->smarty->fetch('eval:<% echo "hello world"; %>')); } /** * test Smarty::PHP_REMOVE */ public function testSmartyPhpRemove() { $this->smarty->security_policy->php_handling = Smarty::PHP_REMOVE; $this->assertEquals(' echo "hello world"; ', $this->smarty->fetch('eval:')); } public function testSmartyPhpRemoveAsp() { $this->smarty->security_policy->php_handling = Smarty::PHP_REMOVE; $this->assertEquals(' echo "hello world"; ', $this->smarty->fetch('eval:<% echo "hello world"; %>')); } /** * test Smarty::PHP_ALLOW */ public function testSmartyPhpAllow() { $this->smartyBC->security_policy->php_handling = Smarty::PHP_ALLOW; $this->assertEquals('hello world', $this->smartyBC->fetch('eval:')); } public function testSmartyPhpAllowAsp() { // NOTE: asp_tags cannot be changed by ini_set() if (!ini_get('asp_tags')) { $this->fail( 'asp_tags are disabled' ); } $this->smartyBC->security_policy->php_handling = Smarty::PHP_ALLOW; $this->assertEquals('hello world', $this->smartyBC->fetch('eval:<% echo "hello world"; %>')); } /** * test standard directory */ public function testStandardDirectory() { $content = $this->smarty->fetch('eval:{include file="helloworld.tpl"}'); $this->assertEquals("hello world", $content); } /** * test trusted directory */ public function testTrustedDirectory() { $this->smarty->security_policy->secure_dir = array('.' . DIRECTORY_SEPARATOR . 'templates_2' . DIRECTORY_SEPARATOR); $this->assertEquals("hello world", $this->smarty->fetch('eval:{include file="templates_2/hello.tpl"}')); } /** * test not trusted directory */ public function testNotTrustedDirectory() { $this->smarty->security_policy->secure_dir = array('.' . DIRECTORY_SEPARATOR . 'templates_3' . DIRECTORY_SEPARATOR); try { $this->smarty->fetch('eval:{include file="templates_2/hello.tpl"}'); } catch (Exception $e) { $this->assertContains("/PHPunit/templates_2/hello.tpl' not allowed by security setting", str_replace('\\','/',$e->getMessage())); return; } $this->fail('Exception for not trusted directory has not been raised.'); } /** * test disabled security for not trusted dir */ public function testDisabledTrustedDirectory() { $this->smarty->disableSecurity(); $this->assertEquals("hello world", $this->smarty->fetch('eval:{include file="templates_2/hello.tpl"}')); } /** * test trusted static class */ public function testTrustedStaticClass() { $this->smarty->security_policy->static_classes = array('mysecuritystaticclass'); $tpl = $this->smarty->createTemplate('eval:{mysecuritystaticclass::square(5)}'); $this->assertEquals('25', $this->smarty->fetch($tpl)); } /** * test not trusted PHP function */ public function testNotTrustedStaticClass() { $this->smarty->security_policy->static_classes = array('null'); try { $this->smarty->fetch('eval:{mysecuritystaticclass::square(5)}'); } catch (Exception $e) { $this->assertContains(htmlentities("access to static class 'mysecuritystaticclass' not allowed by security setting"), $e->getMessage()); return; } $this->fail('Exception for not trusted static class has not been raised.'); } public function testChangedTrustedDirectory() { $this->smarty->security_policy->secure_dir = array( '.' . DS . 'templates_2' . DS, ); $this->assertEquals("hello world", $this->smarty->fetch('eval:{include file="templates_2/hello.tpl"}')); $this->smarty->security_policy->secure_dir = array( '.' . DS . 'templates_2' . DS, '.' . DS . 'templates_3' . DS, ); $this->assertEquals("templates_3", $this->smarty->fetch('eval:{include file="templates_3/dirname.tpl"}')); } public function testTrustedUri() { $this->smarty->security_policy->trusted_uri = array( '#^http://.+smarty\.net$#i' ); try { $this->smarty->fetch('eval:{fetch file="http://www.smarty.net/foo.bar"}'); } catch (SmartyException $e) { $this->assertNotContains(htmlentities("not allowed by security setting"), $e->getMessage()); } try { $this->smarty->fetch('eval:{fetch file="https://www.smarty.net/foo.bar"}'); $this->fail("Exception for unknown resource not thrown (protocol)"); } catch (SmartyException $e) { $this->assertContains(htmlentities("not allowed by security setting"), $e->getMessage()); } try { $this->smarty->fetch('eval:{fetch file="http://www.smarty.com/foo.bar"}'); $this->fail("Exception for unknown resource not thrown (domain)"); } catch (SmartyException $e) { $this->assertContains(htmlentities("not allowed by security setting"), $e->getMessage()); } } } class mysecuritystaticclass { const STATIC_CONSTANT_VALUE = 3; public static $static_var = 5; static function square($i) { return $i*$i; } } ?>smarty3-3.1.13/development/PHPunit/XmlTests.php0000644000175000017500000000474211467061362020017 0ustar mikemike tag handling * * @package PHPunit * @author Uwe Tews */ /** * class for tests */ class XmlTests extends PHPUnit_Framework_TestCase { public function setUp() { $this->smarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->force_compile = true; } public static function isRunnable() { return true; } /** * test standard xml */ public function testXml() { $tpl = $this->smarty->createTemplate('xml.tpl'); $this->assertEquals('', $this->smarty->fetch($tpl)); } /** * test standard xml Smarty::PHP_QUOTE */ public function testXmlPhpQuote() { $this->smarty->security_policy->php_handling = Smarty::PHP_QUOTE; $tpl = $this->smarty->createTemplate('xml.tpl'); $this->assertEquals('', $this->smarty->fetch($tpl)); } /** * test standard xml Smarty::PHP_ALLOW */ public function testXmlPhpAllow() { $this->smarty->security_policy->php_handling = Smarty::PHP_ALLOW; $tpl = $this->smarty->createTemplate('xml.tpl'); $this->assertEquals('', $this->smarty->fetch($tpl)); } /** * test standard xml */ public function testXmlCaching() { $this->smarty->security_policy->php_handling = Smarty::PHP_PASSTHRU; $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $content = $this->smarty->fetch('xml.tpl'); $this->assertEquals('', $content); } /* * test standard xml */ public function testXmlCachingPhpQuote() { $this->smarty->security_policy->php_handling = Smarty::PHP_QUOTE; $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $content = $this->smarty->fetch('xml.tpl'); $this->assertEquals('', $content); } /* * test standard xml */ public function testXmlCachingPhpAllow() { $this->smarty->security_policy->php_handling = Smarty::PHP_ALLOW; $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $content = $this->smarty->fetch('xml.tpl'); $this->assertEquals('', $content); } } ?>smarty3-3.1.13/development/PHPunit/phpunit-tests.sh0000755000175000017500000000014111634664106020677 0ustar mikemike#!/bin/sh php -d asp_tags=On /usr/local/bin/phpunit --verbose SmartyTests.php > test_results.txt smarty3-3.1.13/development/PHPunit/GetTemplateVarsTests.php0000644000175000017500000000664311471273555022334 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test root getTemplateVars single value */ public function testGetSingleTemplateVarScopeRoot() { $this->smarty->assign('foo', 'bar'); $this->smarty->assign('blar', 'buh'); $this->assertEquals("bar", $this->smarty->getTemplateVars('foo')); } /** * test root getTemplateVars all values */ public function testGetAllTemplateVarsScopeRoot() { $this->smarty->assign('foo', 'bar'); $this->smarty->assign('blar', 'buh'); $vars = $this->smarty->getTemplateVars(); $this->assertTrue(is_array($vars)); $this->assertEquals("bar", $vars['foo']); $this->assertEquals("buh", $vars['blar']); } /** * test single variable with data object chain */ public function testGetSingleTemplateVarScopeAll() { $data1 = new Smarty_Data($this->smarty); $data2 = new Smarty_Data($data1); $this->smarty->assign('foo', 'bar'); $this->smarty->assign('blar', 'buh'); $this->assertEquals("bar", $this->smarty->getTemplateVars('foo', $data2)); } /** * test get all variables with data object chain */ public function testGetAllTemplateVarsScopeAll() { $data1 = new Smarty_Data($this->smarty); $data2 = new Smarty_Data($data1); $this->smarty->assign('foo', 'bar'); $data1->assign('blar', 'buh'); $data2->assign('foo2', 'bar2'); $vars = $this->smarty->getTemplateVars(null, $data2); $this->assertTrue(is_array($vars)); $this->assertEquals("bar", $vars['foo']); $this->assertEquals("bar2", $vars['foo2']); $this->assertEquals("buh", $vars['blar']); } /** * test get all variables with data object chain search parents disabled */ public function testGetAllTemplateVarsScopeAllNoParents() { $data1 = new Smarty_Data($this->smarty); $data2 = new Smarty_Data($data1); $this->smarty->assign('foo', 'bar'); $data1->assign('blar', 'buh'); $data2->assign('foo2', 'bar2'); $vars = $this->smarty->getTemplateVars(null, $data2, false); $this->assertTrue(is_array($vars)); $this->assertFalse(isset($vars['foo'])); $this->assertEquals("bar2", $vars['foo2']); $this->assertFalse(isset($vars['blar'])); } /** * test get single variables with data object chain search parents disabled */ public function testGetSingleTemplateVarsScopeAllNoParents() { error_reporting(error_reporting() & ~(E_NOTICE|E_USER_NOTICE)); $data1 = new Smarty_Data($this->smarty); $data2 = new Smarty_Data($data1); $this->smarty->assign('foo', 'bar'); $data1->assign('blar', 'buh'); $data2->assign('foo2', 'bar2'); $this->assertEquals("", $this->smarty->getTemplateVars('foo', $data2, false)); $this->assertEquals("bar2", $this->smarty->getTemplateVars('foo2', $data2, false)); $this->assertEquals("", $this->smarty->getTemplateVars('blar', $data2, false)); } } ?> smarty3-3.1.13/development/PHPunit/ConstantsTests.php0000644000175000017500000000204711467061362021227 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test constants */ public function testConstants() { define('MYCONSTANTS','hello world'); $tpl = $this->smarty->createTemplate('eval:{$smarty.const.MYCONSTANTS}'); $this->assertEquals("hello world", $this->smarty->fetch($tpl)); } /** public function testConstants2() { $tpl = $this->smarty->createTemplate('eval:{MYCONSTANTS}'); $this->assertEquals("hello world", $this->smarty->fetch($tpl)); } public function testConstants3() { $tpl = $this->smarty->createTemplate('eval:{$x=MYCONSTANTS}{$x}'); $this->assertEquals("hello world", $this->smarty->fetch($tpl)); } */ } ?> smarty3-3.1.13/development/PHPunit/ConfigVarTests.php0000644000175000017500000003302312044502270021115 0ustar mikemikesmarty = SmartyTests::$smarty; $this->smarty->clearCompiledTemplate(); $this->smarty->clearAllCache(); SmartyTests::init(); } public static function isRunnable() { return true; } /** * test config varibales loading all sections */ public function testConfigNumber() { $this->smarty->configLoad('test.conf'); $this->assertEquals("123.4", $this->smarty->fetch('eval:{#Number#}')); } public function testConfigText() { $this->smarty->configLoad('test.conf'); $this->assertEquals("123bvc", $this->smarty->fetch('eval:{#text#}')); } public function testConfigLine() { $this->smarty->configLoad('test.conf'); $this->assertEquals("123 This is a line", $this->smarty->fetch('eval:{#line#}')); } public function testConfigVariableGlobalSections() { $this->smarty->configLoad('test.conf'); $this->assertEquals("Welcome to Smarty! Global Section1 Global Section2", $this->smarty->fetch('eval:{#title#} {#sec1#} {#sec2#}')); } /** * test config variables loading section2 */ public function testConfigVariableSection2() { $this->smarty->error_reporting = error_reporting() & ~(E_NOTICE|E_USER_NOTICE); $this->smarty->configLoad('test.conf', 'section2'); $this->assertEquals("Welcome to Smarty! Global Section1 Hello Section2", $this->smarty->fetch('eval:{#title#} {#sec1#} {#sec2#}')); } /** * test config variables loading section special char */ public function testConfigVariableSectionSpecialChar() { $this->smarty->configLoad('test.conf', '/'); $this->assertEquals("Welcome to Smarty! special char", $this->smarty->fetch('eval:{#title#} {#sec#}')); } /** * test config variables loading section foo/bar */ public function testConfigVariableSectionFooBar() { $this->smarty->configLoad('test.conf', 'foo/bar'); $this->assertEquals("Welcome to Smarty! section foo/bar", $this->smarty->fetch('eval:{#title#} {#sec#}')); } /** * test config variables loading indifferent scopes */ public function testConfigVariableScope() { $this->smarty->configLoad('test.conf', 'section2'); $tpl = $this->smarty->createTemplate('eval:{#title#} {#sec1#} {#sec2#}'); $tpl->configLoad('test.conf', 'section1'); $this->assertEquals("Welcome to Smarty! Global Section1 Hello Section2", $this->smarty->fetch('eval:{#title#} {#sec1#} {#sec2#}')); $this->assertEquals("Welcome to Smarty! Hello Section1 Global Section2", $this->smarty->fetch($tpl)); } /** * test config variables loading section2 from template */ public function testConfigVariableSection2Template() { $this->assertEquals("Welcome to Smarty! Global Section1 Hello Section2", $this->smarty->fetch('eval:{config_load file=\'test.conf\' section=\'section2\'}{#title#} {#sec1#} {#sec2#}')); } public function testConfigVariableSection2TemplateShorttags() { $this->assertEquals("Welcome to Smarty! Global Section1 Hello Section2", $this->smarty->fetch('eval:{config_load \'test.conf\' \'section2\'}{#title#} {#sec1#} {#sec2#}')); } /** * test config varibales loading local */ public function testConfigVariableLocal() { $this->assertEquals("Welcome to Smarty!", $this->smarty->fetch('eval:{config_load file=\'test.conf\' scope=\'local\'}{#title#}')); // global must be empty $this->assertEquals("", $this->smarty->getConfigVars('title')); } /** * test config varibales loading parent */ public function testConfigVariableParent() { $this->assertEquals("Welcome to Smarty!", $this->smarty->fetch('eval:{config_load file=\'test.conf\' scope=\'parent\'}{#title#}')); // global is parent must not be empty $this->assertEquals("Welcome to Smarty!", $this->smarty->getConfigVars('title')); } /** * test config varibales loading global */ public function testConfigVariableGlobal() { $this->assertEquals("Welcome to Smarty!", $this->smarty->fetch('eval:{config_load file=\'test.conf\' scope=\'global\'}{#title#}')); // global is parent must not be empty $this->assertEquals("Welcome to Smarty!", $this->smarty->getConfigVars('title')); } /** * test config variables of hidden sections * shall display variables from hidden section */ public function testConfigVariableHidden() { $this->smarty->config_read_hidden = true; $this->smarty->configLoad('test.conf','hidden'); $this->assertEquals("Welcome to Smarty!Hidden Section", $this->smarty->fetch('eval:{#title#}{#hiddentext#}')); } /** * test config variables of disabled hidden sections * shall display not variables from hidden section */ public function testConfigVariableHiddenDisable() { $this->smarty->error_reporting = error_reporting() & ~(E_NOTICE|E_USER_NOTICE); $this->smarty->config_read_hidden = false; $this->smarty->configLoad('test.conf','hidden'); $this->assertEquals("Welcome to Smarty!", $this->smarty->fetch('eval:{#title#}{#hiddentext#}')); } /** * test config varibales loading all sections from template */ public function testConfigVariableAllSectionsTemplate() { $this->smarty->config_overwrite = true; $this->assertEquals("Welcome to Smarty! Global Section1 Global Section2", $this->smarty->fetch('eval:{config_load file=\'test.conf\'}{#title#} {#sec1#} {#sec2#}')); } /** * test config varibales overwrite */ public function testConfigVariableOverwrite() { $this->assertEquals("Overwrite2", $this->smarty->fetch('eval:{config_load file=\'test.conf\'}{#overwrite#}')); } public function testConfigVariableOverwrite2() { $this->assertEquals("Overwrite3", $this->smarty->fetch('eval:{config_load file=\'test.conf\'}{config_load file=\'test2.conf\'}{#overwrite#}')); } /** * test config varibales overwrite false */ public function testConfigVariableOverwriteFalse() { $this->smarty->config_overwrite = false; $this->assertEquals("Overwrite1Overwrite2Overwrite3Welcome to Smarty! Global Section1 Global Section2", $this->smarty->fetch('eval:{config_load file=\'test.conf\'}{config_load file=\'test2.conf\'}{foreach #overwrite# as $over}{$over}{/foreach}{#title#} {#sec1#} {#sec2#}')); } /** * test config varibales array */ public function testConfigVariableArray1() { $this->smarty->config_overwrite = false; $this->smarty->assign('foo',1); $this->assertEquals("Overwrite2", $this->smarty->fetch('eval:{config_load file=\'test.conf\'}{config_load file=\'test2.conf\'}{$smarty.config.overwrite[$foo]}')); } public function testConfigVariableArray2() { $this->smarty->config_overwrite = false; $this->smarty->assign('foo',2); $this->assertEquals("Overwrite3", $this->smarty->fetch('eval:{config_load file=\'test.conf\'}{config_load file=\'test2.conf\'}{#overwrite#.$foo}')); } /** * test config varibales booleanize on */ public function testConfigVariableBooleanizeOn() { $this->smarty->config_booleanize = true; $this->assertEquals("passed", $this->smarty->fetch('eval:{config_load file=\'test.conf\'}{if #booleanon# === true}passed{/if}')); } /** * test config varibales booleanize off */ public function testConfigVariableBooleanizeOff() { $this->smarty->config_booleanize = false; $this->assertEquals("passed", $this->smarty->fetch('eval:{config_load file=\'test.conf\'}{if #booleanon# == \'on\'}passed{/if}')); } /** * test config file syntax error */ public function testConfigSyntaxError() { try { $this->smarty->fetch('eval:{config_load file=\'test_error.conf\'}'); } catch (Exception $e) { $this->assertContains(htmlentities('Syntax error in config file'), $e->getMessage()); return; } $this->fail('Exception for syntax errors in config files has not been raised.'); } /** * test getConfigVars */ public function testConfigGetSingleConfigVar() { $this->smarty->configLoad('test.conf'); $this->assertEquals("Welcome to Smarty!", $this->smarty->getConfigVars('title')); } /** * test getConfigVars return all variables */ public function testConfigGetAllConfigVars() { $this->smarty->configLoad('test.conf'); $vars = $this->smarty->getConfigVars(); $this->assertTrue(is_array($vars)); $this->assertEquals("Welcome to Smarty!", $vars['title']); $this->assertEquals("Global Section1", $vars['sec1']); } /** * test clearConfig for single variable */ public function testConfigClearSingleConfigVar() { $this->smarty->configLoad('test.conf'); $this->smarty->clearConfig('title'); $this->assertEquals("", $this->smarty->getConfigVars('title')); } /** * test clearConfig for all variables */ public function testConfigClearConfigAll() { $this->smarty->configLoad('test.conf'); $this->smarty->clearConfig(); $vars = $this->smarty->getConfigVars(); $this->assertTrue(is_array($vars)); $this->assertTrue(empty($vars)); } /** * test config vars on data object */ public function testConfigTextData() { $data = $this->smarty->createData(); $data->configLoad('test.conf'); $this->assertEquals("123bvc", $this->smarty->fetch('eval:{#text#}', $data)); } /** * test getConfigVars on data object */ public function testConfigGetSingleConfigVarData() { $data = $this->smarty->createData(); $data->configLoad('test.conf'); $this->assertEquals("Welcome to Smarty!", $data->getConfigVars('title')); } /** * test getConfigVars return all variables on data object */ public function testConfigGetAllConfigVarsData() { $data = $this->smarty->createData(); $data->configLoad('test.conf'); $vars = $data->getConfigVars(); $this->assertTrue(is_array($vars)); $this->assertEquals("Welcome to Smarty!", $vars['title']); $this->assertEquals("Global Section1", $vars['sec1']); } /** * test clearConfig for single variable on data object */ public function testConfigClearSingleConfigVarData() { $data = $this->smarty->createData(); $data->configLoad('test.conf'); $data->clearConfig('title'); $this->assertEquals("", $data->getConfigVars('title')); $this->assertEquals("Global Section1", $data->getConfigVars('sec1')); } /** * test clearConfig for all variables on data object */ public function testConfigClearConfigAllData() { $data = $this->smarty->createData(); $data->configLoad('test.conf'); $data->clearConfig(); $vars = $data->getConfigVars(); $this->assertTrue(is_array($vars)); $this->assertTrue(empty($vars)); } /** * test config vars on template object */ public function testConfigTextTemplate() { $tpl = $this->smarty->createTemplate('eval:{#text#}'); $tpl->configLoad('test.conf'); $this->assertEquals("123bvc", $this->smarty->fetch($tpl)); } /** * test getConfigVars on template object */ public function testConfigGetSingleConfigVarTemplate() { $tpl = $this->smarty->createTemplate('eval:{#text#}'); $tpl->configLoad('test.conf'); $this->assertEquals("Welcome to Smarty!", $tpl->getConfigVars('title')); } /** * test getConfigVars return all variables on template object */ public function testConfigGetAllConfigVarsTemplate() { $tpl = $this->smarty->createTemplate('eval:{#text#}'); $tpl->configLoad('test.conf'); $vars = $tpl->getConfigVars(); $this->assertTrue(is_array($vars)); $this->assertEquals("Welcome to Smarty!", $vars['title']); $this->assertEquals("Global Section1", $vars['sec1']); } /** * test clearConfig for single variable on template object */ public function testConfigClearSingleConfigVarTemplate() { $tpl = $this->smarty->createTemplate('eval:{#text#}'); $tpl->configLoad('test.conf'); $tpl->clearConfig('title'); $this->assertEquals("", $tpl->getConfigVars('title')); $this->assertEquals("Global Section1", $tpl->getConfigVars('sec1')); } /** * test clearConfig for all variables on template object */ public function testConfigClearConfigAllTemplate() { $tpl = $this->smarty->createTemplate('eval:{#text#}'); $tpl->configLoad('test.conf'); $tpl->clearConfig(); $vars = $tpl->getConfigVars(); $this->assertTrue(is_array($vars)); $this->assertTrue(empty($vars)); } /** * test config varibales loading from absolute file path */ public function testConfigAbsolutePath() { $file = realpath($this->smarty->getConfigDir(0) . 'test.conf'); $this->smarty->configLoad($file); $this->assertEquals("123.4", $this->smarty->fetch('eval:{#Number#}')); } } ?> smarty3-3.1.13/development/PHPunit/StreamVariableTests.php0000644000175000017500000000603511467061362022155 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); stream_wrapper_register("var", "VariableStream") or die("Failed to register protocol"); $fp = fopen("var://foo", "r+"); fwrite($fp, 'hello world'); fclose($fp); } public function tearDown() { stream_wrapper_unregister("var"); } public static function isRunnable() { return true; } /** * test stream variable */ public function testStreamVariable1() { $tpl = $this->smarty->createTemplate('eval:{$var:foo}', null, null, $this->smarty); $this->assertEquals('hello world', $this->smarty->fetch($tpl)); } /* public function testStreamVariable2() { $tpl = $this->smarty->createTemplate('eval:{var:\'foo\'}', null, null, $this->smarty); $this->assertEquals('hello world', $this->smarty->fetch($tpl)); } public function testStreamVariable3() { $tpl = $this->smarty->createTemplate('eval:{var:"foo"}', null, null, $this->smarty); $this->assertEquals('hello world', $this->smarty->fetch($tpl)); } */ /** * test no existant stream variable */ // public function testStreamVariable2() // { // $tpl = $this->smarty->createTemplate('eval:{$var:bar}', null, null, $this->smarty); // $this->assertEquals('', $this->smarty->fetch($tpl)); // } } class VariableStream { private $position; private $varname; public function stream_open($path, $mode, $options, &$opened_path) { $url = parse_url($path); $this->varname = $url["host"]; $this->position = 0; return true; } public function stream_read($count) { $p = &$this->position; $ret = substr($GLOBALS[$this->varname], $p, $count); $p += strlen($ret); return $ret; } public function stream_write($data) { $v = &$GLOBALS[$this->varname]; $l = strlen($data); $p = &$this->position; $v = substr($v, 0, $p) . $data . substr($v, $p += $l); return $l; } public function stream_tell() { return $this->position; } public function stream_eof() { return $this->position >= strlen($GLOBALS[$this->varname]); } public function stream_seek($offset, $whence) { $l = strlen($GLOBALS[$this->varname]); $p = &$this->position; switch ($whence) { case SEEK_SET: $newPos = $offset; break; case SEEK_CUR: $newPos = $p + $offset; break; case SEEK_END: $newPos = $l + $offset; break; default: return false; } $ret = ($newPos >= 0 && $newPos <= $l); if ($ret) $p = $newPos; return $ret; } } ?> smarty3-3.1.13/development/PHPunit/ClearCacheTests.php0000644000175000017500000000404511634664106021226 0ustar mikemikesmarty = SmartyTests::$smarty; $this->smartyBC = SmartyTests::$smartyBC; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test cache->clear_all method */ public function testClearCacheAll() { $this->smarty->clearAllCache(); file_put_contents($this->smarty->getCacheDir() . 'dummy.php', 'test'); $this->assertEquals(1, $this->smarty->clearAllCache()); } /** * test cache->clear_all method not expired */ public function testClearCacheAllNotExpired() { file_put_contents($this->smarty->getCacheDir() . 'dummy.php', 'test'); touch($this->smarty->getCacheDir() . 'dummy.php', time()-1000); $this->assertEquals(0, $this->smarty->clearAllCache(2000)); } public function testSmarty2ClearCacheAllNotExpired() { file_put_contents($this->smartyBC->getCacheDir() . 'dummy.php', 'test'); touch($this->smartyBC->getCacheDir() . 'dummy.php', time()-1000); $this->smartyBC->clear_all_cache(2000); $this->assertEquals(1, $this->smartyBC->clearAllCache()); } /** * test cache->clear_all method expired */ public function testClearCacheAllExpired() { file_put_contents($this->smarty->getCacheDir() . 'dummy.php', 'test'); touch($this->smarty->getCacheDir() . 'dummy.php', time()-1000); $this->assertEquals(1, $this->smarty->clearAllCache(500)); } public function testSmarty2ClearCacheAllExpired() { file_put_contents($this->smartyBC->getCacheDir() . 'dummy.php', 'test'); touch($this->smartyBC->getCacheDir() . 'dummy.php', time()-1000); $this->smartyBC->clear_all_cache(500); $this->assertEquals(0, $this->smartyBC->clearAllCache()); } } ?> smarty3-3.1.13/development/PHPunit/VariableVariableTests.php0000644000175000017500000000277111467061362022452 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test variable name in variable */ public function testVariableVariable1() { $tpl = $this->smarty->createTemplate('eval:{$foo=\'bar\'}{$bar=123}{${$foo}}'); $this->assertEquals('123', $this->smarty->fetch($tpl)); } /** * test part of variable name in variable */ public function testVariableVariable2() { $tpl = $this->smarty->createTemplate('eval:{$foo=\'a\'}{$bar=123}{$b{$foo}r}'); $this->assertEquals('123', $this->smarty->fetch($tpl)); } /** * test several parts of variable name in variable */ public function testVariableVariable3() { $tpl = $this->smarty->createTemplate('eval:{$foo=\'a\'}{$foo2=\'r\'}{$bar=123}{$b{$foo}{$foo2}}'); $this->assertEquals('123', $this->smarty->fetch($tpl)); } /** * test nesed parts of variable name in variable */ public function testVariableVariable4() { $tpl = $this->smarty->createTemplate('eval:{$foo=\'ar\'}{$foo2=\'oo\'}{$bar=123}{$b{$f{$foo2}}}'); $this->assertEquals('123', $this->smarty->fetch($tpl)); } } ?> smarty3-3.1.13/development/PHPunit/PluginFunctionMailtoTests.php0000644000175000017500000001775411673427331023401 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } public function testDefault() { $result = '
me@example.com'; $tpl = $this->smarty->createTemplate('eval:{mailto address="me@example.com"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testDefaultWithoutMbstring() { Smarty::$_MBSTRING = false; $result = 'me@example.com'; $tpl = $this->smarty->createTemplate('eval:{mailto address="me@example.com"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testText() { $result = 'send me some mail'; $tpl = $this->smarty->createTemplate('eval:{mailto address="me@example.com" text="send me some mail"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testTextWithoutMbstring() { Smarty::$_MBSTRING = false; $result = 'send me some mail'; $tpl = $this->smarty->createTemplate('eval:{mailto address="me@example.com" text="send me some mail"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testEncodeJavascript() { $result = ''; $tpl = $this->smarty->createTemplate('eval:{mailto address="me@example.com" encode="javascript"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testEncodeJavascriptWithoutMbstring() { Smarty::$_MBSTRING = false; $result = ''; $tpl = $this->smarty->createTemplate('eval:{mailto address="me@example.com" encode="javascript"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testEncodeJavascriptCharcode() { $result = "\n"; $tpl = $this->smarty->createTemplate('eval:{mailto address="me@example.com" encode="javascript_charcode"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testEncodeJavascriptCharcodeWithoutMbstring() { Smarty::$_MBSTRING = false; $result = "\n"; $tpl = $this->smarty->createTemplate('eval:{mailto address="me@example.com" encode="javascript_charcode"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testEncodeHex() { $result = 'me@example.com'; $tpl = $this->smarty->createTemplate('eval:{mailto address="me@example.com" encode="hex"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testEncodeHexWithoutMbstring() { Smarty::$_MBSTRING = false; $result = 'me@example.com'; $tpl = $this->smarty->createTemplate('eval:{mailto address="me@example.com" encode="hex"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testSubject() { $result = 'me@example.com'; $tpl = $this->smarty->createTemplate('eval:{mailto address="me@example.com" subject="Hello to you!"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testSubjectWithoutMbstring() { Smarty::$_MBSTRING = false; $result = 'me@example.com'; $tpl = $this->smarty->createTemplate('eval:{mailto address="me@example.com" subject="Hello to you!"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testCc() { $result = 'me@example.com'; $tpl = $this->smarty->createTemplate('eval:{mailto address="me@example.com" cc="you@example.com,they@example.com"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testCcWithoutMbstring() { Smarty::$_MBSTRING = false; $result = 'me@example.com'; $tpl = $this->smarty->createTemplate('eval:{mailto address="me@example.com" cc="you@example.com,they@example.com"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testExtra() { $result = ''; $tpl = $this->smarty->createTemplate('eval:{mailto address="me@example.com" extra=\'class="email"\'}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testExtraWithoutMbstring() { Smarty::$_MBSTRING = false; $result = ''; $tpl = $this->smarty->createTemplate('eval:{mailto address="me@example.com" extra=\'class="email"\'}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testUmlauts() { $result = 'me+smtpext@example.com'; $tpl = $this->smarty->createTemplate('eval:{mailto address="me+smtpext@example.com" cc="you@example.com,they@example.com" subject="hällo wörld"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testUmlautsWithoutMbstring() { Smarty::$_MBSTRING = false; $result = 'me+smtpext@example.com'; $tpl = $this->smarty->createTemplate('eval:{mailto address="me+smtpext@example.com" cc="you@example.com,they@example.com" subject="hällo wörld"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } } ?>smarty3-3.1.13/development/PHPunit/CompileBlockExtendsTests.php0000644000175000017500000003247512015001626023144 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * clear folders */ public function clear() { $this->smarty->clearAllCache(); $this->smarty->clearCompiledTemplate(); } /** * test block default outout */ public function testBlockDefault1() { $result = $this->smarty->fetch('eval:{block name=test}-- block default --{/block}'); $this->assertEquals('-- block default --', $result); } public function testBlockDefault2() { $this->smarty->assign ('foo', 'another'); $result = $this->smarty->fetch('eval:{block name=test}-- {$foo} block default --{/block}'); $this->assertEquals('-- another block default --', $result); } /** * test just call of parent template, no blocks predefined */ public function testCompileBlockParent() { $result = $this->smarty->fetch('test_block_parent.tpl'); $this->assertContains('Default Title', $result); } /** * test child/parent template chain */ public function testCompileBlockChild() { $result = $this->smarty->fetch('test_block_child.tpl'); $this->assertContains('Page Title', $result); } /** * test child/parent template chain with prepend */ public function testCompileBlockChildPrepend() { $result = $this->smarty->fetch('test_block_child_prepend.tpl'); $this->assertContains("prepend - Default Title", $result); } /** * test child/parent template chain with apppend */ public function testCompileBlockChildAppend() { $result = $this->smarty->fetch('test_block_child_append.tpl'); $this->assertContains("Default Title - append", $result); } /** * test child/parent template chain with apppend and shorttags */ public function testCompileBlockChildAppendShortag() { $result = $this->smarty->fetch('test_block_child_append_shorttag.tpl'); $this->assertContains("Default Title - append", $result); } /** * test child/parent template chain with {$smarty.block.child) */ public function testCompileBlockChildSmartyChild() { $result = $this->smarty->fetch('test_block_child_smartychild.tpl'); $this->assertContains('here is child text included', $result); } /** * test child/parent template chain with {$smarty.block.parent) */ public function testCompileBlockChildSmartyParent() { $result = $this->smarty->fetch('test_block_child_smartyparent.tpl'); $this->assertContains('parent block Default Title is here', $result); } /** * test child/parent template chain loading plugin */ public function testCompileBlockChildPlugin() { $result = $this->smarty->fetch('test_block_child_plugin.tpl'); $this->assertContains('escaped <text>', $result); } /** * test parent template with nested blocks */ public function testCompileBlockParentNested() { $result = $this->smarty->fetch('test_block_parent_nested.tpl'); $this->assertContains('Title with -default- here', $result); } /** * test child/parent template chain with nested block */ public function testCompileBlockChildNested() { $result = $this->smarty->fetch('test_block_child_nested.tpl'); $this->assertContains('Title with -content from child- here', $result); } /** * test child/parent template chain with nested block and include */ public function testCompileBlockChildNestedInclude() { $result = $this->smarty->fetch('test_block_grandchild_nested_include.tpl'); $this->assertContains('hello world', $result); } /** * test grandchild/child/parent template chain */ public function testCompileBlockGrandChild() { $result = $this->smarty->fetch('test_block_grandchild.tpl'); $this->assertContains('Grandchild Page Title', $result); } /** * test grandchild/child/parent template chain prepend */ public function testCompileBlockGrandChildPrepend() { $result = $this->smarty->fetch('test_block_grandchild_prepend.tpl'); $this->assertContains('grandchild prepend - Page Title', $result); } /** * test grandchild/child/parent template chain with {$smarty.block.child} */ public function testCompileBlockGrandChildSmartyChild() { $result = $this->smarty->fetch('test_block_grandchild_smartychild.tpl'); $this->assertContains('child title with - grandchild content - here', $result); } /** * test grandchild/child/parent template chain append */ public function testCompileBlockGrandChildAppend() { $result = $this->smarty->fetch('test_block_grandchild_append.tpl'); $this->assertContains('Page Title - grandchild append', $result); } /** * test grandchild/child/parent template chain with nested block */ public function testCompileBlockGrandChildNested() { $result = $this->smarty->fetch('test_block_grandchild_nested.tpl'); $this->assertContains('child title with -grandchild content- here', $result); } /** * test grandchild/child/parent template chain with nested {$smarty.block.child} */ public function testCompileBlockGrandChildNested3() { $result = $this->smarty->fetch('test_block_grandchild_nested3.tpl'); $this->assertContains('child pre -grandchild content- child post', $result); } /** * test nested child block with hide */ public function testCompileBlockChildNestedHide() { $result = $this->smarty->fetch('test_block_child_nested_hide.tpl'); $this->assertContains('nested block', $result); $this->assertNotContains('should be hidden', $result); } /** * test nested child block with hide and auto_literal = false */ public function testCompileBlockChildNestedHideAutoLiteralFalse() { $this->smarty->auto_literal = false; $result = $this->smarty->fetch('test_block_child_nested_hide_space.tpl'); $this->assertContains('nested block', $result); $this->assertNotContains('should be hidden', $result); } /** * test child/parent template chain starting in subtempates */ public function testCompileBlockStartSubTemplates() { $result = $this->smarty->fetch('test_block_include_root.tpl'); $this->assertContains('page 1', $result); $this->assertContains('page 2', $result); $this->assertContains('page 3', $result); $this->assertContains('block 1', $result); $this->assertContains('block 2', $result); $this->assertContains('block 3', $result); } /** * test grandchild/child/parent dependency test1 */ public function testCompileBlockGrandChildMustCompile1() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('test_block_grandchild.tpl'); $this->assertFalse($tpl->isCached()); $result = $this->smarty->fetch($tpl); $this->assertContains('Grandchild Page Title', $result); $this->smarty->template_objects = null; $tpl2 = $this->smarty->createTemplate('test_block_grandchild.tpl'); $this->assertTrue($tpl2->isCached()); $result = $this->smarty->fetch($tpl2); $this->assertContains('Grandchild Page Title', $result); } /** * test grandchild/child/parent dependency test2 */ public function testCompileBlockGrandChildMustCompile2() { touch($this->smarty->getTemplateDir(0) . 'test_block_grandchild.tpl'); $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('test_block_grandchild.tpl'); $this->assertFalse($tpl->isCached()); $result = $this->smarty->fetch($tpl); $this->assertContains('Grandchild Page Title', $result); $this->smarty->template_objects = null; $tpl2 = $this->smarty->createTemplate('test_block_grandchild.tpl'); $this->assertTrue($tpl2->isCached()); $result = $this->smarty->fetch($tpl2); $this->assertContains('Grandchild Page Title', $result); } /** * test grandchild/child/parent dependency test3 */ public function testCompileBlockGrandChildMustCompile3() { touch($this->smarty->getTemplateDir(0) . 'test_block_child.tpl'); $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('test_block_grandchild.tpl'); $this->assertFalse($tpl->isCached()); $result = $this->smarty->fetch($tpl); $this->assertContains('Grandchild Page Title', $result); $this->smarty->template_objects = null; $tpl2 = $this->smarty->createTemplate('test_block_grandchild.tpl'); $this->assertTrue($tpl2->isCached()); $result = $this->smarty->fetch($tpl2); $this->assertContains('Grandchild Page Title', $result); } /** * test grandchild/child/parent dependency test4 */ public function testCompileBlockGrandChildMustCompile4() { touch($this->smarty->getTemplateDir(0) . 'test_block_parent.tpl'); $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('test_block_grandchild.tpl'); $this->assertFalse($tpl->isCached()); $result = $this->smarty->fetch($tpl); $this->assertContains('Grandchild Page Title', $result); $this->smarty->template_objects = null; $tpl2 = $this->smarty->createTemplate('test_block_grandchild.tpl'); $this->assertTrue($tpl2->isCached()); $result = $this->smarty->fetch($tpl2); $this->assertContains('Grandchild Page Title', $result); } public function testCompileBlockSection() { $result = $this->smarty->fetch('test_block_section.tpl'); $this->assertContains('--block base ok--', $result); $this->assertContains('--block section ok--', $result); $this->assertContains('--block passed by section false--', $result); $this->assertContains('--block root false--', $result); $this->assertContains('--block assigned false--', $result); $this->assertContains('--section--', $result); $this->assertContains('--base--', $result); $this->assertContains('--block include false--', $result); } public function testCompileBlockRoot() { $this->smarty->assign('foo', 'hallo'); $result = $this->smarty->fetch('test_block.tpl'); $this->assertContains('--block base ok--', $result); $this->assertContains('--block section ok--', $result); $this->assertContains('--block passed by section ok--', $result); $this->assertContains('--block root ok--', $result); $this->assertContains('--assigned hallo--', $result); $this->assertContains('--parent from --section-- block--', $result); $this->assertContains('--parent from --base-- block--', $result); $this->assertContains('--block include ok--', $result); } public function testCompileBlockRoot2() { $this->smarty->assign('foo', 'hallo'); $result = $this->smarty->fetch('test_block.tpl'); $this->assertContains('--block base ok--', $result); $this->assertContains('--block section ok--', $result); $this->assertContains('--block passed by section ok--', $result); $this->assertContains('--block root ok--', $result); $this->assertContains('--assigned hallo--', $result); $this->assertContains('--parent from --section-- block--', $result); $this->assertContains('--parent from --base-- block--', $result); $this->assertContains('--block include ok--', $result); } public function testCompileBlockNocacheMain1() { $this->smarty->assign('foo', 1); $this->smarty->caching = 1; $this->assertContains('foo 1', $this->smarty->fetch('test_block_nocache_child.tpl')); } public function testCompileBlockNocacheMain2() { $this->smarty->assign('foo', 2); $this->smarty->caching = 1; $this->assertTrue($this->smarty->isCached('test_block_nocache_child.tpl')); $this->assertContains('foo 2', $this->smarty->fetch('test_block_nocache_child.tpl')); } public function testCompileBlockNocacheChild1() { $this->smarty->assign('foo', 1); $this->smarty->caching = 1; $this->assertContains('foo 1', $this->smarty->fetch('extends:test_block_nocache_parent.tpl|test_block_nocache_child.tpl')); } public function testCompileBlockNocacheChild2() { $this->smarty->assign('foo', 2); $this->smarty->caching = 1; $this->assertTrue($this->smarty->isCached('extends:test_block_nocache_parent.tpl|test_block_nocache_child.tpl')); $this->assertContains('foo 2', $this->smarty->fetch('extends:test_block_nocache_parent.tpl|test_block_nocache_child.tpl')); } } ?>smarty3-3.1.13/development/PHPunit/DefaultPluginHandlerTests.php0000644000175000017500000001237712001634534023313 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->force_compile = true; $this->smarty->disableSecurity(); $this->smarty->registerDefaultPluginHandler('my_plugin_handler'); } public static function isRunnable() { return true; } public function testDefaultFunctionScript() { $this->assertEquals("scriptfunction foo bar", $this->smarty->fetch('test_default_function_script.tpl')); } public function testDefaultFunctionScriptNotCachable1() { $this->smarty->assign('foo','foo'); $this->smarty->caching = 1; $this->assertEquals("scriptfunction foo", $this->smarty->fetch('test_default_function_script_notcachable.tpl')); } public function testDefaultFunctionScriptNotCachable2() { $this->smarty->assign('foo','bar'); $this->smarty->caching = 1; $this->assertEquals("scriptfunction bar", $this->smarty->fetch('test_default_function_script_notcachable.tpl')); } public function testDefaultFunctionLocal() { $this->assertEquals("localfunction foo bar", $this->smarty->fetch('test_default_function_local.tpl')); } public function testDefaultCompilerFunctionScript() { $this->assertEquals("scriptcompilerfunction foo bar", $this->smarty->fetch('test_default_compiler_function_script.tpl')); } public function testDefaultBlockScript() { $this->assertEquals("scriptblock foo bar", $this->smarty->fetch('test_default_block_script.tpl')); } public function testDefaultModifierScript() { $this->smarty->assign('foo','bar'); $this->assertEquals("scriptmodifier default bar", $this->smarty->fetch('test_default_modifier_script.tpl')); } public function testDefaultModifier() { $this->smarty->assign('foo','bar'); $this->assertEquals("localmodifier bar", $this->smarty->fetch('test_default_modifier.tpl')); } public function testDefaultModifierStaticClassMethodCaching1() { $this->smarty->assign('foo','bar'); $this->smarty->caching = 1; $this->assertEquals("staticmodifier bar", $this->smarty->fetch('test_default_static_modifier.tpl')); } public function testDefaultModifierStaticClassMethodCaching2() { $this->smarty->assign('foo','bar'); $this->smarty->caching = 1; $this->assertEquals("staticmodifier bar", $this->smarty->fetch('test_default_static_modifier.tpl')); } } function my_plugin_handler ($tag, $type, $template, &$callback, &$script, &$cachable) { switch ($type) { case Smarty::PLUGIN_FUNCTION: switch ($tag) { case 'scriptfunction': $script = './scripts/script_function_tag.php'; $callback = 'default_script_function_tag'; return true; case 'scriptfunctionnotcachable': $script = './scripts/script_function_tag.php'; $callback = 'default_script_function_tag'; $cachable = false; return true; case 'localfunction': $callback = 'default_local_function_tag'; return true; default: return false; } case Smarty::PLUGIN_COMPILER: switch ($tag) { case 'scriptcompilerfunction': $script = './scripts/script_compiler_function_tag.php'; $callback = 'default_script_compiler_function_tag'; return true; default: return false; } case Smarty::PLUGIN_BLOCK: switch ($tag) { case 'scriptblock': $script = './scripts/script_block_tag.php'; $callback = 'default_script_block_tag'; return true; default: return false; } case Smarty::PLUGIN_MODIFIER: switch ($tag) { case 'scriptmodifier': $script = './scripts/script_modifier.php'; $callback = 'default_script_modifier'; return true; case 'mydefaultmodifier': $callback = 'default_local_modifier'; return true; case 'mydefaultstaticmodifier': $script = './scripts/script_default_static_modifier.php'; $callback = array('DefModifier','default_static_modifier'); return true; default: return false; } default: return false; } } function default_local_function_tag ($params, $template) { return 'localfunction '.$params['value']; } function default_local_modifier ($input) { return 'localmodifier '.$input; } ?>smarty3-3.1.13/development/PHPunit/templates/0000755000175000017500000000000012141655570017512 5ustar mikemikesmarty3-3.1.13/development/PHPunit/templates/test_nocache_tag_include.tpl0000644000175000017500000000005711275032024025220 0ustar mikemike
include {nocache}{$foo + 4}{/nocache}{$bar}smarty3-3.1.13/development/PHPunit/templates/test_register_function.tpl0000644000175000017500000000003411275032024025006 0ustar mikemike{testfunction value=$x} {$y}smarty3-3.1.13/development/PHPunit/templates/test_block_child_prepend.tpl0000644000175000017500000000013111467061362025237 0ustar mikemike{extends file='test_block_parent.tpl'} {block name='title' prepend}prepend - {/block} smarty3-3.1.13/development/PHPunit/templates/test_nocache_tag.tpl0000644000175000017500000000013211275032024023507 0ustar mikemike
root {nocache}{$foo + 2}{/nocache}{$bar} {include file='test_nocache_tag_include.tpl'}smarty3-3.1.13/development/PHPunit/templates/test_block_grandchild.tpl0000644000175000017500000000013311467061362024540 0ustar mikemike{extends file='test_block_child.tpl'} {block name='title'}Grandchild Page Title{/block} smarty3-3.1.13/development/PHPunit/templates/test_block_child_nested_hide.tpl0000644000175000017500000000040011773620362026055 0ustar mikemike{extends file="test_block_parent_nested2.tpl"} {block name="index"} {block name="test2"} nested block. {$smarty.block.child} {/block} {block name="test" hide} I should be hidden. {$smarty.block.child} {/block} {/block} smarty3-3.1.13/development/PHPunit/templates/test_template_function_tag2.tpl0000644000175000017500000000022111377023144025716 0ustar mikemike{function name=functest2 default='default'}{$default} {$param}{/function}{call name=functest2 param='param'} {call name=functest2 param='param2'}smarty3-3.1.13/development/PHPunit/templates/test_block_parent_shorttag.tpl0000644000175000017500000000012711467061362025650 0ustar mikemike

{block 'title'}Default Title{/block}

smarty3-3.1.13/development/PHPunit/templates/relative.tpl0000644000175000017500000000004111634664106022042 0ustar mikemike{include file="./helloworld.tpl"}smarty3-3.1.13/development/PHPunit/templates/displayfoo.tpl0000644000175000017500000000000611467061362022400 0ustar mikemike{$foo}smarty3-3.1.13/development/PHPunit/templates/test_block_parent.tpl0000644000175000017500000000013411467061362023733 0ustar mikemike

{block name='title'}Default Title{/block}

smarty3-3.1.13/development/PHPunit/templates/test_default_modifier_script.tpl0000644000175000017500000000005711724226376026166 0ustar mikemike{$foo|scriptmodifier:'scriptmodifier default '}smarty3-3.1.13/development/PHPunit/templates/test_block_child_append.tpl0000644000175000017500000000012711467061362025056 0ustar mikemike{extends file='test_block_parent.tpl'} {block name='title' append} - append{/block} smarty3-3.1.13/development/PHPunit/templates/relative_sub.tpl0000644000175000017500000000004211634664106022714 0ustar mikemike{include file="../helloworld.tpl"}smarty3-3.1.13/development/PHPunit/templates/test_block_grandchild_nested_include.tpl0000644000175000017500000000016011720214665027603 0ustar mikemike{extends file='test_block_child_nested_include.tpl'} {block name='title_content' append} some content {/block} smarty3-3.1.13/development/PHPunit/templates/test_plugin_chained_load.tpl0000644000175000017500000000001011634664106025232 0ustar mikemike{chain1}smarty3-3.1.13/development/PHPunit/templates/test_block_include_start1.tpl0000644000175000017500000000017011467061362025363 0ustar mikemike{extends file='test_block_include_parent.tpl'} {block name="p"}page 1
{/block} {block name="b"}block 1
{/block}smarty3-3.1.13/development/PHPunit/templates/xml.tpl0000644000175000017500000000004611315675705021037 0ustar mikemikesmarty3-3.1.13/development/PHPunit/templates/test_block_child_nested2.tpl0000644000175000017500000000021211467061362025146 0ustar mikemike{extends file='test_block_parent.tpl'} {block name='title'}child title with {block name='title_content'}-default-{/block} here{/block} smarty3-3.1.13/development/PHPunit/templates/template_function_lib.tpl0000644000175000017500000000013111320102632024554 0ustar mikemike{function name=template_func1}{$foo|escape} {nocache}{$foo|escape}{/nocache}{/function} smarty3-3.1.13/development/PHPunit/templates/test_block_parent3.tpl0000644000175000017500000000005711674127533024025 0ustar mikemike{block name='content1'}Default content{/block} smarty3-3.1.13/development/PHPunit/templates/test_block_grandchild_smartychild.tpl0000644000175000017500000000014511467061362027146 0ustar mikemike{extends file='test_block_child_smartychild2.tpl'} {block name='title'}grandchild content{/block} smarty3-3.1.13/development/PHPunit/templates/test_block_child_nested.tpl0000644000175000017500000000015211467061362025067 0ustar mikemike{extends file='test_block_parent_nested.tpl'} {block name='title_content'}-content from child-{/block} smarty3-3.1.13/development/PHPunit/templates/test_block_child_resource.tpl0000644000175000017500000000005011467061362025431 0ustar mikemike{block name='title'}Page Title{/block} smarty3-3.1.13/development/PHPunit/templates/test_block_extends.tpl0000644000175000017500000000022311634664106024114 0ustar mikemike{extends file='extends:test_block_base.tpl|test_block_section.tpl|test_block.tpl'} {block name='blockbase'}--block base from extends--{/block}
smarty3-3.1.13/development/PHPunit/templates/test_block_parent_smartychild.tpl0000644000175000017500000000016511467061362026342 0ustar mikemike

{block name='title'}here is {$smarty.block.child} included{/block}

smarty3-3.1.13/development/PHPunit/templates/test_block_nocache_parent.tpl0000644000175000017500000000005611467061362025416 0ustar mikemike{block name=test nocache}default{/block}
smarty3-3.1.13/development/PHPunit/templates/helloworld.tpl0000644000175000017500000000001311275032024022366 0ustar mikemikehello worldsmarty3-3.1.13/development/PHPunit/templates/test_block_grandchild_nested.tpl0000644000175000017500000000015211467061362026103 0ustar mikemike{extends file='test_block_child_nested2.tpl'} {block name='title_content'}-grandchild content-{/block} smarty3-3.1.13/development/PHPunit/templates/displayfoonofilter.tpl0000644000175000017500000000001711467061362024145 0ustar mikemike{$foo nofilter}smarty3-3.1.13/development/PHPunit/templates/test_block_child_smartyparent.tpl0000644000175000017500000000016111467061362026336 0ustar mikemike{extends file='test_block_parent.tpl'} {block name='title'}parent block {$smarty.block.parent} is here{/block} smarty3-3.1.13/development/PHPunit/templates/test_default_function_local.tpl0000644000175000017500000000003711634664106025776 0ustar mikemike{localfunction value='foo bar'}smarty3-3.1.13/development/PHPunit/templates/phphelloworld.php0000644000175000017500000000002011275032024023064 0ustar mikemikephp hello world smarty3-3.1.13/development/PHPunit/templates/test_default_block_script.tpl0000644000175000017500000000004211634664106025451 0ustar mikemike{scriptblock}foo bar{/scriptblock}smarty3-3.1.13/development/PHPunit/templates/test_block_parent_nested.tpl0000644000175000017500000000021411467061362025274 0ustar mikemike

{block name='title'}Title with {block name='title_content'}-default-{/block} here{/block}

smarty3-3.1.13/development/PHPunit/templates/test_block_child_append_shorttag.tpl0000644000175000017500000000013311467061362026766 0ustar mikemike{extends file='test_block_parent_shorttag.tpl'} {block 'title' append} - append{/block} smarty3-3.1.13/development/PHPunit/templates/test_block_parent_nested2.tpl0000644000175000017500000000003411773620362025357 0ustar mikemike{block name='index'}{/block}smarty3-3.1.13/development/PHPunit/templates/test_template_function_tag1.tpl0000644000175000017500000000015211377023144025720 0ustar mikemike{function name=functest default='default'}{$default} {$param}{/function}{call name=functest param='param'}smarty3-3.1.13/development/PHPunit/templates/test_default_static_modifier.tpl0000644000175000017500000000004612001634534026133 0ustar mikemike{$foo|mydefaultstaticmodifier nocache}smarty3-3.1.13/development/PHPunit/templates/test_template_function_tag4.tpl0000644000175000017500000000017411377023144025727 0ustar mikemike{function name=functest4 loop=0}{$loop}{if $loop < 5}{call name=functest4 loop=$loop+1}{/if}{/function}{call name=functest4}smarty3-3.1.13/development/PHPunit/templates/test_block_include_parent.tpl0000644000175000017500000000015411467061362025440 0ustar mikemike{block name="p"} {/block} {block name='dummy'} {include file='test_block_include_subtemplate.tpl'} {/block} smarty3-3.1.13/development/PHPunit/templates/test_default_function_script_notcachable.tpl0000644000175000017500000000004611714316731030530 0ustar mikemike{scriptfunctionnotcachable value=$foo}smarty3-3.1.13/development/PHPunit/templates/test_block_include_start3.tpl0000644000175000017500000000017111467061362025366 0ustar mikemike{extends file='test_block_include_parent.tpl'} {block name="p"}page 3
{/block} {block name="b"}block 3
{/block} smarty3-3.1.13/development/PHPunit/templates/compilerplugintest.tpl0000644000175000017500000000002111275032024024143 0ustar mikemike{compilerplugin} smarty3-3.1.13/development/PHPunit/templates/test_block_grandchild_nested3.tpl0000644000175000017500000000014311674127533026171 0ustar mikemike{extends file='test_block_child_nested3.tpl'} {block name='content2'}-grandchild content-{/block} smarty3-3.1.13/development/PHPunit/templates/hello_world_test.tpl0000644000175000017500000000001311275032024023564 0ustar mikemikehello worldsmarty3-3.1.13/development/PHPunit/templates/functionplugintest.tpl0000644000175000017500000000003311333533365024172 0ustar mikemike{counter start=10 name=tpl}smarty3-3.1.13/development/PHPunit/templates/test_block_child_plugin.tpl0000644000175000017500000000014011467061362025100 0ustar mikemike{extends file='test_block_parent.tpl'} {block name='title'}{'escaped '|escape}{/block} smarty3-3.1.13/development/PHPunit/templates/test_block_child_nested3.tpl0000644000175000017500000000023211674127533025154 0ustar mikemike{extends file='test_block_parent3.tpl'} {block name='content1'} {block name='content2'} child pre {$smarty.block.child} child post {/block} {/block} smarty3-3.1.13/development/PHPunit/templates/extendsall2.tpl0000644000175000017500000000011511634664106022456 0ustar mikemike{block name="alpha"}templates{/block} {block name="bravo_2"}templates{/block}smarty3-3.1.13/development/PHPunit/templates/assign.root.tpl0000644000175000017500000000027511636155421022503 0ustar mikemike{assign var="root" value="root" scope="root"} {$local|default:"no-local"} {include "assign.global.tpl"} {$parent|default:"no-parent"} {$root|default:"no-root"} {$global|default:"no-global"}smarty3-3.1.13/development/PHPunit/templates/test_recursive_includes2.tpl0000644000175000017500000000017311634664106025253 0ustar mikemikebefore {$foo} {$bar}
{if $foo < 4}{include 'test_recursive_includes_pass.tpl' foo=$foo+1}{/if} after {$foo} {$bar}
smarty3-3.1.13/development/PHPunit/templates/assign.global.tpl0000644000175000017500000000006311636155421022753 0ustar mikemike{assign var="global" value="global" scope="global"}smarty3-3.1.13/development/PHPunit/templates/test_block_grandchild_append.tpl0000644000175000017500000000014111467061362026066 0ustar mikemike{extends file='test_block_child.tpl'} {block name='title' append} - grandchild append{/block} smarty3-3.1.13/development/PHPunit/templates/test_block_nocache_child.tpl0000644000175000017500000000006111467061362025204 0ustar mikemike{block name=test nocache}foo {$foo}{/block}
smarty3-3.1.13/development/PHPunit/templates/default.tpl0000644000175000017500000000012011637375432021655 0ustar mikemike{$foo|default:""} /* should compile something with @silence error suppression */smarty3-3.1.13/development/PHPunit/templates/test_block_include_subtemplate.tpl0000644000175000017500000000003711467061362026474 0ustar mikemike{block name="b"}-dummy-{/block}smarty3-3.1.13/development/PHPunit/templates/test_block_child_nested_hide_space.tpl0000644000175000017500000000043012015001626027215 0ustar mikemike{ extends file="test_block_parent_nested2_space.tpl" } { block name="index" } { block name="test2" } nested block. { $smarty.block.child } { /block } { block name="test" hide } I should be hidden. { $smarty.block.child } { /block } { /block } smarty3-3.1.13/development/PHPunit/templates/test_print_nocache.tpl0000644000175000017500000000003111275032024024066 0ustar mikemike{$foo nocache=true}{$bar}smarty3-3.1.13/development/PHPunit/templates/displayfoonocachenofilter.tpl0000644000175000017500000000002711467061362025467 0ustar mikemike{$foo nocache nofilter}smarty3-3.1.13/development/PHPunit/templates/test_default_function_script.tpl0000644000175000017500000000004011634664106026202 0ustar mikemike{scriptfunction value='foo bar'}smarty3-3.1.13/development/PHPunit/templates/ambiguous/0000755000175000017500000000000012141655570021505 5ustar mikemikesmarty3-3.1.13/development/PHPunit/templates/ambiguous/case1/0000755000175000017500000000000012141655570022501 5ustar mikemikesmarty3-3.1.13/development/PHPunit/templates/ambiguous/case1/foobar.tpl0000644000175000017500000000000511645561456024474 0ustar mikemikecase1smarty3-3.1.13/development/PHPunit/templates/ambiguous/case2/0000755000175000017500000000000012141655570022502 5ustar mikemikesmarty3-3.1.13/development/PHPunit/templates/ambiguous/case2/foobar.tpl0000644000175000017500000000000511645561456024475 0ustar mikemikecase2smarty3-3.1.13/development/PHPunit/templates/test_template_function.tpl0000644000175000017500000000010411320102632024765 0ustar mikemike{include file='template_function_lib.tpl'}{call name=template_func1}smarty3-3.1.13/development/PHPunit/templates/test_block_parent_nested_include.tpl0000644000175000017500000000004511720214665026777 0ustar mikemike{block name='body'}-default-{/block} smarty3-3.1.13/development/PHPunit/templates/test_template_function_nocache_call.tpl0000644000175000017500000000011111467061362027456 0ustar mikemike{include file='template_function_lib.tpl'}{call 'template_func1' nocache}smarty3-3.1.13/development/PHPunit/templates/relativity/0000755000175000017500000000000012141655570021706 5ustar mikemikesmarty3-3.1.13/development/PHPunit/templates/relativity/foo.tpl0000644000175000017500000000001212020163015023163 0ustar mikemikerelativitysmarty3-3.1.13/development/PHPunit/templates/relativity/theory/0000755000175000017500000000000012141655570023220 5ustar mikemikesmarty3-3.1.13/development/PHPunit/templates/relativity/theory/foo.tpl0000644000175000017500000000000612020163015024500 0ustar mikemiketheorysmarty3-3.1.13/development/PHPunit/templates/relativity/theory/einstein/0000755000175000017500000000000012141655570025036 5ustar mikemikesmarty3-3.1.13/development/PHPunit/templates/relativity/theory/einstein/foo.tpl0000644000175000017500000000001012020163015026311 0ustar mikemikeeinsteinsmarty3-3.1.13/development/PHPunit/templates/relativity/theory/einstein/einstein.tpl0000644000175000017500000000001012020214030027336 0ustar mikemikeeinsteinsmarty3-3.1.13/development/PHPunit/templates/relativity/theory/theory.tpl0000644000175000017500000000000612020163015025227 0ustar mikemiketheorysmarty3-3.1.13/development/PHPunit/templates/relativity/relativity.tpl0000644000175000017500000000001212020163015024574 0ustar mikemikerelativitysmarty3-3.1.13/development/PHPunit/templates/test_template_function_tag6.tpl0000644000175000017500000000013411377023144025725 0ustar mikemike{include file='test_define_function_tag.tpl'}{include file='test_inherit_function_tag6.tpl'}smarty3-3.1.13/development/PHPunit/templates/relative_notexist.tpl0000644000175000017500000000003411634664106024001 0ustar mikemike{include file="./hello.tpl"}smarty3-3.1.13/development/PHPunit/templates/test_block_parent_nested2_space.tpl0000644000175000017500000000003412015001626026514 0ustar mikemike{block name='index'}{/block}smarty3-3.1.13/development/PHPunit/templates/sub/0000755000175000017500000000000012141655570020303 5ustar mikemikesmarty3-3.1.13/development/PHPunit/templates/sub/relative.tpl0000644000175000017500000000004211634664106022634 0ustar mikemike{include file="../helloworld.tpl"}smarty3-3.1.13/development/PHPunit/templates/test_template_function_tag7.tpl0000644000175000017500000000010411377023144025723 0ustar mikemike{include file='template_function_lib.tpl'}{call name=template_func1}smarty3-3.1.13/development/PHPunit/templates/test_default_modifier.tpl0000644000175000017500000000003011724226376024571 0ustar mikemike{$foo|mydefaultmodifier}smarty3-3.1.13/development/PHPunit/templates/test_block_child_smartychild2.tpl0000644000175000017500000000016611467061362026217 0ustar mikemike{extends file='test_block_parent.tpl'} {block name='title'}child title with - {$smarty.block.child} - here{/block} smarty3-3.1.13/development/PHPunit/templates/test_block_section.tpl0000644000175000017500000000050011306060673024077 0ustar mikemike{extends file='test_block_base.tpl'} This template should not output anything, ignore all Smarty tags but . {block name=blocksection}--block section ok--{/block}
{'Hello World'} {block name=blockpassedbysection}--block passed by section false--{/block}
{block name='parentsection'}--section--{/block}
smarty3-3.1.13/development/PHPunit/templates/test_block_child_smartychild.tpl0000644000175000017500000000013511467061362026131 0ustar mikemike{extends file='test_block_parent_smartychild.tpl'} {block name='title'}child text{/block} smarty3-3.1.13/development/PHPunit/templates/test_block_include_start2.tpl0000644000175000017500000000017111467061362025365 0ustar mikemike{extends file='test_block_include_parent.tpl'} {block name="p"}page 2
{/block} {block name="b"}block 2
{/block} smarty3-3.1.13/development/PHPunit/templates/blockplugintest.tpl0000644000175000017500000000003411333533365023440 0ustar mikemike{textformat}abc{/textformat}smarty3-3.1.13/development/PHPunit/templates/test_block_grandchild_resource.tpl0000644000175000017500000000006311467061362026451 0ustar mikemike{block name='title'}Grandchild Page Title{/block} smarty3-3.1.13/development/PHPunit/templates/test_inherit_function_tag.tpl0000644000175000017500000000002511377023144025465 0ustar mikemike{call name=functest4}smarty3-3.1.13/development/PHPunit/templates/test_register_block.tpl0000644000175000017500000000004511275032024024255 0ustar mikemike{$x} {testblock}{$y}{/testblock} {$z}smarty3-3.1.13/development/PHPunit/templates/extendsall.tpl0000644000175000017500000000011511634664106022374 0ustar mikemike{block name="alpha"}templates{/block} {block name="bravo_2"}templates{/block}smarty3-3.1.13/development/PHPunit/templates/test_template_function_tag5.tpl0000644000175000017500000000022511377023144025725 0ustar mikemike{function name=functest4 loop=0}{$loop}{if $loop < 5}{call name=functest4 loop=$loop+1}{/if}{/function}{include file='test_inherit_function_tag.tpl'}smarty3-3.1.13/development/PHPunit/templates/displayfoonocache.tpl0000644000175000017500000000001611467061362023722 0ustar mikemike{$foo nocache}smarty3-3.1.13/development/PHPunit/templates/test_inherit_function_tag6.tpl0000644000175000017500000000002611377023144025554 0ustar mikemike{call name=functest6i}smarty3-3.1.13/development/PHPunit/templates/whitespace.tpl0000644000175000017500000000162011634664106022367 0ustar mikemike whitespace
		foobar
	
		foobar
	

smarty3-3.1.13/development/PHPunit/templates/insertplugintest.tpl0000644000175000017500000000005111467061362023652 0ustar mikemike{insert name='insertplugintest' foo=$foo}smarty3-3.1.13/development/PHPunit/templates/test_define_function_tag.tpl0000644000175000017500000000015111377023144025255 0ustar mikemike{function name=functest6i loop=0}{$loop}{if $loop < 5}{call name=functest6i loop=$loop+1}{/if}{/function}smarty3-3.1.13/development/PHPunit/templates/dirname.tpl0000644000175000017500000000001111634664106021643 0ustar mikemiketemplatessmarty3-3.1.13/development/PHPunit/templates/test_block.tpl0000644000175000017500000000070711335276657022401 0ustar mikemike{extends file='test_block_section.tpl'} {block name=blockpassedbysection}--block passed by section ok--{/block}
{block name=blockroot}--block root ok--{/block}
{block name="blockassigned"}--assigned {$foo}--{/block}
{block name='parentbase'}--parent from {$smarty.block.parent} block--{/block}
{block name='parentsection'}--parent from {$smarty.block.parent} block--{/block}
{block name='blockinclude'}--block include ok--{/block}
smarty3-3.1.13/development/PHPunit/templates/test_block_grandchild_prepend.tpl0000644000175000017500000000014311467061362026256 0ustar mikemike{extends file='test_block_child.tpl'} {block name='title' prepend}grandchild prepend - {/block} smarty3-3.1.13/development/PHPunit/templates/assign.tpl0000644000175000017500000000026211636155421021515 0ustar mikemike{assign var="local" value="local"} {$local|default:"no-local"} {include "assign.parent.tpl"} {$parent|default:"no-parent"} {$root|default:"no-root"} {$global|default:"no-global"}smarty3-3.1.13/development/PHPunit/templates/test_capture_nocache.tpl0000644000175000017500000000010011467252375024412 0ustar mikemike{capture assign=bar nocache}foo {$foo}{/capture} {$bar nocache}smarty3-3.1.13/development/PHPunit/templates/helloworld2.tpl0000644000175000017500000000001311315675705022466 0ustar mikemikehello worldsmarty3-3.1.13/development/PHPunit/templates/test_block_child_nested_include.tpl0000644000175000017500000000026411720214665026574 0ustar mikemike{extends file='test_block_parent_nested_include.tpl'} {block name='body'} {block name='title_content'}{block name='nested'}{include file='helloworld.tpl'}{/block}{/block} {/block}smarty3-3.1.13/development/PHPunit/templates/test_default_compiler_function_script.tpl0000644000175000017500000000005011634664106030075 0ustar mikemike{scriptcompilerfunction value='foo bar'}smarty3-3.1.13/development/PHPunit/templates/test_block_include_root.tpl0000644000175000017500000000021611467061362025131 0ustar mikemike{include file='test_block_include_start1.tpl'} {include file='test_block_include_start2.tpl'} {include file='test_block_include_start3.tpl'} smarty3-3.1.13/development/PHPunit/templates/test_block_base.tpl0000644000175000017500000000077011467061362023362 0ustar mikemike{block name='blockbase'}--block base ok--{/block}
{block name=blocksection}--block section false--{/block}
{block name=blockpassedbysection}--block passed by section false--{/block}
{block name=blockroot}--block root false--{/block}
{block name=blockassigned}--block assigned false--{/block}
{block name='parentbase'}--base--{/block}
{block name='parentsection'}--parent from section false--{/block}
{block name='include_dummy'}{include file='test_block_include.tpl'}{/block} smarty3-3.1.13/development/PHPunit/templates/assign.parent.tpl0000644000175000017500000000030111636155421022777 0ustar mikemike{assign var="parent" value="parent" scope="parent"} {$local|default:"no-local"} {include "assign.root.tpl"} {$parent|default:"no-parent"} {$root|default:"no-root"} {$global|default:"no-global"}smarty3-3.1.13/development/PHPunit/templates/test_recursive_includes_pass.tpl0000644000175000017500000000006311634664106026215 0ustar mikemike{include 'test_recursive_includes2.tpl' foo=$foo+1}smarty3-3.1.13/development/PHPunit/templates/test_recursive_includes.tpl0000644000175000017500000000016611634664106025173 0ustar mikemikebefore {$foo} {$bar}
{if $foo < 3}{include 'test_recursive_includes.tpl' foo=$foo+1}{/if} after {$foo} {$bar}
smarty3-3.1.13/development/PHPunit/templates/test_block_child.tpl0000644000175000017500000000012111467061362023521 0ustar mikemike{extends file='test_block_parent.tpl'} {block name='title'}Page Title{/block} smarty3-3.1.13/development/PHPunit/templates/test_template_function_tag3.tpl0000644000175000017500000000024511377023144025725 0ustar mikemike{function name=functest3 default='default'}{$default} {$param}{/function}{call name=functest3 param='param' default='overwrite'} {call name=functest3 param='param2'}smarty3-3.1.13/development/PHPunit/templates/test_block_include.tpl0000644000175000017500000000007711275032024024061 0ustar mikemike{block name='blockinclude'}--block include false--{/block}
smarty3-3.1.13/development/PHPunit/FileResourceTests.php0000644000175000017500000004372512044502270021640 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } protected function relative($path) { $path = str_replace( dirname(__FILE__), '.', $path ); if (DS == "\\") { $path = str_replace( "\\", "/", $path ); } return $path; } public function testGetTemplateFilepath() { $tpl = $this->smarty->createTemplate('helloworld.tpl'); $this->assertEquals('./templates/helloworld.tpl', str_replace('\\','/',$tpl->source->filepath)); } public function testTemplateFileExists1() { $tpl = $this->smarty->createTemplate('helloworld.tpl'); $this->assertTrue($tpl->source->exists); } public function testTemplateFileExists2() { $this->assertTrue($this->smarty->templateExists('helloworld.tpl')); } public function testTemplateFileNotExists1() { $tpl = $this->smarty->createTemplate('notthere.tpl'); $this->assertFalse($tpl->source->exists); } public function testTemplateFileNotExists2() { $this->assertFalse($this->smarty->templateExists('notthere.tpl')); } public function testTemplateFileNotExists3() { try { $result = $this->smarty->fetch('notthere.tpl'); } catch (Exception $e) { $this->assertContains(htmlentities('Unable to load template file \'notthere.tpl\''), $e->getMessage()); return; } $this->fail('Exception for not existing template is missing'); } public function testGetTemplateTimestamp() { $tpl = $this->smarty->createTemplate('helloworld.tpl'); $this->assertTrue(is_integer($tpl->source->timestamp)); $this->assertEquals(10, strlen($tpl->source->timestamp)); } public function testGetTemplateSource() { $tpl = $this->smarty->createTemplate('helloworld.tpl'); $this->assertEquals('hello world', $tpl->source->content); } public function testUsesCompiler() { $tpl = $this->smarty->createTemplate('helloworld.tpl'); $this->assertFalse($tpl->source->uncompiled); } public function testIsEvaluated() { $tpl = $this->smarty->createTemplate('helloworld.tpl'); $this->assertFalse($tpl->source->recompiled); } public function testGetCompiledFilepath() { $tpl = $this->smarty->createTemplate('helloworld.tpl'); $expected = './templates_c/'.sha1($this->smarty->getTemplateDir(0) . 'helloworld.tpl').'.file.helloworld.tpl.php'; $this->assertEquals($expected, $this->relative($tpl->compiled->filepath)); } public function testGetCompiledTimestampPrepare() { $tpl = $this->smarty->createTemplate('helloworld.tpl'); // create dummy compiled file file_put_contents($tpl->compiled->filepath, ''); touch($tpl->compiled->filepath, $tpl->source->timestamp); } public function testGetCompiledTimestamp() { $tpl = $this->smarty->createTemplate('helloworld.tpl'); $this->assertTrue(is_integer($tpl->compiled->timestamp)); $this->assertEquals(10, strlen($tpl->compiled->timestamp)); $this->assertEquals($tpl->compiled->timestamp, $tpl->source->timestamp); } public function testMustCompileExisting() { $tpl = $this->smarty->createTemplate('helloworld.tpl'); $this->assertFalse($tpl->mustCompile()); } public function testMustCompileAtForceCompile() { $this->smarty->force_compile = true; $tpl = $this->smarty->createTemplate('helloworld.tpl'); $this->assertTrue($tpl->mustCompile()); } public function testMustCompileTouchedSource() { $this->smarty->force_compile = false; $tpl = $this->smarty->createTemplate('helloworld.tpl'); touch($tpl->source->filepath); // reset cache for this test to work unset($tpl->source->timestamp); $this->assertTrue($tpl->mustCompile()); // clean up for next tests $this->smarty->clearCompiledTemplate(); } public function testCompileTemplateFile() { $tpl = $this->smarty->createTemplate('helloworld.tpl'); $tpl->compileTemplateSource(); } public function testCompiledTemplateFileExits() { $tpl = $this->smarty->createTemplate('helloworld.tpl'); $this->assertTrue(file_exists($tpl->compiled->filepath)); } public function testGetCachedFilepath() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('helloworld.tpl'); $expected = './cache/'.sha1($this->smarty->getTemplateDir(0) . 'helloworld.tpl').'.helloworld.tpl.php'; $this->assertEquals($expected, $this->relative($tpl->cached->filepath)); } public function testGetCachedTimestamp() { // create dummy cache file for the following test file_put_contents('./cache/'.sha1($this->smarty->getTemplateDir(0) . 'helloworld.tpl').'.helloworld.tpl.php', ''); $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('helloworld.tpl'); $this->assertTrue(is_integer($tpl->cached->timestamp)); $this->assertEquals(10, strlen($tpl->cached->timestamp)); } public function testIsCachedPrepare() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('helloworld.tpl'); // clean up for next tests $this->smarty->clearCompiledTemplate(); $this->smarty->clearAllCache(); // compile and cache $this->smarty->fetch($tpl); } public function testIsCached() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('helloworld.tpl'); $this->assertTrue($tpl->isCached()); } public function testForceCache() { $this->smarty->caching = true; $this->smarty->force_cache = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('helloworld.tpl'); $this->assertFalse($tpl->isCached()); } public function testIsCachedTouchedSourcePrepare() { $tpl = $this->smarty->createTemplate('helloworld.tpl'); sleep(1); touch ($tpl->source->filepath); } public function testIsCachedTouchedSource() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('helloworld.tpl'); $this->assertFalse($tpl->isCached()); } public function testIsCachedCachingDisabled() { $tpl = $this->smarty->createTemplate('helloworld.tpl'); $this->assertFalse($tpl->isCached()); } public function testIsCachedForceCompile() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->force_compile = true; $tpl = $this->smarty->createTemplate('helloworld.tpl'); $this->assertFalse($tpl->isCached()); } public function testWriteCachedContent() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->clearAllCache(); $tpl = $this->smarty->createTemplate('helloworld.tpl'); $this->smarty->fetch($tpl); $this->assertTrue(file_exists($tpl->cached->filepath)); } public function testGetRenderedTemplate() { $tpl = $this->smarty->createTemplate('helloworld.tpl'); $this->assertEquals('hello world', $tpl->fetch()); } public function testSmartyIsCachedPrepare() { // prepare files for next test $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; // clean up for next tests $this->smarty->clearCompiledTemplate(); $this->smarty->clearAllCache(); $tpl = $this->smarty->createTemplate('helloworld.tpl'); $this->smarty->fetch($tpl); } public function testSmartyIsCached() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('helloworld.tpl'); $this->assertTrue($this->smarty->isCached($tpl)); } public function testSmartyIsCachedCachingDisabled() { $tpl = $this->smarty->createTemplate('helloworld.tpl'); $this->assertFalse($this->smarty->isCached($tpl)); } public function testRelativeInclude() { $result = $this->smarty->fetch('relative.tpl'); $this->assertContains('hello world', $result); } public function testRelativeIncludeSub() { $result = $this->smarty->fetch('sub/relative.tpl'); $this->assertContains('hello world', $result); } public function testRelativeIncludeFail() { try { $this->smarty->fetch('relative_sub.tpl'); } catch (Exception $e) { $this->assertContains(htmlentities("Unable to load template"), $e->getMessage()); return; } $this->fail('Exception for unknown relative filepath has not been raised.'); } public function testRelativeIncludeFailOtherDir() { $this->smarty->addTemplateDir('./templates_2'); try { $this->smarty->fetch('relative_notexist.tpl'); } catch (Exception $e) { $this->assertContains(htmlentities("Unable to load template"), $e->getMessage()); return; } $this->fail('Exception for unknown relative filepath has not been raised.'); } public function testRelativeFetch() { $this->smarty->setTemplateDir(array( dirname(__FILE__) . '/does-not-exist/', dirname(__FILE__) . '/templates/sub/', )); $this->smarty->security_policy = null; $this->assertEquals('hello world', $this->smarty->fetch('./relative.tpl')); $this->assertEquals('hello world', $this->smarty->fetch('../helloworld.tpl')); } public function testRelativeFetchCwd() { $cwd = getcwd(); chdir(dirname(__FILE__) . '/templates/sub/'); $this->smarty->setTemplateDir(array( dirname(__FILE__) . '/does-not-exist/', )); $this->smarty->security_policy = null; $this->assertEquals('hello world', $this->smarty->fetch('./relative.tpl')); $this->assertEquals('hello world', $this->smarty->fetch('../helloworld.tpl')); chdir($cwd); } protected function _relativeMap($map, $cwd=null) { foreach ($map as $file => $result) { $this->smarty->clearCompiledTemplate(); $this->smarty->clearAllCache(); if ($result === null) { try { $this->smarty->fetch($file); if ($cwd !== null) { chdir($cwd); } $this->fail('Exception expected for ' . $file); return; } catch (SmartyException $e) { // this was expected to fail } } else { try { $_res = $this->smarty->fetch($file); $this->assertEquals($result, $_res, $file); } catch (Exception $e) { if ($cwd !== null) { chdir($cwd); } throw $e; } } } if ($cwd !== null) { chdir($cwd); } } public function testRelativity() { $this->smarty->security_policy = null; $cwd = getcwd(); $dn = dirname(__FILE__); $this->smarty->setCompileDir($dn . '/templates_c/'); $this->smarty->setTemplateDir(array( $dn . '/templates/relativity/theory/', )); $map = array( 'foo.tpl' => 'theory', './foo.tpl' => 'theory', '././foo.tpl' => 'theory', '../foo.tpl' => 'relativity', '.././foo.tpl' => 'relativity', './../foo.tpl' => 'relativity', 'einstein/foo.tpl' => 'einstein', './einstein/foo.tpl' => 'einstein', '../theory/einstein/foo.tpl' => 'einstein', 'templates/relativity/relativity.tpl' => 'relativity', './templates/relativity/relativity.tpl' => 'relativity', ); $this->_relativeMap($map); $this->smarty->setTemplateDir(array( 'templates/relativity/theory/', )); $map = array( 'foo.tpl' => 'theory', './foo.tpl' => 'theory', '././foo.tpl' => 'theory', '../foo.tpl' => 'relativity', '.././foo.tpl' => 'relativity', './../foo.tpl' => 'relativity', 'einstein/foo.tpl' => 'einstein', './einstein/foo.tpl' => 'einstein', '../theory/einstein/foo.tpl' => 'einstein', 'templates/relativity/relativity.tpl' => 'relativity', './templates/relativity/relativity.tpl' => 'relativity', ); $this->_relativeMap($map); } public function testRelativityCwd() { $this->smarty->security_policy = null; $cwd = getcwd(); $dn = dirname(__FILE__); $this->smarty->setCompileDir($dn . '/templates_c/'); $this->smarty->setTemplateDir(array( $dn . '/templates/', )); chdir($dn . '/templates/relativity/theory/'); $map = array( 'foo.tpl' => 'theory', './foo.tpl' => 'theory', '././foo.tpl' => 'theory', '../foo.tpl' => 'relativity', '.././foo.tpl' => 'relativity', './../foo.tpl' => 'relativity', 'einstein/foo.tpl' => 'einstein', './einstein/foo.tpl' => 'einstein', '../theory/einstein/foo.tpl' => 'einstein', ); $this->_relativeMap($map, $cwd); } public function testRelativityPrecedence() { $this->smarty->security_policy = null; $cwd = getcwd(); $dn = dirname(__FILE__); $this->smarty->setCompileDir($dn . '/templates_c/'); $this->smarty->setTemplateDir(array( $dn . '/templates/relativity/theory/einstein/', )); $map = array( 'foo.tpl' => 'einstein', './foo.tpl' => 'einstein', '././foo.tpl' => 'einstein', '../foo.tpl' => 'theory', '.././foo.tpl' => 'theory', './../foo.tpl' => 'theory', '../../foo.tpl' => 'relativity', ); chdir($dn . '/templates/relativity/theory/'); $this->_relativeMap($map, $cwd); $map = array( '../theory.tpl' => 'theory', './theory.tpl' => 'theory', '../../relativity.tpl' => 'relativity', '../relativity.tpl' => 'relativity', './einstein.tpl' => 'einstein', 'einstein/einstein.tpl' => 'einstein', './einstein/einstein.tpl' => 'einstein', ); chdir($dn . '/templates/relativity/theory/'); $this->_relativeMap($map, $cwd); } public function testRelativityRelRel() { $this->smarty->security_policy = null; $cwd = getcwd(); $dn = dirname(__FILE__); $this->smarty->setCompileDir($dn . '/templates_c/'); $this->smarty->setTemplateDir(array( '../..', )); $map = array( 'foo.tpl' => 'relativity', './foo.tpl' => 'relativity', '././foo.tpl' => 'relativity', ); chdir($dn . '/templates/relativity/theory/einstein'); $this->_relativeMap($map, $cwd); $map = array( 'relativity.tpl' => 'relativity', './relativity.tpl' => 'relativity', 'theory/theory.tpl' => 'theory', './theory/theory.tpl' => 'theory', ); chdir($dn . '/templates/relativity/theory/einstein/'); $this->_relativeMap($map, $cwd); $map = array( 'foo.tpl' => 'theory', './foo.tpl' => 'theory', 'theory.tpl' => 'theory', './theory.tpl' => 'theory', 'einstein/einstein.tpl' => 'einstein', './einstein/einstein.tpl' => 'einstein', '../theory/einstein/einstein.tpl' => 'einstein', '../relativity.tpl' => 'relativity', './../relativity.tpl' => 'relativity', '.././relativity.tpl' => 'relativity', ); $this->smarty->setTemplateDir(array( '..', )); chdir($dn . '/templates/relativity/theory/einstein/'); $this->_relativeMap($map, $cwd); } public function testRelativityRelRel1() { $this->smarty->security_policy = null; $cwd = getcwd(); $dn = dirname(__FILE__); $this->smarty->setCompileDir($dn . '/templates_c/'); $this->smarty->setTemplateDir(array( '..', )); $map = array( 'foo.tpl' => 'theory', './foo.tpl' => 'theory', 'theory.tpl' => 'theory', './theory.tpl' => 'theory', 'einstein/einstein.tpl' => 'einstein', './einstein/einstein.tpl' => 'einstein', '../theory/einstein/einstein.tpl' => 'einstein', '../relativity.tpl' => 'relativity', './../relativity.tpl' => 'relativity', '.././relativity.tpl' => 'relativity', ); chdir($dn . '/templates/relativity/theory/einstein/'); $this->_relativeMap($map, $cwd); } /** * final cleanup */ public function testFinalCleanup() { $this->smarty->clearCompiledTemplate(); $this->smarty->clearAllCache(); } } ?> smarty3-3.1.13/development/PHPunit/IndexedFileResourceTests.php0000644000175000017500000000643311665772477023166 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->addTemplateDir(dirname(__FILE__) .'/templates_2'); // note that 10 is a string! $this->smarty->addTemplateDir(dirname(__FILE__) .'/templates_3', '10'); $this->smarty->addTemplateDir(dirname(__FILE__) .'/templates_4', 'foo'); } public static function isRunnable() { return true; } protected function relative($path) { $path = str_replace( dirname(__FILE__), '.', $path ); if (DS == "\\") { $path = str_replace( "\\", "/", $path ); } return $path; } public function testGetTemplateFilepath() { $tpl = $this->smarty->createTemplate('dirname.tpl'); $this->assertEquals('./templates/dirname.tpl', $this->relative($tpl->source->filepath)); } public function testGetTemplateFilepathNumber() { $tpl = $this->smarty->createTemplate('[1]dirname.tpl'); $this->assertEquals('./templates_2/dirname.tpl', $this->relative($tpl->source->filepath)); } public function testGetTemplateFilepathNumeric() { $tpl = $this->smarty->createTemplate('[10]dirname.tpl'); $this->assertEquals('./templates_3/dirname.tpl', $this->relative($tpl->source->filepath)); } public function testGetTemplateFilepathName() { $tpl = $this->smarty->createTemplate('[foo]dirname.tpl'); $this->assertEquals('./templates_4/dirname.tpl', $this->relative($tpl->source->filepath)); } public function testFetch() { $tpl = $this->smarty->createTemplate('dirname.tpl'); $this->assertEquals('templates', $this->smarty->fetch($tpl)); } public function testFetchNumber() { $tpl = $this->smarty->createTemplate('[1]dirname.tpl'); $this->assertEquals('templates_2', $this->smarty->fetch($tpl)); } public function testFetchNumeric() { $tpl = $this->smarty->createTemplate('[10]dirname.tpl'); $this->assertEquals('templates_3', $this->smarty->fetch($tpl)); } public function testFetchName() { $tpl = $this->smarty->createTemplate('[foo]dirname.tpl'); $this->assertEquals('templates_4', $this->smarty->fetch($tpl)); } public function testGetCompiledFilepath() { $tpl = $this->smarty->createTemplate('[foo]dirname.tpl'); $expected = './templates_c/'.sha1($this->smarty->getTemplateDir('foo').'dirname.tpl').'.file.dirname.tpl.php'; $this->assertEquals($expected, $this->relative($tpl->compiled->filepath)); } public function testGetCachedFilepath() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('[foo]dirname.tpl'); $expected = './cache/'.sha1($this->smarty->getTemplateDir('foo').'dirname.tpl').'.dirname.tpl.php'; $this->assertEquals($expected, $this->relative($tpl->cached->filepath)); } public function testFinalCleanup() { $this->smarty->clearCompiledTemplate(); $this->smarty->clearAllCache(); } } ?> smarty3-3.1.13/development/PHPunit/AssignGlobalTests.php0000644000175000017500000000363211467061362021621 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test assignGlobal and getGlobal */ public function testAssignGlobalGetGlobal() { $this->smarty->assignGlobal('foo', 'bar'); $this->assertEquals('bar', $this->smarty->getGlobal('foo')); } /** * test assignGlobal and getGlobal on arrays */ public function testAssignGlobalGetGlobalArray() { $this->smarty->assignGlobal('foo', array('foo' => 'bar', 'foo2' => 'bar2')); $a1 = array('foo' => array('foo' => 'bar', 'foo2' => 'bar2')); $a2 = $this->smarty->getGlobal(); $diff = array_diff($a1, $a2); $cmp = empty($diff); $this->assertTrue($cmp); } /** * test assignGlobal tag */ public function testAssignGlobalTag() { $this->smarty->assignGlobal('foo', 'bar'); $this->assertEquals('bar', $this->smarty->fetch('eval:{$foo}')); $this->assertEquals('buh', $this->smarty->fetch('eval:{assign var=foo value=buh scope=global}{$foo}')); $this->assertEquals('buh', $this->smarty->fetch('eval:{$foo}')); $this->assertEquals('buh', $this->smarty->getGlobal('foo')); } /** * test global var array element tag */ public function testGlobalVarArrayTag() { $this->smarty->assignGlobal('foo', array('foo' => 'bar', 'foo2' => 'bar2')); $this->assertEquals('bar2', $this->smarty->fetch('eval:{$foo.foo2}')); $this->assertEquals('bar', $this->smarty->fetch('eval:{$foo.foo}')); } } ?> smarty3-3.1.13/development/PHPunit/ResourcePluginTests.php0000644000175000017500000001570712044502270022216 0ustar mikemikesmarty = SmartyTests::$smarty; // reset cache for unit test Smarty_Resource::$resources = array(); SmartyTests::init(); } public static function isRunnable() { return true; } /** * test resource plugin rendering */ public function testResourcePlugin() { $this->smarty->addPluginsDir(dirname(__FILE__)."/PHPunitplugins/"); $this->assertEquals('hello world', $this->smarty->fetch('db:test')); } /** * test resource plugin rendering */ public function testResourcePluginObject() { $this->smarty->addPluginsDir(dirname(__FILE__)."/PHPunitplugins/"); $this->assertEquals('hello world', $this->smarty->fetch('db2:test')); } /** * test resource plugin rendering of a registered object */ public function testResourcePluginRegisteredInstance() { $this->smarty->addPluginsDir(dirname(__FILE__)."/PHPunitplugins/"); $this->smarty->loadPlugin('Smarty_Resource_Db2'); $this->smarty->registerResource( 'db2a', new Smarty_Resource_Db2() ); $this->assertEquals('hello world', $this->smarty->fetch('db2a:test')); } /** * test resource plugin rendering of a recompiling resource */ public function testResourcePluginRecompiled() { return; $this->smarty->addPluginsDir(dirname(__FILE__)."/PHPunitplugins/"); try { $this->assertEquals('hello world', $this->smarty->fetch('db3:test')); } catch (Exception $e) { $this->assertContains(htmlentities('not return a destination'), $e->getMessage()); return; } $this->fail('Exception for empty filepath has not been thrown.'); } /** * test resource plugin non-existent compiled cache of a recompiling resource */ public function testResourcePluginRecompiledCompiledFilepath() { $this->smarty->addPluginsDir(dirname(__FILE__)."/PHPunitplugins/"); $tpl = $this->smarty->createTemplate('db2:test.tpl'); $expected = realpath('./templates_c/'.sha1('db2:test.tpl').'.db2.test.tpl.php'); $this->assertFalse(!!$expected); $this->assertFalse($tpl->compiled->filepath); } /** * test resource plugin rendering of a custom resource */ public function testResourcePluginMysql() { $this->smarty->addPluginsDir(dirname(__FILE__)."/PHPunitplugins/"); $this->assertEquals('hello world', $this->smarty->fetch('mysqltest:test.tpl')); } /** * test resource plugin timestamp of a custom resource */ public function testResourcePluginMysqlTimestamp() { $this->smarty->addPluginsDir(dirname(__FILE__)."/PHPunitplugins/"); $tpl = $this->smarty->createTemplate('mysqltest:test.tpl'); $this->assertEquals(strtotime("2010-12-25 22:00:00"), $tpl->source->timestamp); } /** * test resource plugin timestamp of a custom resource with only fetch() implemented */ public function testResourcePluginMysqlTimestampWithoutFetchTimestamp() { $this->smarty->addPluginsDir(dirname(__FILE__)."/PHPunitplugins/"); $tpl = $this->smarty->createTemplate('mysqlstest:test.tpl'); $this->assertEquals(strtotime("2010-12-25 22:00:00"), $tpl->source->timestamp); } /** * test resource plugin compiledFilepath of a custom resource */ public function testResourcePluginMysqlCompiledFilepath() { $this->smarty->addPluginsDir(dirname(__FILE__)."/PHPunitplugins/"); $tpl = $this->smarty->createTemplate('mysqltest:test.tpl'); $expected = realpath('./templates_c/'.sha1('mysqltest:test.tpl').'.mysqltest.test.tpl.php'); $this->assertTrue(!!$expected); $this->assertEquals($expected, realpath($tpl->compiled->filepath)); } public function testResourcePluginMysqlCompiledFilepathCache() { $this->smarty->addPluginsDir(dirname(__FILE__)."/PHPunitplugins/"); $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->force_compile = true; $this->smarty->fetch('mysqltest:test.tpl'); $tpl = $this->smarty->createTemplate('mysqltest:test.tpl'); $expected = realpath('./templates_c/'.sha1('mysqltest:test.tpl').'.mysqltest.test.tpl.cache.php'); $this->assertTrue(!!$expected); $this->assertEquals($expected, realpath($tpl->compiled->filepath)); $this->smarty->caching = false; } /** * test resource plugin timesatmp */ public function testResourcePluginTimestamp() { $this->smarty->addPluginsDir(dirname(__FILE__)."/PHPunitplugins/"); $tpl = $this->smarty->createTemplate('db:test'); $this->assertTrue(is_integer($tpl->source->timestamp)); $this->assertEquals(10, strlen($tpl->source->timestamp)); } public function testResourcePluginExtendsall() { $this->smarty->addPluginsDir( dirname(__FILE__)."/../../distribution/demo/plugins/"); $this->smarty->setTemplateDir( array( 'root' => './templates', './templates_2', './templates_3', './templates_4', )); $expected = "templates\n\ntemplates_3\ntemplates\n\ntemplates_4"; $this->assertEquals($expected, $this->smarty->fetch('extendsall:extendsall.tpl')); } public function testResourcePluginExtendsallOne() { $this->smarty->addPluginsDir( dirname(__FILE__)."/../../distribution/demo/plugins/"); $this->smarty->setTemplateDir( array( 'root' => './templates', './templates_2', './templates_3', './templates_4', )); $expected = "templates\ntemplates"; $this->assertEquals($expected, $this->smarty->fetch('extendsall:extendsall2.tpl')); } public function testSharing() { $smarty = new Smarty(); $smarty->_resource_handlers = array(); $_smarty = clone $smarty; $smarty->fetch('eval:foo'); $_smarty->fetch('eval:foo'); $this->assertTrue($smarty->_resource_handlers['eval'] === $_smarty->_resource_handlers['eval']); } public function testExplicit() { $smarty = new Smarty(); $smarty->_resource_handlers = array(); $_smarty = clone $smarty; $smarty->fetch('eval:foo'); $_smarty->registerResource('eval', new Smarty_Internal_Resource_Eval()); $_smarty->fetch('eval:foo'); $this->assertFalse($smarty->_resource_handlers['eval'] === $_smarty->_resource_handlers['eval']); } } ?>smarty3-3.1.13/development/PHPunit/smartytestssingle.php0000644000175000017500000001151312020163015022012 0ustar mikemiketemplate_dir = array('.' . DS . 'templates' . DS); $smarty->compile_dir = '.' . DS . 'templates_c' . DS; $smarty->plugins_dir = array(SMARTY_PLUGINS_DIR); $smarty->cache_dir = '.' . DS . 'cache' . DS; $smarty->config_dir = array('.' . DS . 'configs' . DS); $smarty->template_objects = array(); $smarty->config_vars = array(); Smarty::$global_tpl_vars = array(); $smarty->template_functions = array(); $smarty->tpl_vars = array(); $smarty->force_compile = false; $smarty->force_cache = false; $smarty->auto_literal = true; $smarty->caching = false; $smarty->debugging = false; Smarty::$_smarty_vars = array(); $smarty->registered_plugins = array(); $smarty->default_plugin_handler_func = null; $smarty->registered_objects = array(); $smarty->default_modifiers = array(); $smarty->registered_filters = array(); $smarty->autoload_filters = array(); $smarty->escape_html = false; $smarty->use_sub_dirs = false; $smarty->config_overwrite = true; $smarty->config_booleanize = true; $smarty->config_read_hidden = true; $smarty->security_policy = null; $smarty->left_delimiter = '{'; $smarty->right_delimiter = '}'; $smarty->php_handling = Smarty::PHP_PASSTHRU; $smarty->enableSecurity(); $smarty->error_reporting = null; $smarty->error_unassigned = true; $smarty->caching_type = 'file'; $smarty->cache_locking = false; $smarty->cache_id = null; $smarty->compile_id = null; $smarty->default_resource_type = 'file'; } public static function init() { error_reporting(E_ALL | E_STRICT); self::_init(SmartyTests::$smarty); self::_init(SmartyTests::$smartyBC); SmartyTests::$smartyBC->registerPlugin('block','php','smarty_php_tag'); Smarty_Resource::$sources = array(); Smarty_Resource::$compileds = array(); // Smarty_Resource::$resources = array(); } /** * look for test units and run them */ public static function suite() { $testorder = array( 'FileResourceTests', // 'PluginFunctionHtmlImageTests', // 'PluginFunctionFetchTests', ); $smarty_libs_dir = dirname(__FILE__) . '/../../distribution/libs'; if (method_exists('PHPUnit_Util_Filter', $smarty_libs_dir)) { // Older versions of PHPUnit did not have this function, // which is used when determining which PHP files are // included in the PHPUnit code coverage result. PHPUnit_Util_Filter::addDirectoryToWhitelist($smarty_libs_dir); // PHPUnit_Util_FiltaddTestSuite($class); } if (false) { foreach (new DirectoryIterator(dirname(__FILE__)) as $file) { if (!$file->isDot() && !$file->isDir() && (string) $file !== 'smartytests.php' && (string) $file !== 'smartysingletests.php' && substr((string) $file, -4) === '.php') { $class = basename($file, '.php'); if (!in_array($class, $testorder)) { require_once $file->getPathname(); // to have an optional test suite, it should implement a public static function isRunnable // that returns true only if all the conditions are met to run it successfully, for example // it can check that an external library is present if (!method_exists($class, 'isRunnable') || call_user_func(array($class, 'isRunnable'))) { $suite->addTestSuite($class); } } } } } return $suite; } } ?> smarty3-3.1.13/development/PHPunit/CompileFunctionPluginTests.php0000644000175000017500000000337211765432621023533 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test function plugin tag in template file */ public function testFunctionPluginFromTemplateFile() { $tpl = $this->smarty->createTemplate('functionplugintest.tpl', $this->smarty->tpl_vars); $this->assertEquals("10", $this->smarty->fetch($tpl)); } /** * test function plugin tag in compiled template file */ public function testFunctionPluginFromCompiledTemplateFile() { $this->smarty->force_compile = false; $tpl = $this->smarty->createTemplate('functionplugintest.tpl', $this->smarty->tpl_vars); $this->assertEquals("10", $this->smarty->fetch($tpl)); } /** * test function plugin function definition in script */ public function testFunctionPluginRegisteredFunction() { $this->smarty->registerPlugin(Smarty::PLUGIN_FUNCTION,'plugintest', 'myplugintest'); $tpl = $this->smarty->createTemplate('eval:{plugintest foo=bar}', $this->smarty->tpl_vars); $this->assertEquals("plugin test called bar", $this->smarty->fetch($tpl)); } /** * test muiltiline tags */ public function testMultiLineTags() { $this->assertEquals("10", $this->smarty->fetch("eval:{counter\n\tstart=10}")); } } function myplugintest($params, &$smarty) { return "plugin test called $params[foo]"; } ?> smarty3-3.1.13/development/PHPunit/TemplateExistsTests.php0000644000175000017500000000143211333364376022226 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test $smarty->templateExists true */ public function testSmartyTemplateExists() { $this->assertTrue($this->smarty->templateExists('helloworld.tpl')); } /** * test $smarty->templateExists false */ public function testSmartyTemplateNotExists() { $this->assertFalse($this->smarty->templateExists('notthere.tpl')); } } ?> smarty3-3.1.13/development/PHPunit/templates_c/0000755000175000017500000000000012141655567020022 5ustar mikemikesmarty3-3.1.13/development/PHPunit/EvalResourceTests.php0000644000175000017500000001114511665772477021671 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test template eval exits */ public function testTemplateEvalExists1() { $tpl = $this->smarty->createTemplate('eval:{$foo}'); $this->assertTrue($tpl->source->exists); } public function testTemplateEvalExists2() { $this->assertTrue($this->smarty->templateExists('eval:{$foo}')); } /** * test getTemplateFilepath */ public function testGetTemplateFilepath() { $tpl = $this->smarty->createTemplate('eval:hello world'); $this->assertEquals('2aae6c35c94fcfb415dbe95f408b9ce91ee846ed', $tpl->source->filepath); } /** * test getTemplateTimestamp */ public function testGetTemplateTimestamp() { $tpl = $this->smarty->createTemplate('eval:hello world'); $this->assertFalse($tpl->source->timestamp); } /** * test getTemplateSource */ public function testGetTemplateSource() { $tpl = $this->smarty->createTemplate('eval:hello world{$foo}'); $this->assertEquals('hello world{$foo}', $tpl->source->content); } /** * test usesCompiler */ public function testUsesCompiler() { $tpl = $this->smarty->createTemplate('eval:hello world'); $this->assertFalse($tpl->source->uncompiled); } /** * test isEvaluated */ public function testIsEvaluated() { $tpl = $this->smarty->createTemplate('eval:hello world'); $this->assertTrue($tpl->source->recompiled); } /** * test mustCompile */ public function testMustCompile() { $tpl = $this->smarty->createTemplate('eval:hello world'); $this->assertTrue($tpl->mustCompile()); } /** * test getCompiledFilepath */ public function testGetCompiledFilepath() { $tpl = $this->smarty->createTemplate('eval:hello world'); $this->assertFalse($tpl->compiled->filepath); } /** * test getCompiledTimestamp */ public function testGetCompiledTimestamp() { $tpl = $this->smarty->createTemplate('eval:hello world'); $this->assertFalse($tpl->compiled->timestamp); } /** * test writeCachedContent */ public function testWriteCachedContent() { $tpl = $this->smarty->createTemplate('eval:hello world'); $this->assertFalse($tpl->writeCachedContent('dummy')); } /** * test isCached */ public function testIsCached() { $tpl = $this->smarty->createTemplate('eval:hello world'); $this->assertFalse($tpl->isCached()); } /** * test getRenderedTemplate */ public function testGetRenderedTemplate() { $tpl = $this->smarty->createTemplate('eval:hello world'); $this->assertEquals('hello world', $tpl->fetch()); } /** * test that no complied template and cache file was produced */ public function testNoFiles() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 20; $this->smarty->clearCompiledTemplate(); $this->smarty->clearAllCache(); $tpl = $this->smarty->createTemplate('eval:hello world'); $this->assertEquals('hello world', $this->smarty->fetch($tpl)); $this->assertEquals(0, $this->smarty->clearAllCache()); $this->assertEquals(0, $this->smarty->clearCompiledTemplate()); } /** * test $smarty->is_cached */ public function testSmartyIsCached() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 20; $tpl = $this->smarty->createTemplate('eval:hello world'); $this->assertEquals('hello world', $this->smarty->fetch($tpl)); $this->assertFalse($this->smarty->isCached($tpl)); } public function testUrlencodeTemplate() { $tpl = $this->smarty->createTemplate('eval:urlencode:%7B%22foobar%22%7Cescape%7D'); $this->assertEquals('foobar', $tpl->fetch()); } public function testBase64Template() { $tpl = $this->smarty->createTemplate('eval:base64:eyJmb29iYXIifGVzY2FwZX0='); $this->assertEquals('foobar', $tpl->fetch()); } } ?> smarty3-3.1.13/development/PHPunit/SharedFunctionsTests.php0000644000175000017500000000142511634664106022352 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test smarty_function_escape_special_chars() */ public function testEscapeSpecialChars() { require_once SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php'; $this->assertEquals('hello<world ©', smarty_function_escape_special_chars('helloassertEquals('ö€', smarty_function_escape_special_chars('ö€')); } } ?>smarty3-3.1.13/development/PHPunit/DelimiterTests.php0000644000175000017500000000432012023461723021157 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test <{ }> delimiter */ public function testDelimiter1() { $this->smarty->left_delimiter = '<{'; $this->smarty->right_delimiter = '}>'; $tpl = $this->smarty->createTemplate('eval:<{* comment *}><{if true}><{"hello world"}><{/if}>'); $this->assertEquals("hello world", $this->smarty->fetch($tpl)); } /** * test <-{ }-> delimiter */ public function testDelimiter2() { $this->smarty->left_delimiter = '<-{'; $this->smarty->right_delimiter = '}->'; $tpl = $this->smarty->createTemplate('eval:<-{* comment *}-><-{if true}-><-{"hello world"}-><-{/if}->'); $this->assertEquals("hello world", $this->smarty->fetch($tpl)); } /** * test <--{ }--> delimiter */ public function testDelimiter3() { $this->smarty->left_delimiter = '<--{'; $this->smarty->right_delimiter = '}-->'; $tpl = $this->smarty->createTemplate('eval:<--{* comment *}--><--{if true}--><--{"hello world"}--><--{/if}-->'); $this->assertEquals("hello world", $this->smarty->fetch($tpl)); } /** * test {{ }} delimiter */ public function testDelimiter4() { $this->smarty->left_delimiter = '{{'; $this->smarty->right_delimiter = '}}'; $tpl = $this->smarty->createTemplate('eval:{{* comment *}}{{if true}}{{"hello world"}}{{/if}}'); $this->assertEquals("hello world", $this->smarty->fetch($tpl)); } /** * test {= =} delimiter for conficts with option flags */ public function testDelimiter5() { $this->smarty->left_delimiter = '{='; $this->smarty->right_delimiter = '=}'; $tpl = $this->smarty->createTemplate('eval:{=assign var=foo value="hello world" nocache=}{=$foo=}'); $this->assertEquals("hello world", $this->smarty->fetch($tpl)); } } ?> smarty3-3.1.13/development/PHPunit/PluginFunctionHtmlOptionsTests.php0000644000175000017500000004423112050511024024401 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } public function testAssociativeArray() { $n = "\n"; $expected = '' . $n; $tpl = $this->smarty->createTemplate('eval:{html_options name="foo" options=$myOptions selected=$mySelect}'); $tpl->assign('mySelect', 9904); $tpl->assign('myOptions', array( 1800 => 'Joe Schmoe', 9904 => 'Jack Smith', 2003 => 'Charlie Brown', )); $this->assertEquals($expected, $tpl->fetch()); } public function testSeparateArrays() { $n = "\n"; $expected = '' . $n; $tpl = $this->smarty->createTemplate('eval:{html_options name="foo" values=$cust_ids output=$cust_names selected=$customer_id}'); $tpl->assign('customer_id', 92); $tpl->assign('cust_ids', array(56,92,13)); $tpl->assign('cust_names', array( 'Joe Schmoe', 'Jane Johnson', 'Charlie Brown', )); $this->assertEquals($expected, $tpl->fetch()); } public function testIterator() { $n = "\n"; $expected = '' . $n; $tpl = $this->smarty->createTemplate('eval:{html_options name="foo" options=$myOptions selected=$mySelect}'); $tpl->assign('mySelect', 9904); $tpl->assign('myOptions', new ArrayIterator(array( 1800 => 'Joe Schmoe', 9904 => 'Jack Smith', 2003 => 'Charlie Brown', ))); $this->assertEquals($expected, $tpl->fetch()); } public function testOptgroup() { $n = "\n"; $expected = '' . $n; $tpl = $this->smarty->createTemplate('eval:{html_options name=foo options=$lookups selected=$fav}'); $tpl->assign('fav', 7); $tpl->assign('lookups', array( 'Sport' => array( 6 => 'Golf', 9 => 'Cricket', 7 => 'Swim' ), 'Rest' => array( 3 => 'Sauna', 1 => 'Massage' ), )); $this->assertEquals($expected, $tpl->fetch()); } public function testNullString() { $n = "\n"; $expected = '' . $n; $tpl = $this->smarty->createTemplate('eval:{html_options name=foo options=$array selected=$selected}'); $tpl->assign('selected', "null"); $tpl->assign('array', array( 'null' => 'null', 0 => 'zero', 1 => 'one', 2 => 'two', 'optgroup' => array( 'null' => 'null', 0 => 'zero', 1 => 'one', 2 => 'two', ), )); $this->assertEquals($expected, $tpl->fetch()); } public function testNullValue() { $n = "\n"; $expected = '' . $n; $tpl = $this->smarty->createTemplate('eval:{html_options name=foo options=$array selected=$selected}'); $tpl->assign('selected', null); $tpl->assign('array', array( '' => 'empty string', 'null' => 'null', 0 => 'zero', 1 => 'one', 2 => 'two', 'optgroup' => array( '' => 'empty string', 'null' => 'null', 0 => 'zero', 1 => 'one', 2 => 'two', ), )); $this->assertEquals($expected, $tpl->fetch()); } public function testZeroValue() { $n = "\n"; $expected = '' . $n; $tpl = $this->smarty->createTemplate('eval:{html_options name=foo options=$array selected=$selected}'); $tpl->assign('selected', 0); $tpl->assign('array', array( 'null' => 'null', 0 => 'zero', 1 => 'one', 2 => 'two', 'optgroup' => array( 'null' => 'null', 0 => 'zero', 1 => 'one', 2 => 'two', ), )); $this->assertEquals($expected, $tpl->fetch()); } public function testZeroStringValue() { $n = "\n"; $expected = '' . $n; $tpl = $this->smarty->createTemplate('eval:{html_options name=foo options=$array selected=$selected}'); $tpl->assign('selected', "0"); $tpl->assign('array', array( 'null' => "null", 0 => 'zero', 1 => 'one', 2 => 'two', 'optgroup' => array( 'null' => 'null', 0 => 'zero', 1 => 'one', 2 => 'two', ), )); $this->assertEquals($expected, $tpl->fetch()); } public function testEmptyStringValue() { $n = "\n"; $expected = '' . $n; $tpl = $this->smarty->createTemplate('eval:{html_options name=foo options=$array selected=$selected}'); $tpl->assign('selected', ""); $tpl->assign('array', array( 'null' => 'null', '0' => 'zero', '1' => 'one', '2' => 'two', 'optgroup' => array( 'null' => 'null', 0 => 'zero', 1 => 'one', 2 => 'two', ), )); $this->assertEquals($expected, $tpl->fetch()); } public function testEmptyStringValues() { $n = "\n"; $expected = '' . $n; $tpl = $this->smarty->createTemplate('eval:{html_options name=foo options=$array selected=$selected}'); $tpl->assign('selected', ""); $tpl->assign('array', array( '' => 'empty string', 'null' => 'null', '0' => 'zero', '1' => 'one', '2' => 'two', 'optgroup' => array( '' => 'empty string', 'null' => 'null', 0 => 'zero', 1 => 'one', 2 => 'two', ), )); $this->assertEquals($expected, $tpl->fetch()); } public function testObject() { $n = "\n"; $expected = '' . $n; $tpl = $this->smarty->createTemplate('eval:{html_options name="foo" options=$myOptions selected=$mySelect}'); $tpl->assign('mySelect', new _object_toString(9904)); $tpl->assign('myOptions', array( 1800 => 'Joe Schmoe', 9904 => 'Jack Smith', 2003 => 'Charlie Brown', )); $this->assertEquals($expected, $tpl->fetch()); } public function testObjectList() { $n = "\n"; $expected = '' . $n; $tpl = $this->smarty->createTemplate('eval:{html_options name="foo" options=$myOptions selected=$mySelect}'); $tpl->assign('mySelect', new _object_toString(9904)); $tpl->assign('myOptions', array( 1800 => new _object_toString('Joe Schmoe'), 9904 => new _object_toString('Jack Smith'), 2003 => new _object_toString('Charlie Brown'), )); $this->assertEquals($expected, $tpl->fetch()); } protected $_errors = array(); public function error_handler($errno, $errstr, $errfile, $errline, $errcontext) { $this->_errors[] = $errstr; } public function testObjectNoString() { $this->_errors = array(); set_error_handler(array($this, 'error_handler')); $n = "\n"; $expected = '' . $n; $tpl = $this->smarty->createTemplate('eval:{html_options name="foo" options=$myOptions selected=$mySelect}'); $tpl->assign('mySelect', new _object_noString(9904)); $tpl->assign('myOptions', array( 1800 => 'Joe Schmoe', 9904 => 'Jack Smith', 2003 => 'Charlie Brown', )); $tpl->fetch(); $this->assertEquals(1, count($this->_errors)); $this->assertStringEndsWith("without __toString() method", $this->_errors[0]); restore_error_handler(); } public function testObjectListNoString() { $this->_errors = array(); set_error_handler(array($this, 'error_handler')); $n = "\n"; $expected = '' . $n; $tpl = $this->smarty->createTemplate('eval:{html_options name="foo" options=$myOptions selected=$mySelect}'); $tpl->assign('mySelect', new _object_toString(9904)); $tpl->assign('myOptions', array( 1800 => new _object_toString('Joe Schmoe'), 9904 => new _object_noString('Jack Smith'), 2003 => new _object_toString('Charlie Brown'), )); $tpl->fetch(); $this->assertEquals(1, count($this->_errors)); $this->assertStringEndsWith("without __toString() method", $this->_errors[0]); restore_error_handler(); } public function testDisabled() { $n = "\n"; $expected = '' . $n; $tpl = $this->smarty->createTemplate('eval:{html_options name="foo" options=$myOptions selected=$mySelect disabled=1}'); $tpl->assign('mySelect', new _object_toString(9904)); $tpl->assign('myOptions', array( 1800 => 'Joe Schmoe', 9904 => 'Jack Smith', 2003 => 'Charlie Brown', )); $this->assertEquals($expected, $tpl->fetch()); } public function testDisabledStrict() { $n = "\n"; $expected = '' . $n; $tpl = $this->smarty->createTemplate('eval:{html_options name="foo" options=$myOptions selected=$mySelect disabled=1 strict=true}'); $tpl->assign('mySelect', new _object_toString(9904)); $tpl->assign('myOptions', array( 1800 => 'Joe Schmoe', 9904 => 'Jack Smith', 2003 => 'Charlie Brown', )); $this->assertEquals($expected, $tpl->fetch()); $n = "\n"; $expected = '' . $n; $tpl = $this->smarty->createTemplate('eval:{html_options name="foo" options=$myOptions selected=$mySelect disabled=true strict=true}'); $tpl->assign('mySelect', new _object_toString(9904)); $tpl->assign('myOptions', array( 1800 => 'Joe Schmoe', 9904 => 'Jack Smith', 2003 => 'Charlie Brown', )); $this->assertEquals($expected, $tpl->fetch()); $n = "\n"; $expected = '' . $n; $tpl = $this->smarty->createTemplate('eval:{html_options name="foo" options=$myOptions selected=$mySelect disabled="disabled" strict=true}'); $tpl->assign('mySelect', new _object_toString(9904)); $tpl->assign('myOptions', array( 1800 => 'Joe Schmoe', 9904 => 'Jack Smith', 2003 => 'Charlie Brown', )); $this->assertEquals($expected, $tpl->fetch()); } } ?>smarty3-3.1.13/development/PHPunit/DoubleQuotedStringTests.php0000644000175000017500000001433711467061362023043 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test simple double quoted string */ public function testSimpleDoubleQuotedString() { $tpl = $this->smarty->createTemplate('eval:{$foo="Hello World"}{$foo}', null, null, $this->smarty); $this->assertEquals('Hello World', $this->smarty->fetch($tpl)); } /** * test expression tags in double quoted strings */ public function testTagsInDoubleQuotedString() { $tpl = $this->smarty->createTemplate('eval:{$foo="Hello {1+2} World"}{$foo}', null, null, $this->smarty); $this->assertEquals('Hello 3 World', $this->smarty->fetch($tpl)); } /** * test vars in double quoted strings */ public function testVarsInDoubleQuotedString1() { $tpl = $this->smarty->createTemplate('eval:{$bar=\'blah\'}{$foo="Hello $bar World"}{$foo}', null, null, $this->smarty); $this->assertEquals('Hello blah World', $this->smarty->fetch($tpl)); } public function testVarsInDoubleQuotedString2() { $tpl = $this->smarty->createTemplate('eval:{$bar=\'blah\'}{$buh=\'buh\'}{$foo="Hello $bar$buh World"}{$foo}', null, null, $this->smarty); $this->assertEquals('Hello blahbuh World', $this->smarty->fetch($tpl)); } /** * test vars with backtick in double quoted strings */ public function testVarsBacktickInDoubleQuotedString1() { $tpl = $this->smarty->createTemplate('eval:{$bar=\'blah\'}{$foo="Hello `$bar`.test World"}{$foo}', null, null, $this->smarty); $this->assertEquals('Hello blah.test World', $this->smarty->fetch($tpl)); } public function testVarsBacktickInDoubleQuotedString2() { $tpl = $this->smarty->createTemplate('eval:{$bar=\'blah\'}{$buh=\'buh\'}{$foo="Hello `$bar``$buh`.test World"}{$foo}', null, null, $this->smarty); $this->assertEquals('Hello blahbuh.test World', $this->smarty->fetch($tpl)); } /** * test variable vars with backtick in double quoted strings */ public function testVariableVarsBacktickInDoubleQuotedString() { $tpl = $this->smarty->createTemplate('eval:{$barbuh=\'blah\'}{$buh=\'buh\'}{$foo="Hello `$bar{$buh}`.test World"}{$foo}', null, null, $this->smarty); $this->assertEquals('Hello blah.test World', $this->smarty->fetch($tpl)); } /** * test array vars with backtick in double quoted strings */ public function testArrayVarsBacktickInDoubleQuotedString1() { $tpl = $this->smarty->createTemplate('eval:{$bar[1][2]=\'blah\'}{$foo="Hello `$bar.1.2`.test World"}{$foo}', null, null, $this->smarty); $this->assertEquals('Hello blah.test World', $this->smarty->fetch($tpl)); } public function testArrayVarsBacktickInDoubleQuotedString2() { $tpl = $this->smarty->createTemplate('eval:{$bar[1][2]=\'blah\'}{$foo="Hello `$bar[1][2]`.test World"}{$foo}', null, null, $this->smarty); $this->assertEquals('Hello blah.test World', $this->smarty->fetch($tpl)); } /** * test expression in backtick in double quoted strings */ public function testExpressionBacktickInDoubleQuotedString() { $tpl = $this->smarty->createTemplate('eval:{$a=1}{"`$a+1`"}', null, null, $this->smarty); $this->assertEquals('2', $this->smarty->fetch($tpl)); } /** * test smartytag in double quoted strings */ public function testSmartytagInDoubleQuotedString1() { $tpl = $this->smarty->createTemplate('eval:{$foo="Hello {counter start=1} World"}{$foo}', null, null, $this->smarty); $this->assertEquals('Hello 1 World', $this->smarty->fetch($tpl)); } public function testSmartytagInDoubleQuotedString2() { $tpl = $this->smarty->createTemplate('eval:{$foo="Hello {counter start=1}{counter} World"}{$foo}', null, null, $this->smarty); $this->assertEquals('Hello 12 World', $this->smarty->fetch($tpl)); } /** * test block smartytag in double quoted strings */ public function testSmartyBlockTagInDoubleQuotedString1() { $this->smarty->assign('x', 1); $this->smarty->assign('y', 1); $this->smarty->assign('z', true); $this->assertEquals('Hello 1 World', $this->smarty->fetch('eval:{"Hello{if $z} {$x} {else}{$y}{/if}World"}')); } /** * test vars in delimiter in double quoted strings */ public function testVarsDelimiterInDoubleQuotedString() { $tpl = $this->smarty->createTemplate('eval:{$bar=\'blah\'}{$foo="Hello {$bar}.test World"}{$foo}', null, null, $this->smarty); $this->assertEquals('Hello blah.test World', $this->smarty->fetch($tpl)); } /** * test escaped quotes in double quoted strings */ public function testEscapedQuotesInDoubleQuotedString() { $tpl = $this->smarty->createTemplate('eval:{$foo="Hello \" World"}{$foo}', null, null, $this->smarty); $this->assertEquals('Hello " World', $this->smarty->fetch($tpl)); } /** * test single quotes in double quoted strings */ public function testSingleQuotesInDoubleQuotedString() { $tpl = $this->smarty->createTemplate('eval:{$foo="Hello \'World\'"}{$foo}', null, null, $this->smarty); $this->assertEquals("Hello 'World'", $this->smarty->fetch($tpl)); } /** * test single quote tags in double quoted strings */ public function testSingleQuoteTagsInDoubleQuotedString() { $tpl = $this->smarty->createTemplate('eval:{$foo="Hello {\'World\'} Test"}{$foo}', null, null, $this->smarty); $this->assertEquals("Hello World Test", $this->smarty->fetch($tpl)); } /** * test empty double quoted strings */ public function testEmptyDoubleQuotedString() { $tpl = $this->smarty->createTemplate('eval:{$foo=""}{$foo}', null, null, $this->smarty); $this->assertEquals("", $this->smarty->fetch($tpl)); } } ?>smarty3-3.1.13/development/PHPunit/CoreTests.php0000644000175000017500000000232711467407714020151 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * loadPlugin test unkown plugin */ public function testLoadPluginErrorReturn() { $this->assertFalse($this->smarty->loadPlugin('Smarty_Not_Known')); } /** * loadPlugin test Smarty_Internal_Debug exists */ public function testLoadPluginSmartyInternalDebug() { $this->assertTrue($this->smarty->loadPlugin('Smarty_Internal_Debug') == true); } /** * loadPlugin test $template_class exists */ public function testLoadPluginSmartyTemplateClass() { $this->assertTrue($this->smarty->loadPlugin($this->smarty->template_class) == true); } /** * loadPlugin test loaging from plugins_dir */ public function testLoadPluginSmartyPluginCounter() { $this->assertTrue($this->smarty->loadPlugin('Smarty_Function_Counter') == true); } } ?> smarty3-3.1.13/development/PHPunit/CacheResourceCustomMysqlTests.php0000644000175000017500000004445711634664106024223 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->caching_type = 'mysqltest'; $this->smarty->addPluginsDir(dirname(__FILE__)."/PHPunitplugins/"); } public static function isRunnable() { return true; } protected function doClearCacheAssertion($a, $b) { $this->assertEquals($a, $b); } /** * test getCachedFilepath with use_sub_dirs enabled */ public function testGetCachedFilepathSubDirs() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('helloworld.tpl'); $sha1 = sha1($tpl->source->filepath); $this->assertEquals($sha1, $tpl->cached->filepath); } /** * test getCachedFilepath with cache_id */ public function testGetCachedFilepathCacheId() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar'); $sha1 = sha1($tpl->source->filepath . 'foo|bar' . null); $this->assertEquals($sha1, $tpl->cached->filepath); } /** * test getCachedFilepath with compile_id */ public function testGetCachedFilepathCompileId() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('helloworld.tpl', null, 'blar'); $sha1 = sha1($tpl->source->filepath . null . 'blar'); $this->assertEquals($sha1, $tpl->cached->filepath); } /** * test getCachedFilepath with cache_id and compile_id */ public function testGetCachedFilepathCacheIdCompileId() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar'); $sha1 = sha1($tpl->source->filepath . 'foo|bar' . 'blar'); $this->assertEquals($sha1, $tpl->cached->filepath); } /** * test cache->clear_all with cache_id and compile_id */ public function testClearCacheAllCacheIdCompileId() { $this->smarty->clearAllCache(); $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar'); $tpl->writeCachedContent('hello world'); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl)); // Custom CacheResources may return -1 if they can't tell the number of deleted elements $this->assertEquals(-1, $this->smarty->clearAllCache()); } /** * test cache->clear with cache_id and compile_id */ public function testClearCacheCacheIdCompileId() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->clearAllCache(); // create and cache templates $tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar'); $tpl->writeCachedContent('hello world 1'); $tpl2 = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar2', 'blar'); $tpl2->writeCachedContent('hello world 2'); $tpl3 = $this->smarty->createTemplate('helloworld2.tpl', 'foo|bar', 'blar'); $tpl3->writeCachedContent('hello world 3'); // test cached content $this->assertEquals('hello world 1', $tpl->cached->handler->getCachedContent($tpl)); $this->assertEquals('hello world 2', $tpl->cached->handler->getCachedContent($tpl2)); $this->assertEquals('hello world 3', $tpl->cached->handler->getCachedContent($tpl3)); // test number of deleted caches $this->doClearCacheAssertion(2, $this->smarty->clearCache(null, 'foo|bar')); // test that caches are deleted properly $this->assertNull($tpl->cached->handler->getCachedContent($tpl)); $this->assertEquals('hello world 2', $tpl->cached->handler->getCachedContent($tpl2)); $this->assertNull($tpl->cached->handler->getCachedContent($tpl3)); } public function testClearCacheCacheIdCompileId2() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->clearAllCache(); // create and cache templates $tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar'); $tpl->writeCachedContent('hello world'); $tpl2 = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar2', 'blar'); $tpl2->writeCachedContent('hello world'); $tpl3 = $this->smarty->createTemplate('helloworld2.tpl', 'foo|bar', 'blar'); $tpl3->writeCachedContent('hello world'); // test cached content $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl2)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl3)); // test number of deleted caches $this->doClearCacheAssertion(2, $this->smarty->clearCache('helloworld.tpl')); // test that caches are deleted properly $this->assertNull($tpl->cached->handler->getCachedContent($tpl)); $this->assertNull($tpl->cached->handler->getCachedContent($tpl2)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl3)); } public function testClearCacheCacheIdCompileId2Sub() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->clearAllCache(); // create and cache templates $tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar'); $tpl->writeCachedContent('hello world'); $tpl2 = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar2', 'blar'); $tpl2->writeCachedContent('hello world'); $tpl3 = $this->smarty->createTemplate('helloworld2.tpl', 'foo|bar', 'blar'); $tpl3->writeCachedContent('hello world'); // test cached content $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl2)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl3)); // test number of deleted caches $this->doClearCacheAssertion(2, $this->smarty->clearCache('helloworld.tpl')); // test that caches are deleted properly $this->assertNull($tpl->cached->handler->getCachedContent($tpl)); $this->assertNull($tpl->cached->handler->getCachedContent($tpl2)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl3)); } public function testClearCacheCacheIdCompileId3() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->clearAllCache(); // create and cache templates $tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar'); $tpl->writeCachedContent('hello world'); $tpl2 = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar2'); $tpl2->writeCachedContent('hello world'); $tpl3 = $this->smarty->createTemplate('helloworld2.tpl', 'foo|bar', 'blar'); $tpl3->writeCachedContent('hello world'); // test cached content $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl2)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl3)); // test number of deleted caches $this->doClearCacheAssertion(1, $this->smarty->clearCache('helloworld.tpl', null, 'blar2')); // test that caches are deleted properly $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl)); $this->assertNull($tpl->cached->handler->getCachedContent($tpl2)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl3)); } public function testClearCacheCacheIdCompileId3Sub() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->clearAllCache(); // create and cache templates $tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar'); $tpl->writeCachedContent('hello world'); $tpl2 = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar2'); $tpl2->writeCachedContent('hello world'); $tpl3 = $this->smarty->createTemplate('helloworld2.tpl', 'foo|bar', 'blar'); $tpl3->writeCachedContent('hello world'); // test cached content $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl2)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl3)); // test number of deleted caches $this->doClearCacheAssertion(1, $this->smarty->clearCache('helloworld.tpl', null, 'blar2')); // test that caches are deleted properly $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl)); $this->assertNull($tpl->cached->handler->getCachedContent($tpl2)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl3)); } public function testClearCacheCacheIdCompileId4() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->clearAllCache(); // create and cache templates $tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar'); $tpl->writeCachedContent('hello world'); $tpl2 = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar2'); $tpl2->writeCachedContent('hello world'); $tpl3 = $this->smarty->createTemplate('helloworld2.tpl', 'foo|bar', 'blar'); $tpl3->writeCachedContent('hello world'); // test cached content $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl2)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl3)); // test number of deleted caches $this->doClearCacheAssertion(1, $this->smarty->clearCache('helloworld.tpl', null, 'blar2')); // test that caches are deleted properly $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl)); $this->assertNull($tpl->cached->handler->getCachedContent($tpl2)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl3)); } public function testClearCacheCacheIdCompileId4Sub() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->clearAllCache(); // create and cache templates $tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar'); $tpl->writeCachedContent('hello world'); $tpl2 = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar2'); $tpl2->writeCachedContent('hello world'); $tpl3 = $this->smarty->createTemplate('helloworld2.tpl', 'foo|bar', 'blar'); $tpl3->writeCachedContent('hello world'); // test cached content $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl2)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl3)); // test number of deleted caches $this->doClearCacheAssertion(1, $this->smarty->clearCache('helloworld.tpl', null, 'blar2')); // test that caches are deleted properly $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl)); $this->assertNull($tpl->cached->handler->getCachedContent($tpl2)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl3)); } public function testClearCacheCacheIdCompileId5() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->clearAllCache(); // create and cache templates $tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar'); $tpl->writeCachedContent('hello world'); $tpl2 = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar2'); $tpl2->writeCachedContent('hello world'); $tpl3 = $this->smarty->createTemplate('helloworld2.tpl', 'foo|bar', 'blar'); $tpl3->writeCachedContent('hello world'); // test cached content $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl2)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl3)); // test number of deleted caches $this->doClearCacheAssertion(2, $this->smarty->clearCache(null, null, 'blar')); // test that caches are deleted properly $this->assertNull($tpl->cached->handler->getCachedContent($tpl)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl2)); $this->assertNull($tpl->cached->handler->getCachedContent($tpl3)); } public function testClearCacheCacheIdCompileId5Sub() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->clearAllCache(); // create and cache templates $tpl = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar'); $tpl->writeCachedContent('hello world'); $tpl2 = $this->smarty->createTemplate('helloworld.tpl', 'foo|bar', 'blar2'); $tpl2->writeCachedContent('hello world'); $tpl3 = $this->smarty->createTemplate('helloworld2.tpl', 'foo|bar', 'blar'); $tpl3->writeCachedContent('hello world'); // test cached content $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl2)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl3)); // test number of deleted caches $this->doClearCacheAssertion(2, $this->smarty->clearCache(null, null, 'blar')); // test that caches are deleted properly $this->assertNull($tpl->cached->handler->getCachedContent($tpl)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl2)); $this->assertNull($tpl->cached->handler->getCachedContent($tpl3)); } public function testClearCacheCacheFile() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->clearAllCache(); // create and cache templates $tpl = $this->smarty->createTemplate('helloworld.tpl'); $tpl->writeCachedContent('hello world'); $tpl2 = $this->smarty->createTemplate('helloworld.tpl',null,'bar'); $tpl2->writeCachedContent('hello world'); $tpl3 = $this->smarty->createTemplate('helloworld.tpl','buh|blar'); $tpl3->writeCachedContent('hello world'); $tpl4 = $this->smarty->createTemplate('helloworld2.tpl'); $tpl4->writeCachedContent('hello world'); // test cached content $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl2)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl3)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl4)); // test number of deleted caches $this->doClearCacheAssertion(3, $this->smarty->clearCache('helloworld.tpl')); // test that caches are deleted properly $this->assertNull($tpl->cached->handler->getCachedContent($tpl)); $this->assertNull($tpl->cached->handler->getCachedContent($tpl2)); $this->assertNull($tpl->cached->handler->getCachedContent($tpl3)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl4)); } public function testClearCacheCacheFileSub() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->clearAllCache(); // create and cache templates $tpl = $this->smarty->createTemplate('helloworld.tpl'); $tpl->writeCachedContent('hello world'); $tpl2 = $this->smarty->createTemplate('helloworld.tpl',null,'bar'); $tpl2->writeCachedContent('hello world'); $tpl3 = $this->smarty->createTemplate('helloworld.tpl','buh|blar'); $tpl3->writeCachedContent('hello world'); $tpl4 = $this->smarty->createTemplate('helloworld2.tpl'); $tpl4->writeCachedContent('hello world'); // test cached content $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl2)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl3)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl4)); // test number of deleted caches $this->doClearCacheAssertion(3, $this->smarty->clearCache('helloworld.tpl')); // test that caches are deleted properly $this->assertNull($tpl->cached->handler->getCachedContent($tpl)); $this->assertNull($tpl->cached->handler->getCachedContent($tpl2)); $this->assertNull($tpl->cached->handler->getCachedContent($tpl3)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl4)); } /** * final cleanup */ public function testFinalCleanup2() { $this->smarty->clearCompiledTemplate(); $this->smarty->clearAllCache(); } } ?>smarty3-3.1.13/development/PHPunit/CustomResourceAmbiguousTests.php0000644000175000017500000000705311650336220024103 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); // empty the template dir $this->smarty->setTemplateDir(array()); // kill cache for unit test Smarty_Resource::$resources = array(); $this->smarty->_resource_handlers = array(); } public static function isRunnable() { return true; } protected function relative($path) { $path = str_replace( dirname(__FILE__), '.', $path ); if (DS == "\\") { $path = str_replace( "\\", "/", $path ); } return $path; } public function testNone() { $resource_handler = new Smarty_Resource_Ambiguous(dirname(__FILE__) . '/templates/ambiguous/'); $this->smarty->registerResource('ambiguous', $resource_handler); $this->smarty->default_resource_type = 'ambiguous'; $this->smarty->allow_ambiguous_resources = true; $tpl = $this->smarty->createTemplate('foobar.tpl'); $this->assertFalse($tpl->source->exists); } public function testCase1() { $resource_handler = new Smarty_Resource_Ambiguous(dirname(__FILE__) . '/templates/ambiguous/'); $this->smarty->registerResource('ambiguous', $resource_handler); $this->smarty->default_resource_type = 'ambiguous'; $this->smarty->allow_ambiguous_resources = true; $resource_handler->setSegment('case1'); $tpl = $this->smarty->createTemplate('foobar.tpl'); $this->assertTrue($tpl->source->exists); $this->assertEquals('case1', $tpl->source->content); } public function testCase2() { $resource_handler = new Smarty_Resource_Ambiguous(dirname(__FILE__) . '/templates/ambiguous/'); $this->smarty->registerResource('ambiguous', $resource_handler); $this->smarty->default_resource_type = 'ambiguous'; $this->smarty->allow_ambiguous_resources = true; $resource_handler->setSegment('case2'); $tpl = $this->smarty->createTemplate('foobar.tpl'); $this->assertTrue($tpl->source->exists); $this->assertEquals('case2', $tpl->source->content); } public function testCaseSwitching() { $resource_handler = new Smarty_Resource_Ambiguous(dirname(__FILE__) . '/templates/ambiguous/'); $this->smarty->registerResource('ambiguous', $resource_handler); $this->smarty->default_resource_type = 'ambiguous'; $this->smarty->allow_ambiguous_resources = true; $resource_handler->setSegment('case1'); $tpl = $this->smarty->createTemplate('foobar.tpl'); $this->assertTrue($tpl->source->exists); $this->assertEquals('case1', $tpl->source->content); $resource_handler->setSegment('case2'); $tpl = $this->smarty->createTemplate('foobar.tpl'); $this->assertTrue($tpl->source->exists); $this->assertEquals('case2', $tpl->source->content); } /** * final cleanup */ public function testFinalCleanup() { $this->smarty->clearCompiledTemplate(); $this->smarty->clearAllCache(); $this->smarty->allow_ambiguous_resources = false; } } ?> smarty3-3.1.13/development/PHPunit/StreamResourceTests.php0000644000175000017500000001536612044502270022214 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->security_policy->streams = array('global'); $this->smarty->assign('foo', 'bar'); stream_wrapper_register("global", "ResourceStream") or die("Failed to register protocol"); $fp = fopen("global://mytest", "r+"); fwrite($fp, 'hello world {$foo}'); fclose($fp); } public function tearDown() { stream_wrapper_unregister("global"); } public static function isRunnable() { return true; } /** * test getTemplateFilepath */ public function testGetTemplateFilepath() { $tpl = $this->smarty->createTemplate('global:mytest'); $this->assertEquals('global://mytest', $tpl->source->filepath); } /** * test getTemplateTimestamp */ public function testGetTemplateTimestamp() { $tpl = $this->smarty->createTemplate('global:mytest'); $this->assertFalse($tpl->source->timestamp); } /** * test getTemplateSource */ public function testGetTemplateSource() { $tpl = $this->smarty->createTemplate('global:mytest', null, null, $this->smarty); $this->assertEquals('hello world {$foo}', $tpl->source->content); } /** * test usesCompiler */ public function testUsesCompiler() { $tpl = $this->smarty->createTemplate('global:mytest'); $this->assertFalse($tpl->source->uncompiled); } /** * test isEvaluated */ public function testIsEvaluated() { $tpl = $this->smarty->createTemplate('global:mytest'); $this->assertTrue($tpl->source->recompiled); } /** * test mustCompile */ public function testMustCompile() { $tpl = $this->smarty->createTemplate('global:mytest'); $this->assertTrue($tpl->mustCompile()); } /** * test getCompiledFilepath */ public function testGetCompiledFilepath() { $tpl = $this->smarty->createTemplate('global:mytest'); $this->assertFalse($tpl->compiled->filepath); } /** * test getCompiledTimestamp */ public function testGetCompiledTimestamp() { $tpl = $this->smarty->createTemplate('global:mytest'); $this->assertFalse($tpl->compiled->timestamp); } /** * test template file exits */ public function testTemplateStreamExists1() { $tpl = $this->smarty->createTemplate('global:mytest'); $this->assertTrue($tpl->source->exists); } public function testTemplateStreamExists2() { $this->assertTrue($this->smarty->templateExists('global:mytest')); } /** * test template is not existing */ public function testTemplateStreamNotExists1() { $tpl = $this->smarty->createTemplate('global:notthere'); $this->assertFalse($tpl->source->exists); } public function testTemplateStramNotExists2() { $this->assertFalse($this->smarty->templateExists('global:notthere')); } public function testTemplateStramNotExists3() { try { $result = $this->smarty->fetch('global:notthere'); } catch (Exception $e) { $this->assertContains(htmlentities('Unable to load template global \'notthere\''), $e->getMessage()); return; } $this->fail('Exception for not existing template is missing'); } /** * test writeCachedContent */ public function testWriteCachedContent() { $tpl = $this->smarty->createTemplate('global:mytest'); $this->assertFalse($tpl->writeCachedContent('dummy')); } /** * test isCached */ public function testIsCached() { $tpl = $this->smarty->createTemplate('global:mytest'); $this->assertFalse($tpl->isCached()); } /** * test getRenderedTemplate */ public function testGetRenderedTemplate() { $tpl = $this->smarty->createTemplate('global:mytest' , null, null, $this->smarty); $this->assertEquals('hello world bar', $tpl->fetch()); } /** * test that no complied template and cache file was produced */ public function testNoFiles() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 20; $this->smarty->clearCompiledTemplate(); $this->smarty->clearAllCache(); $tpl = $this->smarty->createTemplate('global:mytest', null, null, $this->smarty); $this->assertEquals('hello world bar', $this->smarty->fetch($tpl)); $this->assertEquals(0, $this->smarty->clearAllCache()); $this->assertEquals(0, $this->smarty->clearCompiledTemplate()); } /** * test $smarty->is_cached */ public function testSmartyIsCached() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 20; $tpl = $this->smarty->createTemplate('global:mytest', null, null, $this->smarty); $this->assertEquals('hello world bar', $this->smarty->fetch($tpl)); $this->assertFalse($this->smarty->isCached($tpl)); } } class ResourceStream { private $position; private $varname; public function stream_open($path, $mode, $options, &$opened_path) { $url = parse_url($path); $this->varname = $url["host"]; $this->position = 0; return true; } public function stream_read($count) { $p = &$this->position; $ret = substr($GLOBALS[$this->varname], $p, $count); $p += strlen($ret); return $ret; } public function stream_write($data) { $v = &$GLOBALS[$this->varname]; $l = strlen($data); $p = &$this->position; $v = substr($v, 0, $p) . $data . substr($v, $p += $l); return $l; } public function stream_tell() { return $this->position; } public function stream_eof() { if (!isset($GLOBALS[$this->varname])) { return true; } return $this->position >= strlen($GLOBALS[$this->varname]); } public function stream_seek($offset, $whence) { $l = strlen($GLOBALS[$this->varname]); $p = &$this->position; switch ($whence) { case SEEK_SET: $newPos = $offset; break; case SEEK_CUR: $newPos = $p + $offset; break; case SEEK_END: $newPos = $l + $offset; break; default: return false; } $ret = ($newPos >= 0 && $newPos <= $l); if ($ret) $p = $newPos; return $ret; } } ?> smarty3-3.1.13/development/PHPunit/CompileCompilerPluginTests.php0000644000175000017500000000254411467061362023517 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->force_compile = true; } public static function isRunnable() { return true; } /** * test compiler plugin tag in template file */ public function testCompilerPluginFromTemplateFile() { $this->smarty->registerPlugin(Smarty::PLUGIN_COMPILER,'compilerplugin', 'mycompilerplugin'); $tpl = $this->smarty->createTemplate('compilerplugintest.tpl'); $this->assertEquals("Hello World", $this->smarty->fetch($tpl)); } /** * test compiler plugin tag in compiled template file */ public function testCompilerPluginFromCompiledTemplateFile() { $this->smarty->force_compile = false; $this->smarty->registerPlugin(Smarty::PLUGIN_COMPILER,'compilerplugin', 'mycompilerplugin'); $tpl = $this->smarty->createTemplate('compilerplugintest.tpl'); $this->assertEquals("Hello World", $this->smarty->fetch($tpl)); } } function mycompilerplugin($params, $compiler) { return ''; } ?> smarty3-3.1.13/development/PHPunit/CompileForTests.php0000644000175000017500000001243211467061362021311 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test {for $x=0;$x<10;$x++} tag */ public function testFor1() { $tpl = $this->smarty->createTemplate('eval:{for $x=0;$x<10;$x++}{$x}{/for}'); $this->assertEquals("0123456789", $this->smarty->fetch($tpl)); } public function testFor2() { $tpl = $this->smarty->createTemplate('eval:{for $x=0; $x<10; $x++}{$x}{forelse}else{/for}'); $this->assertEquals("0123456789", $this->smarty->fetch($tpl)); } public function testFor3() { $tpl = $this->smarty->createTemplate('eval:{for $x=10;$x<10;$x++}{$x}{forelse}else{/for}'); $this->assertEquals("else", $this->smarty->fetch($tpl)); } public function testFor4() { $tpl = $this->smarty->createTemplate('eval:{for $x=9;$x>=0;$x--}{$x}{forelse}else{/for}'); $this->assertEquals("9876543210", $this->smarty->fetch($tpl)); } public function testFor5() { $tpl = $this->smarty->createTemplate('eval:{for $x=-1;$x>=0;$x--}{$x}{forelse}else{/for}'); $this->assertEquals("else", $this->smarty->fetch($tpl)); } public function testFor6() { $tpl = $this->smarty->createTemplate('eval:{for $x=0,$y=10;$x<$y;$x++}{$x}{forelse}else{/for}'); $this->assertEquals("0123456789", $this->smarty->fetch($tpl)); } public function testFor7() { $tpl = $this->smarty->createTemplate('eval:{for $x=0;$x<10;$x=$x+2}{$x}{/for}'); $this->assertEquals("02468", $this->smarty->fetch($tpl)); } public function testFor8() { $tpl = $this->smarty->createTemplate('eval:{for $x=0 to 8}{$x}{/for}'); $this->assertEquals("012345678", $this->smarty->fetch($tpl)); } public function testFor9() { $tpl = $this->smarty->createTemplate('eval:{for $x=0 to 8 step=2}{$x}{/for}'); $this->assertEquals("02468", $this->smarty->fetch($tpl)); } public function testFor10() { $tpl = $this->smarty->createTemplate('eval:{for $x=0 to 8 step=2}{if $x@first}{$x} {$x@total}{/if}{/for}'); $this->assertEquals("0 5", $this->smarty->fetch($tpl)); } public function testFor11() { $tpl = $this->smarty->createTemplate('eval:{for $x=0 to 8 step=2}{if $x@last}{$x} {$x@iteration}{/if}{/for}'); $this->assertEquals("8 5", $this->smarty->fetch($tpl)); } public function testFor12() { $tpl = $this->smarty->createTemplate('eval:{for $x=8 to 0 step=-2}{$x}{/for}'); $this->assertEquals("86420", $this->smarty->fetch($tpl)); } public function testFor13() { $tpl = $this->smarty->createTemplate('eval:{for $x=8 to 0 step=2}{$x}{forelse}step error{/for}'); $this->assertEquals("step error", $this->smarty->fetch($tpl)); } public function testFor14() { $tpl = $this->smarty->createTemplate('eval:{for $x=8 to 0 step -1 max=3}{$x}{/for}'); $this->assertEquals("876", $this->smarty->fetch($tpl)); } /* * test for and nocache */ public function testForNocacheVar1() { $this->smarty->caching = true; $tpl = $this->smarty->createTemplate('string:{for $x=$foo to 5}{$x} {/for}'); $tpl->assign('foo',1,true); $this->assertFalse($this->smarty->isCached($tpl)); $this->assertEquals("1 2 3 4 5 ", $this->smarty->fetch($tpl)); } public function testForNocacheVar2() { $this->smarty->caching = true; $tpl = $this->smarty->createTemplate('string:{for $x=$foo to 5}{$x} {/for}'); $tpl->assign('foo',4,true); $this->assertTrue($this->smarty->isCached($tpl)); $this->assertEquals("4 5 ", $this->smarty->fetch($tpl)); } public function testForNocacheTag1() { $this->smarty->caching = true; $tpl = $this->smarty->createTemplate('string:{for $x=$foo to 5 nocache}{$x} {/for}'); $tpl->assign('foo',1); $this->assertFalse($this->smarty->isCached($tpl)); $this->assertEquals("1 2 3 4 5 ", $this->smarty->fetch($tpl)); } public function testForNocacheTag2() { $this->smarty->caching = true; $tpl = $this->smarty->createTemplate('string:{for $x=$foo to 5 nocache}{$x} {/for}'); $tpl->assign('foo',4); $this->assertTrue($this->smarty->isCached($tpl)); $this->assertEquals("4 5 ", $this->smarty->fetch($tpl)); } public function testForCache1() { $this->smarty->caching = true; $tpl = $this->smarty->createTemplate('string:{for $x=$foo to 2}{$x} {/for}'); $tpl->assign('foo',1); $this->assertFalse($this->smarty->isCached($tpl)); $this->assertEquals("1 2 ", $this->smarty->fetch($tpl)); } public function testForCache2() { $this->smarty->caching = true; $tpl = $this->smarty->createTemplate('string:{for $x=$foo to 2}{$x} {/for}'); $tpl->assign('foo',6); $this->assertTrue($this->smarty->isCached($tpl)); $this->assertEquals("1 2 ", $this->smarty->fetch($tpl)); } } ?> smarty3-3.1.13/development/PHPunit/PluginModifierTruncateTests.php0000644000175000017500000001233711673427331023702 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } public function testDefault() { $result = 'Two Sisters Reunite after Eighteen Years at Checkout Counter.'; $tpl = $this->smarty->createTemplate('eval:{"Two Sisters Reunite after Eighteen Years at Checkout Counter."|truncate}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testDefaultWithoutMbstring() { Smarty::$_MBSTRING = false; $result = 'Two Sisters Reunite after Eighteen Years at Checkout Counter.'; $tpl = $this->smarty->createTemplate('eval:{"Two Sisters Reunite after Eighteen Years at Checkout Counter."|truncate}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testLength() { $result = 'Two Sisters Reunite after...'; $tpl = $this->smarty->createTemplate('eval:{"Two Sisters Reunite after Eighteen Years at Checkout Counter."|truncate:30}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testLengthWithoutMbstring() { Smarty::$_MBSTRING = false; $result = 'Two Sisters Reunite after...'; $tpl = $this->smarty->createTemplate('eval:{"Two Sisters Reunite after Eighteen Years at Checkout Counter."|truncate:30}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testEtc() { $result = 'Two Sisters Reunite after'; $tpl = $this->smarty->createTemplate('eval:{"Two Sisters Reunite after Eighteen Years at Checkout Counter."|truncate:30:""}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testEtcWithoutMbstring() { Smarty::$_MBSTRING = false; $result = 'Two Sisters Reunite after'; $tpl = $this->smarty->createTemplate('eval:{"Two Sisters Reunite after Eighteen Years at Checkout Counter."|truncate:30:""}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testEtc2() { $result = 'Two Sisters Reunite after---'; $tpl = $this->smarty->createTemplate('eval:{"Two Sisters Reunite after Eighteen Years at Checkout Counter."|truncate:30:"---"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testEtc2WithoutMbstring() { Smarty::$_MBSTRING = false; $result = 'Two Sisters Reunite after---'; $tpl = $this->smarty->createTemplate('eval:{"Two Sisters Reunite after Eighteen Years at Checkout Counter."|truncate:30:"---"}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testBreak() { $result = 'Two Sisters Reunite after Eigh'; $tpl = $this->smarty->createTemplate('eval:{"Two Sisters Reunite after Eighteen Years at Checkout Counter."|truncate:30:"":true}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testBreakWithoutMbstring() { Smarty::$_MBSTRING = false; $result = 'Two Sisters Reunite after Eigh'; $tpl = $this->smarty->createTemplate('eval:{"Two Sisters Reunite after Eighteen Years at Checkout Counter."|truncate:30:"":true}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testBreak2() { $result = 'Two Sisters Reunite after E...'; $tpl = $this->smarty->createTemplate('eval:{"Two Sisters Reunite after Eighteen Years at Checkout Counter."|truncate:30:"...":true}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testBreak2WithoutMbstring() { Smarty::$_MBSTRING = false; $result = 'Two Sisters Reunite after E...'; $tpl = $this->smarty->createTemplate('eval:{"Two Sisters Reunite after Eighteen Years at Checkout Counter."|truncate:30:"...":true}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testMiddle() { $result = 'Two Sisters Re..ckout Counter.'; $tpl = $this->smarty->createTemplate('eval:{"Two Sisters Reunite after Eighteen Years at Checkout Counter."|truncate:30:"..":true:true}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testMiddleWithoutMbstring() { Smarty::$_MBSTRING = false; $result = 'Two Sisters Re..ckout Counter.'; $tpl = $this->smarty->createTemplate('eval:{"Two Sisters Reunite after Eighteen Years at Checkout Counter."|truncate:30:"..":true:true}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } } ?>smarty3-3.1.13/development/PHPunit/templates_2/0000755000175000017500000000000012141655567017741 5ustar mikemikesmarty3-3.1.13/development/PHPunit/templates_2/ambiguous/0000755000175000017500000000000012141655567021734 5ustar mikemikesmarty3-3.1.13/development/PHPunit/templates_2/ambiguous/case1/0000755000175000017500000000000012141655567022730 5ustar mikemikesmarty3-3.1.13/development/PHPunit/templates_2/ambiguous/case1/foobar.tpl0000644000175000017500000000001311650102145024672 0ustar mikemiketemplates_2smarty3-3.1.13/development/PHPunit/templates_2/hello.tpl0000644000175000017500000000001311275032024021537 0ustar mikemikehello worldsmarty3-3.1.13/development/PHPunit/templates_2/dirname.tpl0000644000175000017500000000001311634664106022066 0ustar mikemiketemplates_2smarty3-3.1.13/development/PHPunit/templates_2/helloworld.php0000644000175000017500000000001711634664106022616 0ustar mikemikephp hello worldsmarty3-3.1.13/development/PHPunit/CommentsTests.php0000644000175000017500000000436611467061362021046 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test simple comments */ public function testSimpleComment1() { $tpl = $this->smarty->createTemplate("eval:{* this is a comment *}"); $this->assertEquals("", $this->smarty->fetch($tpl)); } public function testSimpleComment2() { $tpl = $this->smarty->createTemplate("eval:{* another \$foo comment *}"); $this->assertEquals("", $this->smarty->fetch($tpl)); } public function testSimpleComment3() { $tpl = $this->smarty->createTemplate("eval:{* another comment *}some in between{* another comment *}"); $this->assertEquals("some in between", $this->smarty->fetch($tpl)); } public function testSimpleComment4() { $tpl = $this->smarty->createTemplate("eval:{* multi line \n comment *}"); $this->assertEquals("", $this->smarty->fetch($tpl)); } public function testSimpleComment5() { $tpl = $this->smarty->createTemplate("eval:{* /* foo * / *}"); $this->assertEquals("", $this->smarty->fetch($tpl)); } /** * test comment text combinations */ public function testTextComment1() { $tpl = $this->smarty->createTemplate("eval:A{* comment *}B\nC"); $this->assertEquals("AB\nC", $this->smarty->fetch($tpl)); } public function testTextComment2() { $tpl = $this->smarty->createTemplate("eval:D{* comment *}\n{* comment *}E\nF"); $this->assertEquals("D\nE\nF", $this->smarty->fetch($tpl)); } public function testTextComment3() { $tpl = $this->smarty->createTemplate("eval:G{* multi \nline *}H"); $this->assertEquals("GH", $this->smarty->fetch($tpl)); } public function testTextComment4() { $tpl = $this->smarty->createTemplate("eval:I{* multi \nline *}\nJ"); $this->assertEquals("I\nJ", $this->smarty->fetch($tpl)); } } ?>smarty3-3.1.13/development/PHPunit/CompileCaptureTests.php0000644000175000017500000000607211467061362022171 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test capture tag */ public function testCapture1() { $tpl = $this->smarty->createTemplate('eval:{capture assign=foo}hello world{/capture}'); $this->assertEquals("", $this->smarty->fetch($tpl)); } public function testCapture2() { $tpl = $this->smarty->createTemplate('eval:{assign var=foo value=bar}{capture assign=foo}hello world{/capture}{$foo}'); $this->assertEquals("hello world", $this->smarty->fetch($tpl)); } public function testCapture3() { $tpl = $this->smarty->createTemplate('eval:{capture name=foo}hello world{/capture}{$smarty.capture.foo}'); $this->assertEquals("hello world", $this->smarty->fetch($tpl)); } public function testCapture4() { $tpl = $this->smarty->createTemplate('eval:{capture name=foo assign=bar}hello world{/capture}{$smarty.capture.foo} {$bar}'); $this->assertEquals("hello world hello world", $this->smarty->fetch($tpl)); } public function testCapture5() { $tpl = $this->smarty->createTemplate('eval:{capture}hello world{/capture}{$smarty.capture.default}'); $this->assertEquals("hello world", $this->smarty->fetch($tpl)); } public function testCapture6() { $tpl = $this->smarty->createTemplate('eval:{capture short}hello shorttag{/capture}{$smarty.capture.short}'); $this->assertEquals("hello shorttag", $this->smarty->fetch($tpl)); } public function testCapture7() { $tpl = $this->smarty->createTemplate('eval:{capture append=foo}hello{/capture}bar{capture append=foo}world{/capture}{foreach $foo item} {$item@key} {$item}{/foreach}'); $this->assertEquals("bar 0 hello 1 world", $this->smarty->fetch($tpl)); } /* * The following test has been disabled. It fails only in PHPunit */ public function testCapture8() { $tpl = $this->smarty->createTemplate('eval:{capture assign=foo}hello {capture assign=bar}this is my {/capture}world{/capture}{$foo} {$bar}'); $this->assertEquals("hello world this is my ", $this->smarty->fetch($tpl),'This failure pops up only during PHPunit test ?????'); } public function testCompileCaptureNocache1() { $this->smarty->assign('foo', 1); $this->smarty->caching = 1; $this->assertContains('foo 1', $this->smarty->fetch('test_capture_nocache.tpl')); } public function testCompileCaptureNocache2() { $this->smarty->assign('foo', 2); $this->smarty->caching = 1; $this->assertTrue($this->smarty->isCached('test_capture_nocache.tpl')); $this->assertContains('foo 2', $this->smarty->fetch('test_capture_nocache.tpl')); } } ?> smarty3-3.1.13/development/PHPunit/phpunit-tests-single.sh0000755000175000017500000000012311634664106022156 0ustar mikemike#!/bin/sh php -d asp_tags=On /usr/local/bin/phpunit --verbose SmartyTestssingle.phpsmarty3-3.1.13/development/PHPunit/SingleQuotedStringTests.php0000644000175000017500000000415711467061362023051 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test simple single quoted string */ public function testSimpleSingleQuotedString() { $tpl = $this->smarty->createTemplate('eval:{$foo=\'Hello World\'}{$foo}'); $this->assertEquals('Hello World', $this->smarty->fetch($tpl)); } /** * test that tags not interpreted in single quoted strings */ public function testTagsInSingleQuotedString() { $tpl = $this->smarty->createTemplate('eval:{$foo=\'Hello {1+2} World\'}{$foo}'); $this->assertEquals('Hello {1+2} World', $this->smarty->fetch($tpl)); } /** * test that vars not interpreted in single quoted strings */ public function testVarsInSingleQuotedString() { $tpl = $this->smarty->createTemplate('eval:{$foo=\'Hello $bar World\'}{$foo}'); $this->assertEquals('Hello $bar World', $this->smarty->fetch($tpl)); } /** * test double quotes in single quoted strings */ public function testDoubleQuotesInSingleQuotedString() { $tpl = $this->smarty->createTemplate('eval:{$foo=\'Hello "World"\'}{$foo}'); $this->assertEquals('Hello "World"', $this->smarty->fetch($tpl)); } /** * test escaped single quotes in single quoted strings */ public function testEscapedSingleQuotesInSingleQuotedString() { $tpl = $this->smarty->createTemplate('eval:{$foo=\'Hello \\\'World\'}{$foo}'); $this->assertEquals("Hello 'World", $this->smarty->fetch($tpl)); } /** * test empty single quoted strings */ public function testEmptySingleQuotedString() { $tpl = $this->smarty->createTemplate('eval:{$foo=\'\'}{$foo}'); $this->assertEquals("", $this->smarty->fetch($tpl)); } } ?> smarty3-3.1.13/development/PHPunit/StringResourceTests.php0000644000175000017500000001104411665772477022246 0ustar mikemikesmarty = SmartyTests::$smarty; $this->smarty->clearAllCache(); $this->smarty->clearCompiledTemplate(); SmartyTests::init(); } public static function isRunnable() { return true; } protected function relative($path) { $path = str_replace( dirname(__FILE__), '.', $path ); if (DS == "\\") { $path = str_replace( "\\", "/", $path ); } return $path; } /** * test template string exits */ public function testTemplateStringExists1() { $tpl = $this->smarty->createTemplate('string:{$foo}'); $this->assertTrue($tpl->source->exists); } public function testTemplateStringExists2() { $this->assertTrue($this->smarty->templateExists('string:{$foo}')); } /** * test getTemplateFilepath */ public function testGetTemplateFilepath() { $tpl = $this->smarty->createTemplate('string:hello world'); $this->assertEquals('2aae6c35c94fcfb415dbe95f408b9ce91ee846ed', $tpl->source->filepath); } /** * test getTemplateTimestamp */ public function testGetTemplateTimestamp() { $tpl = $this->smarty->createTemplate('string:hello world'); $this->assertEquals(0,$tpl->source->timestamp); } /** * test getTemplateSource */ public function testGetTemplateSource() { $tpl = $this->smarty->createTemplate('string:hello world{$foo}'); $this->assertEquals('hello world{$foo}', $tpl->source->content); } /** * test usesCompiler */ public function testUsesCompiler() { $tpl = $this->smarty->createTemplate('string:hello world'); $this->assertFalse($tpl->source->uncompiled); } /** * test isEvaluated */ public function testIsEvaluated() { $tpl = $this->smarty->createTemplate('string:hello world'); $this->assertFalse($tpl->source->recompiled); } /** * test mustCompile */ public function testMustCompile() { $tpl = $this->smarty->createTemplate('string:hello world'); $this->assertTrue($tpl->mustCompile()); } /** * test getCompiledFilepath */ public function testGetCompiledFilepath() { $tpl = $this->smarty->createTemplate('string:hello world'); $this->assertEquals('./templates_c/2aae6c35c94fcfb415dbe95f408b9ce91ee846ed.string.php', $this->relative($tpl->compiled->filepath)); } /** * test getCompiledTimestamp */ public function testGetCompiledTimestamp() { $tpl = $this->smarty->createTemplate('string:hello world'); $this->assertFalse($tpl->compiled->timestamp); } /** * test getCachedTimestamp */ public function testGetCachedTimestamp() { $tpl = $this->smarty->createTemplate('string:hello world'); $this->assertFalse($tpl->cached->timestamp); } /** * test writeCachedContent */ public function testWriteCachedContent() { $tpl = $this->smarty->createTemplate('string:hello world'); $this->assertFalse($tpl->writeCachedContent('dummy')); } /** * test isCached */ public function testIsCached() { $tpl = $this->smarty->createTemplate('string:hello world'); $this->assertFalse($tpl->isCached()); } /** * test getRenderedTemplate */ public function testGetRenderedTemplate() { $tpl = $this->smarty->createTemplate('string:hello world'); $this->assertEquals('hello world', $tpl->fetch()); } /** * test $smarty->is_cached */ public function testSmartyIsCached() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 20; $tpl = $this->smarty->createTemplate('string:hello world'); $this->assertEquals('hello world', $this->smarty->fetch($tpl)); $this->assertTrue($this->smarty->isCached($tpl)); } public function testUrlencodeTemplate() { $tpl = $this->smarty->createTemplate('string:urlencode:%7B%22foobar%22%7Cescape%7D'); $this->assertEquals('foobar', $tpl->fetch()); } public function testBase64Template() { $tpl = $this->smarty->createTemplate('string:base64:eyJmb29iYXIifGVzY2FwZX0='); $this->assertEquals('foobar', $tpl->fetch()); } } ?> smarty3-3.1.13/development/PHPunit/PluginModifierCountCharactersTests.php0000644000175000017500000000532311673427331025202 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } public function testDefault() { $result = "29"; $tpl = $this->smarty->createTemplate('eval:{"Cold Wave Linked to Temperatures."|count_characters}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testDefaultWithoutMbstring() { Smarty::$_MBSTRING = false; $result = "29"; $tpl = $this->smarty->createTemplate('eval:{"Cold Wave Linked to Temperatures."|count_characters}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testSpaces() { $result = "33"; $tpl = $this->smarty->createTemplate('eval:{"Cold Wave Linked to Temperatures."|count_characters:true}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testSpacesWithoutMbstring() { Smarty::$_MBSTRING = false; $result = "33"; $tpl = $this->smarty->createTemplate('eval:{"Cold Wave Linked to Temperatures."|count_characters:true}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testUmlauts() { $result = "29"; $tpl = $this->smarty->createTemplate('eval:{"Cold Wäve Linked tö Temperatures."|count_characters}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testUmlautsWithoutMbstring() { Smarty::$_MBSTRING = false; $result = "29"; $tpl = $this->smarty->createTemplate('eval:{"Cold Wäve Linked tö Temperatures."|count_characters}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testUmlautsSpaces() { $result = "33"; $tpl = $this->smarty->createTemplate('eval:{"Cold Wäve Linked tö Temperatures."|count_characters:true}'); $this->assertEquals($result, $this->smarty->fetch($tpl)); } public function testUmlautsSpacesWithoutMbstring() { Smarty::$_MBSTRING = false; $result = "33"; $tpl = $this->smarty->createTemplate('eval:{"Cold Wäve Linked tö Temperatures."|count_characters:true}'); $this->assertNotEquals($result, $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } } ?>smarty3-3.1.13/development/PHPunit/AttributeTests.php0000644000175000017500000000430212044502270021200 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test required attribute */ public function testRequiredAttributeVar() { try { $this->smarty->fetch('string:{assign value=1}'); } catch (Exception $e) { $this->assertContains(htmlentities('missing "var" attribute'), $e->getMessage()); return; } $this->fail('Exception for required attribute "var" has not been raised.'); } /** * test unexspected attribute */ public function testUnexpectedAttribute() { try { $this->smarty->fetch('string:{assign var=foo value=1 bar=2}'); } catch (Exception $e) { $this->assertContains(htmlentities('unexpected "bar" attribute'), $e->getMessage()); return; } $this->fail('Exception for unexpected attribute "bar" has not been raised.'); } /** * test illegal option value */ public function testIllegalOptionValue() { try { $this->smarty->fetch('string:{assign var=foo value=1 nocache=buh}'); } catch (Exception $e) { $this->assertContains(htmlentities('illegal value of option flag'), $e->getMessage()); return; } $this->fail('Exception for illegal value of option flag has not been raised.'); } /** * test too many shorthands */ public function testTooManyShorthands() { try { $this->smarty->fetch('string:{assign foo 1 2}'); } catch (Exception $e) { $this->assertContains(htmlentities('too many shorthand attributes'), $e->getMessage()); return; } $this->fail('Exception for too many shorthand attributes has not been raised.'); } } ?>smarty3-3.1.13/development/PHPunit/LoadFilterTests.php0000644000175000017500000000124711333364376021304 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test loadFilter method */ public function testLoadFilter() { $this->smarty->loadFilter('output', 'trimwhitespace'); $this->assertTrue(is_callable($this->smarty->registered_filters['output']['smarty_outputfilter_trimwhitespace'])); } } ?> smarty3-3.1.13/development/PHPunit/CompileWhileTests.php0000644000175000017500000000164311471273555021641 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test {while 'condition'} tag */ public function testWhileCondition() { $tpl = $this->smarty->createTemplate('eval:{$x=0}{while $x<10}{$x}{$x=$x+1}{/while}'); $this->assertEquals("0123456789", $this->smarty->fetch($tpl)); } /** * test {while 'statement'} tag */ public function testWhileStatement() { $tpl = $this->smarty->createTemplate('eval:{$y=5}{while $y=$y-1}{$y}{/while}'); $this->assertEquals("4321", $this->smarty->fetch($tpl)); } } ?> smarty3-3.1.13/development/PHPunit/GetterSetterTests.php0000644000175000017500000000374511634664106021703 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test setter on Smarty object */ public function testSmartySetter() { $this->smarty->setLeftDelimiter('<{'); $this->smarty->setRightDelimiter('}>'); $this->assertEquals('<{', $this->smarty->left_delimiter); $this->assertEquals('}>', $this->smarty->right_delimiter); } /** * test getter on Smarty object */ public function testSmartyGetter() { $this->smarty->setLeftDelimiter('<{'); $this->smarty->setRightDelimiter('}>'); $this->assertEquals('<{', $this->smarty->getLeftDelimiter()); $this->assertEquals('}>', $this->smarty->getRightDelimiter()); } /** * test setter on Template object */ public function testTemplateSetter() { $tpl = $this->smarty->createTemplate('helloworld.tpl'); $tpl->setLeftDelimiter('<{'); $tpl->setRightDelimiter('}>'); $this->assertEquals('<{', $tpl->smarty->left_delimiter); $this->assertEquals('}>', $tpl->smarty->right_delimiter); $this->assertEquals('{', $this->smarty->left_delimiter); $this->assertEquals('}', $this->smarty->right_delimiter); } /** * test getter on Template object */ public function testTemplateGetter() { $tpl = $this->smarty->createTemplate('helloworld.tpl'); $tpl->setLeftDelimiter('<{'); $tpl->setRightDelimiter('}>'); $this->assertEquals('<{', $tpl->getLeftDelimiter()); $this->assertEquals('}>', $tpl->getRightDelimiter()); } } ?> smarty3-3.1.13/development/PHPunit/HttpModifiedSinceTests.php0000644000175000017500000000710611634664106022617 0ustar mikemikesmarty = SmartyTests::$smarty; $this->smarty->clearCompiledTemplate(); $this->smarty->clearAllCache(); SmartyTests::init(); } public static function isRunnable() { return true; } public function testDisabled() { $_SERVER['SMARTY_PHPUNIT_DISABLE_HEADERS'] = true; $_SERVER['SMARTY_PHPUNIT_HEADERS'] = array(); $this->smarty->cache_modified_check = false; $this->smarty->caching = true; $this->smarty->cache_lifetime = 20; ob_start(); $this->smarty->display('helloworld.tpl'); $output = ob_get_contents(); ob_end_clean(); $this->assertEquals('hello world', $output); $this->assertEquals('', join( "\r\n",$_SERVER['SMARTY_PHPUNIT_HEADERS'])); unset($_SERVER['HTTP_IF_MODIFIED_SINCE']); unset($_SERVER['SMARTY_PHPUNIT_HEADERS']); unset($_SERVER['SMARTY_PHPUNIT_DISABLE_HEADERS']); } public function testEnabledUncached() { $_SERVER['SMARTY_PHPUNIT_DISABLE_HEADERS'] = true; $_SERVER['SMARTY_PHPUNIT_HEADERS'] = array(); $this->smarty->cache_modified_check = true; $this->smarty->caching = false; $this->smarty->cache_lifetime = 20; ob_start(); $this->smarty->display('helloworld.tpl'); $output = ob_get_contents(); ob_end_clean(); $this->assertEquals('hello world', $output); $this->assertEquals('', join( "\r\n",$_SERVER['SMARTY_PHPUNIT_HEADERS'])); unset($_SERVER['HTTP_IF_MODIFIED_SINCE']); unset($_SERVER['SMARTY_PHPUNIT_HEADERS']); unset($_SERVER['SMARTY_PHPUNIT_DISABLE_HEADERS']); } public function testEnabledCached() { $_SERVER['SMARTY_PHPUNIT_DISABLE_HEADERS'] = true; $_SERVER['SMARTY_PHPUNIT_HEADERS'] = array(); $this->smarty->cache_modified_check = true; $this->smarty->caching = true; $this->smarty->cache_lifetime = 20; ob_start(); $this->smarty->display('helloworld.tpl'); $output = ob_get_contents(); ob_end_clean(); $this->assertEquals('hello world', $output); $header = 'Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'; $this->assertEquals($header, join( "\r\n",$_SERVER['SMARTY_PHPUNIT_HEADERS'])); $_SERVER['SMARTY_PHPUNIT_HEADERS'] = array(); $_SERVER['HTTP_IF_MODIFIED_SINCE'] = gmdate('D, d M Y H:i:s', time() - 3600) . ' GMT'; ob_start(); $this->smarty->display('helloworld.tpl'); $output = ob_get_contents(); ob_end_clean(); $this->assertEquals('hello world', $output); $this->assertEquals($header, join( "\r\n",$_SERVER['SMARTY_PHPUNIT_HEADERS'])); $_SERVER['SMARTY_PHPUNIT_HEADERS'] = array(); $_SERVER['HTTP_IF_MODIFIED_SINCE'] = gmdate('D, d M Y H:i:s', time() + 10) . ' GMT'; ob_start(); $this->smarty->display('helloworld.tpl'); $output = ob_get_contents(); ob_end_clean(); $this->assertEquals('', $output); $this->assertEquals('304 Not Modified', join( "\r\n",$_SERVER['SMARTY_PHPUNIT_HEADERS'])); unset($_SERVER['HTTP_IF_MODIFIED_SINCE']); unset($_SERVER['SMARTY_PHPUNIT_HEADERS']); unset($_SERVER['SMARTY_PHPUNIT_DISABLE_HEADERS']); } } ?>smarty3-3.1.13/development/PHPunit/ExtendsResourceTests.php0000644000175000017500000002403712015001626022363 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * clear folders */ public function clear() { $this->smarty->clearAllCache(); $this->smarty->clearCompiledTemplate(); } /* Test compilation */ public function testExtendsResourceBlockBase() { $this->smarty->force_compile=true; $result = $this->smarty->fetch('extends:test_block_base.tpl'); $this->assertContains('--block base ok--', $result); $this->assertContains('--block section false--', $result); $this->assertContains('--block passed by section false--', $result); $this->assertContains('--block root false--', $result); $this->assertContains('--block assigned false--', $result); $this->assertContains('--parent from section false--', $result); $this->assertContains('--base--', $result); $this->assertContains('--block include false--', $result); } public function testExtendResourceBlockSection() { $this->smarty->force_compile=true; $result = $this->smarty->fetch('extends:test_block_base.tpl|test_block_section.tpl'); $this->assertContains('--block base ok--', $result); $this->assertContains('--block section ok--', $result); $this->assertContains('--block passed by section false--', $result); $this->assertContains('--block root false--', $result); $this->assertContains('--block assigned false--', $result); $this->assertContains('--section--', $result); $this->assertContains('--base--', $result); $this->assertContains('--block include false--', $result); } public function testExtendResourceBlockRoot() { $this->smarty->force_compile=true; $this->smarty->assign('foo', 'hallo'); $result = $this->smarty->fetch('extends:test_block_base.tpl|test_block_section.tpl|test_block.tpl'); $this->assertContains('--block base ok--', $result); $this->assertContains('--block section ok--', $result); $this->assertContains('--block passed by section ok--', $result); $this->assertContains('--block root ok--', $result); $this->assertContains('--assigned hallo--', $result); $this->assertContains('--parent from --section-- block--', $result); $this->assertContains('--parent from --base-- block--', $result); $this->assertContains('--block include ok--', $result); } public function testExtendsTagWithExtendsResource() { $this->smarty->force_compile=true; $this->smarty->assign('foo', 'hallo'); $result = $this->smarty->fetch('test_block_extends.tpl'); $this->assertContains('--block base from extends--', $result); $this->assertContains('--block section ok--', $result); $this->assertContains('--block passed by section ok--', $result); $this->assertContains('--block root ok--', $result); $this->assertContains('--assigned hallo--', $result); $this->assertContains('--parent from --section-- block--', $result); $this->assertContains('--parent from --base-- block--', $result); $this->assertContains('--block include ok--', $result); } /** * test grandchild/child/parent dependency test1 */ public function testCompileBlockGrandChildMustCompile1() { // FIXME: this tests fails when run with smartytestssingle.php // $this->smarty->clearCache('extends:test_block_parent.tpl|test_block_child_resource.tpl|test_block_grandchild_resource.tpl'); $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('extends:test_block_parent.tpl|test_block_child_resource.tpl|test_block_grandchild_resource.tpl'); $this->assertFalse($tpl->isCached()); $result = $this->smarty->fetch($tpl); $this->assertContains('Grandchild Page Title', $result); $this->smarty->template_objects = null; $tpl2 = $this->smarty->createTemplate('extends:test_block_parent.tpl|test_block_child_resource.tpl|test_block_grandchild_resource.tpl'); $this->assertTrue($tpl2->isCached()); $result = $this->smarty->fetch($tpl2); $this->assertContains('Grandchild Page Title', $result); } /** * test grandchild/child/parent dependency test2 */ public function testCompileBlockGrandChildMustCompile2() { touch($this->smarty->getTemplateDir(0) . 'test_block_grandchild_resource.tpl'); $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('extends:test_block_parent.tpl|test_block_child_resource.tpl|test_block_grandchild_resource.tpl'); $this->assertFalse($tpl->isCached()); $result = $this->smarty->fetch($tpl); $this->assertContains('Grandchild Page Title', $result); $this->smarty->template_objects = null; $tpl2 = $this->smarty->createTemplate('extends:test_block_parent.tpl|test_block_child_resource.tpl|test_block_grandchild_resource.tpl'); $this->assertTrue($tpl2->isCached()); $result = $this->smarty->fetch($tpl2); $this->assertContains('Grandchild Page Title', $result); } /** * test grandchild/child/parent dependency test3 */ public function testCompileBlockGrandChildMustCompile3() { touch($this->smarty->getTemplateDir(0) . 'test_block_child_resource.tpl'); $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('extends:test_block_parent.tpl|test_block_child_resource.tpl|test_block_grandchild_resource.tpl'); $this->assertFalse($tpl->isCached()); $result = $this->smarty->fetch($tpl); $this->assertContains('Grandchild Page Title', $result); $this->smarty->template_objects = null; $tpl2 = $this->smarty->createTemplate('extends:test_block_parent.tpl|test_block_child_resource.tpl|test_block_grandchild_resource.tpl'); $this->assertTrue($tpl2->isCached()); $result = $this->smarty->fetch($tpl2); $this->assertContains('Grandchild Page Title', $result); } /** * test grandchild/child/parent dependency test4 */ public function testCompileBlockGrandChildMustCompile4() { touch($this->smarty->getTemplateDir(0) . 'test_block_parent.tpl'); $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('extends:test_block_parent.tpl|test_block_child_resource.tpl|test_block_grandchild_resource.tpl'); $this->assertFalse($tpl->isCached()); $result = $this->smarty->fetch($tpl); $this->assertContains('Grandchild Page Title', $result); $this->smarty->template_objects = null; $tpl2 = $this->smarty->createTemplate('extends:test_block_parent.tpl|test_block_child_resource.tpl|test_block_grandchild_resource.tpl'); $this->assertTrue($tpl2->isCached()); $result = $this->smarty->fetch($tpl2); $this->assertContains('Grandchild Page Title', $result); } /** * test nested child block with hide and auto_literal = false */ public function testCompileBlockChildNestedHideAutoLiteralFalseResource() { $this->smarty->auto_literal = false; $result = $this->smarty->fetch('extends:test_block_parent_nested2_space.tpl|test_block_child_nested_hide_space.tpl'); $this->assertContains('nested block', $result); $this->assertNotContains('should be hidden', $result); } /* Test create cache file */ public function testExtendResource1() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->assign('foo', 'hallo'); $result = $this->smarty->fetch('extends:test_block_base.tpl|test_block_section.tpl|test_block.tpl'); $this->assertContains('--block base ok--', $result); $this->assertContains('--block section ok--', $result); $this->assertContains('--block passed by section ok--', $result); $this->assertContains('--block root ok--', $result); $this->assertContains('--assigned hallo--', $result); $this->assertContains('--parent from --section-- block--', $result); $this->assertContains('--parent from --base-- block--', $result); $this->assertContains('--block include ok--', $result); } /* Test access cache file */ public function testExtendResource2() { $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->assign('foo', 'world'); $tpl = $this->smarty->createTemplate('extends:test_block_base.tpl|test_block_section.tpl|test_block.tpl'); $this->assertTrue($this->smarty->isCached($tpl)); $result = $this->smarty->fetch('extends:test_block_base.tpl|test_block_section.tpl|test_block.tpl'); $this->assertContains('--block base ok--', $result); $this->assertContains('--block section ok--', $result); $this->assertContains('--block passed by section ok--', $result); $this->assertContains('--block root ok--', $result); $this->assertContains('--assigned hallo--', $result); $this->assertContains('--parent from --section-- block--', $result); $this->assertContains('--parent from --base-- block--', $result); $this->assertContains('--block include ok--', $result); } public function testExtendExists() { $this->smarty->caching = false; $tpl = $this->smarty->createTemplate('extends:test_block_base.tpl'); $this->assertTrue($tpl->source->exists); $tpl = $this->smarty->createTemplate('extends:does-not-exists.tpl|this-neither.tpl'); $this->assertFalse($tpl->source->exists); } } ?> smarty3-3.1.13/development/PHPunit/CompileDelimiterTests.php0000644000175000017500000000146711467061362022507 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } /** * test delimiter tag test */ public function testLeftDelimiter() { $tpl = $this->smarty->createTemplate('eval:x{ldelim}x'); $this->assertEquals('x{x', $this->smarty->fetch($tpl)); } public function testRightDelimiter() { $tpl = $this->smarty->createTemplate('eval:x{rdelim}x'); $this->assertEquals('x}x', $this->smarty->fetch($tpl)); } } ?> smarty3-3.1.13/development/PHPunit/PluginChainedLoadTests.php0000644000175000017500000000120711634664106022563 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } public function testPluginChainedLoad() { $this->smarty->addPluginsDir(dirname(__FILE__)."/PHPunitplugins/"); $this->assertContains('from chain3', $this->smarty->fetch('test_plugin_chained_load.tpl')); } } ?>smarty3-3.1.13/development/PHPunit/PluginModifierRegexReplaceTests.php0000644000175000017500000000316111673427331024456 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); } public static function isRunnable() { return true; } public function testDefault() { $tpl = $this->smarty->createTemplate('eval:{"Infertility unlikely to\nbe passed on, experts say."|regex_replace:"/[\r\t\n]/":" "}'); $this->assertEquals("Infertility unlikely to be passed on, experts say.", $this->smarty->fetch($tpl)); } public function testDefaultWithoutMbstring() { Smarty::$_MBSTRING = false; $tpl = $this->smarty->createTemplate('eval:{"Infertility unlikely to\nbe passed on, experts say."|regex_replace:"/[\r\t\n]/":" "}'); $this->assertEquals("Infertility unlikely to be passed on, experts say.", $this->smarty->fetch($tpl)); Smarty::$_MBSTRING = true; } public function testUmlauts() { $tpl = $this->smarty->createTemplate('eval:{"Infertility unlikely tö\näe passed on, experts say."|regex_replace:"/[\r\t\n]/u":" "}'); $this->assertEquals("Infertility unlikely tö äe passed on, experts say.", $this->smarty->fetch($tpl)); $tpl = $this->smarty->createTemplate('eval:{"Infertility unlikely tä be passed on, experts say."|regex_replace:"/[ä]/ue":"ae"}'); $this->assertEquals("Infertility unlikely tae be passed on, experts say.", $this->smarty->fetch($tpl)); } } ?>smarty3-3.1.13/development/PHPunit/DefaultConfigHandlerTests.php0000644000175000017500000000624011634664106023263 0ustar mikemikesmarty = SmartyTests::$smarty; SmartyTests::init(); $this->smarty->force_compile = true; $this->smarty->disableSecurity(); } public static function isRunnable() { return true; } public function testUnknownConfig() { try { $this->smarty->configLoad('foo.conf'); $this->assertEquals("123.4", $this->smarty->fetch('eval:{#Number#}')); } catch (Exception $e) { $this->assertContains('Unable to read config file', $e->getMessage()); return; } $this->fail('Exception for none existing config has not been raised.'); } public function testRegisterNoneExistentHandlerFunction() { try { $this->smarty->registerDefaultConfigHandler('foo'); } catch (Exception $e) { $this->assertContains("Default config handler 'foo' not callable", $e->getMessage()); return; } $this->fail('Exception for non-callable function has not been raised.'); } public function testDefaultConfigHandlerReplacement() { $this->smarty->registerDefaultConfigHandler('my_config_handler'); $this->smarty->configLoad('foo.conf'); $this->assertEquals("bar", $this->smarty->fetch('eval:{#foo#}')); } public function testDefaultConfigHandlerReplacementByConfigFile() { $this->smarty->registerDefaultConfigHandler('my_config_handler_file'); $this->smarty->configLoad('foo.conf'); $this->assertEquals("123.4", $this->smarty->fetch('eval:{#Number#}')); } public function testDefaultConfigHandlerReturningFalse() { $this->smarty->registerDefaultConfigHandler('my_config_false'); try { $this->smarty->configLoad('foo.conf'); $this->assertEquals("123.4", $this->smarty->fetch('eval:{#Number#}')); } catch (Exception $e) { $this->assertContains('Unable to read config file', $e->getMessage()); return; } $this->fail('Exception for none existing template has not been raised.'); } public function testConfigResourceDb4() { $this->smarty->addPluginsDir(dirname(__FILE__)."/PHPunitplugins/"); $this->smarty->configLoad('db4:foo.conf'); $this->assertEquals("bar", $this->smarty->fetch('eval:{#foo#}')); } } function my_config_handler ($resource_type, $resource_name, &$config_source, &$config_timestamp, Smarty $smarty) { $output = "foo = 'bar'\n"; $config_source = $output; $config_timestamp = time(); return true; } function my_config_handler_file ($resource_type, $resource_name, &$config_source, &$config_timestamp, Smarty $smarty) { return $smarty->getConfigDir(0) . 'test.conf'; } function my_config_false ($resource_type, $resource_name, &$config_source, &$config_timestamp, Smarty $smarty) { return false; } ?>smarty3-3.1.13/development/PHPunit/phpunit-tests.bat0000644000175000017500000000360611275032024021026 0ustar mikemike@echo off REM PHPUnit REM REM Copyright (c) 2002-2008, Sebastian Bergmann . REM All rights reserved. REM REM Redistribution and use in source and binary forms, with or without REM modification, are permitted provided that the following conditions REM are met: REM REM * Redistributions of source code must retain the above copyright REM notice, this list of conditions and the following disclaimer. REM REM * Redistributions in binary form must reproduce the above copyright REM notice, this list of conditions and the following disclaimer in REM the documentation and/or other materials provided with the REM distribution. REM REM * Neither the name of Sebastian Bergmann nor the names of his REM contributors may be used to endorse or promote products derived REM from this software without specific prior written permission. REM REM THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS REM "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT REM LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS REM FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REM COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, REM INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, REM BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; REM LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER REM CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC REM LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN REM ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE REM POSSIBILITY OF SUCH DAMAGE. REM REM $Id: pear-phpunit.bat 2798 2008-04-14 16:48:33Z sb $ REM set PHPBIN="C:\wamp\bin\php\php5.2.9-1\.\php.exe" "C:\wamp\bin\php\php5.2.9-1\.\php.exe">test_results.txt "C:\wamp\bin\php\php5.2.9-1\phpunit" --verbose SmartyTests.php smarty3-3.1.13/distribution/0000755000175000017500000000000012141655567014370 5ustar mikemikesmarty3-3.1.13/distribution/SMARTY_2_BC_NOTES.txt0000644000175000017500000001055311647612323017702 0ustar mikemike= Known incompatibilities with Smarty 2 = == Syntax == Smarty 3 API has a new syntax. Much of the Smarty 2 syntax is supported by a wrapper but deprecated. See the README that comes with Smarty 3 for more information. The {$array|@mod} syntax has always been a bit confusing, where an "@" is required to apply a modifier to an array instead of the individual elements. Normally you always want the modifier to apply to the variable regardless of its type. In Smarty 3, {$array|mod} and {$array|@mod} behave identical. It is safe to drop the "@" and the modifier will still apply to the array. If you really want the modifier to apply to each array element, you must loop the array in-template, or use a custom modifier that supports array iteration. Most smarty functions already escape values where necessary such as {html_options} == PHP Version == Smarty 3 is PHP 5 only. It will not work with PHP 4. == {php} Tag == The {php} tag is disabled by default. The use of {php} tags is deprecated. It can be enabled with $smarty->allow_php_tag=true. But if you scatter PHP code which belongs together into several {php} tags it may not work any longer. == Delimiters and whitespace == Delimiters surrounded by whitespace are no longer treated as Smarty tags. Therefore, { foo } will not compile as a tag, you must use {foo}. This change Makes Javascript/CSS easier to work with, eliminating the need for {literal}. This can be disabled by setting $smarty->auto_literal = false; == Unquoted Strings == Smarty 2 was a bit more forgiving (and ambiguous) when it comes to unquoted strings in parameters. Smarty3 is more restrictive. You can still pass strings without quotes so long as they contain no special characters. (anything outside of A-Za-z0-9_) For example filename strings must be quoted {include file='path/foo.tpl'} == Extending the Smarty class == Smarty 3 makes use of the __construct method for initialization. If you are extending the Smarty class, its constructor is not called implicitly if the your child class defines its own constructor. In order to run Smarty's constructor, a call to parent::__construct() within your child constructor is required. class MySmarty extends Smarty { function __construct() { parent::__construct(); // your initialization code goes here } } == Autoloader == Smarty 3 does register its own autoloader with spl_autoload_register. If your code has an existing __autoload function then this function must be explicitly registered on the __autoload stack. See http://us3.php.net/manual/en/function.spl-autoload-register.php for further details. == Plugin Filenames == Smarty 3 optionally supports the PHP spl_autoloader. The autoloader requires filenames to be lower case. Because of this, Smarty plugin file names must also be lowercase. In Smarty 2, mixed case file names did work. == Scope of Special Smarty Variables == In Smarty 2 the special Smarty variables $smarty.section... and $smarty.foreach... had global scope. If you had loops with the same name in subtemplates you could accidentally overwrite values of parent template. In Smarty 3 these special Smarty variable have only local scope in the template which is defining the loop. If you need their value in a subtemplate you have to pass them as parameter. {include file='path/foo.tpl' index=$smarty.section.foo.index} == SMARTY_RESOURCE_CHAR_SET == Smarty 3 sets the constant SMARTY_RESOURCE_CHAR_SET to utf-8 as default template charset. This is now used also on modifiers like escape as default charset. If your templates use other charsets make sure that you define the constant accordingly. Otherwise you may not get any output. == newline at {if} tags == A \n was added to the compiled code of the {if},{else},{elseif},{/if} tags to get output of newlines as expected by the template source. If one of the {if} tags is at the line end you will now get a newline in the HTML output. == trigger_error() == The API function trigger_error() has been removed because it did just map to PHP trigger_error. However it's still included in the Smarty2 API wrapper. == Smarty constants == The constants SMARTY_PHP_PASSTHRU SMARTY_PHP_QUOTE SMARTY_PHP_REMOVE SMARTY_PHP_ALLOW have been replaced with class constants Smarty::PHP_PASSTHRU Smarty::PHP_QUOTE Smarty::PHP_REMOVE Smarty::PHP_ALLOW smarty3-3.1.13/distribution/SMARTY_3.0_BC_NOTES.txt0000644000175000017500000000166311647612323020043 0ustar mikemike== Smarty2 backward compatibility == All Smarty2 specific API functions and deprecated functionallity has been moved to the SmartyBC class. == {php} Tag == The {php} tag is no longer available in the standard Smarty calls. The use of {php} tags is deprecated and only available in the SmartyBC class. == {include_php} Tag == The {include_php} tag is no longer available in the standard Smarty calls. The use of {include_php} tags is deprecated and only available in the SmartyBC class. == php template resource == The support of the php template resource is removed. == $cache_dir, $compile_dir, $config_dir, $template_dir access == The mentioned properties can't be accessed directly any longer. You must use corresponding getter/setters like addConfigDir(), setConfigDir(), getConfigDir() == obsolete Smarty class properties == The following no longer used properties are removed: $allow_php_tag $allow_php_template $deprecation_noticessmarty3-3.1.13/distribution/README0000644000175000017500000005046011634664106015250 0ustar mikemikeSmarty 3.x Author: Monte Ohrt Author: Uwe Tews AN INTRODUCTION TO SMARTY 3 NOTICE FOR 3.1 release: Please see the SMARTY_3.1_NOTES.txt file that comes with the distribution. NOTICE for 3.0.5 release: Smarty now follows the PHP error_reporting level by default. If PHP does not mask E_NOTICE and you try to access an unset template variable, you will now get an E_NOTICE warning. To revert to the old behavior: $smarty->error_reporting = E_ALL & ~E_NOTICE; NOTICE for 3.0 release: IMPORTANT: Some API adjustments have been made between the RC4 and 3.0 release. We felt it is better to make these now instead of after a 3.0 release, then have to immediately deprecate APIs in 3.1. Online documentation has been updated to reflect these changes. Specifically: ---- API CHANGES RC4 -> 3.0 ---- $smarty->register->* $smarty->unregister->* $smarty->utility->* $samrty->cache->* Have all been changed to local method calls such as: $smarty->clearAllCache() $smarty->registerFoo() $smarty->unregisterFoo() $smarty->testInstall() etc. Registration of function, block, compiler, and modifier plugins have been consolidated under two API calls: $smarty->registerPlugin(...) $smarty->unregisterPlugin(...) Registration of pre, post, output and variable filters have been consolidated under two API calls: $smarty->registerFilter(...) $smarty->unregisterFilter(...) Please refer to the online documentation for all specific changes: http://www.smarty.net/documentation ---- The Smarty 3 API has been refactored to a syntax geared for consistency and modularity. The Smarty 2 API syntax is still supported, but will throw a deprecation notice. You can disable the notices, but it is highly recommended to adjust your syntax to Smarty 3, as the Smarty 2 syntax must run through an extra rerouting wrapper. Basically, all Smarty methods now follow the "fooBarBaz" camel case syntax. Also, all Smarty properties now have getters and setters. So for example, the property $smarty->cache_dir can be set with $smarty->setCacheDir('foo/') and can be retrieved with $smarty->getCacheDir(). Some of the Smarty 3 APIs have been revoked such as the "is*" methods that were just duplicate functions of the now available "get*" methods. Here is a rundown of the Smarty 3 API: $smarty->fetch($template, $cache_id = null, $compile_id = null, $parent = null) $smarty->display($template, $cache_id = null, $compile_id = null, $parent = null) $smarty->isCached($template, $cache_id = null, $compile_id = null) $smarty->createData($parent = null) $smarty->createTemplate($template, $cache_id = null, $compile_id = null, $parent = null) $smarty->enableSecurity() $smarty->disableSecurity() $smarty->setTemplateDir($template_dir) $smarty->addTemplateDir($template_dir) $smarty->templateExists($resource_name) $smarty->loadPlugin($plugin_name, $check = true) $smarty->loadFilter($type, $name) $smarty->setExceptionHandler($handler) $smarty->addPluginsDir($plugins_dir) $smarty->getGlobal($varname = null) $smarty->getRegisteredObject($name) $smarty->getDebugTemplate() $smarty->setDebugTemplate($tpl_name) $smarty->assign($tpl_var, $value = null, $nocache = false) $smarty->assignGlobal($varname, $value = null, $nocache = false) $smarty->assignByRef($tpl_var, &$value, $nocache = false) $smarty->append($tpl_var, $value = null, $merge = false, $nocache = false) $smarty->appendByRef($tpl_var, &$value, $merge = false) $smarty->clearAssign($tpl_var) $smarty->clearAllAssign() $smarty->configLoad($config_file, $sections = null) $smarty->getVariable($variable, $_ptr = null, $search_parents = true, $error_enable = true) $smarty->getConfigVariable($variable) $smarty->getStreamVariable($variable) $smarty->getConfigVars($varname = null) $smarty->clearConfig($varname = null) $smarty->getTemplateVars($varname = null, $_ptr = null, $search_parents = true) $smarty->clearAllCache($exp_time = null, $type = null) $smarty->clearCache($template_name, $cache_id = null, $compile_id = null, $exp_time = null, $type = null) $smarty->registerPlugin($type, $tag, $callback, $cacheable = true, $cache_attr = array()) $smarty->registerObject($object_name, $object_impl, $allowed = array(), $smarty_args = true, $block_methods = array()) $smarty->registerFilter($type, $function_name) $smarty->registerResource($resource_type, $function_names) $smarty->registerDefaultPluginHandler($function_name) $smarty->registerDefaultTemplateHandler($function_name) $smarty->unregisterPlugin($type, $tag) $smarty->unregisterObject($object_name) $smarty->unregisterFilter($type, $function_name) $smarty->unregisterResource($resource_type) $smarty->compileAllTemplates($extention = '.tpl', $force_compile = false, $time_limit = 0, $max_errors = null) $smarty->clearCompiledTemplate($resource_name = null, $compile_id = null, $exp_time = null) $smarty->testInstall() // then all the getters/setters, available for all properties. Here are a few: $caching = $smarty->getCaching(); // get $smarty->caching $smarty->setCaching(true); // set $smarty->caching $smarty->setDeprecationNotices(false); // set $smarty->deprecation_notices $smarty->setCacheId($id); // set $smarty->cache_id $debugging = $smarty->getDebugging(); // get $smarty->debugging FILE STRUCTURE The Smarty 3 file structure is similar to Smarty 2: /libs/ Smarty.class.php /libs/sysplugins/ internal.* /libs/plugins/ function.mailto.php modifier.escape.php ... A lot of Smarty 3 core functionality lies in the sysplugins directory; you do not need to change any files here. The /libs/plugins/ folder is where Smarty plugins are located. You can add your own here, or create a separate plugin directory, just the same as Smarty 2. You will still need to create your own /cache/, /templates/, /templates_c/, /configs/ folders. Be sure /cache/ and /templates_c/ are writable. The typical way to use Smarty 3 should also look familiar: require('Smarty.class.php'); $smarty = new Smarty; $smarty->assign('foo','bar'); $smarty->display('index.tpl'); However, Smarty 3 works completely different on the inside. Smarty 3 is mostly backward compatible with Smarty 2, except for the following items: *) Smarty 3 is PHP 5 only. It will not work with PHP 4. *) The {php} tag is disabled by default. Enable with $smarty->allow_php_tag=true. *) Delimiters surrounded by whitespace are no longer treated as Smarty tags. Therefore, { foo } will not compile as a tag, you must use {foo}. This change Makes Javascript/CSS easier to work with, eliminating the need for {literal}. This can be disabled by setting $smarty->auto_literal = false; *) The Smarty 3 API is a bit different. Many Smarty 2 API calls are deprecated but still work. You will want to update your calls to Smarty 3 for maximum efficiency. There are many things that are new to Smarty 3. Here are the notable items: LEXER/PARSER ============ Smarty 3 now uses a lexing tokenizer for its parser/compiler. Basically, this means Smarty has some syntax additions that make life easier such as in-template math, shorter/intuitive function parameter options, infinite function recursion, more accurate error handling, etc. WHAT IS NEW IN SMARTY TEMPLATE SYNTAX ===================================== Smarty 3 allows expressions almost anywhere. Expressions can include PHP functions as long as they are not disabled by the security policy, object methods and properties, etc. The {math} plugin is no longer necessary but is still supported for BC. Examples: {$x+$y} will output the sum of x and y. {$foo = strlen($bar)} function in assignment {assign var=foo value= $x+$y} in attributes {$foo = myfunct( ($x+$y)*3 )} as function parameter {$foo[$x+3]} as array index Smarty tags can be used as values within other tags. Example: {$foo={counter}+3} Smarty tags can also be used inside double quoted strings. Example: {$foo="this is message {counter}"} You can define arrays within templates. Examples: {assign var=foo value=[1,2,3]} {assign var=foo value=['y'=>'yellow','b'=>'blue']} Arrays can be nested. {assign var=foo value=[1,[9,8],3]} There is a new short syntax supported for assigning variables. Example: {$foo=$bar+2} You can assign a value to a specific array element. If the variable exists but is not an array, it is converted to an array before the new values are assigned. Examples: {$foo['bar']=1} {$foo['bar']['blar']=1} You can append values to an array. If the variable exists but is not an array, it is converted to an array before the new values are assigned. Example: {$foo[]=1} You can use a PHP-like syntax for accessing array elements, as well as the original "dot" notation. Examples: {$foo[1]} normal access {$foo['bar']} {$foo['bar'][1]} {$foo[$x+$x]} index may contain any expression {$foo[$bar[1]]} nested index {$foo[section_name]} smarty section access, not array access! The original "dot" notation stays, and with improvements. Examples: {$foo.a.b.c} => $foo['a']['b']['c'] {$foo.a.$b.c} => $foo['a'][$b]['c'] with variable index {$foo.a.{$b+4}.c} => $foo['a'][$b+4]['c'] with expression as index {$foo.a.{$b.c}} => $foo['a'][$b['c']] with nested index note that { and } are used to address ambiguties when nesting the dot syntax. Variable names themselves can be variable and contain expressions. Examples: $foo normal variable $foo_{$bar} variable name containing other variable $foo_{$x+$y} variable name containing expressions $foo_{$bar}_buh_{$blar} variable name with multiple segments {$foo_{$x}} will output the variable $foo_1 if $x has a value of 1. Object method chaining is implemented. Example: {$object->method1($x)->method2($y)} {for} tag added for looping (replacement for {section} tag): {for $x=0, $y=count($foo); $x<$y; $x++} .... {/for} Any number of statements can be used separated by comma as the first inital expression at {for}. {for $x = $start to $end step $step} ... {/for}is in the SVN now . You can use also {for $x = $start to $end} ... {/for} In this case the step value will be automaticall 1 or -1 depending on the start and end values. Instead of $start and $end you can use any valid expression. Inside the loop the following special vars can be accessed: $x@iteration = number of iteration $x@total = total number of iterations $x@first = true on first iteration $x@last = true on last iteration The Smarty 2 {section} syntax is still supported. New shorter {foreach} syntax to loop over an array. Example: {foreach $myarray as $var}...{/foreach} Within the foreach loop, properties are access via: $var@key foreach $var array key $var@iteration foreach current iteration count (1,2,3...) $var@index foreach current index count (0,1,2...) $var@total foreach $var array total $var@first true on first iteration $var@last true on last iteration The Smarty 2 {foreach} tag syntax is still supported. NOTE: {$bar[foo]} still indicates a variable inside of a {section} named foo. If you want to access an array element with index foo, you must use quotes such as {$bar['foo']}, or use the dot syntax {$bar.foo}. while block tag is now implemented: {while $foo}...{/while} {while $x lt 10}...{/while} Direct access to PHP functions: Just as you can use PHP functions as modifiers directly, you can now access PHP functions directly, provided they are permitted by security settings: {time()} There is a new {function}...{/function} block tag to implement a template function. This enables reuse of code sequences like a plugin function. It can call itself recursively. Template function must be called with the new {call name=foo...} tag. Example: Template file: {function name=menu level=0}
    {foreach $data as $entry} {if is_array($entry)}
  • {$entry@key}
  • {call name=menu data=$entry level=$level+1} {else}
  • {$entry}
  • {/if} {/foreach}
{/function} {$menu = ['item1','item2','item3' => ['item3-1','item3-2','item3-3' => ['item3-3-1','item3-3-2']],'item4']} {call name=menu data=$menu} Generated output: * item1 * item2 * item3 o item3-1 o item3-2 o item3-3 + item3-3-1 + item3-3-2 * item4 The function tag itself must have the "name" attribute. This name is the tag name when calling the function. The function tag may have any number of additional attributes. These will be default settings for local variables. New {nocache} block function: {nocache}...{/nocache} will declare a section of the template to be non-cached when template caching is enabled. New nocache attribute: You can declare variable/function output as non-cached with the nocache attribute. Examples: {$foo nocache=true} {$foo nocache} /* same */ {foo bar="baz" nocache=true} {foo bar="baz" nocache} /* same */ {time() nocache=true} {time() nocache} /* same */ Or you can also assign the variable in your script as nocache: $smarty->assign('foo',$something,true); // third param is nocache setting {$foo} /* non-cached */ $smarty.current_dir returns the directory name of the current template. You can use strings directly as templates with the "string" resource type. Examples: $smarty->display('string:This is my template, {$foo}!'); // php {include file="string:This is my template, {$foo}!"} // template VARIABLE SCOPE / VARIABLE STORAGE ================================= In Smarty 2, all assigned variables were stored within the Smarty object. Therefore, all variables assigned in PHP were accessible by all subsequent fetch and display template calls. In Smarty 3, we have the choice to assign variables to the main Smarty object, to user-created data objects, and to user-created template objects. These objects can be chained. The object at the end of a chain can access all variables belonging to that template and all variables within the parent objects. The Smarty object can only be the root of a chain, but a chain can be isolated from the Smarty object. All known Smarty assignment interfaces will work on the data and template objects. Besides the above mentioned objects, there is also a special storage area for global variables. A Smarty data object can be created as follows: $data = $smarty->createData(); // create root data object $data->assign('foo','bar'); // assign variables as usual $data->config_load('my.conf'); // load config file $data= $smarty->createData($smarty); // create data object having a parent link to the Smarty object $data2= $smarty->createData($data); // create data object having a parent link to the $data data object A template object can be created by using the createTemplate method. It has the same parameter assignments as the fetch() or display() method. Function definition: function createTemplate($template, $cache_id = null, $compile_id = null, $parent = null) The first parameter can be a template name, a smarty object or a data object. Examples: $tpl = $smarty->createTemplate('mytpl.tpl'); // create template object not linked to any parent $tpl->assign('foo','bar'); // directly assign variables $tpl->config_load('my.conf'); // load config file $tpl = $smarty->createTemplate('mytpl.tpl',$smarty); // create template having a parent link to the Smarty object $tpl = $smarty->createTemplate('mytpl.tpl',$data); // create template having a parent link to the $data object The standard fetch() and display() methods will implicitly create a template object. If the $parent parameter is not specified in these method calls, the template object is will link back to the Smarty object as it's parent. If a template is called by an {include...} tag from another template, the subtemplate links back to the calling template as it's parent. All variables assigned locally or from a parent template are accessible. If the template creates or modifies a variable by using the {assign var=foo...} or {$foo=...} tags, these new values are only known locally (local scope). When the template exits, none of the new variables or modifications can be seen in the parent template(s). This is same behavior as in Smarty 2. With Smarty 3, we can assign variables with a scope attribute which allows the availablility of these new variables or modifications globally (ie in the parent templates.) Possible scopes are local, parent, root and global. Examples: {assign var=foo value='bar'} // no scope is specified, the default 'local' {$foo='bar'} // same, local scope {assign var=foo value='bar' scope='local'} // same, local scope {assign var=foo value='bar' scope='parent'} // Values will be available to the parent object {$foo='bar' scope='parent'} // (normally the calling template) {assign var=foo value='bar' scope='root'} // Values will be exported up to the root object, so they can {$foo='bar' scope='root'} // be seen from all templates using the same root. {assign var=foo value='bar' scope='global'} // Values will be exported to global variable storage, {$foo='bar' scope='global'} // they are available to any and all templates. The scope attribute can also be attached to the {include...} tag. In this case, the specified scope will be the default scope for all assignments within the included template. PLUGINS ======= Smarty3 are following the same coding rules as in Smarty2. The only difference is that the template object is passed as additional third parameter. smarty_plugintype_name (array $params, object $smarty, object $template) The Smarty 2 plugins are still compatible as long as they do not make use of specific Smarty2 internals. TEMPLATE INHERITANCE: ===================== With template inheritance you can define blocks, which are areas that can be overriden by child templates, so your templates could look like this: parent.tpl: {block name='title'}My site name{/block}

{block name='page-title'}Default page title{/block}

{block name='content'} Default content {/block}
child.tpl: {extends file='parent.tpl'} {block name='title'} Child title {/block} grandchild.tpl: {extends file='child.tpl'} {block name='title'}Home - {$smarty.block.parent}{/block} {block name='page-title'}My home{/block} {block name='content'} {foreach $images as $img} {$img.description} {/foreach} {/block} We redefined all the blocks here, however in the title block we used {$smarty.block.parent}, which tells Smarty to insert the default content from the parent template in its place. The content block was overriden to display the image files, and page-title has also be overriden to display a completely different title. If we render grandchild.tpl we will get this: Home - Child title

My home

image image image
NOTE: In the child templates everything outside the {extends} or {block} tag sections is ignored. The inheritance tree can be as big as you want (meaning you can extend a file that extends another one that extends another one and so on..), but be aware that all files have to be checked for modifications at runtime so the more inheritance the more overhead you add. Instead of defining the parent/child relationships with the {extends} tag in the child template you can use the resource as follow: $smarty->display('extends:parent.tpl|child.tpl|grandchild.tpl'); Child {block} tags may optionally have a append or prepend attribute. In this case the parent block content is appended or prepended to the child block content. {block name='title' append} My title {/block} PHP STREAMS: ============ (see online documentation) VARIBLE FILTERS: ================ (see online documentation) STATIC CLASS ACCESS AND NAMESPACE SUPPORT ========================================= You can register a class with optional namespace for the use in the template like: $smarty->register->templateClass('foo','name\name2\myclass'); In the template you can use it like this: {foo::method()} etc. ======================= Please look through it and send any questions/suggestions/etc to the forums. http://www.phpinsider.com/smarty-forum/viewtopic.php?t=14168 Monte and Uwe smarty3-3.1.13/distribution/libs/0000755000175000017500000000000012141655567015321 5ustar mikemikesmarty3-3.1.13/distribution/libs/plugins/0000755000175000017500000000000012141655567017002 5ustar mikemikesmarty3-3.1.13/distribution/libs/plugins/shared.make_timestamp.php0000644000175000017500000000242111640411343023740 0ustar mikemike * Purpose: used by other smarty functions to make a timestamp from a string. * * @author Monte Ohrt * @param DateTime|int|string $string date object, timestamp or string that can be converted using strtotime() * @return int */ function smarty_make_timestamp($string) { if (empty($string)) { // use "now": return time(); } elseif ($string instanceof DateTime) { return $string->getTimestamp(); } elseif (strlen($string) == 14 && ctype_digit($string)) { // it is mysql timestamp format of YYYYMMDDHHMMSS? return mktime(substr($string, 8, 2),substr($string, 10, 2),substr($string, 12, 2), substr($string, 4, 2),substr($string, 6, 2),substr($string, 0, 4)); } elseif (is_numeric($string)) { // it is a numeric string, we handle it as timestamp return (int) $string; } else { // strtotime should handle it $time = strtotime($string); if ($time == -1 || $time === false) { // strtotime() was not able to parse $string, use "now": return time(); } return $time; } } ?> smarty3-3.1.13/distribution/libs/plugins/variablefilter.htmlspecialchars.php0000644000175000017500000000066011673427331026030 0ustar mikemikesmarty3-3.1.13/distribution/libs/plugins/modifiercompiler.count_sentences.php0000644000175000017500000000141511673432547026243 0ustar mikemike * Name: count_sentences * Purpose: count the number of sentences in a text * * @link http://www.smarty.net/manual/en/language.modifier.count.paragraphs.php * count_sentences (Smarty online manual) * @author Uwe Tews * @param array $params parameters * @return string with compiled code */ function smarty_modifiercompiler_count_sentences($params, $compiler) { // find periods, question marks, exclamation marks with a word before but not after. return 'preg_match_all("#\w[\.\?\!](\W|$)#S' . Smarty::$_UTF8_MODIFIER . '", ' . $params[0] . ', $tmp)'; } ?>smarty3-3.1.13/distribution/libs/plugins/function.html_image.php0000644000175000017500000001230111673463575023447 0ustar mikemike * Name: html_image
* Date: Feb 24, 2003
* Purpose: format HTML tags for the image
* Examples: {html_image file="/images/masthead.gif"}
* Output:
* Params: *
 * - file        - (required) - file (and path) of image
 * - height      - (optional) - image height (default actual height)
 * - width       - (optional) - image width (default actual width)
 * - basedir     - (optional) - base directory for absolute paths, default is environment variable DOCUMENT_ROOT
 * - path_prefix - prefix for path output (optional, default empty)
 * 
* * @link http://www.smarty.net/manual/en/language.function.html.image.php {html_image} * (Smarty online manual) * @author Monte Ohrt * @author credits to Duda * @version 1.0 * @param array $params parameters * @param Smarty_Internal_Template $template template object * @return string * @uses smarty_function_escape_special_chars() */ function smarty_function_html_image($params, $template) { require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php'); $alt = ''; $file = ''; $height = ''; $width = ''; $extra = ''; $prefix = ''; $suffix = ''; $path_prefix = ''; $basedir = isset($_SERVER['DOCUMENT_ROOT']) ? $_SERVER['DOCUMENT_ROOT'] : ''; foreach($params as $_key => $_val) { switch ($_key) { case 'file': case 'height': case 'width': case 'dpi': case 'path_prefix': case 'basedir': $$_key = $_val; break; case 'alt': if (!is_array($_val)) { $$_key = smarty_function_escape_special_chars($_val); } else { throw new SmartyException ("html_image: extra attribute '$_key' cannot be an array", E_USER_NOTICE); } break; case 'link': case 'href': $prefix = ''; $suffix = ''; break; default: if (!is_array($_val)) { $extra .= ' ' . $_key . '="' . smarty_function_escape_special_chars($_val) . '"'; } else { throw new SmartyException ("html_image: extra attribute '$_key' cannot be an array", E_USER_NOTICE); } break; } } if (empty($file)) { trigger_error("html_image: missing 'file' parameter", E_USER_NOTICE); return; } if ($file[0] == '/') { $_image_path = $basedir . $file; } else { $_image_path = $file; } // strip file protocol if (stripos($params['file'], 'file://') === 0) { $params['file'] = substr($params['file'], 7); } $protocol = strpos($params['file'], '://'); if ($protocol !== false) { $protocol = strtolower(substr($params['file'], 0, $protocol)); } if (isset($template->smarty->security_policy)) { if ($protocol) { // remote resource (or php stream, …) if(!$template->smarty->security_policy->isTrustedUri($params['file'])) { return; } } else { // local file if(!$template->smarty->security_policy->isTrustedResourceDir($params['file'])) { return; } } } if (!isset($params['width']) || !isset($params['height'])) { // FIXME: (rodneyrehm) getimagesize() loads the complete file off a remote resource, use custom [jpg,png,gif]header reader! if (!$_image_data = @getimagesize($_image_path)) { if (!file_exists($_image_path)) { trigger_error("html_image: unable to find '$_image_path'", E_USER_NOTICE); return; } else if (!is_readable($_image_path)) { trigger_error("html_image: unable to read '$_image_path'", E_USER_NOTICE); return; } else { trigger_error("html_image: '$_image_path' is not a valid image file", E_USER_NOTICE); return; } } if (!isset($params['width'])) { $width = $_image_data[0]; } if (!isset($params['height'])) { $height = $_image_data[1]; } } if (isset($params['dpi'])) { if (strstr($_SERVER['HTTP_USER_AGENT'], 'Mac')) { // FIXME: (rodneyrehm) wrong dpi assumption // don't know who thought this up… even if it was true in 1998, it's definitely wrong in 2011. $dpi_default = 72; } else { $dpi_default = 96; } $_resize = $dpi_default / $params['dpi']; $width = round($width * $_resize); $height = round($height * $_resize); } return $prefix . '' . $alt . '' . $suffix; } ?>smarty3-3.1.13/distribution/libs/plugins/shared.escape_special_chars.php0000644000175000017500000000320611673427331025074 0ustar mikemike=')) { /** * escape_special_chars common function * * Function: smarty_function_escape_special_chars
* Purpose: used by other smarty functions to escape * special chars except for already escaped ones * * @author Monte Ohrt * @param string $string text that should by escaped * @return string */ function smarty_function_escape_special_chars($string) { if (!is_array($string)) { $string = htmlspecialchars($string, ENT_COMPAT, Smarty::$_CHARSET, false); } return $string; } } else { /** * escape_special_chars common function * * Function: smarty_function_escape_special_chars
* Purpose: used by other smarty functions to escape * special chars except for already escaped ones * * @author Monte Ohrt * @param string $string text that should by escaped * @return string */ function smarty_function_escape_special_chars($string) { if (!is_array($string)) { $string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string); $string = htmlspecialchars($string); $string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string); } return $string; } } ?>smarty3-3.1.13/distribution/libs/plugins/modifier.regex_replace.php0000644000175000017500000000303011634655414024106 0ustar mikemike * Name: regex_replace
* Purpose: regular expression search/replace * * @link http://smarty.php.net/manual/en/language.modifier.regex.replace.php * regex_replace (Smarty online manual) * @author Monte Ohrt * @param string $string input string * @param string|array $search regular expression(s) to search for * @param string|array $replace string(s) that should be replaced * @return string */ function smarty_modifier_regex_replace($string, $search, $replace) { if(is_array($search)) { foreach($search as $idx => $s) { $search[$idx] = _smarty_regex_replace_check($s); } } else { $search = _smarty_regex_replace_check($search); } return preg_replace($search, $replace, $string); } /** * @param string $search string(s) that should be replaced * @return string * @ignore */ function _smarty_regex_replace_check($search) { // null-byte injection detection // anything behind the first null-byte is ignored if (($pos = strpos($search,"\0")) !== false) { $search = substr($search,0,$pos); } // remove eval-modifier from $search if (preg_match('!([a-zA-Z\s]+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) { $search = substr($search, 0, -strlen($match[1])) . preg_replace('![e\s]+!', '', $match[1]); } return $search; } ?>smarty3-3.1.13/distribution/libs/plugins/outputfilter.trimwhitespace.php0000644000175000017500000000662311773135335025313 0ustar mikemike.*?#is', $source, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) { foreach ($matches as $match) { $store[] = $match[0][0]; $_length = strlen($match[0][0]); $replace = '@!@SMARTY:' . $_store . ':SMARTY@!@'; $source = substr_replace($source, $replace, $match[0][1] - $_offset, $_length); $_offset += $_length - strlen($replace); $_store++; } } // Strip all HTML-Comments // yes, even the ones in '; } elseif ($encode == 'javascript_charcode') { $string = '' . $text . ''; for($x = 0, $y = strlen($string); $x < $y; $x++) { $ord[] = ord($string[$x]); } $_ret = "\n"; return $_ret; } elseif ($encode == 'hex') { preg_match('!^(.*)(\?.*)$!', $address, $match); if (!empty($match[2])) { trigger_error("mailto: hex encoding does not work with extra attributes. Try javascript.",E_USER_WARNING); return; } $address_encode = ''; for ($x = 0, $_length = strlen($address); $x < $_length; $x++) { if (preg_match('!\w!' . Smarty::$_UTF8_MODIFIER, $address[$x])) { $address_encode .= '%' . bin2hex($address[$x]); } else { $address_encode .= $address[$x]; } } $text_encode = ''; for ($x = 0, $_length = strlen($text); $x < $_length; $x++) { $text_encode .= '&#x' . bin2hex($text[$x]) . ';'; } $mailto = "mailto:"; return '' . $text_encode . ''; } else { // no encoding return '' . $text . ''; } } ?>smarty3-3.1.13/distribution/libs/plugins/modifiercompiler.escape.php0000644000175000017500000001172312012450040024257 0ustar mikemike * Name: escape
* Purpose: escape string for output * * @link http://www.smarty.net/docsv2/en/language.modifier.escape count_characters (Smarty online manual) * @author Rodney Rehm * @param array $params parameters * @return string with compiled code */ function smarty_modifiercompiler_escape($params, $compiler) { static $_double_encode = null; if ($_double_encode === null) { $_double_encode = version_compare(PHP_VERSION, '5.2.3', '>='); } try { $esc_type = smarty_literal_compiler_param($params, 1, 'html'); $char_set = smarty_literal_compiler_param($params, 2, Smarty::$_CHARSET); $double_encode = smarty_literal_compiler_param($params, 3, true); if (!$char_set) { $char_set = Smarty::$_CHARSET; } switch ($esc_type) { case 'html': if ($_double_encode) { return 'htmlspecialchars(' . $params[0] .', ENT_QUOTES, ' . var_export($char_set, true) . ', ' . var_export($double_encode, true) . ')'; } else if ($double_encode) { return 'htmlspecialchars(' . $params[0] .', ENT_QUOTES, ' . var_export($char_set, true) . ')'; } else { // fall back to modifier.escape.php } case 'htmlall': if (Smarty::$_MBSTRING) { if ($_double_encode) { // php >=5.2.3 - go native return 'mb_convert_encoding(htmlspecialchars(' . $params[0] .', ENT_QUOTES, ' . var_export($char_set, true) . ', ' . var_export($double_encode, true) . '), "HTML-ENTITIES", ' . var_export($char_set, true) . ')'; } else if ($double_encode) { // php <5.2.3 - only handle double encoding return 'mb_convert_encoding(htmlspecialchars(' . $params[0] .', ENT_QUOTES, ' . var_export($char_set, true) . '), "HTML-ENTITIES", ' . var_export($char_set, true) . ')'; } else { // fall back to modifier.escape.php } } // no MBString fallback if ($_double_encode) { // php >=5.2.3 - go native return 'htmlentities(' . $params[0] .', ENT_QUOTES, ' . var_export($char_set, true) . ', ' . var_export($double_encode, true) . ')'; } else if ($double_encode) { // php <5.2.3 - only handle double encoding return 'htmlentities(' . $params[0] .', ENT_QUOTES, ' . var_export($char_set, true) . ')'; } else { // fall back to modifier.escape.php } case 'url': return 'rawurlencode(' . $params[0] . ')'; case 'urlpathinfo': return 'str_replace("%2F", "/", rawurlencode(' . $params[0] . '))'; case 'quotes': // escape unescaped single quotes return 'preg_replace("%(? "\\\\\\\\", "\'" => "\\\\\'", "\"" => "\\\\\"", "\\r" => "\\\\r", "\\n" => "\\\n", " "<\/" ))'; } } catch(SmartyException $e) { // pass through to regular plugin fallback } // could not optimize |escape call, so fallback to regular plugin if ($compiler->tag_nocache | $compiler->nocache) { $compiler->template->required_plugins['nocache']['escape']['modifier']['file'] = SMARTY_PLUGINS_DIR .'modifier.escape.php'; $compiler->template->required_plugins['nocache']['escape']['modifier']['function'] = 'smarty_modifier_escape'; } else { $compiler->template->required_plugins['compiled']['escape']['modifier']['file'] = SMARTY_PLUGINS_DIR .'modifier.escape.php'; $compiler->template->required_plugins['compiled']['escape']['modifier']['function'] = 'smarty_modifier_escape'; } return 'smarty_modifier_escape(' . join( ', ', $params ) . ')'; } ?>smarty3-3.1.13/distribution/libs/plugins/shared.mb_unicode.php0000644000175000017500000000274711650560622023065 0ustar mikemikesmarty3-3.1.13/distribution/libs/plugins/function.math.php0000644000175000017500000000552711642633164022273 0ustar mikemike * Name: math
* Purpose: handle math computations in template * * @link http://www.smarty.net/manual/en/language.function.math.php {math} * (Smarty online manual) * @author Monte Ohrt * @param array $params parameters * @param Smarty_Internal_Template $template template object * @return string|null */ function smarty_function_math($params, $template) { static $_allowed_funcs = array( 'int' => true, 'abs' => true, 'ceil' => true, 'cos' => true, 'exp' => true, 'floor' => true, 'log' => true, 'log10' => true, 'max' => true, 'min' => true, 'pi' => true, 'pow' => true, 'rand' => true, 'round' => true, 'sin' => true, 'sqrt' => true, 'srand' => true ,'tan' => true ); // be sure equation parameter is present if (empty($params['equation'])) { trigger_error("math: missing equation parameter",E_USER_WARNING); return; } $equation = $params['equation']; // make sure parenthesis are balanced if (substr_count($equation,"(") != substr_count($equation,")")) { trigger_error("math: unbalanced parenthesis",E_USER_WARNING); return; } // match all vars in equation, make sure all are passed preg_match_all("!(?:0x[a-fA-F0-9]+)|([a-zA-Z][a-zA-Z0-9_]*)!",$equation, $match); foreach($match[1] as $curr_var) { if ($curr_var && !isset($params[$curr_var]) && !isset($_allowed_funcs[$curr_var])) { trigger_error("math: function call $curr_var not allowed",E_USER_WARNING); return; } } foreach($params as $key => $val) { if ($key != "equation" && $key != "format" && $key != "assign") { // make sure value is not empty if (strlen($val)==0) { trigger_error("math: parameter $key is empty",E_USER_WARNING); return; } if (!is_numeric($val)) { trigger_error("math: parameter $key: is not numeric",E_USER_WARNING); return; } $equation = preg_replace("/\b$key\b/", " \$params['$key'] ", $equation); } } $smarty_math_result = null; eval("\$smarty_math_result = ".$equation.";"); if (empty($params['format'])) { if (empty($params['assign'])) { return $smarty_math_result; } else { $template->assign($params['assign'],$smarty_math_result); } } else { if (empty($params['assign'])){ printf($params['format'],$smarty_math_result); } else { $template->assign($params['assign'],sprintf($params['format'],$smarty_math_result)); } } } ?>smarty3-3.1.13/distribution/libs/plugins/function.html_select_date.php0000644000175000017500000003435011663745426024646 0ustar mikemike * Name: html_select_date
* Purpose: Prints the dropdowns for date selection. * * ChangeLog: *
 *            - 1.0 initial release
 *            - 1.1 added support for +/- N syntax for begin
 *              and end year values. (Monte)
 *            - 1.2 added support for yyyy-mm-dd syntax for
 *              time value. (Jan Rosier)
 *            - 1.3 added support for choosing format for
 *              month values (Gary Loescher)
 *            - 1.3.1 added support for choosing format for
 *              day values (Marcus Bointon)
 *            - 1.3.2 support negative timestamps, force year
 *              dropdown to include given date unless explicitly set (Monte)
 *            - 1.3.4 fix behaviour of 0000-00-00 00:00:00 dates to match that
 *              of 0000-00-00 dates (cybot, boots)
 *            - 2.0 complete rewrite for performance,  
 *              added attributes month_names, *_id
 * 
* * @link http://www.smarty.net/manual/en/language.function.html.select.date.php {html_select_date} * (Smarty online manual) * @version 2.0 * @author Andrei Zmievski * @author Monte Ohrt * @author Rodney Rehm * @param array $params parameters * @param Smarty_Internal_Template $template template object * @return string */ function smarty_function_html_select_date($params, $template) { // generate timestamps used for month names only static $_month_timestamps = null; static $_current_year = null; if ($_month_timestamps === null) { $_current_year = date('Y'); $_month_timestamps = array(); for ($i = 1; $i <= 12; $i++) { $_month_timestamps[$i] = mktime(0, 0, 0, $i, 1, 2000); } } /* Default values. */ $prefix = "Date_"; $start_year = null; $end_year = null; $display_days = true; $display_months = true; $display_years = true; $month_format = "%B"; /* Write months as numbers by default GL */ $month_value_format = "%m"; $day_format = "%02d"; /* Write day values using this format MB */ $day_value_format = "%d"; $year_as_text = false; /* Display years in reverse order? Ie. 2000,1999,.... */ $reverse_years = false; /* Should the select boxes be part of an array when returned from PHP? e.g. setting it to "birthday", would create "birthday[Day]", "birthday[Month]" & "birthday[Year]". Can be combined with prefix */ $field_array = null; /* tags. If not set, uses default dropdown. */ $day_size = null; $month_size = null; $year_size = null; /* Unparsed attributes common to *ALL* the tags. An example might be in the template: all_extra ='class ="foo"'. */ $all_extra = null; /* Separate attributes for the tags. */ $day_extra = null; $month_extra = null; $year_extra = null; /* Order in which to display the fields. "D" -> day, "M" -> month, "Y" -> year. */ $field_order = 'MDY'; /* String printed between the different fields. */ $field_separator = "\n"; $option_separator = "\n"; $time = null; // $all_empty = null; // $day_empty = null; // $month_empty = null; // $year_empty = null; $extra_attrs = ''; $all_id = null; $day_id = null; $month_id = null; $year_id = null; foreach ($params as $_key => $_value) { switch ($_key) { case 'time': if (!is_array($_value) && $_value !== null) { $time = smarty_make_timestamp($_value); } break; case 'month_names': if (is_array($_value) && count($_value) == 12) { $$_key = $_value; } else { trigger_error("html_select_date: month_names must be an array of 12 strings", E_USER_NOTICE); } break; case 'prefix': case 'field_array': case 'start_year': case 'end_year': case 'day_format': case 'day_value_format': case 'month_format': case 'month_value_format': case 'day_size': case 'month_size': case 'year_size': case 'all_extra': case 'day_extra': case 'month_extra': case 'year_extra': case 'field_order': case 'field_separator': case 'option_separator': case 'all_empty': case 'month_empty': case 'day_empty': case 'year_empty': case 'all_id': case 'month_id': case 'day_id': case 'year_id': $$_key = (string)$_value; break; case 'display_days': case 'display_months': case 'display_years': case 'year_as_text': case 'reverse_years': $$_key = (bool)$_value; break; default: if (!is_array($_value)) { $extra_attrs .= ' ' . $_key . '="' . smarty_function_escape_special_chars($_value) . '"'; } else { trigger_error("html_select_date: extra attribute '$_key' cannot be an array", E_USER_NOTICE); } break; } } // Note: date() is faster than strftime() // Note: explode(date()) is faster than date() date() date() if (isset($params['time']) && is_array($params['time'])) { if (isset($params['time'][$prefix . 'Year'])) { // $_REQUEST[$field_array] given foreach (array('Y' => 'Year', 'm' => 'Month', 'd' => 'Day') as $_elementKey => $_elementName) { $_variableName = '_' . strtolower($_elementName); $$_variableName = isset($params['time'][$prefix . $_elementName]) ? $params['time'][$prefix . $_elementName] : date($_elementKey); } $time = mktime(0, 0, 0, $_month, $_day, $_year); } elseif (isset($params['time'][$field_array][$prefix . 'Year'])) { // $_REQUEST given foreach (array('Y' => 'Year', 'm' => 'Month', 'd' => 'Day') as $_elementKey => $_elementName) { $_variableName = '_' . strtolower($_elementName); $$_variableName = isset($params['time'][$field_array][$prefix . $_elementName]) ? $params['time'][$field_array][$prefix . $_elementName] : date($_elementKey); } $time = mktime(0, 0, 0, $_month, $_day, $_year); } else { // no date found, use NOW list($_year, $_month, $_day) = $time = explode('-', date('Y-m-d')); } } elseif ($time === null) { if (array_key_exists('time', $params)) { $_year = $_month = $_day = $time = null; } else { list($_year, $_month, $_day) = $time = explode('-', date('Y-m-d')); } } else { list($_year, $_month, $_day) = $time = explode('-', date('Y-m-d', $time)); } // make syntax "+N" or "-N" work with $start_year and $end_year // Note preg_match('!^(\+|\-)\s*(\d+)$!', $end_year, $match) is slower than trim+substr foreach (array('start', 'end') as $key) { $key .= '_year'; $t = $$key; if ($t === null) { $$key = (int)$_current_year; } else if ($t[0] == '+') { $$key = (int)($_current_year + trim(substr($t, 1))); } else if ($t[0] == '-') { $$key = (int)($_current_year - trim(substr($t, 1))); } else { $$key = (int)$$key; } } // flip for ascending or descending if (($start_year > $end_year && !$reverse_years) || ($start_year < $end_year && $reverse_years)) { $t = $end_year; $end_year = $start_year; $start_year = $t; } // generate year if ($display_years) { $_html_years = ''; $_extra = ''; $_name = $field_array ? ($field_array . '[' . $prefix . 'Year]') : ($prefix . 'Year'); if ($all_extra) { $_extra .= ' ' . $all_extra; } if ($year_extra) { $_extra .= ' ' . $year_extra; } if ($year_as_text) { $_html_years = ''; } else { $_html_years = ''; } } // generate month if ($display_months) { $_html_month = ''; $_extra = ''; $_name = $field_array ? ($field_array . '[' . $prefix . 'Month]') : ($prefix . 'Month'); if ($all_extra) { $_extra .= ' ' . $all_extra; } if ($month_extra) { $_extra .= ' ' . $month_extra; } $_html_months = ''; } // generate day if ($display_days) { $_html_day = ''; $_extra = ''; $_name = $field_array ? ($field_array . '[' . $prefix . 'Day]') : ($prefix . 'Day'); if ($all_extra) { $_extra .= ' ' . $all_extra; } if ($day_extra) { $_extra .= ' ' . $day_extra; } $_html_days = ''; } // order the fields for output $_html = ''; for ($i=0; $i <= 2; $i++) { switch ($field_order[$i]) { case 'Y': case 'y': if (isset($_html_years)) { if ($_html) { $_html .= $field_separator; } $_html .= $_html_years; } break; case 'm': case 'M': if (isset($_html_months)) { if ($_html) { $_html .= $field_separator; } $_html .= $_html_months; } break; case 'd': case 'D': if (isset($_html_days)) { if ($_html) { $_html .= $field_separator; } $_html .= $_html_days; } break; } } return $_html; } ?>smarty3-3.1.13/distribution/libs/plugins/modifier.debug_print_var.php0000644000175000017500000000661411673427331024464 0ustar mikemike * Name: debug_print_var
* Purpose: formats variable contents for display in the console * * @author Monte Ohrt * @param array|object $var variable to be formatted * @param integer $depth maximum recursion depth if $var is an array * @param integer $length maximum string length if $var is a string * @return string */ function smarty_modifier_debug_print_var ($var, $depth = 0, $length = 40) { $_replace = array("\n" => '\n', "\r" => '\r', "\t" => '\t' ); switch (gettype($var)) { case 'array' : $results = 'Array (' . count($var) . ')'; foreach ($var as $curr_key => $curr_val) { $results .= '
' . str_repeat(' ', $depth * 2) . '' . strtr($curr_key, $_replace) . ' => ' . smarty_modifier_debug_print_var($curr_val, ++$depth, $length); $depth--; } break; case 'object' : $object_vars = get_object_vars($var); $results = '' . get_class($var) . ' Object (' . count($object_vars) . ')'; foreach ($object_vars as $curr_key => $curr_val) { $results .= '
' . str_repeat(' ', $depth * 2) . ' ->' . strtr($curr_key, $_replace) . ' = ' . smarty_modifier_debug_print_var($curr_val, ++$depth, $length); $depth--; } break; case 'boolean' : case 'NULL' : case 'resource' : if (true === $var) { $results = 'true'; } elseif (false === $var) { $results = 'false'; } elseif (null === $var) { $results = 'null'; } else { $results = htmlspecialchars((string) $var); } $results = '' . $results . ''; break; case 'integer' : case 'float' : $results = htmlspecialchars((string) $var); break; case 'string' : $results = strtr($var, $_replace); if (Smarty::$_MBSTRING) { if (mb_strlen($var, Smarty::$_CHARSET) > $length) { $results = mb_substr($var, 0, $length - 3, Smarty::$_CHARSET) . '...'; } } else { if (isset($var[$length])) { $results = substr($var, 0, $length - 3) . '...'; } } $results = htmlspecialchars('"' . $results . '"'); break; case 'unknown type' : default : $results = strtr((string) $var, $_replace); if (Smarty::$_MBSTRING) { if (mb_strlen($results, Smarty::$_CHARSET) > $length) { $results = mb_substr($results, 0, $length - 3, Smarty::$_CHARSET) . '...'; } } else { if (strlen($results) > $length) { $results = substr($results, 0, $length - 3) . '...'; } } $results = htmlspecialchars($results); } return $results; } ?>smarty3-3.1.13/distribution/libs/plugins/modifier.escape.php0000644000175000017500000001641012012450040022522 0ustar mikemike * Name: escape
* Purpose: escape string for output * * @link http://www.smarty.net/manual/en/language.modifier.count.characters.php count_characters (Smarty online manual) * @author Monte Ohrt * @param string $string input string * @param string $esc_type escape type * @param string $char_set character set, used for htmlspecialchars() or htmlentities() * @param boolean $double_encode encode already encoded entitites again, used for htmlspecialchars() or htmlentities() * @return string escaped input string */ function smarty_modifier_escape($string, $esc_type = 'html', $char_set = null, $double_encode = true) { static $_double_encode = null; if ($_double_encode === null) { $_double_encode = version_compare(PHP_VERSION, '5.2.3', '>='); } if (!$char_set) { $char_set = Smarty::$_CHARSET; } switch ($esc_type) { case 'html': if ($_double_encode) { // php >=5.3.2 - go native return htmlspecialchars($string, ENT_QUOTES, $char_set, $double_encode); } else { if ($double_encode) { // php <5.2.3 - only handle double encoding return htmlspecialchars($string, ENT_QUOTES, $char_set); } else { // php <5.2.3 - prevent double encoding $string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string); $string = htmlspecialchars($string, ENT_QUOTES, $char_set); $string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string); return $string; } } case 'htmlall': if (Smarty::$_MBSTRING) { // mb_convert_encoding ignores htmlspecialchars() if ($_double_encode) { // php >=5.3.2 - go native $string = htmlspecialchars($string, ENT_QUOTES, $char_set, $double_encode); } else { if ($double_encode) { // php <5.2.3 - only handle double encoding $string = htmlspecialchars($string, ENT_QUOTES, $char_set); } else { // php <5.2.3 - prevent double encoding $string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string); $string = htmlspecialchars($string, ENT_QUOTES, $char_set); $string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string); return $string; } } // htmlentities() won't convert everything, so use mb_convert_encoding return mb_convert_encoding($string, 'HTML-ENTITIES', $char_set); } // no MBString fallback if ($_double_encode) { return htmlentities($string, ENT_QUOTES, $char_set, $double_encode); } else { if ($double_encode) { return htmlentities($string, ENT_QUOTES, $char_set); } else { $string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string); $string = htmlentities($string, ENT_QUOTES, $char_set); $string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string); return $string; } } case 'url': return rawurlencode($string); case 'urlpathinfo': return str_replace('%2F', '/', rawurlencode($string)); case 'quotes': // escape unescaped single quotes return preg_replace("%(? '\\\\', "'" => "\\'", '"' => '\\"', "\r" => '\\r', "\n" => '\\n', ' '<\/')); case 'mail': if (Smarty::$_MBSTRING) { require_once(SMARTY_PLUGINS_DIR . 'shared.mb_str_replace.php'); return smarty_mb_str_replace(array('@', '.'), array(' [AT] ', ' [DOT] '), $string); } // no MBString fallback return str_replace(array('@', '.'), array(' [AT] ', ' [DOT] '), $string); case 'nonstd': // escape non-standard chars, such as ms document quotes $return = ''; if (Smarty::$_MBSTRING) { require_once(SMARTY_PLUGINS_DIR . 'shared.mb_unicode.php'); foreach (smarty_mb_to_unicode($string, Smarty::$_CHARSET) as $unicode) { if ($unicode >= 126) { $return .= '&#' . $unicode . ';'; } else { $return .= chr($unicode); } } return $return; } $_length = strlen($string); for ($_i = 0; $_i < $_length; $_i++) { $_ord = ord(substr($string, $_i, 1)); // non-standard char, escape it if ($_ord >= 126) { $return .= '&#' . $_ord . ';'; } else { $return .= substr($string, $_i, 1); } } return $return; default: return $string; } } ?>smarty3-3.1.13/distribution/libs/plugins/function.html_checkboxes.php0000644000175000017500000001751612050511024024465 0ustar mikemike * Type: function
* Name: html_checkboxes
* Date: 24.Feb.2003
* Purpose: Prints out a list of checkbox input types
* Examples: *
 * {html_checkboxes values=$ids output=$names}
 * {html_checkboxes values=$ids name='box' separator='
' output=$names} * {html_checkboxes values=$ids checked=$checked separator='
' output=$names} *
* Params: *
 * - name       (optional) - string default "checkbox"
 * - values     (required) - array
 * - options    (optional) - associative array
 * - checked    (optional) - array default not set
 * - separator  (optional) - ie 
or   * - output (optional) - the output next to each checkbox * - assign (optional) - assign the output as an array to this variable * - escape (optional) - escape the content (not value), defaults to true *
* * @link http://www.smarty.net/manual/en/language.function.html.checkboxes.php {html_checkboxes} * (Smarty online manual) * @author Christopher Kvarme * @author credits to Monte Ohrt * @version 1.0 * @param array $params parameters * @param object $template template object * @return string * @uses smarty_function_escape_special_chars() */ function smarty_function_html_checkboxes($params, $template) { require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php'); $name = 'checkbox'; $values = null; $options = null; $selected = array(); $separator = ''; $escape = true; $labels = true; $label_ids = false; $output = null; $extra = ''; foreach($params as $_key => $_val) { switch($_key) { case 'name': case 'separator': $$_key = (string) $_val; break; case 'escape': case 'labels': case 'label_ids': $$_key = (bool) $_val; break; case 'options': $$_key = (array) $_val; break; case 'values': case 'output': $$_key = array_values((array) $_val); break; case 'checked': case 'selected': if (is_array($_val)) { $selected = array(); foreach ($_val as $_sel) { if (is_object($_sel)) { if (method_exists($_sel, "__toString")) { $_sel = smarty_function_escape_special_chars((string) $_sel->__toString()); } else { trigger_error("html_checkboxes: selected attribute contains an object of class '". get_class($_sel) ."' without __toString() method", E_USER_NOTICE); continue; } } else { $_sel = smarty_function_escape_special_chars((string) $_sel); } $selected[$_sel] = true; } } elseif (is_object($_val)) { if (method_exists($_val, "__toString")) { $selected = smarty_function_escape_special_chars((string) $_val->__toString()); } else { trigger_error("html_checkboxes: selected attribute is an object of class '". get_class($_val) ."' without __toString() method", E_USER_NOTICE); } } else { $selected = smarty_function_escape_special_chars((string) $_val); } break; case 'checkboxes': trigger_error('html_checkboxes: the use of the "checkboxes" attribute is deprecated, use "options" instead', E_USER_WARNING); $options = (array) $_val; break; case 'assign': break; case 'strict': break; case 'disabled': case 'readonly': if (!empty($params['strict'])) { if (!is_scalar($_val)) { trigger_error("html_options: $_key attribute must be a scalar, only boolean true or string '$_key' will actually add the attribute", E_USER_NOTICE); } if ($_val === true || $_val === $_key) { $extra .= ' ' . $_key . '="' . smarty_function_escape_special_chars($_key) . '"'; } break; } // omit break; to fall through! default: if(!is_array($_val)) { $extra .= ' '.$_key.'="'.smarty_function_escape_special_chars($_val).'"'; } else { trigger_error("html_checkboxes: extra attribute '$_key' cannot be an array", E_USER_NOTICE); } break; } } if (!isset($options) && !isset($values)) return ''; /* raise error here? */ $_html_result = array(); if (isset($options)) { foreach ($options as $_key=>$_val) { $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids, $escape); } } else { foreach ($values as $_i=>$_key) { $_val = isset($output[$_i]) ? $output[$_i] : ''; $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids, $escape); } } if(!empty($params['assign'])) { $template->assign($params['assign'], $_html_result); } else { return implode("\n", $_html_result); } } function smarty_function_html_checkboxes_output($name, $value, $output, $selected, $extra, $separator, $labels, $label_ids, $escape=true) { $_output = ''; if (is_object($value)) { if (method_exists($value, "__toString")) { $value = (string) $value->__toString(); } else { trigger_error("html_options: value is an object of class '". get_class($value) ."' without __toString() method", E_USER_NOTICE); return ''; } } else { $value = (string) $value; } if (is_object($output)) { if (method_exists($output, "__toString")) { $output = (string) $output->__toString(); } else { trigger_error("html_options: output is an object of class '". get_class($output) ."' without __toString() method", E_USER_NOTICE); return ''; } } else { $output = (string) $output; } if ($labels) { if ($label_ids) { $_id = smarty_function_escape_special_chars(preg_replace('![^\w\-\.]!' . Smarty::$_UTF8_MODIFIER, '_', $name . '_' . $value)); $_output .= '