@@ -36,537 +36,537 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | class LoggerCategory { |
| 38 | 38 | |
| 39 | - /** |
|
| 40 | - * Additivity is set to true by default, that is children inherit the |
|
| 41 | - * appenders of their ancestors by default. |
|
| 42 | - * @var boolean |
|
| 43 | - */ |
|
| 44 | - public $additive = true; |
|
| 39 | + /** |
|
| 40 | + * Additivity is set to true by default, that is children inherit the |
|
| 41 | + * appenders of their ancestors by default. |
|
| 42 | + * @var boolean |
|
| 43 | + */ |
|
| 44 | + public $additive = true; |
|
| 45 | 45 | |
| 46 | - /** |
|
| 47 | - * @var string fully qualified class name |
|
| 48 | - */ |
|
| 49 | - public $fqcn = 'LoggerCategory'; |
|
| 46 | + /** |
|
| 47 | + * @var string fully qualified class name |
|
| 48 | + */ |
|
| 49 | + public $fqcn = 'LoggerCategory'; |
|
| 50 | 50 | |
| 51 | - /** |
|
| 52 | - * @var LoggerLevel The assigned level of this category. |
|
| 53 | - */ |
|
| 54 | - public $level = null; |
|
| 51 | + /** |
|
| 52 | + * @var LoggerLevel The assigned level of this category. |
|
| 53 | + */ |
|
| 54 | + public $level = null; |
|
| 55 | 55 | |
| 56 | - /** |
|
| 57 | - * @var string name of this category. |
|
| 58 | - */ |
|
| 59 | - public $name = ''; |
|
| 56 | + /** |
|
| 57 | + * @var string name of this category. |
|
| 58 | + */ |
|
| 59 | + public $name = ''; |
|
| 60 | 60 | |
| 61 | - /** |
|
| 62 | - * @var Logger The parent of this category. |
|
| 63 | - */ |
|
| 64 | - public $parent = null; |
|
| 61 | + /** |
|
| 62 | + * @var Logger The parent of this category. |
|
| 63 | + */ |
|
| 64 | + public $parent = null; |
|
| 65 | 65 | |
| 66 | - /** |
|
| 67 | - * @var LoggerHierarchy the object repository |
|
| 68 | - */ |
|
| 69 | - public $repository = null; |
|
| 66 | + /** |
|
| 67 | + * @var LoggerHierarchy the object repository |
|
| 68 | + */ |
|
| 69 | + public $repository = null; |
|
| 70 | 70 | |
| 71 | - /** |
|
| 72 | - * @var array collection of appenders |
|
| 73 | - * @see LoggerAppender |
|
| 74 | - */ |
|
| 75 | - public $aai = array(); |
|
| 71 | + /** |
|
| 72 | + * @var array collection of appenders |
|
| 73 | + * @see LoggerAppender |
|
| 74 | + */ |
|
| 75 | + public $aai = array(); |
|
| 76 | 76 | |
| 77 | 77 | /* --------------------------------------------------------------------------*/ |
| 78 | 78 | /* --------------------------------------------------------------------------*/ |
| 79 | 79 | /* --------------------------------------------------------------------------*/ |
| 80 | 80 | |
| 81 | - /** |
|
| 82 | - * Constructor. |
|
| 83 | - * |
|
| 84 | - * @param string $name Category name |
|
| 85 | - */ |
|
| 86 | - public function LoggerCategory($name) |
|
| 87 | - { |
|
| 88 | - $this->name = $name; |
|
| 89 | - } |
|
| 81 | + /** |
|
| 82 | + * Constructor. |
|
| 83 | + * |
|
| 84 | + * @param string $name Category name |
|
| 85 | + */ |
|
| 86 | + public function LoggerCategory($name) |
|
| 87 | + { |
|
| 88 | + $this->name = $name; |
|
| 89 | + } |
|
| 90 | 90 | |
| 91 | - /** |
|
| 92 | - * Add a new Appender to the list of appenders of this Category instance. |
|
| 93 | - * |
|
| 94 | - * @param LoggerAppender $newAppender |
|
| 95 | - */ |
|
| 96 | - public function addAppender(&$newAppender) |
|
| 97 | - { |
|
| 98 | - $appenderName = $newAppender->getName(); |
|
| 99 | - $this->aai[$appenderName] =& $newAppender; |
|
| 100 | - } |
|
| 91 | + /** |
|
| 92 | + * Add a new Appender to the list of appenders of this Category instance. |
|
| 93 | + * |
|
| 94 | + * @param LoggerAppender $newAppender |
|
| 95 | + */ |
|
| 96 | + public function addAppender(&$newAppender) |
|
| 97 | + { |
|
| 98 | + $appenderName = $newAppender->getName(); |
|
| 99 | + $this->aai[$appenderName] =& $newAppender; |
|
| 100 | + } |
|
| 101 | 101 | |
| 102 | - /** |
|
| 103 | - * If assertion parameter is false, then logs msg as an error statement. |
|
| 104 | - * |
|
| 105 | - * @param bool $assertion |
|
| 106 | - * @param string $msg message to log |
|
| 107 | - */ |
|
| 108 | - public function assertLog($assertion = true, $msg = '') |
|
| 109 | - { |
|
| 110 | - if ($assertion === false) { |
|
| 111 | - $this->error($msg); |
|
| 112 | - } |
|
| 113 | - } |
|
| 102 | + /** |
|
| 103 | + * If assertion parameter is false, then logs msg as an error statement. |
|
| 104 | + * |
|
| 105 | + * @param bool $assertion |
|
| 106 | + * @param string $msg message to log |
|
| 107 | + */ |
|
| 108 | + public function assertLog($assertion = true, $msg = '') |
|
| 109 | + { |
|
| 110 | + if ($assertion === false) { |
|
| 111 | + $this->error($msg); |
|
| 112 | + } |
|
| 113 | + } |
|
| 114 | 114 | |
| 115 | - /** |
|
| 116 | - * Call the appenders in the hierarchy starting at this. |
|
| 117 | - * |
|
| 118 | - * @param LoggerLoggingEvent $event |
|
| 119 | - */ |
|
| 120 | - public function callAppenders($event) |
|
| 121 | - { |
|
| 122 | - if (sizeof($this->aai) > 0) { |
|
| 123 | - foreach (array_keys($this->aai) as $appenderName) { |
|
| 124 | - $this->aai[$appenderName]->doAppend($event); |
|
| 125 | - } |
|
| 126 | - } |
|
| 127 | - if ($this->parent !== null && $this->getAdditivity()) { |
|
| 128 | - $this->parent->callAppenders($event); |
|
| 129 | - } |
|
| 130 | - } |
|
| 115 | + /** |
|
| 116 | + * Call the appenders in the hierarchy starting at this. |
|
| 117 | + * |
|
| 118 | + * @param LoggerLoggingEvent $event |
|
| 119 | + */ |
|
| 120 | + public function callAppenders($event) |
|
| 121 | + { |
|
| 122 | + if (sizeof($this->aai) > 0) { |
|
| 123 | + foreach (array_keys($this->aai) as $appenderName) { |
|
| 124 | + $this->aai[$appenderName]->doAppend($event); |
|
| 125 | + } |
|
| 126 | + } |
|
| 127 | + if ($this->parent !== null && $this->getAdditivity()) { |
|
| 128 | + $this->parent->callAppenders($event); |
|
| 129 | + } |
|
| 130 | + } |
|
| 131 | 131 | |
| 132 | - /** |
|
| 133 | - * Log a message object with the DEBUG level including the caller. |
|
| 134 | - * |
|
| 135 | - * @param mixed $message message |
|
| 136 | - * @param mixed $caller caller object or caller string id |
|
| 137 | - */ |
|
| 138 | - public function debug($message, $caller = null) |
|
| 139 | - { |
|
| 140 | - $debugLevel = LoggerLevel::getLevelDebug(); |
|
| 141 | - if ($this->repository->isDisabled($debugLevel)) { |
|
| 142 | - return; |
|
| 143 | - } |
|
| 144 | - if ($debugLevel->isGreaterOrEqual($this->getEffectiveLevel())) { |
|
| 145 | - $this->forcedLog($this->fqcn, $caller, $debugLevel, $message); |
|
| 146 | - } |
|
| 147 | - } |
|
| 132 | + /** |
|
| 133 | + * Log a message object with the DEBUG level including the caller. |
|
| 134 | + * |
|
| 135 | + * @param mixed $message message |
|
| 136 | + * @param mixed $caller caller object or caller string id |
|
| 137 | + */ |
|
| 138 | + public function debug($message, $caller = null) |
|
| 139 | + { |
|
| 140 | + $debugLevel = LoggerLevel::getLevelDebug(); |
|
| 141 | + if ($this->repository->isDisabled($debugLevel)) { |
|
| 142 | + return; |
|
| 143 | + } |
|
| 144 | + if ($debugLevel->isGreaterOrEqual($this->getEffectiveLevel())) { |
|
| 145 | + $this->forcedLog($this->fqcn, $caller, $debugLevel, $message); |
|
| 146 | + } |
|
| 147 | + } |
|
| 148 | 148 | |
| 149 | - /** |
|
| 150 | - * Log a message object with the ERROR level including the caller. |
|
| 151 | - * |
|
| 152 | - * @param mixed $message message |
|
| 153 | - * @param mixed $caller caller object or caller string id |
|
| 154 | - */ |
|
| 155 | - public function error($message, $caller = null) |
|
| 156 | - { |
|
| 157 | - $errorLevel = LoggerLevel::getLevelError(); |
|
| 158 | - if ($this->repository->isDisabled($errorLevel)) { |
|
| 159 | - return; |
|
| 160 | - } |
|
| 161 | - if ($errorLevel->isGreaterOrEqual($this->getEffectiveLevel())) { |
|
| 162 | - $this->forcedLog($this->fqcn, $caller, $errorLevel, $message); |
|
| 149 | + /** |
|
| 150 | + * Log a message object with the ERROR level including the caller. |
|
| 151 | + * |
|
| 152 | + * @param mixed $message message |
|
| 153 | + * @param mixed $caller caller object or caller string id |
|
| 154 | + */ |
|
| 155 | + public function error($message, $caller = null) |
|
| 156 | + { |
|
| 157 | + $errorLevel = LoggerLevel::getLevelError(); |
|
| 158 | + if ($this->repository->isDisabled($errorLevel)) { |
|
| 159 | + return; |
|
| 160 | + } |
|
| 161 | + if ($errorLevel->isGreaterOrEqual($this->getEffectiveLevel())) { |
|
| 162 | + $this->forcedLog($this->fqcn, $caller, $errorLevel, $message); |
|
| 163 | 163 | $this->forcedLog($this->fqcn, $caller, $errorLevel, PHP_EOL.vtlib\Functions::getBacktrace(1)); |
| 164 | - } |
|
| 165 | - } |
|
| 164 | + } |
|
| 165 | + } |
|
| 166 | 166 | |
| 167 | - /** |
|
| 168 | - * Deprecated. Please use LoggerManager::exists() instead. |
|
| 169 | - * |
|
| 170 | - * @param string $name |
|
| 171 | - * @see LoggerManager::exists() |
|
| 172 | - * @deprecated |
|
| 173 | - */ |
|
| 174 | - public function exists($name) |
|
| 175 | - { |
|
| 176 | - return LoggerManager::exists($name); |
|
| 177 | - } |
|
| 167 | + /** |
|
| 168 | + * Deprecated. Please use LoggerManager::exists() instead. |
|
| 169 | + * |
|
| 170 | + * @param string $name |
|
| 171 | + * @see LoggerManager::exists() |
|
| 172 | + * @deprecated |
|
| 173 | + */ |
|
| 174 | + public function exists($name) |
|
| 175 | + { |
|
| 176 | + return LoggerManager::exists($name); |
|
| 177 | + } |
|
| 178 | 178 | |
| 179 | - /** |
|
| 180 | - * Log a message object with the FATAL level including the caller. |
|
| 181 | - * |
|
| 182 | - * @param mixed $message message |
|
| 183 | - * @param mixed $caller caller object or caller string id |
|
| 184 | - */ |
|
| 185 | - public function fatal($message, $caller = null) |
|
| 186 | - { |
|
| 187 | - $fatalLevel = LoggerLevel::getLevelFatal(); |
|
| 188 | - if ($this->repository->isDisabled($fatalLevel)) { |
|
| 189 | - return; |
|
| 190 | - } |
|
| 191 | - if ($fatalLevel->isGreaterOrEqual($this->getEffectiveLevel())) { |
|
| 192 | - $this->forcedLog($this->fqcn, $caller, $fatalLevel, $message); |
|
| 193 | - } |
|
| 194 | - } |
|
| 179 | + /** |
|
| 180 | + * Log a message object with the FATAL level including the caller. |
|
| 181 | + * |
|
| 182 | + * @param mixed $message message |
|
| 183 | + * @param mixed $caller caller object or caller string id |
|
| 184 | + */ |
|
| 185 | + public function fatal($message, $caller = null) |
|
| 186 | + { |
|
| 187 | + $fatalLevel = LoggerLevel::getLevelFatal(); |
|
| 188 | + if ($this->repository->isDisabled($fatalLevel)) { |
|
| 189 | + return; |
|
| 190 | + } |
|
| 191 | + if ($fatalLevel->isGreaterOrEqual($this->getEffectiveLevel())) { |
|
| 192 | + $this->forcedLog($this->fqcn, $caller, $fatalLevel, $message); |
|
| 193 | + } |
|
| 194 | + } |
|
| 195 | 195 | |
| 196 | - /** |
|
| 197 | - * This method creates a new logging event and logs the event without further checks. |
|
| 198 | - * |
|
| 199 | - * It should not be called directly. Use {@link info()}, {@link debug()}, {@link warn()}, |
|
| 200 | - * {@link error()} and {@link fatal()} wrappers. |
|
| 201 | - * |
|
| 202 | - * @param string $fqcn Fully Qualified Class Name of the Logger |
|
| 203 | - * @param mixed $caller caller object or caller string id |
|
| 204 | - * @param LoggerLevel $level log level |
|
| 205 | - * @param mixed $message message |
|
| 206 | - * @see LoggerLoggingEvent |
|
| 207 | - */ |
|
| 208 | - public function forcedLog($fqcn, $caller, $level, $message) |
|
| 209 | - { |
|
| 210 | - $this->callAppenders(new LoggerLoggingEvent($fqcn, $this, $level, $message)); |
|
| 211 | - } |
|
| 196 | + /** |
|
| 197 | + * This method creates a new logging event and logs the event without further checks. |
|
| 198 | + * |
|
| 199 | + * It should not be called directly. Use {@link info()}, {@link debug()}, {@link warn()}, |
|
| 200 | + * {@link error()} and {@link fatal()} wrappers. |
|
| 201 | + * |
|
| 202 | + * @param string $fqcn Fully Qualified Class Name of the Logger |
|
| 203 | + * @param mixed $caller caller object or caller string id |
|
| 204 | + * @param LoggerLevel $level log level |
|
| 205 | + * @param mixed $message message |
|
| 206 | + * @see LoggerLoggingEvent |
|
| 207 | + */ |
|
| 208 | + public function forcedLog($fqcn, $caller, $level, $message) |
|
| 209 | + { |
|
| 210 | + $this->callAppenders(new LoggerLoggingEvent($fqcn, $this, $level, $message)); |
|
| 211 | + } |
|
| 212 | 212 | |
| 213 | - /** |
|
| 214 | - * Get the additivity flag for this Category instance. |
|
| 215 | - * @return boolean |
|
| 216 | - */ |
|
| 217 | - public function getAdditivity() |
|
| 218 | - { |
|
| 219 | - return $this->additive; |
|
| 220 | - } |
|
| 213 | + /** |
|
| 214 | + * Get the additivity flag for this Category instance. |
|
| 215 | + * @return boolean |
|
| 216 | + */ |
|
| 217 | + public function getAdditivity() |
|
| 218 | + { |
|
| 219 | + return $this->additive; |
|
| 220 | + } |
|
| 221 | 221 | |
| 222 | - /** |
|
| 223 | - * Get the appenders contained in this category as an array. |
|
| 224 | - * @return array collection of appenders |
|
| 225 | - */ |
|
| 226 | - public function &getAllAppenders() |
|
| 227 | - { |
|
| 228 | - $appenders = array(); |
|
| 229 | - $appenderNames = array_keys($this->aai); |
|
| 230 | - $enumAppenders = sizeof($appenderNames); |
|
| 231 | - for ($i = 0; $i < $enumAppenders; $i++) { |
|
| 232 | - $appenderName = $appenderNames[$i]; |
|
| 233 | - $appenders[] =& $this->aai[$appenderName]; |
|
| 234 | - } |
|
| 235 | - return $appenders; |
|
| 236 | - } |
|
| 222 | + /** |
|
| 223 | + * Get the appenders contained in this category as an array. |
|
| 224 | + * @return array collection of appenders |
|
| 225 | + */ |
|
| 226 | + public function &getAllAppenders() |
|
| 227 | + { |
|
| 228 | + $appenders = array(); |
|
| 229 | + $appenderNames = array_keys($this->aai); |
|
| 230 | + $enumAppenders = sizeof($appenderNames); |
|
| 231 | + for ($i = 0; $i < $enumAppenders; $i++) { |
|
| 232 | + $appenderName = $appenderNames[$i]; |
|
| 233 | + $appenders[] =& $this->aai[$appenderName]; |
|
| 234 | + } |
|
| 235 | + return $appenders; |
|
| 236 | + } |
|
| 237 | 237 | |
| 238 | - /** |
|
| 239 | - * Look for the appender named as name. |
|
| 240 | - * @return LoggerAppender |
|
| 241 | - */ |
|
| 242 | - public function &getAppender($name) |
|
| 243 | - { |
|
| 244 | - return $this->aai[$name]; |
|
| 245 | - } |
|
| 238 | + /** |
|
| 239 | + * Look for the appender named as name. |
|
| 240 | + * @return LoggerAppender |
|
| 241 | + */ |
|
| 242 | + public function &getAppender($name) |
|
| 243 | + { |
|
| 244 | + return $this->aai[$name]; |
|
| 245 | + } |
|
| 246 | 246 | |
| 247 | - /** |
|
| 248 | - * Please use the {@link getEffectiveLevel()} method instead. |
|
| 249 | - * @deprecated |
|
| 250 | - */ |
|
| 251 | - public function getChainedPriority() |
|
| 252 | - { |
|
| 253 | - return $this->getEffectiveLevel(); |
|
| 254 | - } |
|
| 247 | + /** |
|
| 248 | + * Please use the {@link getEffectiveLevel()} method instead. |
|
| 249 | + * @deprecated |
|
| 250 | + */ |
|
| 251 | + public function getChainedPriority() |
|
| 252 | + { |
|
| 253 | + return $this->getEffectiveLevel(); |
|
| 254 | + } |
|
| 255 | 255 | |
| 256 | - /** |
|
| 257 | - * Please use {@link LoggerManager::getCurrentLoggers()} instead. |
|
| 258 | - * @deprecated |
|
| 259 | - */ |
|
| 260 | - public function getCurrentCategories() |
|
| 261 | - { |
|
| 262 | - return LoggerManager::getCurrentLoggers(); |
|
| 263 | - } |
|
| 256 | + /** |
|
| 257 | + * Please use {@link LoggerManager::getCurrentLoggers()} instead. |
|
| 258 | + * @deprecated |
|
| 259 | + */ |
|
| 260 | + public function getCurrentCategories() |
|
| 261 | + { |
|
| 262 | + return LoggerManager::getCurrentLoggers(); |
|
| 263 | + } |
|
| 264 | 264 | |
| 265 | - /** |
|
| 266 | - * Please use {@link LoggerManager::getLoggerRepository()} instead. |
|
| 267 | - * @deprecated |
|
| 268 | - */ |
|
| 269 | - public function &getDefaultHierarchy() |
|
| 270 | - { |
|
| 271 | - return LoggerManager::getLoggerRepository(); |
|
| 272 | - } |
|
| 265 | + /** |
|
| 266 | + * Please use {@link LoggerManager::getLoggerRepository()} instead. |
|
| 267 | + * @deprecated |
|
| 268 | + */ |
|
| 269 | + public function &getDefaultHierarchy() |
|
| 270 | + { |
|
| 271 | + return LoggerManager::getLoggerRepository(); |
|
| 272 | + } |
|
| 273 | 273 | |
| 274 | - /** |
|
| 275 | - * @deprecated Use {@link getLoggerRepository()} |
|
| 276 | - * @return LoggerHierarchy |
|
| 277 | - */ |
|
| 278 | - public function &getHierarchy() |
|
| 279 | - { |
|
| 280 | - return $this->getLoggerRepository(); |
|
| 281 | - } |
|
| 274 | + /** |
|
| 275 | + * @deprecated Use {@link getLoggerRepository()} |
|
| 276 | + * @return LoggerHierarchy |
|
| 277 | + */ |
|
| 278 | + public function &getHierarchy() |
|
| 279 | + { |
|
| 280 | + return $this->getLoggerRepository(); |
|
| 281 | + } |
|
| 282 | 282 | |
| 283 | - /** |
|
| 284 | - * Starting from this category, search the category hierarchy for a non-null level and return it. |
|
| 285 | - * @see LoggerLevel |
|
| 286 | - * @return LoggerLevel or null |
|
| 287 | - */ |
|
| 288 | - public function getEffectiveLevel() |
|
| 289 | - { |
|
| 290 | - for($c = $this; $c !== null; $c = $c->parent) { |
|
| 291 | - if($c->level !== null) |
|
| 292 | - return $c->level; |
|
| 293 | - } |
|
| 294 | - return null; |
|
| 295 | - } |
|
| 283 | + /** |
|
| 284 | + * Starting from this category, search the category hierarchy for a non-null level and return it. |
|
| 285 | + * @see LoggerLevel |
|
| 286 | + * @return LoggerLevel or null |
|
| 287 | + */ |
|
| 288 | + public function getEffectiveLevel() |
|
| 289 | + { |
|
| 290 | + for($c = $this; $c !== null; $c = $c->parent) { |
|
| 291 | + if($c->level !== null) |
|
| 292 | + return $c->level; |
|
| 293 | + } |
|
| 294 | + return null; |
|
| 295 | + } |
|
| 296 | 296 | |
| 297 | - /** |
|
| 298 | - * Retrieve a category with named as the name parameter. |
|
| 299 | - * @return Logger |
|
| 300 | - */ |
|
| 301 | - public function &getInstance($name) |
|
| 302 | - { |
|
| 303 | - return LoggerManager::getLogger($name); |
|
| 304 | - } |
|
| 297 | + /** |
|
| 298 | + * Retrieve a category with named as the name parameter. |
|
| 299 | + * @return Logger |
|
| 300 | + */ |
|
| 301 | + public function &getInstance($name) |
|
| 302 | + { |
|
| 303 | + return LoggerManager::getLogger($name); |
|
| 304 | + } |
|
| 305 | 305 | |
| 306 | - /** |
|
| 307 | - * Returns the assigned Level, if any, for this Category. |
|
| 308 | - * @return LoggerLevel or null |
|
| 309 | - */ |
|
| 310 | - public function getLevel() |
|
| 311 | - { |
|
| 312 | - return $this->level; |
|
| 313 | - } |
|
| 306 | + /** |
|
| 307 | + * Returns the assigned Level, if any, for this Category. |
|
| 308 | + * @return LoggerLevel or null |
|
| 309 | + */ |
|
| 310 | + public function getLevel() |
|
| 311 | + { |
|
| 312 | + return $this->level; |
|
| 313 | + } |
|
| 314 | 314 | |
| 315 | - /** |
|
| 316 | - * Return the the repository where this Category is attached. |
|
| 317 | - * @return LoggerHierarchy |
|
| 318 | - */ |
|
| 319 | - public function &getLoggerRepository() |
|
| 320 | - { |
|
| 321 | - return $this->repository; |
|
| 322 | - } |
|
| 315 | + /** |
|
| 316 | + * Return the the repository where this Category is attached. |
|
| 317 | + * @return LoggerHierarchy |
|
| 318 | + */ |
|
| 319 | + public function &getLoggerRepository() |
|
| 320 | + { |
|
| 321 | + return $this->repository; |
|
| 322 | + } |
|
| 323 | 323 | |
| 324 | - /** |
|
| 325 | - * Return the category name. |
|
| 326 | - * @return string |
|
| 327 | - */ |
|
| 328 | - public function getName() |
|
| 329 | - { |
|
| 330 | - return $this->name; |
|
| 331 | - } |
|
| 324 | + /** |
|
| 325 | + * Return the category name. |
|
| 326 | + * @return string |
|
| 327 | + */ |
|
| 328 | + public function getName() |
|
| 329 | + { |
|
| 330 | + return $this->name; |
|
| 331 | + } |
|
| 332 | 332 | |
| 333 | - /** |
|
| 334 | - * Returns the parent of this category. |
|
| 335 | - * @return Logger |
|
| 336 | - */ |
|
| 337 | - public function &getParent() |
|
| 338 | - { |
|
| 339 | - return $this->parent; |
|
| 340 | - } |
|
| 333 | + /** |
|
| 334 | + * Returns the parent of this category. |
|
| 335 | + * @return Logger |
|
| 336 | + */ |
|
| 337 | + public function &getParent() |
|
| 338 | + { |
|
| 339 | + return $this->parent; |
|
| 340 | + } |
|
| 341 | 341 | |
| 342 | - /** |
|
| 343 | - * Please use getLevel() instead. |
|
| 344 | - * @deprecated |
|
| 345 | - */ |
|
| 346 | - public function getPriority() |
|
| 347 | - { |
|
| 348 | - return $this->getLevel(); |
|
| 349 | - } |
|
| 342 | + /** |
|
| 343 | + * Please use getLevel() instead. |
|
| 344 | + * @deprecated |
|
| 345 | + */ |
|
| 346 | + public function getPriority() |
|
| 347 | + { |
|
| 348 | + return $this->getLevel(); |
|
| 349 | + } |
|
| 350 | 350 | |
| 351 | - /** |
|
| 352 | - * Return the inherited ResourceBundle for this category. |
|
| 353 | - */ |
|
| 354 | - public function getResourceBundle() |
|
| 355 | - { |
|
| 356 | - return; |
|
| 357 | - } |
|
| 351 | + /** |
|
| 352 | + * Return the inherited ResourceBundle for this category. |
|
| 353 | + */ |
|
| 354 | + public function getResourceBundle() |
|
| 355 | + { |
|
| 356 | + return; |
|
| 357 | + } |
|
| 358 | 358 | |
| 359 | - /** |
|
| 360 | - * Returns the string resource coresponding to key in this category's inherited resource bundle. |
|
| 361 | - */ |
|
| 362 | - public function getResourceBundleString($key) |
|
| 363 | - { |
|
| 364 | - return; |
|
| 365 | - } |
|
| 359 | + /** |
|
| 360 | + * Returns the string resource coresponding to key in this category's inherited resource bundle. |
|
| 361 | + */ |
|
| 362 | + public function getResourceBundleString($key) |
|
| 363 | + { |
|
| 364 | + return; |
|
| 365 | + } |
|
| 366 | 366 | |
| 367 | - /** |
|
| 368 | - * Return the root of the default category hierrachy. |
|
| 369 | - * @return LoggerRoot |
|
| 370 | - */ |
|
| 371 | - public function &getRoot() |
|
| 372 | - { |
|
| 373 | - return LoggerManager::getRootLogger(); |
|
| 374 | - } |
|
| 367 | + /** |
|
| 368 | + * Return the root of the default category hierrachy. |
|
| 369 | + * @return LoggerRoot |
|
| 370 | + */ |
|
| 371 | + public function &getRoot() |
|
| 372 | + { |
|
| 373 | + return LoggerManager::getRootLogger(); |
|
| 374 | + } |
|
| 375 | 375 | |
| 376 | - /** |
|
| 377 | - * Log a message object with the INFO Level. |
|
| 378 | - * |
|
| 379 | - * @param mixed $message message |
|
| 380 | - * @param mixed $caller caller object or caller string id |
|
| 381 | - */ |
|
| 382 | - public function info($message, $caller = null) |
|
| 383 | - { |
|
| 384 | - $infoLevel = LoggerLevel::getLevelInfo(); |
|
| 385 | - if ($this->repository->isDisabled($infoLevel)) { |
|
| 386 | - return; |
|
| 387 | - } |
|
| 388 | - if ($infoLevel->isGreaterOrEqual($this->getEffectiveLevel())) { |
|
| 389 | - $this->forcedLog($this->fqcn, $caller, $infoLevel, $message); |
|
| 390 | - } |
|
| 391 | - } |
|
| 376 | + /** |
|
| 377 | + * Log a message object with the INFO Level. |
|
| 378 | + * |
|
| 379 | + * @param mixed $message message |
|
| 380 | + * @param mixed $caller caller object or caller string id |
|
| 381 | + */ |
|
| 382 | + public function info($message, $caller = null) |
|
| 383 | + { |
|
| 384 | + $infoLevel = LoggerLevel::getLevelInfo(); |
|
| 385 | + if ($this->repository->isDisabled($infoLevel)) { |
|
| 386 | + return; |
|
| 387 | + } |
|
| 388 | + if ($infoLevel->isGreaterOrEqual($this->getEffectiveLevel())) { |
|
| 389 | + $this->forcedLog($this->fqcn, $caller, $infoLevel, $message); |
|
| 390 | + } |
|
| 391 | + } |
|
| 392 | 392 | |
| 393 | - /** |
|
| 394 | - * Is the appender passed as parameter attached to this category? |
|
| 395 | - * |
|
| 396 | - * @param LoggerAppender $appender |
|
| 397 | - */ |
|
| 398 | - public function isAttached($appender) |
|
| 399 | - { |
|
| 400 | - return in_array($appender->getName(), array_keys($this->aai)); |
|
| 401 | - } |
|
| 393 | + /** |
|
| 394 | + * Is the appender passed as parameter attached to this category? |
|
| 395 | + * |
|
| 396 | + * @param LoggerAppender $appender |
|
| 397 | + */ |
|
| 398 | + public function isAttached($appender) |
|
| 399 | + { |
|
| 400 | + return in_array($appender->getName(), array_keys($this->aai)); |
|
| 401 | + } |
|
| 402 | 402 | |
| 403 | - /** |
|
| 404 | - * Check whether this category is enabled for the DEBUG Level. |
|
| 405 | - * @return boolean |
|
| 406 | - */ |
|
| 407 | - public function isDebugEnabled() |
|
| 408 | - { |
|
| 409 | - $debugLevel = LoggerLevel::getLevelDebug(); |
|
| 410 | - if ($this->repository->isDisabled($debugLevel)) { |
|
| 411 | - return false; |
|
| 412 | - } |
|
| 413 | - return ($debugLevel->isGreaterOrEqual($this->getEffectiveLevel())); |
|
| 414 | - } |
|
| 403 | + /** |
|
| 404 | + * Check whether this category is enabled for the DEBUG Level. |
|
| 405 | + * @return boolean |
|
| 406 | + */ |
|
| 407 | + public function isDebugEnabled() |
|
| 408 | + { |
|
| 409 | + $debugLevel = LoggerLevel::getLevelDebug(); |
|
| 410 | + if ($this->repository->isDisabled($debugLevel)) { |
|
| 411 | + return false; |
|
| 412 | + } |
|
| 413 | + return ($debugLevel->isGreaterOrEqual($this->getEffectiveLevel())); |
|
| 414 | + } |
|
| 415 | 415 | |
| 416 | - /** |
|
| 417 | - * Check whether this category is enabled for a given Level passed as parameter. |
|
| 418 | - * |
|
| 419 | - * @param LoggerLevel level |
|
| 420 | - * @return boolean |
|
| 421 | - */ |
|
| 422 | - public function isEnabledFor($level) |
|
| 423 | - { |
|
| 424 | - if ($this->repository->isDisabled($level)) { |
|
| 425 | - return false; |
|
| 426 | - } |
|
| 427 | - return (bool)($level->isGreaterOrEqual($this->getEffectiveLevel())); |
|
| 428 | - } |
|
| 416 | + /** |
|
| 417 | + * Check whether this category is enabled for a given Level passed as parameter. |
|
| 418 | + * |
|
| 419 | + * @param LoggerLevel level |
|
| 420 | + * @return boolean |
|
| 421 | + */ |
|
| 422 | + public function isEnabledFor($level) |
|
| 423 | + { |
|
| 424 | + if ($this->repository->isDisabled($level)) { |
|
| 425 | + return false; |
|
| 426 | + } |
|
| 427 | + return (bool)($level->isGreaterOrEqual($this->getEffectiveLevel())); |
|
| 428 | + } |
|
| 429 | 429 | |
| 430 | - /** |
|
| 431 | - * Check whether this category is enabled for the info Level. |
|
| 432 | - * @return boolean |
|
| 433 | - * @see LoggerLevel |
|
| 434 | - */ |
|
| 435 | - public function isInfoEnabled() |
|
| 436 | - { |
|
| 437 | - $infoLevel = LoggerLevel::getLevelInfo(); |
|
| 438 | - if ($this->repository->isDisabled($infoLevel)) { |
|
| 439 | - return false; |
|
| 440 | - } |
|
| 441 | - return ($infoLevel->isGreaterOrEqual($this->getEffectiveLevel())); |
|
| 442 | - } |
|
| 430 | + /** |
|
| 431 | + * Check whether this category is enabled for the info Level. |
|
| 432 | + * @return boolean |
|
| 433 | + * @see LoggerLevel |
|
| 434 | + */ |
|
| 435 | + public function isInfoEnabled() |
|
| 436 | + { |
|
| 437 | + $infoLevel = LoggerLevel::getLevelInfo(); |
|
| 438 | + if ($this->repository->isDisabled($infoLevel)) { |
|
| 439 | + return false; |
|
| 440 | + } |
|
| 441 | + return ($infoLevel->isGreaterOrEqual($this->getEffectiveLevel())); |
|
| 442 | + } |
|
| 443 | 443 | |
| 444 | - /** |
|
| 445 | - * Log a localized and parameterized message. |
|
| 446 | - */ |
|
| 447 | - public function l7dlog($priority, $key, $params, $t) |
|
| 448 | - { |
|
| 449 | - return; |
|
| 450 | - } |
|
| 444 | + /** |
|
| 445 | + * Log a localized and parameterized message. |
|
| 446 | + */ |
|
| 447 | + public function l7dlog($priority, $key, $params, $t) |
|
| 448 | + { |
|
| 449 | + return; |
|
| 450 | + } |
|
| 451 | 451 | |
| 452 | - /** |
|
| 453 | - * This generic form is intended to be used by wrappers. |
|
| 454 | - * |
|
| 455 | - * @param LoggerLevel $priority a valid level |
|
| 456 | - * @param mixed $message message |
|
| 457 | - * @param mixed $caller caller object or caller string id |
|
| 458 | - */ |
|
| 459 | - public function log($priority, $message, $caller = null) |
|
| 460 | - { |
|
| 461 | - if ($this->repository->isDisabled($priority)) { |
|
| 462 | - return; |
|
| 463 | - } |
|
| 464 | - if ($priority->isGreaterOrEqual($this->getEffectiveLevel())) { |
|
| 465 | - $this->forcedLog($this->fqcn, $caller, $priority, $message); |
|
| 466 | - } |
|
| 467 | - } |
|
| 452 | + /** |
|
| 453 | + * This generic form is intended to be used by wrappers. |
|
| 454 | + * |
|
| 455 | + * @param LoggerLevel $priority a valid level |
|
| 456 | + * @param mixed $message message |
|
| 457 | + * @param mixed $caller caller object or caller string id |
|
| 458 | + */ |
|
| 459 | + public function log($priority, $message, $caller = null) |
|
| 460 | + { |
|
| 461 | + if ($this->repository->isDisabled($priority)) { |
|
| 462 | + return; |
|
| 463 | + } |
|
| 464 | + if ($priority->isGreaterOrEqual($this->getEffectiveLevel())) { |
|
| 465 | + $this->forcedLog($this->fqcn, $caller, $priority, $message); |
|
| 466 | + } |
|
| 467 | + } |
|
| 468 | 468 | |
| 469 | - /** |
|
| 470 | - * Remove all previously added appenders from this Category instance. |
|
| 471 | - */ |
|
| 472 | - public function removeAllAppenders() |
|
| 473 | - { |
|
| 474 | - $appenderNames = array_keys($this->aai); |
|
| 475 | - $enumAppenders = sizeof($appenderNames); |
|
| 476 | - for ($i = 0; $i < $enumAppenders; $i++) { |
|
| 477 | - $this->removeAppender($appenderNames[$i]); |
|
| 478 | - } |
|
| 479 | - } |
|
| 469 | + /** |
|
| 470 | + * Remove all previously added appenders from this Category instance. |
|
| 471 | + */ |
|
| 472 | + public function removeAllAppenders() |
|
| 473 | + { |
|
| 474 | + $appenderNames = array_keys($this->aai); |
|
| 475 | + $enumAppenders = sizeof($appenderNames); |
|
| 476 | + for ($i = 0; $i < $enumAppenders; $i++) { |
|
| 477 | + $this->removeAppender($appenderNames[$i]); |
|
| 478 | + } |
|
| 479 | + } |
|
| 480 | 480 | |
| 481 | - /** |
|
| 482 | - * Remove the appender passed as parameter form the list of appenders. |
|
| 483 | - * |
|
| 484 | - * @param mixed $appender can be an appender name or a {@link LoggerAppender} object |
|
| 485 | - */ |
|
| 486 | - public function removeAppender($appender) |
|
| 487 | - { |
|
| 488 | - if (is_a($appender, 'loggerappender')) { |
|
| 489 | - $appender->close(); |
|
| 490 | - unset($this->aai[$appender->getName()]); |
|
| 491 | - } elseif (is_string($appender) && isset($this->aai[$appender])) { |
|
| 492 | - $this->aai[$appender]->close(); |
|
| 493 | - unset($this->aai[$appender]); |
|
| 494 | - } |
|
| 495 | - } |
|
| 481 | + /** |
|
| 482 | + * Remove the appender passed as parameter form the list of appenders. |
|
| 483 | + * |
|
| 484 | + * @param mixed $appender can be an appender name or a {@link LoggerAppender} object |
|
| 485 | + */ |
|
| 486 | + public function removeAppender($appender) |
|
| 487 | + { |
|
| 488 | + if (is_a($appender, 'loggerappender')) { |
|
| 489 | + $appender->close(); |
|
| 490 | + unset($this->aai[$appender->getName()]); |
|
| 491 | + } elseif (is_string($appender) && isset($this->aai[$appender])) { |
|
| 492 | + $this->aai[$appender]->close(); |
|
| 493 | + unset($this->aai[$appender]); |
|
| 494 | + } |
|
| 495 | + } |
|
| 496 | 496 | |
| 497 | - /** |
|
| 498 | - * Set the additivity flag for this Category instance. |
|
| 499 | - * |
|
| 500 | - * @param boolean $additive |
|
| 501 | - */ |
|
| 502 | - public function setAdditivity($additive) |
|
| 503 | - { |
|
| 504 | - $this->additive = (bool)$additive; |
|
| 505 | - } |
|
| 497 | + /** |
|
| 498 | + * Set the additivity flag for this Category instance. |
|
| 499 | + * |
|
| 500 | + * @param boolean $additive |
|
| 501 | + */ |
|
| 502 | + public function setAdditivity($additive) |
|
| 503 | + { |
|
| 504 | + $this->additive = (bool)$additive; |
|
| 505 | + } |
|
| 506 | 506 | |
| 507 | - /** |
|
| 508 | - * @deprecated Please use {@link setLevel()} instead. |
|
| 509 | - * @see setLevel() |
|
| 510 | - */ |
|
| 511 | - public function setPriority($priority) |
|
| 512 | - { |
|
| 513 | - $this->setLevel($priority); |
|
| 514 | - } |
|
| 507 | + /** |
|
| 508 | + * @deprecated Please use {@link setLevel()} instead. |
|
| 509 | + * @see setLevel() |
|
| 510 | + */ |
|
| 511 | + public function setPriority($priority) |
|
| 512 | + { |
|
| 513 | + $this->setLevel($priority); |
|
| 514 | + } |
|
| 515 | 515 | |
| 516 | - /** |
|
| 517 | - * Only the Hiearchy class can set the hiearchy of a |
|
| 518 | - * category. |
|
| 519 | - * |
|
| 520 | - * @param LoggerHierarchy &$repository |
|
| 521 | - */ |
|
| 522 | - public function setHierarchy(&$repository) |
|
| 523 | - { |
|
| 524 | - $this->repository =& $repository; |
|
| 525 | - } |
|
| 516 | + /** |
|
| 517 | + * Only the Hiearchy class can set the hiearchy of a |
|
| 518 | + * category. |
|
| 519 | + * |
|
| 520 | + * @param LoggerHierarchy &$repository |
|
| 521 | + */ |
|
| 522 | + public function setHierarchy(&$repository) |
|
| 523 | + { |
|
| 524 | + $this->repository =& $repository; |
|
| 525 | + } |
|
| 526 | 526 | |
| 527 | - /** |
|
| 528 | - * Set the level of this Category. |
|
| 529 | - * |
|
| 530 | - * @param LoggerLevel $level a level string or a level costant |
|
| 531 | - */ |
|
| 532 | - public function setLevel($level) |
|
| 533 | - { |
|
| 534 | - $this->level = $level; |
|
| 535 | - } |
|
| 527 | + /** |
|
| 528 | + * Set the level of this Category. |
|
| 529 | + * |
|
| 530 | + * @param LoggerLevel $level a level string or a level costant |
|
| 531 | + */ |
|
| 532 | + public function setLevel($level) |
|
| 533 | + { |
|
| 534 | + $this->level = $level; |
|
| 535 | + } |
|
| 536 | 536 | |
| 537 | - /** |
|
| 538 | - * Set the resource bundle to be used with localized logging methods |
|
| 539 | - */ |
|
| 540 | - public function setResourceBundle($bundle) |
|
| 541 | - { |
|
| 542 | - return; |
|
| 543 | - } |
|
| 537 | + /** |
|
| 538 | + * Set the resource bundle to be used with localized logging methods |
|
| 539 | + */ |
|
| 540 | + public function setResourceBundle($bundle) |
|
| 541 | + { |
|
| 542 | + return; |
|
| 543 | + } |
|
| 544 | 544 | |
| 545 | - /** |
|
| 546 | - * @deprecated use {@link LoggerManager::shutdown()} instead. |
|
| 547 | - * @see LoggerManager::shutdown() |
|
| 548 | - */ |
|
| 549 | - public function shutdown() |
|
| 550 | - { |
|
| 551 | - LoggerManager::shutdown(); |
|
| 552 | - } |
|
| 545 | + /** |
|
| 546 | + * @deprecated use {@link LoggerManager::shutdown()} instead. |
|
| 547 | + * @see LoggerManager::shutdown() |
|
| 548 | + */ |
|
| 549 | + public function shutdown() |
|
| 550 | + { |
|
| 551 | + LoggerManager::shutdown(); |
|
| 552 | + } |
|
| 553 | 553 | |
| 554 | - /** |
|
| 555 | - * Log a message with the WARN level. |
|
| 556 | - * |
|
| 557 | - * @param mixed $message message |
|
| 558 | - * @param mixed $caller caller object or caller string id |
|
| 559 | - */ |
|
| 560 | - public function warn($message, $caller = null) |
|
| 561 | - { |
|
| 562 | - $warnLevel = LoggerLevel::getLevelWarn(); |
|
| 563 | - if ($this->repository->isDisabled($warnLevel)) { |
|
| 564 | - return; |
|
| 565 | - } |
|
| 566 | - if ($warnLevel->isGreaterOrEqual($this->getEffectiveLevel())) { |
|
| 567 | - $this->forcedLog($this->fqcn, $caller, $warnLevel, $message); |
|
| 568 | - } |
|
| 569 | - } |
|
| 554 | + /** |
|
| 555 | + * Log a message with the WARN level. |
|
| 556 | + * |
|
| 557 | + * @param mixed $message message |
|
| 558 | + * @param mixed $caller caller object or caller string id |
|
| 559 | + */ |
|
| 560 | + public function warn($message, $caller = null) |
|
| 561 | + { |
|
| 562 | + $warnLevel = LoggerLevel::getLevelWarn(); |
|
| 563 | + if ($this->repository->isDisabled($warnLevel)) { |
|
| 564 | + return; |
|
| 565 | + } |
|
| 566 | + if ($warnLevel->isGreaterOrEqual($this->getEffectiveLevel())) { |
|
| 567 | + $this->forcedLog($this->fqcn, $caller, $warnLevel, $message); |
|
| 568 | + } |
|
| 569 | + } |
|
| 570 | 570 | |
| 571 | 571 | } |
| 572 | 572 | ?> |
@@ -50,157 +50,157 @@ |
||
| 50 | 50 | */ |
| 51 | 51 | class LoggerXmlLayout extends LoggerLayout { |
| 52 | 52 | |
| 53 | - /** |
|
| 54 | - * The <b>LocationInfo</b> option takes a boolean value. By default, |
|
| 55 | - * it is set to false which means there will be no location |
|
| 56 | - * information output by this layout. If the the option is set to |
|
| 57 | - * true, then the file name and line number of the statement at the |
|
| 58 | - * origin of the log statement will be output. |
|
| 59 | - * @var boolean |
|
| 60 | - */ |
|
| 61 | - public $locationInfo = true; |
|
| 53 | + /** |
|
| 54 | + * The <b>LocationInfo</b> option takes a boolean value. By default, |
|
| 55 | + * it is set to false which means there will be no location |
|
| 56 | + * information output by this layout. If the the option is set to |
|
| 57 | + * true, then the file name and line number of the statement at the |
|
| 58 | + * origin of the log statement will be output. |
|
| 59 | + * @var boolean |
|
| 60 | + */ |
|
| 61 | + public $locationInfo = true; |
|
| 62 | 62 | |
| 63 | - /** |
|
| 64 | - * @var boolean set the elements namespace |
|
| 65 | - */ |
|
| 66 | - public $log4jNamespace = false; |
|
| 63 | + /** |
|
| 64 | + * @var boolean set the elements namespace |
|
| 65 | + */ |
|
| 66 | + public $log4jNamespace = false; |
|
| 67 | 67 | |
| 68 | 68 | |
| 69 | - /** |
|
| 70 | - * @var string namespace |
|
| 71 | - * @private |
|
| 72 | - */ |
|
| 73 | - public $_namespace = LOG4PHP_LOGGER_XML_LAYOUT_LOG4PHP_NS; |
|
| 69 | + /** |
|
| 70 | + * @var string namespace |
|
| 71 | + * @private |
|
| 72 | + */ |
|
| 73 | + public $_namespace = LOG4PHP_LOGGER_XML_LAYOUT_LOG4PHP_NS; |
|
| 74 | 74 | |
| 75 | - /** |
|
| 76 | - * @var string namespace prefix |
|
| 77 | - * @private |
|
| 78 | - */ |
|
| 79 | - public $_namespacePrefix = LOG4PHP_LOGGER_XML_LAYOUT_LOG4PHP_NS_PREFIX; |
|
| 75 | + /** |
|
| 76 | + * @var string namespace prefix |
|
| 77 | + * @private |
|
| 78 | + */ |
|
| 79 | + public $_namespacePrefix = LOG4PHP_LOGGER_XML_LAYOUT_LOG4PHP_NS_PREFIX; |
|
| 80 | 80 | |
| 81 | - /** |
|
| 82 | - * No options to activate. |
|
| 83 | - */ |
|
| 84 | - public function activateOptions() |
|
| 85 | - { |
|
| 86 | - if ($this->getLog4jNamespace()) { |
|
| 87 | - $this->_namespace = LOG4PHP_LOGGER_XML_LAYOUT_LOG4J_NS; |
|
| 88 | - $this->_namespacePrefix = LOG4PHP_LOGGER_XML_LAYOUT_LOG4J_NS_PREFIX; |
|
| 89 | - } else { |
|
| 90 | - $this->_namespace = LOG4PHP_LOGGER_XML_LAYOUT_LOG4PHP_NS; |
|
| 91 | - $this->_namespacePrefix = LOG4PHP_LOGGER_XML_LAYOUT_LOG4PHP_NS_PREFIX; |
|
| 92 | - } |
|
| 93 | - } |
|
| 81 | + /** |
|
| 82 | + * No options to activate. |
|
| 83 | + */ |
|
| 84 | + public function activateOptions() |
|
| 85 | + { |
|
| 86 | + if ($this->getLog4jNamespace()) { |
|
| 87 | + $this->_namespace = LOG4PHP_LOGGER_XML_LAYOUT_LOG4J_NS; |
|
| 88 | + $this->_namespacePrefix = LOG4PHP_LOGGER_XML_LAYOUT_LOG4J_NS_PREFIX; |
|
| 89 | + } else { |
|
| 90 | + $this->_namespace = LOG4PHP_LOGGER_XML_LAYOUT_LOG4PHP_NS; |
|
| 91 | + $this->_namespacePrefix = LOG4PHP_LOGGER_XML_LAYOUT_LOG4PHP_NS_PREFIX; |
|
| 92 | + } |
|
| 93 | + } |
|
| 94 | 94 | |
| 95 | - /** |
|
| 96 | - * @return string |
|
| 97 | - */ |
|
| 98 | - public function getHeader() |
|
| 99 | - { |
|
| 100 | - return "<{$this->_namespacePrefix}:eventSet ". |
|
| 101 | - "xmlns:{$this->_namespacePrefix}=\"{$this->_namespace}\" ". |
|
| 102 | - "version=\"0.3\" ". |
|
| 103 | - "includesLocationInfo=\"".($this->getLocationInfo() ? "true" : "false")."\"". |
|
| 104 | - ">\r\n"; |
|
| 105 | - } |
|
| 106 | - |
|
| 107 | - /** |
|
| 108 | - * Formats a {@link LoggerLoggingEvent} in conformance with the log4php.dtd. |
|
| 109 | - * |
|
| 110 | - * @param LoggerLoggingEvent $event |
|
| 111 | - * @return string |
|
| 112 | - */ |
|
| 113 | - public function format($event) |
|
| 114 | - { |
|
| 115 | - $loggerName = $event->getLoggerName(); |
|
| 116 | - $timeStamp = number_format((float)($event->getTimeStamp() * 1000), 0, '', ''); |
|
| 117 | - $thread = $event->getThreadName(); |
|
| 118 | - $level = $event->getLevel(); |
|
| 119 | - $levelStr = $level->toString(); |
|
| 120 | - |
|
| 121 | - $buf = "<{$this->_namespacePrefix}:event logger=\"{$loggerName}\" level=\"{$levelStr}\" thread=\"{$thread}\" timestamp=\"{$timeStamp}\">\r\n"; |
|
| 122 | - $buf .= "<{$this->_namespacePrefix}:message><![CDATA["; |
|
| 123 | - LoggerTransform::appendEscapingCDATA($buf, $event->getRenderedMessage()); |
|
| 124 | - $buf .= "]]></{$this->_namespacePrefix}:message>\r\n"; |
|
| 125 | - |
|
| 126 | - $ndc = $event->getNDC(); |
|
| 127 | - if($ndc !== null) { |
|
| 128 | - $buf .= "<{$this->_namespacePrefix}:NDC><![CDATA["; |
|
| 129 | - LoggerTransform::appendEscapingCDATA($buf, $ndc); |
|
| 130 | - $buf .= "]]></{$this->_namespacePrefix}:NDC>\r\n"; |
|
| 131 | - } |
|
| 132 | - |
|
| 133 | - if ($this->getLocationInfo()) { |
|
| 134 | - $locationInfo = $event->getLocationInformation(); |
|
| 135 | - $buf .= "<{$this->_namespacePrefix}:locationInfo ". |
|
| 136 | - "class=\"" . $locationInfo->getClassName() . "\" ". |
|
| 137 | - "file=\"" . htmlentities($locationInfo->getFileName(), ENT_QUOTES) . "\" ". |
|
| 138 | - "line=\"" . $locationInfo->getLineNumber() . "\" ". |
|
| 139 | - "method=\"" . $locationInfo->getMethodName() . "\" "; |
|
| 140 | - $buf .= "/>\r\n"; |
|
| 141 | - |
|
| 142 | - } |
|
| 143 | - |
|
| 144 | - $buf .= "</{$this->_namespacePrefix}:event>\r\n\r\n"; |
|
| 95 | + /** |
|
| 96 | + * @return string |
|
| 97 | + */ |
|
| 98 | + public function getHeader() |
|
| 99 | + { |
|
| 100 | + return "<{$this->_namespacePrefix}:eventSet ". |
|
| 101 | + "xmlns:{$this->_namespacePrefix}=\"{$this->_namespace}\" ". |
|
| 102 | + "version=\"0.3\" ". |
|
| 103 | + "includesLocationInfo=\"".($this->getLocationInfo() ? "true" : "false")."\"". |
|
| 104 | + ">\r\n"; |
|
| 105 | + } |
|
| 106 | + |
|
| 107 | + /** |
|
| 108 | + * Formats a {@link LoggerLoggingEvent} in conformance with the log4php.dtd. |
|
| 109 | + * |
|
| 110 | + * @param LoggerLoggingEvent $event |
|
| 111 | + * @return string |
|
| 112 | + */ |
|
| 113 | + public function format($event) |
|
| 114 | + { |
|
| 115 | + $loggerName = $event->getLoggerName(); |
|
| 116 | + $timeStamp = number_format((float)($event->getTimeStamp() * 1000), 0, '', ''); |
|
| 117 | + $thread = $event->getThreadName(); |
|
| 118 | + $level = $event->getLevel(); |
|
| 119 | + $levelStr = $level->toString(); |
|
| 120 | + |
|
| 121 | + $buf = "<{$this->_namespacePrefix}:event logger=\"{$loggerName}\" level=\"{$levelStr}\" thread=\"{$thread}\" timestamp=\"{$timeStamp}\">\r\n"; |
|
| 122 | + $buf .= "<{$this->_namespacePrefix}:message><![CDATA["; |
|
| 123 | + LoggerTransform::appendEscapingCDATA($buf, $event->getRenderedMessage()); |
|
| 124 | + $buf .= "]]></{$this->_namespacePrefix}:message>\r\n"; |
|
| 125 | + |
|
| 126 | + $ndc = $event->getNDC(); |
|
| 127 | + if($ndc !== null) { |
|
| 128 | + $buf .= "<{$this->_namespacePrefix}:NDC><![CDATA["; |
|
| 129 | + LoggerTransform::appendEscapingCDATA($buf, $ndc); |
|
| 130 | + $buf .= "]]></{$this->_namespacePrefix}:NDC>\r\n"; |
|
| 131 | + } |
|
| 132 | + |
|
| 133 | + if ($this->getLocationInfo()) { |
|
| 134 | + $locationInfo = $event->getLocationInformation(); |
|
| 135 | + $buf .= "<{$this->_namespacePrefix}:locationInfo ". |
|
| 136 | + "class=\"" . $locationInfo->getClassName() . "\" ". |
|
| 137 | + "file=\"" . htmlentities($locationInfo->getFileName(), ENT_QUOTES) . "\" ". |
|
| 138 | + "line=\"" . $locationInfo->getLineNumber() . "\" ". |
|
| 139 | + "method=\"" . $locationInfo->getMethodName() . "\" "; |
|
| 140 | + $buf .= "/>\r\n"; |
|
| 141 | + |
|
| 142 | + } |
|
| 143 | + |
|
| 144 | + $buf .= "</{$this->_namespacePrefix}:event>\r\n\r\n"; |
|
| 145 | 145 | |
| 146 | - return $buf; |
|
| 146 | + return $buf; |
|
| 147 | 147 | |
| 148 | - } |
|
| 148 | + } |
|
| 149 | 149 | |
| 150 | - /** |
|
| 151 | - * @return string |
|
| 152 | - */ |
|
| 153 | - public function getFooter() |
|
| 154 | - { |
|
| 155 | - |
|
| 156 | - return "</{$this->_namespacePrefix}:eventSet>\r\n"; |
|
| 157 | - } |
|
| 150 | + /** |
|
| 151 | + * @return string |
|
| 152 | + */ |
|
| 153 | + public function getFooter() |
|
| 154 | + { |
|
| 155 | + |
|
| 156 | + return "</{$this->_namespacePrefix}:eventSet>\r\n"; |
|
| 157 | + } |
|
| 158 | 158 | |
| 159 | - /** |
|
| 160 | - * @return boolean |
|
| 161 | - */ |
|
| 162 | - public function getLocationInfo() |
|
| 163 | - { |
|
| 164 | - return $this->locationInfo; |
|
| 165 | - } |
|
| 159 | + /** |
|
| 160 | + * @return boolean |
|
| 161 | + */ |
|
| 162 | + public function getLocationInfo() |
|
| 163 | + { |
|
| 164 | + return $this->locationInfo; |
|
| 165 | + } |
|
| 166 | 166 | |
| 167 | - /** |
|
| 168 | - * @return boolean |
|
| 169 | - */ |
|
| 170 | - public function getLog4jNamespace() |
|
| 171 | - { |
|
| 172 | - return $this->log4jNamespace; |
|
| 173 | - } |
|
| 174 | - |
|
| 175 | - /** |
|
| 176 | - * The XMLLayout prints and does not ignore exceptions. Hence the |
|
| 177 | - * return value <b>false</b>. |
|
| 178 | - * @return boolean |
|
| 179 | - */ |
|
| 180 | - public function ignoresThrowable() |
|
| 181 | - { |
|
| 182 | - return false; |
|
| 183 | - } |
|
| 167 | + /** |
|
| 168 | + * @return boolean |
|
| 169 | + */ |
|
| 170 | + public function getLog4jNamespace() |
|
| 171 | + { |
|
| 172 | + return $this->log4jNamespace; |
|
| 173 | + } |
|
| 174 | + |
|
| 175 | + /** |
|
| 176 | + * The XMLLayout prints and does not ignore exceptions. Hence the |
|
| 177 | + * return value <b>false</b>. |
|
| 178 | + * @return boolean |
|
| 179 | + */ |
|
| 180 | + public function ignoresThrowable() |
|
| 181 | + { |
|
| 182 | + return false; |
|
| 183 | + } |
|
| 184 | 184 | |
| 185 | - /** |
|
| 186 | - * The {@link $locationInfo} option takes a boolean value. By default, |
|
| 187 | - * it is set to false which means there will be no location |
|
| 188 | - * information output by this layout. If the the option is set to |
|
| 189 | - * true, then the file name and line number of the statement at the |
|
| 190 | - * origin of the log statement will be output. |
|
| 191 | - */ |
|
| 192 | - public function setLocationInfo($flag) |
|
| 193 | - { |
|
| 194 | - $this->locationInfo = LoggerOptionConverter::toBoolean($flag, true); |
|
| 195 | - } |
|
| 185 | + /** |
|
| 186 | + * The {@link $locationInfo} option takes a boolean value. By default, |
|
| 187 | + * it is set to false which means there will be no location |
|
| 188 | + * information output by this layout. If the the option is set to |
|
| 189 | + * true, then the file name and line number of the statement at the |
|
| 190 | + * origin of the log statement will be output. |
|
| 191 | + */ |
|
| 192 | + public function setLocationInfo($flag) |
|
| 193 | + { |
|
| 194 | + $this->locationInfo = LoggerOptionConverter::toBoolean($flag, true); |
|
| 195 | + } |
|
| 196 | 196 | |
| 197 | - /** |
|
| 198 | - * @param boolean |
|
| 199 | - */ |
|
| 200 | - public function setLog4jNamespace($flag) |
|
| 201 | - { |
|
| 202 | - $this->log4jNamespace = LoggerOptionConverter::toBoolean($flag, true); |
|
| 203 | - } |
|
| 197 | + /** |
|
| 198 | + * @param boolean |
|
| 199 | + */ |
|
| 200 | + public function setLog4jNamespace($flag) |
|
| 201 | + { |
|
| 202 | + $this->log4jNamespace = LoggerOptionConverter::toBoolean($flag, true); |
|
| 203 | + } |
|
| 204 | 204 | } |
| 205 | 205 | |
| 206 | 206 | ?> |
| 207 | 207 | \ No newline at end of file |
@@ -23,17 +23,17 @@ discard block |
||
| 23 | 23 | if (!defined('LOG4PHP_DIR')) define('LOG4PHP_DIR', dirname(__FILE__) . '/..'); |
| 24 | 24 | |
| 25 | 25 | if (!defined('LOG4PHP_LINE_SEP')) { |
| 26 | - if (substr(php_uname(), 0, 7) == "Windows") { |
|
| 27 | - /** |
|
| 28 | - * @ignore |
|
| 29 | - */ |
|
| 30 | - define('LOG4PHP_LINE_SEP', "\r\n"); |
|
| 31 | - } else { |
|
| 32 | - /** |
|
| 33 | - * @ignore |
|
| 34 | - */ |
|
| 35 | - define('LOG4PHP_LINE_SEP', "\n"); |
|
| 36 | - } |
|
| 26 | + if (substr(php_uname(), 0, 7) == "Windows") { |
|
| 27 | + /** |
|
| 28 | + * @ignore |
|
| 29 | + */ |
|
| 30 | + define('LOG4PHP_LINE_SEP', "\r\n"); |
|
| 31 | + } else { |
|
| 32 | + /** |
|
| 33 | + * @ignore |
|
| 34 | + */ |
|
| 35 | + define('LOG4PHP_LINE_SEP', "\n"); |
|
| 36 | + } |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | /** |
@@ -76,165 +76,165 @@ discard block |
||
| 76 | 76 | */ |
| 77 | 77 | class LoggerLayoutTTCC extends LoggerLayout { |
| 78 | 78 | |
| 79 | - // Internal representation of options |
|
| 80 | - public $threadPrinting = true; |
|
| 81 | - public $categoryPrefixing = true; |
|
| 82 | - public $contextPrinting = true; |
|
| 83 | - public $microSecondsPrinting = true; |
|
| 79 | + // Internal representation of options |
|
| 80 | + public $threadPrinting = true; |
|
| 81 | + public $categoryPrefixing = true; |
|
| 82 | + public $contextPrinting = true; |
|
| 83 | + public $microSecondsPrinting = true; |
|
| 84 | 84 | |
| 85 | - /** |
|
| 86 | - * @var string date format. See {@link PHP_MANUAL#strftime} for details |
|
| 87 | - */ |
|
| 88 | - public $dateFormat = '%c'; |
|
| 85 | + /** |
|
| 86 | + * @var string date format. See {@link PHP_MANUAL#strftime} for details |
|
| 87 | + */ |
|
| 88 | + public $dateFormat = '%c'; |
|
| 89 | 89 | |
| 90 | - /** |
|
| 91 | - * Constructor |
|
| 92 | - * |
|
| 93 | - * @param string date format |
|
| 94 | - * @see dateFormat |
|
| 95 | - */ |
|
| 96 | - public function LoggerLayoutTTCC($dateFormat = '') |
|
| 97 | - { |
|
| 98 | - if (!empty($dateFormat)) |
|
| 99 | - $this->dateFormat = $dateFormat; |
|
| 100 | - return; |
|
| 101 | - } |
|
| 90 | + /** |
|
| 91 | + * Constructor |
|
| 92 | + * |
|
| 93 | + * @param string date format |
|
| 94 | + * @see dateFormat |
|
| 95 | + */ |
|
| 96 | + public function LoggerLayoutTTCC($dateFormat = '') |
|
| 97 | + { |
|
| 98 | + if (!empty($dateFormat)) |
|
| 99 | + $this->dateFormat = $dateFormat; |
|
| 100 | + return; |
|
| 101 | + } |
|
| 102 | 102 | |
| 103 | - /** |
|
| 104 | - * The <b>ThreadPrinting</b> option specifies whether the name of the |
|
| 105 | - * current thread is part of log output or not. This is true by default. |
|
| 106 | - */ |
|
| 107 | - public function setThreadPrinting($threadPrinting) |
|
| 108 | - { |
|
| 103 | + /** |
|
| 104 | + * The <b>ThreadPrinting</b> option specifies whether the name of the |
|
| 105 | + * current thread is part of log output or not. This is true by default. |
|
| 106 | + */ |
|
| 107 | + public function setThreadPrinting($threadPrinting) |
|
| 108 | + { |
|
| 109 | 109 | |
| 110 | - $this->threadPrinting = is_bool($threadPrinting) ? |
|
| 111 | - $threadPrinting : |
|
| 112 | - (bool)(strtolower($threadPrinting) == 'true'); |
|
| 113 | - } |
|
| 110 | + $this->threadPrinting = is_bool($threadPrinting) ? |
|
| 111 | + $threadPrinting : |
|
| 112 | + (bool)(strtolower($threadPrinting) == 'true'); |
|
| 113 | + } |
|
| 114 | 114 | |
| 115 | - /** |
|
| 116 | - * @return boolean Returns value of the <b>ThreadPrinting</b> option. |
|
| 117 | - */ |
|
| 118 | - public function getThreadPrinting() { |
|
| 119 | - return $this->threadPrinting; |
|
| 120 | - } |
|
| 115 | + /** |
|
| 116 | + * @return boolean Returns value of the <b>ThreadPrinting</b> option. |
|
| 117 | + */ |
|
| 118 | + public function getThreadPrinting() { |
|
| 119 | + return $this->threadPrinting; |
|
| 120 | + } |
|
| 121 | 121 | |
| 122 | - /** |
|
| 123 | - * The <b>CategoryPrefixing</b> option specifies whether {@link Category} |
|
| 124 | - * name is part of log output or not. This is true by default. |
|
| 125 | - */ |
|
| 126 | - public function setCategoryPrefixing($categoryPrefixing) |
|
| 127 | - { |
|
| 128 | - $this->categoryPrefixing = is_bool($categoryPrefixing) ? |
|
| 129 | - $categoryPrefixing : |
|
| 130 | - (bool)(strtolower($categoryPrefixing) == 'true'); |
|
| 131 | - } |
|
| 122 | + /** |
|
| 123 | + * The <b>CategoryPrefixing</b> option specifies whether {@link Category} |
|
| 124 | + * name is part of log output or not. This is true by default. |
|
| 125 | + */ |
|
| 126 | + public function setCategoryPrefixing($categoryPrefixing) |
|
| 127 | + { |
|
| 128 | + $this->categoryPrefixing = is_bool($categoryPrefixing) ? |
|
| 129 | + $categoryPrefixing : |
|
| 130 | + (bool)(strtolower($categoryPrefixing) == 'true'); |
|
| 131 | + } |
|
| 132 | 132 | |
| 133 | - /** |
|
| 134 | - * @return boolean Returns value of the <b>CategoryPrefixing</b> option. |
|
| 135 | - */ |
|
| 136 | - public function getCategoryPrefixing() { |
|
| 137 | - return $this->categoryPrefixing; |
|
| 138 | - } |
|
| 133 | + /** |
|
| 134 | + * @return boolean Returns value of the <b>CategoryPrefixing</b> option. |
|
| 135 | + */ |
|
| 136 | + public function getCategoryPrefixing() { |
|
| 137 | + return $this->categoryPrefixing; |
|
| 138 | + } |
|
| 139 | 139 | |
| 140 | - /** |
|
| 141 | - * The <b>ContextPrinting</b> option specifies log output will include |
|
| 142 | - * the nested context information belonging to the current thread. |
|
| 143 | - * This is true by default. |
|
| 144 | - */ |
|
| 145 | - public function setContextPrinting($contextPrinting) { |
|
| 146 | - $this->contextPrinting = is_bool($contextPrinting) ? |
|
| 147 | - $contextPrinting : |
|
| 148 | - (bool)(strtolower($contextPrinting) == 'true'); |
|
| 149 | - } |
|
| 140 | + /** |
|
| 141 | + * The <b>ContextPrinting</b> option specifies log output will include |
|
| 142 | + * the nested context information belonging to the current thread. |
|
| 143 | + * This is true by default. |
|
| 144 | + */ |
|
| 145 | + public function setContextPrinting($contextPrinting) { |
|
| 146 | + $this->contextPrinting = is_bool($contextPrinting) ? |
|
| 147 | + $contextPrinting : |
|
| 148 | + (bool)(strtolower($contextPrinting) == 'true'); |
|
| 149 | + } |
|
| 150 | 150 | |
| 151 | - /** |
|
| 152 | - * @return boolean Returns value of the <b>ContextPrinting</b> option. |
|
| 153 | - */ |
|
| 154 | - public function getContextPrinting() |
|
| 155 | - { |
|
| 156 | - return $this->contextPrinting; |
|
| 157 | - } |
|
| 151 | + /** |
|
| 152 | + * @return boolean Returns value of the <b>ContextPrinting</b> option. |
|
| 153 | + */ |
|
| 154 | + public function getContextPrinting() |
|
| 155 | + { |
|
| 156 | + return $this->contextPrinting; |
|
| 157 | + } |
|
| 158 | 158 | |
| 159 | - /** |
|
| 160 | - * The <b>MicroSecondsPrinting</b> option specifies if microseconds infos |
|
| 161 | - * should be printed at the end of timestamp. |
|
| 162 | - * This is true by default. |
|
| 163 | - */ |
|
| 164 | - public function setMicroSecondsPrinting($microSecondsPrinting) { |
|
| 165 | - $this->microSecondsPrinting = is_bool($microSecondsPrinting) ? |
|
| 166 | - $microSecondsPrinting : |
|
| 167 | - (bool)(strtolower($microSecondsPrinting) == 'true'); |
|
| 168 | - } |
|
| 159 | + /** |
|
| 160 | + * The <b>MicroSecondsPrinting</b> option specifies if microseconds infos |
|
| 161 | + * should be printed at the end of timestamp. |
|
| 162 | + * This is true by default. |
|
| 163 | + */ |
|
| 164 | + public function setMicroSecondsPrinting($microSecondsPrinting) { |
|
| 165 | + $this->microSecondsPrinting = is_bool($microSecondsPrinting) ? |
|
| 166 | + $microSecondsPrinting : |
|
| 167 | + (bool)(strtolower($microSecondsPrinting) == 'true'); |
|
| 168 | + } |
|
| 169 | 169 | |
| 170 | - /** |
|
| 171 | - * @return boolean Returns value of the <b>MicroSecondsPrinting</b> option. |
|
| 172 | - */ |
|
| 173 | - public function getMicroSecondsPrinting() |
|
| 174 | - { |
|
| 175 | - return $this->microSecondsPrinting; |
|
| 176 | - } |
|
| 170 | + /** |
|
| 171 | + * @return boolean Returns value of the <b>MicroSecondsPrinting</b> option. |
|
| 172 | + */ |
|
| 173 | + public function getMicroSecondsPrinting() |
|
| 174 | + { |
|
| 175 | + return $this->microSecondsPrinting; |
|
| 176 | + } |
|
| 177 | 177 | |
| 178 | 178 | |
| 179 | - public function setDateFormat($dateFormat) |
|
| 180 | - { |
|
| 181 | - $this->dateFormat = $dateFormat; |
|
| 182 | - } |
|
| 179 | + public function setDateFormat($dateFormat) |
|
| 180 | + { |
|
| 181 | + $this->dateFormat = $dateFormat; |
|
| 182 | + } |
|
| 183 | 183 | |
| 184 | - /** |
|
| 185 | - * @return string |
|
| 186 | - */ |
|
| 187 | - public function getDateFormat() |
|
| 188 | - { |
|
| 189 | - return $this->dateFormat; |
|
| 190 | - } |
|
| 184 | + /** |
|
| 185 | + * @return string |
|
| 186 | + */ |
|
| 187 | + public function getDateFormat() |
|
| 188 | + { |
|
| 189 | + return $this->dateFormat; |
|
| 190 | + } |
|
| 191 | 191 | |
| 192 | - /** |
|
| 193 | - * In addition to the level of the statement and message, the |
|
| 194 | - * returned string includes time, thread, category. |
|
| 195 | - * <p>Time, thread, category are printed depending on options. |
|
| 196 | - * |
|
| 197 | - * @param LoggerLoggingEvent $event |
|
| 198 | - * @return string |
|
| 199 | - */ |
|
| 200 | - public function format($event) |
|
| 201 | - { |
|
| 202 | - $timeStamp = (float)$event->getTimeStamp(); |
|
| 203 | - $format = strftime($this->dateFormat, (int)$timeStamp); |
|
| 192 | + /** |
|
| 193 | + * In addition to the level of the statement and message, the |
|
| 194 | + * returned string includes time, thread, category. |
|
| 195 | + * <p>Time, thread, category are printed depending on options. |
|
| 196 | + * |
|
| 197 | + * @param LoggerLoggingEvent $event |
|
| 198 | + * @return string |
|
| 199 | + */ |
|
| 200 | + public function format($event) |
|
| 201 | + { |
|
| 202 | + $timeStamp = (float)$event->getTimeStamp(); |
|
| 203 | + $format = strftime($this->dateFormat, (int)$timeStamp); |
|
| 204 | 204 | |
| 205 | - if ($this->microSecondsPrinting) { |
|
| 206 | - $usecs = round(($timeStamp - (int)$timeStamp) * 1000); |
|
| 207 | - $format .= sprintf(',%03d', $usecs); |
|
| 208 | - } |
|
| 205 | + if ($this->microSecondsPrinting) { |
|
| 206 | + $usecs = round(($timeStamp - (int)$timeStamp) * 1000); |
|
| 207 | + $format .= sprintf(',%03d', $usecs); |
|
| 208 | + } |
|
| 209 | 209 | |
| 210 | - $format .= ' '; |
|
| 210 | + $format .= ' '; |
|
| 211 | 211 | |
| 212 | - if ($this->threadPrinting) |
|
| 213 | - $format .= '['.getmypid().'] '; |
|
| 212 | + if ($this->threadPrinting) |
|
| 213 | + $format .= '['.getmypid().'] '; |
|
| 214 | 214 | |
| 215 | - $level = $event->getLevel(); |
|
| 216 | - $format .= $level->toString().' '; |
|
| 215 | + $level = $event->getLevel(); |
|
| 216 | + $format .= $level->toString().' '; |
|
| 217 | 217 | |
| 218 | - if($this->categoryPrefixing) { |
|
| 219 | - $format .= $event->getLoggerName().' '; |
|
| 220 | - } |
|
| 218 | + if($this->categoryPrefixing) { |
|
| 219 | + $format .= $event->getLoggerName().' '; |
|
| 220 | + } |
|
| 221 | 221 | |
| 222 | - if($this->contextPrinting) { |
|
| 223 | - $ndc = $event->getNDC(); |
|
| 224 | - if($ndc !== null) { |
|
| 225 | - $format .= $ndc.' '; |
|
| 226 | - } |
|
| 227 | - } |
|
| 222 | + if($this->contextPrinting) { |
|
| 223 | + $ndc = $event->getNDC(); |
|
| 224 | + if($ndc !== null) { |
|
| 225 | + $format .= $ndc.' '; |
|
| 226 | + } |
|
| 227 | + } |
|
| 228 | 228 | |
| 229 | - $format .= '- '.$event->getRenderedMessage(); |
|
| 230 | - $format .= LOG4PHP_LINE_SEP; |
|
| 229 | + $format .= '- '.$event->getRenderedMessage(); |
|
| 230 | + $format .= LOG4PHP_LINE_SEP; |
|
| 231 | 231 | |
| 232 | - return $format; |
|
| 233 | - } |
|
| 232 | + return $format; |
|
| 233 | + } |
|
| 234 | 234 | |
| 235 | - public function ignoresThrowable() |
|
| 236 | - { |
|
| 237 | - return true; |
|
| 238 | - } |
|
| 235 | + public function ignoresThrowable() |
|
| 236 | + { |
|
| 237 | + return true; |
|
| 238 | + } |
|
| 239 | 239 | } |
| 240 | 240 | ?> |
| 241 | 241 | \ No newline at end of file |
@@ -23,17 +23,17 @@ discard block |
||
| 23 | 23 | if (!defined('LOG4PHP_DIR')) define('LOG4PHP_DIR', dirname(__FILE__) . '/..'); |
| 24 | 24 | |
| 25 | 25 | if (!defined('LOG4PHP_LINE_SEP')) { |
| 26 | - if (substr(php_uname(), 0, 7) == "Windows") { |
|
| 27 | - /** |
|
| 28 | - * @ignore |
|
| 29 | - */ |
|
| 30 | - define('LOG4PHP_LINE_SEP', "\r\n"); |
|
| 31 | - } else { |
|
| 32 | - /** |
|
| 33 | - * @ignore |
|
| 34 | - */ |
|
| 35 | - define('LOG4PHP_LINE_SEP', "\n"); |
|
| 36 | - } |
|
| 26 | + if (substr(php_uname(), 0, 7) == "Windows") { |
|
| 27 | + /** |
|
| 28 | + * @ignore |
|
| 29 | + */ |
|
| 30 | + define('LOG4PHP_LINE_SEP', "\r\n"); |
|
| 31 | + } else { |
|
| 32 | + /** |
|
| 33 | + * @ignore |
|
| 34 | + */ |
|
| 35 | + define('LOG4PHP_LINE_SEP', "\n"); |
|
| 36 | + } |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | /** |
@@ -53,204 +53,204 @@ discard block |
||
| 53 | 53 | */ |
| 54 | 54 | class LoggerLayoutHtml extends LoggerLayout { |
| 55 | 55 | |
| 56 | - /** |
|
| 57 | - * The <b>LocationInfo</b> option takes a boolean value. By |
|
| 58 | - * default, it is set to false which means there will be no location |
|
| 59 | - * information output by this layout. If the the option is set to |
|
| 60 | - * true, then the file name and line number of the statement |
|
| 61 | - * at the origin of the log statement will be output. |
|
| 62 | - * |
|
| 63 | - * <p>If you are embedding this layout within a {@link LoggerAppenderMail} |
|
| 64 | - * or a {@link LoggerAppenderMailEvent} then make sure to set the |
|
| 65 | - * <b>LocationInfo</b> option of that appender as well. |
|
| 66 | - * @var boolean |
|
| 67 | - */ |
|
| 68 | - public $locationInfo = false; |
|
| 56 | + /** |
|
| 57 | + * The <b>LocationInfo</b> option takes a boolean value. By |
|
| 58 | + * default, it is set to false which means there will be no location |
|
| 59 | + * information output by this layout. If the the option is set to |
|
| 60 | + * true, then the file name and line number of the statement |
|
| 61 | + * at the origin of the log statement will be output. |
|
| 62 | + * |
|
| 63 | + * <p>If you are embedding this layout within a {@link LoggerAppenderMail} |
|
| 64 | + * or a {@link LoggerAppenderMailEvent} then make sure to set the |
|
| 65 | + * <b>LocationInfo</b> option of that appender as well. |
|
| 66 | + * @var boolean |
|
| 67 | + */ |
|
| 68 | + public $locationInfo = false; |
|
| 69 | 69 | |
| 70 | - /** |
|
| 71 | - * The <b>Title</b> option takes a String value. This option sets the |
|
| 72 | - * document title of the generated HTML document. |
|
| 73 | - * Defaults to 'Log4php Log Messages'. |
|
| 74 | - * @var string |
|
| 75 | - */ |
|
| 76 | - public $title = "Log4php Log Messages"; |
|
| 70 | + /** |
|
| 71 | + * The <b>Title</b> option takes a String value. This option sets the |
|
| 72 | + * document title of the generated HTML document. |
|
| 73 | + * Defaults to 'Log4php Log Messages'. |
|
| 74 | + * @var string |
|
| 75 | + */ |
|
| 76 | + public $title = "Log4php Log Messages"; |
|
| 77 | 77 | |
| 78 | - /** |
|
| 79 | - * Constructor |
|
| 80 | - */ |
|
| 81 | - public function LoggerLayoutHtml() |
|
| 82 | - { |
|
| 83 | - return; |
|
| 84 | - } |
|
| 78 | + /** |
|
| 79 | + * Constructor |
|
| 80 | + */ |
|
| 81 | + public function LoggerLayoutHtml() |
|
| 82 | + { |
|
| 83 | + return; |
|
| 84 | + } |
|
| 85 | 85 | |
| 86 | - /** |
|
| 87 | - * The <b>LocationInfo</b> option takes a boolean value. By |
|
| 88 | - * default, it is set to false which means there will be no location |
|
| 89 | - * information output by this layout. If the the option is set to |
|
| 90 | - * true, then the file name and line number of the statement |
|
| 91 | - * at the origin of the log statement will be output. |
|
| 92 | - * |
|
| 93 | - * <p>If you are embedding this layout within a {@link LoggerAppenderMail} |
|
| 94 | - * or a {@link LoggerAppenderMailEvent} then make sure to set the |
|
| 95 | - * <b>LocationInfo</b> option of that appender as well. |
|
| 96 | - */ |
|
| 97 | - public function setLocationInfo($flag) |
|
| 98 | - { |
|
| 99 | - if (is_bool($flag)) { |
|
| 100 | - $this->locationInfo = $flag; |
|
| 101 | - } else { |
|
| 102 | - $this->locationInfo = (bool)(strtolower($flag) == 'true'); |
|
| 103 | - } |
|
| 104 | - } |
|
| 86 | + /** |
|
| 87 | + * The <b>LocationInfo</b> option takes a boolean value. By |
|
| 88 | + * default, it is set to false which means there will be no location |
|
| 89 | + * information output by this layout. If the the option is set to |
|
| 90 | + * true, then the file name and line number of the statement |
|
| 91 | + * at the origin of the log statement will be output. |
|
| 92 | + * |
|
| 93 | + * <p>If you are embedding this layout within a {@link LoggerAppenderMail} |
|
| 94 | + * or a {@link LoggerAppenderMailEvent} then make sure to set the |
|
| 95 | + * <b>LocationInfo</b> option of that appender as well. |
|
| 96 | + */ |
|
| 97 | + public function setLocationInfo($flag) |
|
| 98 | + { |
|
| 99 | + if (is_bool($flag)) { |
|
| 100 | + $this->locationInfo = $flag; |
|
| 101 | + } else { |
|
| 102 | + $this->locationInfo = (bool)(strtolower($flag) == 'true'); |
|
| 103 | + } |
|
| 104 | + } |
|
| 105 | 105 | |
| 106 | - /** |
|
| 107 | - * Returns the current value of the <b>LocationInfo</b> option. |
|
| 108 | - */ |
|
| 109 | - public function getLocationInfo() |
|
| 110 | - { |
|
| 111 | - return $this->locationInfo; |
|
| 112 | - } |
|
| 106 | + /** |
|
| 107 | + * Returns the current value of the <b>LocationInfo</b> option. |
|
| 108 | + */ |
|
| 109 | + public function getLocationInfo() |
|
| 110 | + { |
|
| 111 | + return $this->locationInfo; |
|
| 112 | + } |
|
| 113 | 113 | |
| 114 | - /** |
|
| 115 | - * The <b>Title</b> option takes a String value. This option sets the |
|
| 116 | - * document title of the generated HTML document. |
|
| 117 | - * Defaults to 'Log4php Log Messages'. |
|
| 118 | - */ |
|
| 119 | - public function setTitle($title) |
|
| 120 | - { |
|
| 121 | - $this->title = $title; |
|
| 122 | - } |
|
| 114 | + /** |
|
| 115 | + * The <b>Title</b> option takes a String value. This option sets the |
|
| 116 | + * document title of the generated HTML document. |
|
| 117 | + * Defaults to 'Log4php Log Messages'. |
|
| 118 | + */ |
|
| 119 | + public function setTitle($title) |
|
| 120 | + { |
|
| 121 | + $this->title = $title; |
|
| 122 | + } |
|
| 123 | 123 | |
| 124 | - /** |
|
| 125 | - * @return string Returns the current value of the <b>Title</b> option. |
|
| 126 | - */ |
|
| 127 | - public function getTitle() |
|
| 128 | - { |
|
| 129 | - return $this->title; |
|
| 130 | - } |
|
| 124 | + /** |
|
| 125 | + * @return string Returns the current value of the <b>Title</b> option. |
|
| 126 | + */ |
|
| 127 | + public function getTitle() |
|
| 128 | + { |
|
| 129 | + return $this->title; |
|
| 130 | + } |
|
| 131 | 131 | |
| 132 | - /** |
|
| 133 | - * @return string Returns the content type output by this layout, i.e "text/html". |
|
| 134 | - */ |
|
| 135 | - public function getContentType() |
|
| 136 | - { |
|
| 137 | - return "text/html"; |
|
| 138 | - } |
|
| 132 | + /** |
|
| 133 | + * @return string Returns the content type output by this layout, i.e "text/html". |
|
| 134 | + */ |
|
| 135 | + public function getContentType() |
|
| 136 | + { |
|
| 137 | + return "text/html"; |
|
| 138 | + } |
|
| 139 | 139 | |
| 140 | - /** |
|
| 141 | - * No options to activate. |
|
| 142 | - */ |
|
| 143 | - public function activateOptions() |
|
| 144 | - { |
|
| 145 | - return true; |
|
| 146 | - } |
|
| 140 | + /** |
|
| 141 | + * No options to activate. |
|
| 142 | + */ |
|
| 143 | + public function activateOptions() |
|
| 144 | + { |
|
| 145 | + return true; |
|
| 146 | + } |
|
| 147 | 147 | |
| 148 | - /** |
|
| 149 | - * @param LoggerLoggingEvent $event |
|
| 150 | - * @return string |
|
| 151 | - */ |
|
| 152 | - public function format($event) |
|
| 153 | - { |
|
| 154 | - $sbuf = LOG4PHP_LINE_SEP . "<tr>" . LOG4PHP_LINE_SEP; |
|
| 148 | + /** |
|
| 149 | + * @param LoggerLoggingEvent $event |
|
| 150 | + * @return string |
|
| 151 | + */ |
|
| 152 | + public function format($event) |
|
| 153 | + { |
|
| 154 | + $sbuf = LOG4PHP_LINE_SEP . "<tr>" . LOG4PHP_LINE_SEP; |
|
| 155 | 155 | |
| 156 | - $sbuf .= "<td>"; |
|
| 156 | + $sbuf .= "<td>"; |
|
| 157 | 157 | |
| 158 | - $eventTime = (float)$event->getTimeStamp(); |
|
| 159 | - $eventStartTime = (float)LoggerLoggingEvent::getStartTime(); |
|
| 160 | - $sbuf .= number_format(($eventTime - $eventStartTime) * 1000, 0, '', ''); |
|
| 161 | - $sbuf .= "</td>" . LOG4PHP_LINE_SEP; |
|
| 158 | + $eventTime = (float)$event->getTimeStamp(); |
|
| 159 | + $eventStartTime = (float)LoggerLoggingEvent::getStartTime(); |
|
| 160 | + $sbuf .= number_format(($eventTime - $eventStartTime) * 1000, 0, '', ''); |
|
| 161 | + $sbuf .= "</td>" . LOG4PHP_LINE_SEP; |
|
| 162 | 162 | |
| 163 | - $sbuf .= "<td title=\"" . $event->getThreadName() . " thread\">"; |
|
| 164 | - $sbuf .= $event->getThreadName(); |
|
| 165 | - $sbuf .= "</td>" . LOG4PHP_LINE_SEP; |
|
| 163 | + $sbuf .= "<td title=\"" . $event->getThreadName() . " thread\">"; |
|
| 164 | + $sbuf .= $event->getThreadName(); |
|
| 165 | + $sbuf .= "</td>" . LOG4PHP_LINE_SEP; |
|
| 166 | 166 | |
| 167 | - $sbuf .= "<td title=\"Level\">"; |
|
| 167 | + $sbuf .= "<td title=\"Level\">"; |
|
| 168 | 168 | |
| 169 | - $level = $event->getLevel(); |
|
| 169 | + $level = $event->getLevel(); |
|
| 170 | 170 | |
| 171 | - if ($level->equals(LoggerLevel::getLevelDebug())) { |
|
| 172 | - $sbuf .= "<font color=\"#339933\">"; |
|
| 173 | - $sbuf .= $level->toString(); |
|
| 174 | - $sbuf .= "</font>"; |
|
| 175 | - }elseif($level->equals(LoggerLevel::getLevelWarn())) { |
|
| 176 | - $sbuf .= "<font color=\"#993300\"><strong>"; |
|
| 177 | - $sbuf .= $level->toString(); |
|
| 178 | - $sbuf .= "</strong></font>"; |
|
| 179 | - } else { |
|
| 180 | - $sbuf .= $level->toString(); |
|
| 181 | - } |
|
| 182 | - $sbuf .= "</td>" . LOG4PHP_LINE_SEP; |
|
| 171 | + if ($level->equals(LoggerLevel::getLevelDebug())) { |
|
| 172 | + $sbuf .= "<font color=\"#339933\">"; |
|
| 173 | + $sbuf .= $level->toString(); |
|
| 174 | + $sbuf .= "</font>"; |
|
| 175 | + }elseif($level->equals(LoggerLevel::getLevelWarn())) { |
|
| 176 | + $sbuf .= "<font color=\"#993300\"><strong>"; |
|
| 177 | + $sbuf .= $level->toString(); |
|
| 178 | + $sbuf .= "</strong></font>"; |
|
| 179 | + } else { |
|
| 180 | + $sbuf .= $level->toString(); |
|
| 181 | + } |
|
| 182 | + $sbuf .= "</td>" . LOG4PHP_LINE_SEP; |
|
| 183 | 183 | |
| 184 | - $sbuf .= "<td title=\"" . htmlentities($event->getLoggerName(), ENT_QUOTES) . " category\">"; |
|
| 185 | - $sbuf .= htmlentities($event->getLoggerName(), ENT_QUOTES); |
|
| 186 | - $sbuf .= "</td>" . LOG4PHP_LINE_SEP; |
|
| 184 | + $sbuf .= "<td title=\"" . htmlentities($event->getLoggerName(), ENT_QUOTES) . " category\">"; |
|
| 185 | + $sbuf .= htmlentities($event->getLoggerName(), ENT_QUOTES); |
|
| 186 | + $sbuf .= "</td>" . LOG4PHP_LINE_SEP; |
|
| 187 | 187 | |
| 188 | - if ($this->locationInfo) { |
|
| 189 | - $locInfo = $event->getLocationInformation(); |
|
| 190 | - $sbuf .= "<td>"; |
|
| 191 | - $sbuf .= htmlentities($locInfo->getFileName(), ENT_QUOTES). ':' . $locInfo->getLineNumber(); |
|
| 192 | - $sbuf .= "</td>" . LOG4PHP_LINE_SEP; |
|
| 193 | - } |
|
| 188 | + if ($this->locationInfo) { |
|
| 189 | + $locInfo = $event->getLocationInformation(); |
|
| 190 | + $sbuf .= "<td>"; |
|
| 191 | + $sbuf .= htmlentities($locInfo->getFileName(), ENT_QUOTES). ':' . $locInfo->getLineNumber(); |
|
| 192 | + $sbuf .= "</td>" . LOG4PHP_LINE_SEP; |
|
| 193 | + } |
|
| 194 | 194 | |
| 195 | - $sbuf .= "<td title=\"Message\">"; |
|
| 196 | - $sbuf .= htmlentities($event->getRenderedMessage(), ENT_QUOTES); |
|
| 197 | - $sbuf .= "</td>" . LOG4PHP_LINE_SEP; |
|
| 195 | + $sbuf .= "<td title=\"Message\">"; |
|
| 196 | + $sbuf .= htmlentities($event->getRenderedMessage(), ENT_QUOTES); |
|
| 197 | + $sbuf .= "</td>" . LOG4PHP_LINE_SEP; |
|
| 198 | 198 | |
| 199 | - $sbuf .= "</tr>" . LOG4PHP_LINE_SEP; |
|
| 199 | + $sbuf .= "</tr>" . LOG4PHP_LINE_SEP; |
|
| 200 | 200 | |
| 201 | - if ($event->getNDC() !== null) { |
|
| 202 | - $sbuf .= "<tr><td bgcolor=\"#EEEEEE\" style=\"font-size : xx-small;\" colspan=\"6\" title=\"Nested Diagnostic Context\">"; |
|
| 203 | - $sbuf .= "NDC: " . htmlentities($event->getNDC(), ENT_QUOTES); |
|
| 204 | - $sbuf .= "</td></tr>" . LOG4PHP_LINE_SEP; |
|
| 205 | - } |
|
| 201 | + if ($event->getNDC() !== null) { |
|
| 202 | + $sbuf .= "<tr><td bgcolor=\"#EEEEEE\" style=\"font-size : xx-small;\" colspan=\"6\" title=\"Nested Diagnostic Context\">"; |
|
| 203 | + $sbuf .= "NDC: " . htmlentities($event->getNDC(), ENT_QUOTES); |
|
| 204 | + $sbuf .= "</td></tr>" . LOG4PHP_LINE_SEP; |
|
| 205 | + } |
|
| 206 | 206 | |
| 207 | - return $sbuf; |
|
| 208 | - } |
|
| 207 | + return $sbuf; |
|
| 208 | + } |
|
| 209 | 209 | |
| 210 | - /** |
|
| 211 | - * @return string Returns appropriate HTML headers. |
|
| 212 | - */ |
|
| 213 | - public function getHeader() |
|
| 214 | - { |
|
| 215 | - $sbuf = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">" . LOG4PHP_LINE_SEP; |
|
| 216 | - $sbuf .= "<html>" . LOG4PHP_LINE_SEP; |
|
| 217 | - $sbuf .= "<head>" . LOG4PHP_LINE_SEP; |
|
| 218 | - $sbuf .= "<title>" . $this->title . "</title>" . LOG4PHP_LINE_SEP; |
|
| 219 | - $sbuf .= "<style type=\"text/css\">" . LOG4PHP_LINE_SEP; |
|
| 220 | - $sbuf .= "<!--" . LOG4PHP_LINE_SEP; |
|
| 221 | - $sbuf .= "body, table {font-family: arial,sans-serif; font-size: x-small;}" . LOG4PHP_LINE_SEP; |
|
| 222 | - $sbuf .= "th {background: #336699; color: #FFFFFF; text-align: left;}" . LOG4PHP_LINE_SEP; |
|
| 223 | - $sbuf .= "-->" . LOG4PHP_LINE_SEP; |
|
| 224 | - $sbuf .= "</style>" . LOG4PHP_LINE_SEP; |
|
| 225 | - $sbuf .= "</head>" . LOG4PHP_LINE_SEP; |
|
| 226 | - $sbuf .= "<body bgcolor=\"#FFFFFF\" topmargin=\"6\" leftmargin=\"6\">" . LOG4PHP_LINE_SEP; |
|
| 227 | - $sbuf .= "<hr size=\"1\" noshade>" . LOG4PHP_LINE_SEP; |
|
| 228 | - $sbuf .= "Log session start time " . strftime('%c', time()) . "<br>" . LOG4PHP_LINE_SEP; |
|
| 229 | - $sbuf .= "<br>" . LOG4PHP_LINE_SEP; |
|
| 230 | - $sbuf .= "<table cellspacing=\"0\" cellpadding=\"4\" border=\"1\" bordercolor=\"#224466\" width=\"100%\">" . LOG4PHP_LINE_SEP; |
|
| 231 | - $sbuf .= "<tr>" . LOG4PHP_LINE_SEP; |
|
| 232 | - $sbuf .= "<th>Time</th>" . LOG4PHP_LINE_SEP; |
|
| 233 | - $sbuf .= "<th>Thread</th>" . LOG4PHP_LINE_SEP; |
|
| 234 | - $sbuf .= "<th>Level</th>" . LOG4PHP_LINE_SEP; |
|
| 235 | - $sbuf .= "<th>Category</th>" . LOG4PHP_LINE_SEP; |
|
| 236 | - if ($this->locationInfo) |
|
| 237 | - $sbuf .= "<th>File:Line</th>" . LOG4PHP_LINE_SEP; |
|
| 238 | - $sbuf .= "<th>Message</th>" . LOG4PHP_LINE_SEP; |
|
| 239 | - $sbuf .= "</tr>" . LOG4PHP_LINE_SEP; |
|
| 210 | + /** |
|
| 211 | + * @return string Returns appropriate HTML headers. |
|
| 212 | + */ |
|
| 213 | + public function getHeader() |
|
| 214 | + { |
|
| 215 | + $sbuf = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">" . LOG4PHP_LINE_SEP; |
|
| 216 | + $sbuf .= "<html>" . LOG4PHP_LINE_SEP; |
|
| 217 | + $sbuf .= "<head>" . LOG4PHP_LINE_SEP; |
|
| 218 | + $sbuf .= "<title>" . $this->title . "</title>" . LOG4PHP_LINE_SEP; |
|
| 219 | + $sbuf .= "<style type=\"text/css\">" . LOG4PHP_LINE_SEP; |
|
| 220 | + $sbuf .= "<!--" . LOG4PHP_LINE_SEP; |
|
| 221 | + $sbuf .= "body, table {font-family: arial,sans-serif; font-size: x-small;}" . LOG4PHP_LINE_SEP; |
|
| 222 | + $sbuf .= "th {background: #336699; color: #FFFFFF; text-align: left;}" . LOG4PHP_LINE_SEP; |
|
| 223 | + $sbuf .= "-->" . LOG4PHP_LINE_SEP; |
|
| 224 | + $sbuf .= "</style>" . LOG4PHP_LINE_SEP; |
|
| 225 | + $sbuf .= "</head>" . LOG4PHP_LINE_SEP; |
|
| 226 | + $sbuf .= "<body bgcolor=\"#FFFFFF\" topmargin=\"6\" leftmargin=\"6\">" . LOG4PHP_LINE_SEP; |
|
| 227 | + $sbuf .= "<hr size=\"1\" noshade>" . LOG4PHP_LINE_SEP; |
|
| 228 | + $sbuf .= "Log session start time " . strftime('%c', time()) . "<br>" . LOG4PHP_LINE_SEP; |
|
| 229 | + $sbuf .= "<br>" . LOG4PHP_LINE_SEP; |
|
| 230 | + $sbuf .= "<table cellspacing=\"0\" cellpadding=\"4\" border=\"1\" bordercolor=\"#224466\" width=\"100%\">" . LOG4PHP_LINE_SEP; |
|
| 231 | + $sbuf .= "<tr>" . LOG4PHP_LINE_SEP; |
|
| 232 | + $sbuf .= "<th>Time</th>" . LOG4PHP_LINE_SEP; |
|
| 233 | + $sbuf .= "<th>Thread</th>" . LOG4PHP_LINE_SEP; |
|
| 234 | + $sbuf .= "<th>Level</th>" . LOG4PHP_LINE_SEP; |
|
| 235 | + $sbuf .= "<th>Category</th>" . LOG4PHP_LINE_SEP; |
|
| 236 | + if ($this->locationInfo) |
|
| 237 | + $sbuf .= "<th>File:Line</th>" . LOG4PHP_LINE_SEP; |
|
| 238 | + $sbuf .= "<th>Message</th>" . LOG4PHP_LINE_SEP; |
|
| 239 | + $sbuf .= "</tr>" . LOG4PHP_LINE_SEP; |
|
| 240 | 240 | |
| 241 | - return $sbuf; |
|
| 242 | - } |
|
| 241 | + return $sbuf; |
|
| 242 | + } |
|
| 243 | 243 | |
| 244 | - /** |
|
| 245 | - * @return string Returns the appropriate HTML footers. |
|
| 246 | - */ |
|
| 247 | - public function getFooter() |
|
| 248 | - { |
|
| 249 | - $sbuf = "</table>" . LOG4PHP_LINE_SEP; |
|
| 250 | - $sbuf .= "<br>" . LOG4PHP_LINE_SEP; |
|
| 251 | - $sbuf .= "</body></html>"; |
|
| 244 | + /** |
|
| 245 | + * @return string Returns the appropriate HTML footers. |
|
| 246 | + */ |
|
| 247 | + public function getFooter() |
|
| 248 | + { |
|
| 249 | + $sbuf = "</table>" . LOG4PHP_LINE_SEP; |
|
| 250 | + $sbuf .= "<br>" . LOG4PHP_LINE_SEP; |
|
| 251 | + $sbuf .= "</body></html>"; |
|
| 252 | 252 | |
| 253 | - return $sbuf; |
|
| 254 | - } |
|
| 253 | + return $sbuf; |
|
| 254 | + } |
|
| 255 | 255 | } |
| 256 | 256 | ?> |
| 257 | 257 | \ No newline at end of file |
@@ -17,52 +17,52 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | class Smarty_Data extends Smarty_Internal_Data |
| 19 | 19 | { |
| 20 | - /** |
|
| 21 | - * Counter |
|
| 22 | - * |
|
| 23 | - * @var int |
|
| 24 | - */ |
|
| 25 | - static $count = 0; |
|
| 20 | + /** |
|
| 21 | + * Counter |
|
| 22 | + * |
|
| 23 | + * @var int |
|
| 24 | + */ |
|
| 25 | + static $count = 0; |
|
| 26 | 26 | |
| 27 | - /** |
|
| 28 | - * Data block name |
|
| 29 | - * |
|
| 30 | - * @var string |
|
| 31 | - */ |
|
| 32 | - public $dataObjectName = ''; |
|
| 27 | + /** |
|
| 28 | + * Data block name |
|
| 29 | + * |
|
| 30 | + * @var string |
|
| 31 | + */ |
|
| 32 | + public $dataObjectName = ''; |
|
| 33 | 33 | |
| 34 | - /** |
|
| 35 | - * Smarty object |
|
| 36 | - * |
|
| 37 | - * @var Smarty |
|
| 38 | - */ |
|
| 39 | - public $smarty = null; |
|
| 34 | + /** |
|
| 35 | + * Smarty object |
|
| 36 | + * |
|
| 37 | + * @var Smarty |
|
| 38 | + */ |
|
| 39 | + public $smarty = null; |
|
| 40 | 40 | |
| 41 | - /** |
|
| 42 | - * create Smarty data object |
|
| 43 | - * |
|
| 44 | - * @param Smarty|array $_parent parent template |
|
| 45 | - * @param Smarty|Smarty_Internal_Template $smarty global smarty instance |
|
| 46 | - * @param string $name optional data block name |
|
| 47 | - * |
|
| 48 | - * @throws SmartyException |
|
| 49 | - */ |
|
| 50 | - public function __construct($_parent = null, $smarty = null, $name = null) |
|
| 51 | - { |
|
| 52 | - parent::__construct(); |
|
| 53 | - self::$count ++; |
|
| 54 | - $this->dataObjectName = 'Data_object ' . (isset($name) ? "'{$name}'" : self::$count); |
|
| 55 | - $this->smarty = $smarty; |
|
| 56 | - if (is_object($_parent)) { |
|
| 57 | - // when object set up back pointer |
|
| 58 | - $this->parent = $_parent; |
|
| 59 | - } elseif (is_array($_parent)) { |
|
| 60 | - // set up variable values |
|
| 61 | - foreach ($_parent as $_key => $_val) { |
|
| 62 | - $this->tpl_vars[ $_key ] = new Smarty_Variable($_val); |
|
| 63 | - } |
|
| 64 | - } elseif ($_parent !== null) { |
|
| 65 | - throw new SmartyException("Wrong type for template variables"); |
|
| 66 | - } |
|
| 67 | - } |
|
| 41 | + /** |
|
| 42 | + * create Smarty data object |
|
| 43 | + * |
|
| 44 | + * @param Smarty|array $_parent parent template |
|
| 45 | + * @param Smarty|Smarty_Internal_Template $smarty global smarty instance |
|
| 46 | + * @param string $name optional data block name |
|
| 47 | + * |
|
| 48 | + * @throws SmartyException |
|
| 49 | + */ |
|
| 50 | + public function __construct($_parent = null, $smarty = null, $name = null) |
|
| 51 | + { |
|
| 52 | + parent::__construct(); |
|
| 53 | + self::$count ++; |
|
| 54 | + $this->dataObjectName = 'Data_object ' . (isset($name) ? "'{$name}'" : self::$count); |
|
| 55 | + $this->smarty = $smarty; |
|
| 56 | + if (is_object($_parent)) { |
|
| 57 | + // when object set up back pointer |
|
| 58 | + $this->parent = $_parent; |
|
| 59 | + } elseif (is_array($_parent)) { |
|
| 60 | + // set up variable values |
|
| 61 | + foreach ($_parent as $_key => $_val) { |
|
| 62 | + $this->tpl_vars[ $_key ] = new Smarty_Variable($_val); |
|
| 63 | + } |
|
| 64 | + } elseif ($_parent !== null) { |
|
| 65 | + throw new SmartyException("Wrong type for template variables"); |
|
| 66 | + } |
|
| 67 | + } |
|
| 68 | 68 | } |
@@ -2,75 +2,75 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | class TP_yyToken implements ArrayAccess |
| 4 | 4 | { |
| 5 | - public $string = ''; |
|
| 6 | - |
|
| 7 | - public $metadata = array(); |
|
| 8 | - |
|
| 9 | - public function __construct($s, $m = array()) |
|
| 10 | - { |
|
| 11 | - if ($s instanceof TP_yyToken) { |
|
| 12 | - $this->string = $s->string; |
|
| 13 | - $this->metadata = $s->metadata; |
|
| 14 | - } else { |
|
| 15 | - $this->string = (string) $s; |
|
| 16 | - if ($m instanceof TP_yyToken) { |
|
| 17 | - $this->metadata = $m->metadata; |
|
| 18 | - } elseif (is_array($m)) { |
|
| 19 | - $this->metadata = $m; |
|
| 20 | - } |
|
| 21 | - } |
|
| 22 | - } |
|
| 23 | - |
|
| 24 | - public function __toString() |
|
| 25 | - { |
|
| 26 | - return $this->string; |
|
| 27 | - } |
|
| 28 | - |
|
| 29 | - public function offsetExists($offset) |
|
| 30 | - { |
|
| 31 | - return isset($this->metadata[ $offset ]); |
|
| 32 | - } |
|
| 33 | - |
|
| 34 | - public function offsetGet($offset) |
|
| 35 | - { |
|
| 36 | - return $this->metadata[ $offset ]; |
|
| 37 | - } |
|
| 38 | - |
|
| 39 | - public function offsetSet($offset, $value) |
|
| 40 | - { |
|
| 41 | - if ($offset === null) { |
|
| 42 | - if (isset($value[ 0 ])) { |
|
| 43 | - $x = ($value instanceof TP_yyToken) ? $value->metadata : $value; |
|
| 44 | - $this->metadata = array_merge($this->metadata, $x); |
|
| 45 | - |
|
| 46 | - return; |
|
| 47 | - } |
|
| 48 | - $offset = count($this->metadata); |
|
| 49 | - } |
|
| 50 | - if ($value === null) { |
|
| 51 | - return; |
|
| 52 | - } |
|
| 53 | - if ($value instanceof TP_yyToken) { |
|
| 54 | - if ($value->metadata) { |
|
| 55 | - $this->metadata[ $offset ] = $value->metadata; |
|
| 56 | - } |
|
| 57 | - } elseif ($value) { |
|
| 58 | - $this->metadata[ $offset ] = $value; |
|
| 59 | - } |
|
| 60 | - } |
|
| 61 | - |
|
| 62 | - public function offsetUnset($offset) |
|
| 63 | - { |
|
| 64 | - unset($this->metadata[ $offset ]); |
|
| 65 | - } |
|
| 5 | + public $string = ''; |
|
| 6 | + |
|
| 7 | + public $metadata = array(); |
|
| 8 | + |
|
| 9 | + public function __construct($s, $m = array()) |
|
| 10 | + { |
|
| 11 | + if ($s instanceof TP_yyToken) { |
|
| 12 | + $this->string = $s->string; |
|
| 13 | + $this->metadata = $s->metadata; |
|
| 14 | + } else { |
|
| 15 | + $this->string = (string) $s; |
|
| 16 | + if ($m instanceof TP_yyToken) { |
|
| 17 | + $this->metadata = $m->metadata; |
|
| 18 | + } elseif (is_array($m)) { |
|
| 19 | + $this->metadata = $m; |
|
| 20 | + } |
|
| 21 | + } |
|
| 22 | + } |
|
| 23 | + |
|
| 24 | + public function __toString() |
|
| 25 | + { |
|
| 26 | + return $this->string; |
|
| 27 | + } |
|
| 28 | + |
|
| 29 | + public function offsetExists($offset) |
|
| 30 | + { |
|
| 31 | + return isset($this->metadata[ $offset ]); |
|
| 32 | + } |
|
| 33 | + |
|
| 34 | + public function offsetGet($offset) |
|
| 35 | + { |
|
| 36 | + return $this->metadata[ $offset ]; |
|
| 37 | + } |
|
| 38 | + |
|
| 39 | + public function offsetSet($offset, $value) |
|
| 40 | + { |
|
| 41 | + if ($offset === null) { |
|
| 42 | + if (isset($value[ 0 ])) { |
|
| 43 | + $x = ($value instanceof TP_yyToken) ? $value->metadata : $value; |
|
| 44 | + $this->metadata = array_merge($this->metadata, $x); |
|
| 45 | + |
|
| 46 | + return; |
|
| 47 | + } |
|
| 48 | + $offset = count($this->metadata); |
|
| 49 | + } |
|
| 50 | + if ($value === null) { |
|
| 51 | + return; |
|
| 52 | + } |
|
| 53 | + if ($value instanceof TP_yyToken) { |
|
| 54 | + if ($value->metadata) { |
|
| 55 | + $this->metadata[ $offset ] = $value->metadata; |
|
| 56 | + } |
|
| 57 | + } elseif ($value) { |
|
| 58 | + $this->metadata[ $offset ] = $value; |
|
| 59 | + } |
|
| 60 | + } |
|
| 61 | + |
|
| 62 | + public function offsetUnset($offset) |
|
| 63 | + { |
|
| 64 | + unset($this->metadata[ $offset ]); |
|
| 65 | + } |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | class TP_yyStackEntry |
| 69 | 69 | { |
| 70 | - public $stateno; /* The state-number */ |
|
| 71 | - public $major; /* The major token value. This is the code |
|
| 70 | + public $stateno; /* The state-number */ |
|
| 71 | + public $major; /* The major token value. This is the code |
|
| 72 | 72 | ** number for the token at this stack level */ |
| 73 | - public $minor; /* The user-supplied minor token value. This |
|
| 73 | + public $minor; /* The user-supplied minor token value. This |
|
| 74 | 74 | ** is the value of the token */ |
| 75 | 75 | } |
| 76 | 76 | |
@@ -88,2790 +88,2790 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | class Smarty_Internal_Templateparser |
| 90 | 90 | { |
| 91 | - #line 23 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 92 | - |
|
| 93 | - const Err1 = "Security error: Call to private object member not allowed"; |
|
| 94 | - |
|
| 95 | - const Err2 = "Security error: Call to dynamic object member not allowed"; |
|
| 96 | - |
|
| 97 | - const Err3 = "PHP in template not allowed. Use SmartyBC to enable it"; |
|
| 98 | - |
|
| 99 | - /** |
|
| 100 | - * result status |
|
| 101 | - * |
|
| 102 | - * @var bool |
|
| 103 | - */ |
|
| 104 | - public $successful = true; |
|
| 105 | - |
|
| 106 | - /** |
|
| 107 | - * return value |
|
| 108 | - * |
|
| 109 | - * @var mixed |
|
| 110 | - */ |
|
| 111 | - public $retvalue = 0; |
|
| 112 | - |
|
| 113 | - /** |
|
| 114 | - * @var |
|
| 115 | - */ |
|
| 116 | - public $yymajor; |
|
| 117 | - |
|
| 118 | - /** |
|
| 119 | - * last index of array variable |
|
| 120 | - * |
|
| 121 | - * @var mixed |
|
| 122 | - */ |
|
| 123 | - public $last_index; |
|
| 124 | - |
|
| 125 | - /** |
|
| 126 | - * last variable name |
|
| 127 | - * |
|
| 128 | - * @var string |
|
| 129 | - */ |
|
| 130 | - public $last_variable; |
|
| 131 | - |
|
| 132 | - /** |
|
| 133 | - * root parse tree buffer |
|
| 134 | - * |
|
| 135 | - * @var Smarty_Internal_ParseTree |
|
| 136 | - */ |
|
| 137 | - public $root_buffer; |
|
| 138 | - |
|
| 139 | - /** |
|
| 140 | - * current parse tree object |
|
| 141 | - * |
|
| 142 | - * @var Smarty_Internal_ParseTree |
|
| 143 | - */ |
|
| 144 | - public $current_buffer; |
|
| 145 | - |
|
| 146 | - /** |
|
| 147 | - * lexer object |
|
| 148 | - * |
|
| 149 | - * @var Smarty_Internal_Templatelexer |
|
| 150 | - */ |
|
| 151 | - public $lex; |
|
| 152 | - |
|
| 153 | - /** |
|
| 154 | - * internal error flag |
|
| 155 | - * |
|
| 156 | - * @var bool |
|
| 157 | - */ |
|
| 158 | - private $internalError = false; |
|
| 159 | - |
|
| 160 | - /** |
|
| 161 | - * {strip} status |
|
| 162 | - * |
|
| 163 | - * @var bool |
|
| 164 | - */ |
|
| 165 | - public $strip = false; |
|
| 166 | - |
|
| 167 | - /** |
|
| 168 | - * compiler object |
|
| 169 | - * |
|
| 170 | - * @var Smarty_Internal_TemplateCompilerBase |
|
| 171 | - */ |
|
| 172 | - public $compiler = null; |
|
| 173 | - |
|
| 174 | - /** |
|
| 175 | - * smarty object |
|
| 176 | - * |
|
| 177 | - * @var Smarty |
|
| 178 | - */ |
|
| 179 | - public $smarty = null; |
|
| 180 | - |
|
| 181 | - /** |
|
| 182 | - * template object |
|
| 183 | - * |
|
| 184 | - * @var Smarty_Internal_Template |
|
| 185 | - */ |
|
| 186 | - public $template = null; |
|
| 187 | - |
|
| 188 | - /** |
|
| 189 | - * block nesting level |
|
| 190 | - * |
|
| 191 | - * @var int |
|
| 192 | - */ |
|
| 193 | - public $block_nesting_level = 0; |
|
| 194 | - |
|
| 195 | - /** |
|
| 196 | - * security object |
|
| 197 | - * |
|
| 198 | - * @var Smarty_Security |
|
| 199 | - */ |
|
| 200 | - public $security = null; |
|
| 201 | - |
|
| 202 | - /** |
|
| 203 | - * template prefix array |
|
| 204 | - * |
|
| 205 | - * @var \Smarty_Internal_ParseTree[] |
|
| 206 | - */ |
|
| 207 | - public $template_prefix = array(); |
|
| 208 | - |
|
| 209 | - /** |
|
| 210 | - * security object |
|
| 211 | - * |
|
| 212 | - * @var \Smarty_Internal_ParseTree[] |
|
| 213 | - */ |
|
| 214 | - public $template_postfix = array(); |
|
| 215 | - |
|
| 216 | - /** |
|
| 217 | - * constructor |
|
| 218 | - * |
|
| 219 | - * @param Smarty_Internal_Templatelexer $lex |
|
| 220 | - * @param Smarty_Internal_TemplateCompilerBase $compiler |
|
| 221 | - */ |
|
| 222 | - public function __construct(Smarty_Internal_Templatelexer $lex, Smarty_Internal_TemplateCompilerBase $compiler) |
|
| 223 | - { |
|
| 224 | - $this->lex = $lex; |
|
| 225 | - $this->compiler = $compiler; |
|
| 226 | - $this->template = $this->compiler->template; |
|
| 227 | - $this->smarty = $this->template->smarty; |
|
| 228 | - $this->security = isset($this->smarty->security_policy) ? $this->smarty->security_policy : false; |
|
| 229 | - $this->current_buffer = $this->root_buffer = new Smarty_Internal_ParseTree_Template(); |
|
| 230 | - } |
|
| 91 | + #line 23 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 92 | + |
|
| 93 | + const Err1 = "Security error: Call to private object member not allowed"; |
|
| 94 | + |
|
| 95 | + const Err2 = "Security error: Call to dynamic object member not allowed"; |
|
| 96 | + |
|
| 97 | + const Err3 = "PHP in template not allowed. Use SmartyBC to enable it"; |
|
| 98 | + |
|
| 99 | + /** |
|
| 100 | + * result status |
|
| 101 | + * |
|
| 102 | + * @var bool |
|
| 103 | + */ |
|
| 104 | + public $successful = true; |
|
| 105 | + |
|
| 106 | + /** |
|
| 107 | + * return value |
|
| 108 | + * |
|
| 109 | + * @var mixed |
|
| 110 | + */ |
|
| 111 | + public $retvalue = 0; |
|
| 112 | + |
|
| 113 | + /** |
|
| 114 | + * @var |
|
| 115 | + */ |
|
| 116 | + public $yymajor; |
|
| 117 | + |
|
| 118 | + /** |
|
| 119 | + * last index of array variable |
|
| 120 | + * |
|
| 121 | + * @var mixed |
|
| 122 | + */ |
|
| 123 | + public $last_index; |
|
| 124 | + |
|
| 125 | + /** |
|
| 126 | + * last variable name |
|
| 127 | + * |
|
| 128 | + * @var string |
|
| 129 | + */ |
|
| 130 | + public $last_variable; |
|
| 131 | + |
|
| 132 | + /** |
|
| 133 | + * root parse tree buffer |
|
| 134 | + * |
|
| 135 | + * @var Smarty_Internal_ParseTree |
|
| 136 | + */ |
|
| 137 | + public $root_buffer; |
|
| 138 | + |
|
| 139 | + /** |
|
| 140 | + * current parse tree object |
|
| 141 | + * |
|
| 142 | + * @var Smarty_Internal_ParseTree |
|
| 143 | + */ |
|
| 144 | + public $current_buffer; |
|
| 145 | + |
|
| 146 | + /** |
|
| 147 | + * lexer object |
|
| 148 | + * |
|
| 149 | + * @var Smarty_Internal_Templatelexer |
|
| 150 | + */ |
|
| 151 | + public $lex; |
|
| 152 | + |
|
| 153 | + /** |
|
| 154 | + * internal error flag |
|
| 155 | + * |
|
| 156 | + * @var bool |
|
| 157 | + */ |
|
| 158 | + private $internalError = false; |
|
| 159 | + |
|
| 160 | + /** |
|
| 161 | + * {strip} status |
|
| 162 | + * |
|
| 163 | + * @var bool |
|
| 164 | + */ |
|
| 165 | + public $strip = false; |
|
| 166 | + |
|
| 167 | + /** |
|
| 168 | + * compiler object |
|
| 169 | + * |
|
| 170 | + * @var Smarty_Internal_TemplateCompilerBase |
|
| 171 | + */ |
|
| 172 | + public $compiler = null; |
|
| 173 | + |
|
| 174 | + /** |
|
| 175 | + * smarty object |
|
| 176 | + * |
|
| 177 | + * @var Smarty |
|
| 178 | + */ |
|
| 179 | + public $smarty = null; |
|
| 180 | + |
|
| 181 | + /** |
|
| 182 | + * template object |
|
| 183 | + * |
|
| 184 | + * @var Smarty_Internal_Template |
|
| 185 | + */ |
|
| 186 | + public $template = null; |
|
| 187 | + |
|
| 188 | + /** |
|
| 189 | + * block nesting level |
|
| 190 | + * |
|
| 191 | + * @var int |
|
| 192 | + */ |
|
| 193 | + public $block_nesting_level = 0; |
|
| 194 | + |
|
| 195 | + /** |
|
| 196 | + * security object |
|
| 197 | + * |
|
| 198 | + * @var Smarty_Security |
|
| 199 | + */ |
|
| 200 | + public $security = null; |
|
| 201 | + |
|
| 202 | + /** |
|
| 203 | + * template prefix array |
|
| 204 | + * |
|
| 205 | + * @var \Smarty_Internal_ParseTree[] |
|
| 206 | + */ |
|
| 207 | + public $template_prefix = array(); |
|
| 208 | + |
|
| 209 | + /** |
|
| 210 | + * security object |
|
| 211 | + * |
|
| 212 | + * @var \Smarty_Internal_ParseTree[] |
|
| 213 | + */ |
|
| 214 | + public $template_postfix = array(); |
|
| 215 | + |
|
| 216 | + /** |
|
| 217 | + * constructor |
|
| 218 | + * |
|
| 219 | + * @param Smarty_Internal_Templatelexer $lex |
|
| 220 | + * @param Smarty_Internal_TemplateCompilerBase $compiler |
|
| 221 | + */ |
|
| 222 | + public function __construct(Smarty_Internal_Templatelexer $lex, Smarty_Internal_TemplateCompilerBase $compiler) |
|
| 223 | + { |
|
| 224 | + $this->lex = $lex; |
|
| 225 | + $this->compiler = $compiler; |
|
| 226 | + $this->template = $this->compiler->template; |
|
| 227 | + $this->smarty = $this->template->smarty; |
|
| 228 | + $this->security = isset($this->smarty->security_policy) ? $this->smarty->security_policy : false; |
|
| 229 | + $this->current_buffer = $this->root_buffer = new Smarty_Internal_ParseTree_Template(); |
|
| 230 | + } |
|
| 231 | 231 | |
| 232 | - /** |
|
| 233 | - * insert PHP code in current buffer |
|
| 234 | - * |
|
| 235 | - * @param string $code |
|
| 236 | - */ |
|
| 237 | - public function insertPhpCode($code) |
|
| 238 | - { |
|
| 239 | - $this->current_buffer->append_subtree($this, new Smarty_Internal_ParseTree_Tag($this, $code)); |
|
| 240 | - } |
|
| 232 | + /** |
|
| 233 | + * insert PHP code in current buffer |
|
| 234 | + * |
|
| 235 | + * @param string $code |
|
| 236 | + */ |
|
| 237 | + public function insertPhpCode($code) |
|
| 238 | + { |
|
| 239 | + $this->current_buffer->append_subtree($this, new Smarty_Internal_ParseTree_Tag($this, $code)); |
|
| 240 | + } |
|
| 241 | 241 | |
| 242 | - /** |
|
| 243 | - * merge PHP code with prefix code and return parse tree tag object |
|
| 244 | - * |
|
| 245 | - * @param string $code |
|
| 246 | - * |
|
| 247 | - * @return Smarty_Internal_ParseTree_Tag |
|
| 248 | - */ |
|
| 249 | - public function mergePrefixCode($code) |
|
| 250 | - { |
|
| 251 | - $tmp = ''; |
|
| 252 | - foreach ($this->compiler->prefix_code as $preCode) { |
|
| 253 | - $tmp .= $preCode; |
|
| 254 | - } |
|
| 255 | - $this->compiler->prefix_code = array(); |
|
| 256 | - $tmp .= $code; |
|
| 257 | - return new Smarty_Internal_ParseTree_Tag($this, $this->compiler->processNocacheCode($tmp, true)); |
|
| 258 | - } |
|
| 242 | + /** |
|
| 243 | + * merge PHP code with prefix code and return parse tree tag object |
|
| 244 | + * |
|
| 245 | + * @param string $code |
|
| 246 | + * |
|
| 247 | + * @return Smarty_Internal_ParseTree_Tag |
|
| 248 | + */ |
|
| 249 | + public function mergePrefixCode($code) |
|
| 250 | + { |
|
| 251 | + $tmp = ''; |
|
| 252 | + foreach ($this->compiler->prefix_code as $preCode) { |
|
| 253 | + $tmp .= $preCode; |
|
| 254 | + } |
|
| 255 | + $this->compiler->prefix_code = array(); |
|
| 256 | + $tmp .= $code; |
|
| 257 | + return new Smarty_Internal_ParseTree_Tag($this, $this->compiler->processNocacheCode($tmp, true)); |
|
| 258 | + } |
|
| 259 | 259 | |
| 260 | - const TP_VERT = 1; |
|
| 260 | + const TP_VERT = 1; |
|
| 261 | 261 | |
| 262 | - const TP_COLON = 2; |
|
| 262 | + const TP_COLON = 2; |
|
| 263 | 263 | |
| 264 | - const TP_PHP = 3; |
|
| 264 | + const TP_PHP = 3; |
|
| 265 | 265 | |
| 266 | - const TP_NOCACHE = 4; |
|
| 266 | + const TP_NOCACHE = 4; |
|
| 267 | 267 | |
| 268 | - const TP_TEXT = 5; |
|
| 268 | + const TP_TEXT = 5; |
|
| 269 | 269 | |
| 270 | - const TP_STRIPON = 6; |
|
| 270 | + const TP_STRIPON = 6; |
|
| 271 | 271 | |
| 272 | - const TP_STRIPOFF = 7; |
|
| 272 | + const TP_STRIPOFF = 7; |
|
| 273 | 273 | |
| 274 | - const TP_LITERALSTART = 8; |
|
| 274 | + const TP_LITERALSTART = 8; |
|
| 275 | 275 | |
| 276 | - const TP_LITERALEND = 9; |
|
| 276 | + const TP_LITERALEND = 9; |
|
| 277 | 277 | |
| 278 | - const TP_LITERAL = 10; |
|
| 278 | + const TP_LITERAL = 10; |
|
| 279 | 279 | |
| 280 | - const TP_RDEL = 11; |
|
| 280 | + const TP_RDEL = 11; |
|
| 281 | 281 | |
| 282 | - const TP_SIMPELOUTPUT = 12; |
|
| 282 | + const TP_SIMPELOUTPUT = 12; |
|
| 283 | 283 | |
| 284 | - const TP_LDEL = 13; |
|
| 284 | + const TP_LDEL = 13; |
|
| 285 | 285 | |
| 286 | - const TP_DOLLARID = 14; |
|
| 286 | + const TP_DOLLARID = 14; |
|
| 287 | 287 | |
| 288 | - const TP_EQUAL = 15; |
|
| 288 | + const TP_EQUAL = 15; |
|
| 289 | 289 | |
| 290 | - const TP_SIMPLETAG = 16; |
|
| 290 | + const TP_SIMPLETAG = 16; |
|
| 291 | 291 | |
| 292 | - const TP_ID = 17; |
|
| 292 | + const TP_ID = 17; |
|
| 293 | 293 | |
| 294 | - const TP_PTR = 18; |
|
| 294 | + const TP_PTR = 18; |
|
| 295 | 295 | |
| 296 | - const TP_LDELMAKENOCACHE = 19; |
|
| 296 | + const TP_LDELMAKENOCACHE = 19; |
|
| 297 | 297 | |
| 298 | - const TP_LDELIF = 20; |
|
| 298 | + const TP_LDELIF = 20; |
|
| 299 | 299 | |
| 300 | - const TP_LDELFOR = 21; |
|
| 300 | + const TP_LDELFOR = 21; |
|
| 301 | 301 | |
| 302 | - const TP_SEMICOLON = 22; |
|
| 302 | + const TP_SEMICOLON = 22; |
|
| 303 | 303 | |
| 304 | - const TP_INCDEC = 23; |
|
| 304 | + const TP_INCDEC = 23; |
|
| 305 | 305 | |
| 306 | - const TP_TO = 24; |
|
| 306 | + const TP_TO = 24; |
|
| 307 | 307 | |
| 308 | - const TP_STEP = 25; |
|
| 308 | + const TP_STEP = 25; |
|
| 309 | 309 | |
| 310 | - const TP_LDELFOREACH = 26; |
|
| 310 | + const TP_LDELFOREACH = 26; |
|
| 311 | 311 | |
| 312 | - const TP_SPACE = 27; |
|
| 312 | + const TP_SPACE = 27; |
|
| 313 | 313 | |
| 314 | - const TP_AS = 28; |
|
| 314 | + const TP_AS = 28; |
|
| 315 | 315 | |
| 316 | - const TP_APTR = 29; |
|
| 316 | + const TP_APTR = 29; |
|
| 317 | 317 | |
| 318 | - const TP_LDELSETFILTER = 30; |
|
| 318 | + const TP_LDELSETFILTER = 30; |
|
| 319 | 319 | |
| 320 | - const TP_SMARTYBLOCKCHILDPARENT = 31; |
|
| 320 | + const TP_SMARTYBLOCKCHILDPARENT = 31; |
|
| 321 | 321 | |
| 322 | - const TP_CLOSETAG = 32; |
|
| 322 | + const TP_CLOSETAG = 32; |
|
| 323 | 323 | |
| 324 | - const TP_LDELSLASH = 33; |
|
| 324 | + const TP_LDELSLASH = 33; |
|
| 325 | 325 | |
| 326 | - const TP_ATTR = 34; |
|
| 326 | + const TP_ATTR = 34; |
|
| 327 | 327 | |
| 328 | - const TP_INTEGER = 35; |
|
| 328 | + const TP_INTEGER = 35; |
|
| 329 | 329 | |
| 330 | - const TP_COMMA = 36; |
|
| 330 | + const TP_COMMA = 36; |
|
| 331 | 331 | |
| 332 | - const TP_OPENP = 37; |
|
| 332 | + const TP_OPENP = 37; |
|
| 333 | 333 | |
| 334 | - const TP_CLOSEP = 38; |
|
| 334 | + const TP_CLOSEP = 38; |
|
| 335 | 335 | |
| 336 | - const TP_MATH = 39; |
|
| 336 | + const TP_MATH = 39; |
|
| 337 | 337 | |
| 338 | - const TP_UNIMATH = 40; |
|
| 338 | + const TP_UNIMATH = 40; |
|
| 339 | 339 | |
| 340 | - const TP_ISIN = 41; |
|
| 340 | + const TP_ISIN = 41; |
|
| 341 | 341 | |
| 342 | - const TP_QMARK = 42; |
|
| 342 | + const TP_QMARK = 42; |
|
| 343 | 343 | |
| 344 | - const TP_NOT = 43; |
|
| 344 | + const TP_NOT = 43; |
|
| 345 | 345 | |
| 346 | - const TP_TYPECAST = 44; |
|
| 346 | + const TP_TYPECAST = 44; |
|
| 347 | 347 | |
| 348 | - const TP_HEX = 45; |
|
| 348 | + const TP_HEX = 45; |
|
| 349 | 349 | |
| 350 | - const TP_DOT = 46; |
|
| 350 | + const TP_DOT = 46; |
|
| 351 | 351 | |
| 352 | - const TP_INSTANCEOF = 47; |
|
| 352 | + const TP_INSTANCEOF = 47; |
|
| 353 | 353 | |
| 354 | - const TP_SINGLEQUOTESTRING = 48; |
|
| 354 | + const TP_SINGLEQUOTESTRING = 48; |
|
| 355 | 355 | |
| 356 | - const TP_DOUBLECOLON = 49; |
|
| 356 | + const TP_DOUBLECOLON = 49; |
|
| 357 | 357 | |
| 358 | - const TP_NAMESPACE = 50; |
|
| 358 | + const TP_NAMESPACE = 50; |
|
| 359 | 359 | |
| 360 | - const TP_AT = 51; |
|
| 360 | + const TP_AT = 51; |
|
| 361 | 361 | |
| 362 | - const TP_HATCH = 52; |
|
| 362 | + const TP_HATCH = 52; |
|
| 363 | 363 | |
| 364 | - const TP_OPENB = 53; |
|
| 364 | + const TP_OPENB = 53; |
|
| 365 | 365 | |
| 366 | - const TP_CLOSEB = 54; |
|
| 366 | + const TP_CLOSEB = 54; |
|
| 367 | 367 | |
| 368 | - const TP_DOLLAR = 55; |
|
| 368 | + const TP_DOLLAR = 55; |
|
| 369 | 369 | |
| 370 | - const TP_LOGOP = 56; |
|
| 370 | + const TP_LOGOP = 56; |
|
| 371 | 371 | |
| 372 | - const TP_SLOGOP = 57; |
|
| 372 | + const TP_SLOGOP = 57; |
|
| 373 | 373 | |
| 374 | - const TP_TLOGOP = 58; |
|
| 374 | + const TP_TLOGOP = 58; |
|
| 375 | 375 | |
| 376 | - const TP_SINGLECOND = 59; |
|
| 376 | + const TP_SINGLECOND = 59; |
|
| 377 | 377 | |
| 378 | - const TP_QUOTE = 60; |
|
| 378 | + const TP_QUOTE = 60; |
|
| 379 | 379 | |
| 380 | - const TP_BACKTICK = 61; |
|
| 380 | + const TP_BACKTICK = 61; |
|
| 381 | 381 | |
| 382 | - const YY_NO_ACTION = 534; |
|
| 382 | + const YY_NO_ACTION = 534; |
|
| 383 | 383 | |
| 384 | - const YY_ACCEPT_ACTION = 533; |
|
| 384 | + const YY_ACCEPT_ACTION = 533; |
|
| 385 | 385 | |
| 386 | - const YY_ERROR_ACTION = 532; |
|
| 386 | + const YY_ERROR_ACTION = 532; |
|
| 387 | 387 | |
| 388 | - const YY_SZ_ACTTAB = 2017; |
|
| 388 | + const YY_SZ_ACTTAB = 2017; |
|
| 389 | 389 | |
| 390 | - static public $yy_action = array(269, 8, 133, 295, 335, 80, 282, 219, 7, 84, 128, 178, 255, 276, 113, 102, 13, 83, |
|
| 391 | - 227, 286, 305, 220, 36, 223, 283, 21, 32, 297, 41, 14, 90, 40, 44, 260, 213, 231, |
|
| 392 | - 250, 235, 210, 128, 81, 1, 298, 296, 102, 269, 8, 132, 79, 335, 196, 184, 219, 7, |
|
| 393 | - 84, 26, 297, 461, 101, 113, 39, 24, 278, 227, 461, 305, 220, 171, 206, 222, 21, |
|
| 394 | - 230, 201, 41, 104, 192, 40, 44, 260, 213, 18, 236, 241, 210, 251, 81, 1, 316, 296, |
|
| 395 | - 114, 269, 8, 135, 79, 335, 205, 302, 219, 7, 84, 116, 107, 477, 477, 113, 33, 197, |
|
| 396 | - 477, 227, 266, 305, 220, 326, 223, 31, 21, 29, 215, 41, 311, 78, 40, 44, 260, 213, |
|
| 397 | - 296, 250, 256, 210, 190, 81, 1, 3, 296, 307, 269, 8, 134, 79, 335, 205, 302, 219, |
|
| 398 | - 7, 84, 232, 18, 296, 294, 113, 334, 85, 323, 227, 136, 305, 220, 328, 223, 29, 21, |
|
| 399 | - 183, 101, 41, 234, 78, 40, 44, 260, 213, 137, 250, 314, 210, 139, 81, 1, 10, 296, |
|
| 400 | - 101, 269, 8, 135, 79, 335, 195, 154, 219, 7, 84, 322, 232, 81, 114, 113, 296, 329, |
|
| 401 | - 94, 227, 315, 305, 220, 326, 212, 120, 21, 168, 215, 41, 281, 114, 40, 44, 260, |
|
| 402 | - 213, 296, 250, 222, 210, 265, 81, 1, 104, 296, 211, 269, 8, 135, 79, 335, 193, 302, |
|
| 403 | - 219, 7, 84, 242, 239, 249, 217, 113, 11, 215, 289, 227, 136, 305, 220, 228, 223, |
|
| 404 | - 222, 21, 238, 149, 41, 104, 78, 40, 44, 260, 213, 461, 250, 329, 210, 6, 81, 1, |
|
| 405 | - 461, 296, 2, 269, 8, 136, 79, 335, 205, 158, 219, 7, 84, 190, 211, 81, 101, 113, |
|
| 406 | - 296, 329, 93, 227, 12, 305, 220, 18, 223, 244, 34, 268, 448, 41, 281, 449, 40, 44, |
|
| 407 | - 260, 213, 191, 250, 36, 210, 448, 81, 1, 449, 296, 14, 269, 8, 135, 79, 335, 205, |
|
| 408 | - 15, 219, 7, 84, 186, 293, 152, 14, 113, 16, 214, 5, 227, 165, 305, 220, 329, 194, |
|
| 409 | - 20, 21, 140, 101, 41, 115, 448, 40, 44, 260, 213, 281, 250, 303, 210, 264, 81, 1, |
|
| 410 | - 448, 296, 169, 269, 8, 131, 79, 335, 205, 176, 219, 7, 84, 137, 28, 296, 310, 113, |
|
| 411 | - 185, 293, 10, 227, 275, 305, 220, 296, 223, 175, 4, 281, 143, 41, 144, 192, 40, 44, |
|
| 412 | - 260, 213, 35, 250, 329, 210, 329, 81, 1, 270, 296, 308, 269, 8, 135, 79, 335, 198, |
|
| 413 | - 121, 219, 7, 84, 190, 292, 17, 232, 113, 166, 284, 281, 227, 141, 305, 220, 211, |
|
| 414 | - 223, 319, 21, 299, 211, 41, 329, 211, 40, 44, 260, 213, 258, 250, 363, 210, 221, |
|
| 415 | - 81, 1, 281, 296, 6, 269, 8, 136, 79, 335, 205, 177, 219, 7, 84, 167, 211, 159, 22, |
|
| 416 | - 113, 104, 211, 156, 227, 300, 305, 220, 329, 223, 274, 34, 359, 329, 41, 172, 192, |
|
| 417 | - 40, 44, 260, 213, 95, 250, 318, 210, 329, 81, 273, 36, 296, 257, 292, 17, 181, 79, |
|
| 418 | - 14, 284, 309, 277, 254, 262, 263, 259, 178, 211, 25, 36, 269, 8, 187, 331, 335, |
|
| 419 | - 261, 14, 219, 7, 84, 192, 303, 211, 38, 113, 237, 321, 180, 227, 267, 305, 220, |
|
| 420 | - 153, 121, 312, 179, 192, 272, 108, 215, 209, 211, 118, 69, 112, 43, 42, 37, 248, |
|
| 421 | - 102, 86, 189, 252, 279, 182, 293, 150, 271, 204, 317, 176, 297, 288, 287, 285, 280, |
|
| 422 | - 329, 281, 312, 174, 87, 202, 330, 215, 209, 170, 118, 69, 112, 43, 42, 37, 138, |
|
| 423 | - 102, 192, 402, 252, 279, 38, 216, 88, 271, 204, 317, 211, 297, 288, 287, 285, 280, |
|
| 424 | - 310, 402, 105, 253, 404, 164, 332, 312, 402, 211, 89, 448, 215, 209, 305, 129, 61, |
|
| 425 | - 106, 163, 238, 404, 142, 102, 448, 305, 252, 279, 404, 305, 305, 271, 204, 317, |
|
| 426 | - 305, 297, 312, 155, 305, 305, 305, 215, 209, 211, 129, 73, 112, 211, 43, 42, 37, |
|
| 427 | - 102, 305, 404, 252, 279, 305, 292, 17, 271, 204, 317, 284, 297, 305, 288, 287, 285, |
|
| 428 | - 280, 404, 203, 305, 477, 477, 312, 305, 404, 477, 305, 215, 209, 305, 129, 73, 112, |
|
| 429 | - 43, 42, 37, 305, 102, 305, 305, 252, 279, 305, 305, 224, 271, 204, 317, 324, 297, |
|
| 430 | - 288, 287, 285, 280, 305, 305, 208, 312, 305, 477, 305, 305, 215, 209, 211, 129, 50, |
|
| 431 | - 106, 305, 117, 305, 305, 102, 148, 401, 252, 279, 92, 325, 448, 271, 204, 317, 329, |
|
| 432 | - 297, 269, 9, 327, 218, 335, 401, 448, 219, 7, 84, 305, 320, 401, 305, 113, 325, |
|
| 433 | - 192, 305, 227, 305, 305, 220, 269, 9, 327, 305, 335, 305, 305, 219, 7, 84, 305, 43, |
|
| 434 | - 42, 37, 113, 305, 305, 305, 227, 305, 305, 220, 305, 305, 305, 305, 291, 27, 288, |
|
| 435 | - 287, 285, 280, 305, 305, 305, 312, 305, 305, 305, 305, 215, 209, 305, 129, 73, 112, |
|
| 436 | - 211, 305, 290, 27, 102, 305, 305, 252, 279, 305, 369, 305, 271, 204, 317, 305, 297, |
|
| 437 | - 225, 305, 312, 305, 211, 305, 207, 215, 209, 36, 129, 54, 112, 305, 188, 305, 14, |
|
| 438 | - 102, 145, 448, 252, 279, 91, 305, 305, 271, 204, 317, 329, 297, 312, 448, 292, 17, |
|
| 439 | - 305, 215, 209, 284, 129, 65, 112, 305, 43, 42, 37, 102, 192, 305, 252, 279, 305, |
|
| 440 | - 305, 305, 271, 204, 317, 305, 297, 312, 288, 287, 285, 280, 215, 209, 305, 99, 67, |
|
| 441 | - 112, 305, 305, 229, 305, 102, 305, 305, 252, 279, 305, 305, 305, 271, 204, 317, |
|
| 442 | - 312, 297, 211, 305, 305, 215, 209, 305, 129, 45, 112, 305, 246, 305, 305, 102, 162, |
|
| 443 | - 305, 252, 279, 184, 305, 305, 271, 204, 317, 329, 297, 312, 39, 24, 278, 305, 215, |
|
| 444 | - 209, 305, 129, 56, 112, 305, 43, 42, 37, 102, 192, 305, 252, 279, 305, 305, 305, |
|
| 445 | - 271, 204, 317, 305, 297, 312, 288, 287, 285, 280, 215, 209, 305, 96, 55, 112, 305, |
|
| 446 | - 305, 305, 305, 102, 305, 305, 252, 279, 305, 305, 305, 271, 204, 317, 312, 297, |
|
| 447 | - 211, 305, 305, 215, 97, 305, 82, 47, 103, 305, 247, 305, 305, 102, 151, 305, 252, |
|
| 448 | - 279, 184, 305, 305, 271, 204, 317, 329, 297, 312, 39, 24, 278, 305, 215, 209, 305, |
|
| 449 | - 129, 71, 112, 305, 43, 42, 37, 102, 192, 305, 252, 279, 305, 305, 305, 271, 204, |
|
| 450 | - 317, 305, 297, 312, 288, 287, 285, 280, 215, 209, 305, 129, 59, 112, 305, 305, 305, |
|
| 451 | - 305, 102, 305, 305, 252, 279, 305, 305, 305, 271, 204, 317, 312, 297, 211, 305, |
|
| 452 | - 305, 215, 209, 305, 129, 58, 112, 305, 305, 305, 305, 102, 160, 305, 252, 279, 184, |
|
| 453 | - 305, 305, 271, 204, 317, 329, 297, 312, 39, 24, 278, 305, 215, 209, 305, 129, 53, |
|
| 454 | - 112, 226, 43, 42, 37, 102, 192, 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, |
|
| 455 | - 297, 312, 288, 287, 285, 280, 215, 209, 305, 129, 60, 112, 305, 305, 305, 305, 102, |
|
| 456 | - 305, 305, 252, 279, 305, 305, 305, 271, 204, 317, 312, 297, 211, 305, 305, 215, |
|
| 457 | - 209, 305, 100, 64, 112, 305, 305, 305, 305, 102, 146, 305, 252, 279, 184, 305, 305, |
|
| 458 | - 271, 204, 317, 329, 297, 312, 39, 24, 278, 305, 215, 209, 305, 129, 61, 112, 245, |
|
| 459 | - 43, 42, 37, 102, 192, 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, 312, |
|
| 460 | - 288, 287, 285, 280, 215, 200, 305, 129, 63, 112, 305, 305, 305, 305, 102, 305, 305, |
|
| 461 | - 252, 279, 305, 305, 305, 271, 204, 317, 312, 297, 211, 305, 305, 215, 209, 305, |
|
| 462 | - 111, 51, 112, 305, 305, 305, 305, 102, 147, 305, 252, 279, 184, 305, 305, 271, 204, |
|
| 463 | - 317, 329, 297, 312, 39, 24, 278, 305, 215, 209, 305, 129, 49, 112, 305, 43, 42, 37, |
|
| 464 | - 102, 192, 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, 312, 288, 287, |
|
| 465 | - 285, 280, 215, 209, 305, 129, 75, 112, 305, 305, 305, 305, 102, 305, 305, 252, 279, |
|
| 466 | - 305, 305, 305, 271, 204, 317, 312, 297, 305, 305, 305, 215, 209, 305, 129, 76, 112, |
|
| 467 | - 305, 305, 305, 305, 102, 161, 305, 252, 279, 184, 305, 305, 271, 204, 317, 329, |
|
| 468 | - 297, 312, 39, 24, 278, 305, 215, 98, 305, 82, 46, 103, 305, 305, 305, 305, 102, |
|
| 469 | - 192, 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, 312, 305, 305, 305, |
|
| 470 | - 305, 215, 209, 305, 129, 70, 112, 305, 305, 305, 305, 102, 305, 305, 252, 279, 305, |
|
| 471 | - 305, 305, 271, 204, 317, 312, 297, 305, 305, 305, 215, 209, 305, 129, 57, 112, 305, |
|
| 472 | - 305, 305, 305, 102, 305, 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, |
|
| 473 | - 312, 305, 305, 305, 305, 215, 199, 305, 109, 62, 112, 305, 305, 305, 305, 102, 305, |
|
| 474 | - 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, 312, 305, 305, 305, 305, |
|
| 475 | - 215, 209, 305, 129, 72, 112, 305, 305, 305, 305, 102, 305, 305, 252, 279, 305, 305, |
|
| 476 | - 305, 271, 204, 317, 312, 297, 305, 305, 305, 215, 209, 305, 129, 77, 112, 305, 305, |
|
| 477 | - 305, 305, 102, 305, 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, 312, |
|
| 478 | - 305, 305, 305, 305, 215, 209, 305, 129, 68, 112, 305, 305, 305, 305, 102, 305, 305, |
|
| 479 | - 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, 312, 305, 305, 305, 305, 215, |
|
| 480 | - 209, 305, 129, 74, 112, 305, 305, 305, 305, 102, 305, 305, 252, 279, 305, 305, 305, |
|
| 481 | - 271, 204, 317, 312, 297, 305, 305, 305, 215, 209, 305, 129, 48, 112, 305, 305, 305, |
|
| 482 | - 305, 102, 305, 305, 252, 279, 414, 414, 305, 271, 204, 317, 305, 297, 312, 305, |
|
| 483 | - 305, 305, 305, 215, 209, 305, 129, 66, 112, 305, 305, 305, 305, 102, 305, 305, 252, |
|
| 484 | - 279, 211, 305, 305, 271, 204, 317, 305, 297, 448, 305, 414, 414, 414, 533, 52, 243, |
|
| 485 | - 239, 249, 217, 305, 448, 215, 305, 305, 30, 305, 36, 414, 414, 414, 414, 305, 233, |
|
| 486 | - 14, 305, 305, 305, 305, 43, 42, 37, 305, 477, 477, 312, 23, 305, 477, 461, 215, |
|
| 487 | - 209, 211, 127, 305, 112, 288, 287, 285, 280, 102, 305, 301, 357, 313, 305, 292, 17, |
|
| 488 | - 271, 204, 317, 284, 297, 305, 305, 302, 305, 461, 36, 36, 461, 36, 477, 157, 461, |
|
| 489 | - 14, 14, 305, 14, 305, 43, 42, 37, 305, 305, 305, 312, 305, 211, 78, 305, 215, 209, |
|
| 490 | - 305, 130, 305, 112, 288, 287, 285, 280, 102, 305, 305, 305, 240, 305, 292, 17, 271, |
|
| 491 | - 204, 317, 284, 297, 36, 305, 305, 305, 305, 305, 305, 14, 36, 305, 173, 312, 43, |
|
| 492 | - 42, 37, 14, 215, 209, 305, 122, 305, 112, 305, 305, 305, 305, 102, 304, 305, 288, |
|
| 493 | - 287, 285, 280, 305, 271, 204, 317, 305, 297, 302, 305, 312, 305, 36, 305, 305, 215, |
|
| 494 | - 209, 305, 123, 14, 112, 312, 305, 305, 305, 102, 215, 209, 305, 124, 305, 112, 78, |
|
| 495 | - 271, 204, 317, 102, 297, 305, 305, 305, 305, 305, 305, 271, 204, 317, 312, 297, |
|
| 496 | - 305, 305, 305, 215, 209, 305, 119, 305, 112, 305, 305, 305, 305, 102, 305, 305, |
|
| 497 | - 233, 305, 305, 305, 305, 271, 204, 317, 305, 297, 477, 477, 312, 32, 305, 477, 461, |
|
| 498 | - 215, 209, 305, 126, 305, 112, 305, 305, 305, 305, 102, 305, 305, 233, 305, 305, |
|
| 499 | - 305, 305, 271, 204, 317, 305, 297, 477, 477, 305, 305, 461, 477, 461, 461, 312, |
|
| 500 | - 477, 19, 461, 211, 215, 209, 305, 125, 305, 112, 305, 477, 477, 305, 102, 305, 477, |
|
| 501 | - 461, 305, 305, 305, 305, 271, 204, 317, 461, 297, 305, 461, 305, 477, 305, 461, |
|
| 502 | - 333, 305, 211, 305, 305, 305, 305, 305, 43, 42, 37, 305, 461, 305, 305, 461, 305, |
|
| 503 | - 477, 305, 461, 305, 305, 233, 110, 305, 288, 287, 285, 280, 305, 306, 305, 477, |
|
| 504 | - 477, 305, 305, 305, 477, 461, 305, 43, 42, 37, 477, 477, 305, 305, 305, 477, 461, |
|
| 505 | - 305, 305, 305, 305, 305, 305, 305, 288, 287, 285, 280, 305, 305, 305, 305, 305, |
|
| 506 | - 461, 305, 305, 461, 408, 477, 305, 461, 305, 305, 305, 461, 305, 305, 461, 408, |
|
| 507 | - 477, 408, 461, 305, 408, 305, 305, 305, 305, 305, 305, 408, 305, 408, 305, 408, |
|
| 508 | - 305, 305, 305, 305, 305, 305, 305, 232,); |
|
| 509 | - |
|
| 510 | - static public $yy_lookahead = array(12, 13, 14, 17, 16, 17, 72, 19, 20, 21, 76, 8, 9, 10, 26, 81, 22, 17, 30, 31, |
|
| 511 | - 32, 33, 27, 35, 90, 37, 15, 93, 40, 34, 36, 43, 44, 45, 46, 72, 48, 51, 50, 76, |
|
| 512 | - 52, 53, 98, 55, 81, 12, 13, 14, 60, 16, 17, 77, 19, 20, 21, 15, 93, 46, 18, 26, |
|
| 513 | - 86, 87, 88, 30, 53, 32, 33, 94, 35, 76, 37, 78, 79, 40, 81, 101, 43, 44, 45, 46, |
|
| 514 | - 36, 48, 38, 50, 14, 52, 53, 54, 55, 49, 12, 13, 14, 60, 16, 17, 23, 19, 20, 21, |
|
| 515 | - 17, 81, 12, 13, 26, 13, 14, 17, 30, 17, 32, 33, 66, 35, 15, 37, 15, 71, 40, 99, |
|
| 516 | - 47, 43, 44, 45, 46, 55, 48, 35, 50, 101, 52, 53, 36, 55, 61, 12, 13, 14, 60, 16, |
|
| 517 | - 17, 23, 19, 20, 21, 46, 36, 55, 38, 26, 54, 105, 106, 30, 14, 32, 33, 17, 35, |
|
| 518 | - 15, 37, 14, 18, 40, 17, 47, 43, 44, 45, 46, 46, 48, 54, 50, 14, 52, 53, 53, 55, |
|
| 519 | - 18, 12, 13, 14, 60, 16, 17, 73, 19, 20, 21, 50, 46, 52, 49, 26, 55, 83, 37, 30, |
|
| 520 | - 54, 32, 33, 66, 35, 17, 37, 94, 71, 40, 96, 49, 43, 44, 45, 46, 55, 48, 76, 50, |
|
| 521 | - 78, 52, 53, 81, 55, 1, 12, 13, 14, 60, 16, 17, 23, 19, 20, 21, 65, 66, 67, 68, |
|
| 522 | - 26, 13, 71, 106, 30, 14, 32, 33, 17, 35, 76, 37, 78, 73, 40, 81, 47, 43, 44, 45, |
|
| 523 | - 46, 46, 48, 83, 50, 37, 52, 53, 53, 55, 37, 12, 13, 14, 60, 16, 17, 73, 19, 20, |
|
| 524 | - 21, 101, 1, 52, 18, 26, 55, 83, 94, 30, 29, 32, 33, 36, 35, 38, 37, 17, 37, 40, |
|
| 525 | - 96, 37, 43, 44, 45, 46, 17, 48, 27, 50, 49, 52, 53, 49, 55, 34, 12, 13, 14, 60, |
|
| 526 | - 16, 17, 27, 19, 20, 21, 97, 98, 73, 34, 26, 13, 14, 37, 30, 17, 32, 33, 83, 35, |
|
| 527 | - 42, 37, 14, 18, 40, 49, 37, 43, 44, 45, 46, 96, 48, 102, 50, 35, 52, 53, 49, 55, |
|
| 528 | - 52, 12, 13, 14, 60, 16, 17, 77, 19, 20, 21, 46, 15, 55, 95, 26, 97, 98, 53, 30, |
|
| 529 | - 23, 32, 33, 55, 35, 94, 37, 96, 73, 40, 73, 101, 43, 44, 45, 46, 24, 48, 83, 50, |
|
| 530 | - 83, 52, 53, 17, 55, 92, 12, 13, 14, 60, 16, 17, 99, 19, 20, 21, 101, 12, 13, 46, |
|
| 531 | - 26, 94, 17, 96, 30, 73, 32, 33, 1, 35, 54, 37, 17, 1, 40, 83, 1, 43, 44, 45, 46, |
|
| 532 | - 38, 48, 11, 50, 18, 52, 53, 96, 55, 37, 12, 13, 14, 60, 16, 17, 77, 19, 20, 21, |
|
| 533 | - 76, 1, 73, 29, 26, 81, 1, 73, 30, 17, 32, 33, 83, 35, 35, 37, 11, 83, 40, 73, |
|
| 534 | - 101, 43, 44, 45, 46, 82, 48, 54, 50, 83, 52, 67, 27, 55, 70, 12, 13, 77, 60, 34, |
|
| 535 | - 17, 14, 3, 4, 5, 6, 7, 8, 1, 2, 27, 12, 13, 77, 54, 16, 5, 34, 19, 20, 21, 101, |
|
| 536 | - 102, 1, 2, 26, 17, 92, 82, 30, 11, 32, 33, 52, 99, 66, 82, 101, 17, 80, 71, 72, |
|
| 537 | - 1, 74, 75, 76, 39, 40, 41, 83, 81, 81, 11, 84, 85, 97, 98, 73, 89, 90, 91, 77, |
|
| 538 | - 93, 56, 57, 58, 59, 83, 96, 66, 94, 81, 103, 104, 71, 72, 94, 74, 75, 76, 39, |
|
| 539 | - 40, 41, 81, 81, 101, 11, 84, 85, 2, 15, 81, 89, 90, 91, 1, 93, 56, 57, 58, 59, |
|
| 540 | - 95, 27, 69, 9, 11, 94, 104, 66, 34, 1, 81, 37, 71, 72, 107, 74, 75, 76, 94, 78, |
|
| 541 | - 27, 28, 81, 49, 107, 84, 85, 34, 107, 107, 89, 90, 91, 107, 93, 66, 28, 107, |
|
| 542 | - 107, 107, 71, 72, 1, 74, 75, 76, 1, 39, 40, 41, 81, 107, 11, 84, 85, 107, 12, |
|
| 543 | - 13, 89, 90, 91, 17, 93, 107, 56, 57, 58, 59, 27, 100, 107, 12, 13, 66, 107, 34, |
|
| 544 | - 17, 107, 71, 72, 107, 74, 75, 76, 39, 40, 41, 107, 81, 107, 107, 84, 85, 107, |
|
| 545 | - 107, 51, 89, 90, 91, 54, 93, 56, 57, 58, 59, 107, 107, 100, 66, 107, 51, 107, |
|
| 546 | - 107, 71, 72, 1, 74, 75, 76, 107, 78, 107, 107, 81, 73, 11, 84, 85, 77, 5, 37, |
|
| 547 | - 89, 90, 91, 83, 93, 12, 13, 14, 46, 16, 27, 49, 19, 20, 21, 107, 54, 34, 107, |
|
| 548 | - 26, 5, 101, 107, 30, 107, 32, 33, 12, 13, 14, 107, 16, 107, 107, 19, 20, 21, |
|
| 549 | - 107, 39, 40, 41, 26, 107, 107, 107, 30, 107, 32, 33, 107, 107, 107, 107, 60, 61, |
|
| 550 | - 56, 57, 58, 59, 107, 107, 107, 66, 107, 107, 107, 107, 71, 72, 107, 74, 75, 76, |
|
| 551 | - 1, 107, 60, 61, 81, 107, 107, 84, 85, 107, 11, 107, 89, 90, 91, 107, 93, 18, |
|
| 552 | - 107, 66, 107, 1, 107, 100, 71, 72, 27, 74, 75, 76, 107, 11, 107, 34, 81, 73, 37, |
|
| 553 | - 84, 85, 77, 107, 107, 89, 90, 91, 83, 93, 66, 49, 12, 13, 107, 71, 72, 17, 74, |
|
| 554 | - 75, 76, 107, 39, 40, 41, 81, 101, 107, 84, 85, 107, 107, 107, 89, 90, 91, 107, |
|
| 555 | - 93, 66, 56, 57, 58, 59, 71, 72, 107, 74, 75, 76, 107, 107, 51, 107, 81, 107, |
|
| 556 | - 107, 84, 85, 107, 107, 107, 89, 90, 91, 66, 93, 1, 107, 107, 71, 72, 107, 74, |
|
| 557 | - 75, 76, 107, 11, 107, 107, 81, 73, 107, 84, 85, 77, 107, 107, 89, 90, 91, 83, |
|
| 558 | - 93, 66, 86, 87, 88, 107, 71, 72, 107, 74, 75, 76, 107, 39, 40, 41, 81, 101, 107, |
|
| 559 | - 84, 85, 107, 107, 107, 89, 90, 91, 107, 93, 66, 56, 57, 58, 59, 71, 72, 107, 74, |
|
| 560 | - 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, 66, |
|
| 561 | - 93, 1, 107, 107, 71, 72, 107, 74, 75, 76, 107, 11, 107, 107, 81, 73, 107, 84, |
|
| 562 | - 85, 77, 107, 107, 89, 90, 91, 83, 93, 66, 86, 87, 88, 107, 71, 72, 107, 74, 75, |
|
| 563 | - 76, 107, 39, 40, 41, 81, 101, 107, 84, 85, 107, 107, 107, 89, 90, 91, 107, 93, |
|
| 564 | - 66, 56, 57, 58, 59, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 107, 107, |
|
| 565 | - 84, 85, 107, 107, 107, 89, 90, 91, 66, 93, 1, 107, 107, 71, 72, 107, 74, 75, 76, |
|
| 566 | - 107, 107, 107, 107, 81, 73, 107, 84, 85, 77, 107, 107, 89, 90, 91, 83, 93, 66, |
|
| 567 | - 86, 87, 88, 107, 71, 72, 107, 74, 75, 76, 38, 39, 40, 41, 81, 101, 107, 84, 85, |
|
| 568 | - 107, 107, 107, 89, 90, 91, 107, 93, 66, 56, 57, 58, 59, 71, 72, 107, 74, 75, 76, |
|
| 569 | - 107, 107, 107, 107, 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, 66, 93, 1, |
|
| 570 | - 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 73, 107, 84, 85, 77, |
|
| 571 | - 107, 107, 89, 90, 91, 83, 93, 66, 86, 87, 88, 107, 71, 72, 107, 74, 75, 76, 38, |
|
| 572 | - 39, 40, 41, 81, 101, 107, 84, 85, 107, 107, 107, 89, 90, 91, 107, 93, 66, 56, |
|
| 573 | - 57, 58, 59, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, 85, |
|
| 574 | - 107, 107, 107, 89, 90, 91, 66, 93, 1, 107, 107, 71, 72, 107, 74, 75, 76, 107, |
|
| 575 | - 107, 107, 107, 81, 73, 107, 84, 85, 77, 107, 107, 89, 90, 91, 83, 93, 66, 86, |
|
| 576 | - 87, 88, 107, 71, 72, 107, 74, 75, 76, 107, 39, 40, 41, 81, 101, 107, 84, 85, |
|
| 577 | - 107, 107, 107, 89, 90, 91, 107, 93, 66, 56, 57, 58, 59, 71, 72, 107, 74, 75, 76, |
|
| 578 | - 107, 107, 107, 107, 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, 66, 93, |
|
| 579 | - 107, 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 73, 107, 84, 85, |
|
| 580 | - 77, 107, 107, 89, 90, 91, 83, 93, 66, 86, 87, 88, 107, 71, 72, 107, 74, 75, 76, |
|
| 581 | - 107, 107, 107, 107, 81, 101, 107, 84, 85, 107, 107, 107, 89, 90, 91, 107, 93, |
|
| 582 | - 66, 107, 107, 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 107, |
|
| 583 | - 107, 84, 85, 107, 107, 107, 89, 90, 91, 66, 93, 107, 107, 107, 71, 72, 107, 74, |
|
| 584 | - 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, |
|
| 585 | - 107, 93, 66, 107, 107, 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, |
|
| 586 | - 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, 107, 93, 66, 107, 107, 107, |
|
| 587 | - 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, 85, 107, |
|
| 588 | - 107, 107, 89, 90, 91, 66, 93, 107, 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, |
|
| 589 | - 107, 107, 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, 107, 93, 66, 107, |
|
| 590 | - 107, 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, |
|
| 591 | - 85, 107, 107, 107, 89, 90, 91, 107, 93, 66, 107, 107, 107, 107, 71, 72, 107, 74, |
|
| 592 | - 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, 66, |
|
| 593 | - 93, 107, 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 107, 107, |
|
| 594 | - 84, 85, 1, 2, 107, 89, 90, 91, 107, 93, 66, 107, 107, 107, 107, 71, 72, 107, 74, |
|
| 595 | - 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, 85, 1, 107, 107, 89, 90, 91, 107, |
|
| 596 | - 93, 37, 107, 39, 40, 41, 63, 64, 65, 66, 67, 68, 107, 49, 71, 107, 107, 25, 107, |
|
| 597 | - 27, 56, 57, 58, 59, 107, 2, 34, 107, 107, 107, 107, 39, 40, 41, 107, 12, 13, 66, |
|
| 598 | - 15, 107, 17, 18, 71, 72, 1, 74, 107, 76, 56, 57, 58, 59, 81, 107, 11, 11, 85, |
|
| 599 | - 107, 12, 13, 89, 90, 91, 17, 93, 107, 107, 23, 107, 46, 27, 27, 49, 27, 51, 29, |
|
| 600 | - 53, 34, 34, 107, 34, 107, 39, 40, 41, 107, 107, 107, 66, 107, 1, 47, 107, 71, |
|
| 601 | - 72, 107, 74, 107, 76, 56, 57, 58, 59, 81, 107, 107, 107, 85, 107, 12, 13, 89, |
|
| 602 | - 90, 91, 17, 93, 27, 107, 107, 107, 107, 107, 107, 34, 27, 107, 29, 66, 39, 40, |
|
| 603 | - 41, 34, 71, 72, 107, 74, 107, 76, 107, 107, 107, 107, 81, 11, 107, 56, 57, 58, |
|
| 604 | - 59, 107, 89, 90, 91, 107, 93, 23, 107, 66, 107, 27, 107, 107, 71, 72, 107, 74, |
|
| 605 | - 34, 76, 66, 107, 107, 107, 81, 71, 72, 107, 74, 107, 76, 47, 89, 90, 91, 81, 93, |
|
| 606 | - 107, 107, 107, 107, 107, 107, 89, 90, 91, 66, 93, 107, 107, 107, 71, 72, 107, |
|
| 607 | - 74, 107, 76, 107, 107, 107, 107, 81, 107, 107, 2, 107, 107, 107, 107, 89, 90, |
|
| 608 | - 91, 107, 93, 12, 13, 66, 15, 107, 17, 18, 71, 72, 107, 74, 107, 76, 107, 107, |
|
| 609 | - 107, 107, 81, 107, 107, 2, 107, 107, 107, 107, 89, 90, 91, 107, 93, 12, 13, 107, |
|
| 610 | - 107, 46, 17, 18, 49, 66, 51, 2, 53, 1, 71, 72, 107, 74, 107, 76, 107, 12, 13, |
|
| 611 | - 107, 81, 107, 17, 18, 107, 107, 107, 107, 89, 90, 91, 46, 93, 107, 49, 107, 51, |
|
| 612 | - 107, 53, 54, 107, 1, 107, 107, 107, 107, 107, 39, 40, 41, 107, 46, 107, 107, 49, |
|
| 613 | - 107, 51, 107, 53, 107, 107, 2, 22, 107, 56, 57, 58, 59, 107, 61, 107, 12, 13, |
|
| 614 | - 107, 107, 107, 17, 18, 107, 39, 40, 41, 12, 13, 107, 107, 107, 17, 18, 107, 107, |
|
| 615 | - 107, 107, 107, 107, 107, 56, 57, 58, 59, 107, 107, 107, 107, 107, 46, 107, 107, |
|
| 616 | - 49, 11, 51, 107, 53, 107, 107, 107, 46, 107, 107, 49, 22, 51, 24, 53, 107, 27, |
|
| 617 | - 107, 107, 107, 107, 107, 107, 34, 107, 36, 107, 38, 107, 107, 107, 107, 107, |
|
| 618 | - 107, 107, 46,); |
|
| 619 | - |
|
| 620 | - const YY_SHIFT_USE_DFLT = - 15; |
|
| 621 | - |
|
| 622 | - const YY_SHIFT_MAX = 238; |
|
| 623 | - |
|
| 624 | - static public $yy_shift_ofst = array(499, 393, 78, 393, 348, 78, 78, 348, - 12, - 12, 33, 78, 78, 78, 78, 168, 78, |
|
| 625 | - 78, 78, 213, 123, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 303, 78, 78, 78, |
|
| 626 | - 168, 258, 258, 438, 438, 438, 438, 438, 438, 1609, 1660, 1706, 1706, 1706, |
|
| 627 | - 1706, 1706, 499, 1912, 1153, 609, 541, 507, 989, 907, 825, 1071, 646, 1880, |
|
| 628 | - 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 731, |
|
| 629 | - 731, 140, 725, 804, 230, 465, 280, 160, 747, 1714, 1663, 483, 483, 160, 280, |
|
| 630 | - 280, 324, 160, 522, 594, 1661, 1749, 642, 715, 317, 842, 40, 404, 3, 144, 404, |
|
| 631 | - - 5, 460, 327, 431, 161, 294, 147, 147, 426, - 5, 434, 223, 223, 265, 223, 223, |
|
| 632 | - 223, 223, 223, 223, 265, 223, - 15, 1827, 1857, 1640, 1877, 1931, 1942, 92, |
|
| 633 | - 645, 11, 90, - 5, 70, - 5, - 5, - 5, - 5, - 5, - 5, - 5, - 5, - 5, - 5, 214, |
|
| 634 | - - 5, 70, - 5, 70, - 5, - 5, - 5, - 5, - 5, 124, 124, 227, 124, 356, 124, 214, |
|
| 635 | - 124, 124, - 5, 70, 124, 124, 223, 223, 595, 587, 587, 223, 265, 232, 223, 265, |
|
| 636 | - 265, 223, - 15, - 15, - 15, - 15, - 15, 1581, 1970, 575, 694, 660, 260, 118, |
|
| 637 | - 73, - 6, 96, 256, 295, 308, 145, 44, 110, 208, 263, - 14, 99, 439, 232, 519, |
|
| 638 | - 521, 511, 509, 487, 83, 187, 101, 372, 279, 0, 297, 288, 481, 452, 371, 307, |
|
| 639 | - 319, 385, 412, 414, 433, 375, 402,); |
|
| 640 | - |
|
| 641 | - const YY_REDUCE_USE_DFLT = - 67; |
|
| 642 | - |
|
| 643 | - const YY_REDUCE_MAX = 192; |
|
| 644 | - |
|
| 645 | - static public $yy_reduce_ofst = array(1560, 469, 608, 503, 542, 570, 728, 643, 922, 1278, 1360, 1060, 950, 1032, |
|
| 646 | - 1086, 896, 868, 1004, 786, 1414, 1332, 1114, 1524, 1168, 1224, 1250, 1196, |
|
| 647 | - 1142, 1306, 1470, 1496, 1388, 1442, 978, 758, 840, 814, 1588, 1639, 1745, |
|
| 648 | - 1719, 1678, 1708, 1775, 1811, 1259, 931, 931, 1013, 1095, 849, 1177, 170, |
|
| 649 | - - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, |
|
| 650 | - - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 66, |
|
| 651 | - 46, 652, - 37, 484, 767, - 7, 136, 351, 113, 203, 254, 141, 314, 179, 278, |
|
| 652 | - 173, 420, 289, 394, 394, 289, 289, 20, 290, 228, 290, 424, 228, 326, 406, 289, |
|
| 653 | - 384, 289, 228, 316, 312, 435, 379, 389, 289, 289, 436, 458, 289, 289, 289, |
|
| 654 | - 289, 289, 289, 228, 289, 289, 476, 476, 476, 476, 476, 476, 502, 472, 476, |
|
| 655 | - 476, 466, 470, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 482, 466, |
|
| 656 | - 490, 466, 510, 466, 466, 466, 466, 466, 506, 506, 512, 506, 459, 506, 525, |
|
| 657 | - 506, 506, 466, 530, 506, 506, 28, 28, 534, 250, 250, 28, - 56, 193, 28, - 56, |
|
| 658 | - - 56, 28, 112, - 27, 454, 403, 446,); |
|
| 659 | - |
|
| 660 | - static public $yyExpectedTokens = array(array(3, 4, 5, 6, 7, 8, 12, 13, 16, 19, 20, 21, 26, 30, 32, 33,), |
|
| 661 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 662 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 663 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 664 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 665 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 666 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 667 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 668 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 669 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 670 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 671 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 672 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 673 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 674 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 675 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 31, 32, 33, 35, 37, 40, 43, |
|
| 676 | - 44, 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 677 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 31, 32, 33, 35, 37, 40, 43, |
|
| 678 | - 44, 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 679 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 680 | - 45, 46, 48, 50, 52, 53, 54, 55, 60,), |
|
| 681 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 682 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 683 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 684 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 685 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 686 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 687 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 688 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 689 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 690 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 691 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 692 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 693 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 694 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 695 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 696 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 697 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 698 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 699 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 700 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 701 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 702 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 703 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 704 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 705 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 706 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 707 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 708 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 709 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 710 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 711 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 712 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 713 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 714 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 715 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 716 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 717 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 718 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 719 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 720 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 721 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 722 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 723 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 724 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 725 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 726 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 727 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 728 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 729 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 730 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 731 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 732 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 733 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 734 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 735 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 736 | - 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 737 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 738 | - 45, 46, 48, 50, 52, 55, 60,), |
|
| 739 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 740 | - 45, 46, 48, 50, 52, 55, 60,), |
|
| 741 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 742 | - 45, 46, 48, 50, 52, 55, 60,), |
|
| 743 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 744 | - 45, 46, 48, 50, 52, 55, 60,), |
|
| 745 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 746 | - 45, 46, 48, 50, 52, 55, 60,), |
|
| 747 | - array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 748 | - 45, 46, 48, 50, 52, 55, 60,), |
|
| 749 | - array(1, 25, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 750 | - array(1, 11, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 751 | - array(1, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 752 | - array(1, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 753 | - array(1, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 754 | - array(1, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 755 | - array(1, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 756 | - array(3, 4, 5, 6, 7, 8, 12, 13, 16, 19, 20, 21, 26, 30, 32, 33,), |
|
| 757 | - array(1, 22, 39, 40, 41, 56, 57, 58, 59,), |
|
| 758 | - array(1, 38, 39, 40, 41, 56, 57, 58, 59,), |
|
| 759 | - array(1, 28, 39, 40, 41, 56, 57, 58, 59,), |
|
| 760 | - array(1, 11, 39, 40, 41, 56, 57, 58, 59,), |
|
| 761 | - array(1, 2, 39, 40, 41, 56, 57, 58, 59,), |
|
| 762 | - array(1, 11, 39, 40, 41, 56, 57, 58, 59,), |
|
| 763 | - array(1, 11, 39, 40, 41, 56, 57, 58, 59,), |
|
| 764 | - array(1, 11, 39, 40, 41, 56, 57, 58, 59,), |
|
| 765 | - array(1, 38, 39, 40, 41, 56, 57, 58, 59,), |
|
| 766 | - array(1, 39, 40, 41, 54, 56, 57, 58, 59,), |
|
| 767 | - array(1, 39, 40, 41, 56, 57, 58, 59, 61,), |
|
| 768 | - array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 769 | - array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 770 | - array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 771 | - array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 772 | - array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 773 | - array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 774 | - array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 775 | - array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 776 | - array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 777 | - array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 778 | - array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 779 | - array(1, 39, 40, 41, 56, 57, 58, 59,), array(39, 40, 41, 56, 57, 58, 59,), |
|
| 780 | - array(39, 40, 41, 56, 57, 58, 59,), array(14, 17, 50, 52, 55,), |
|
| 781 | - array(5, 12, 13, 14, 16, 19, 20, 21, 26, 30, 32, 33, 60, 61,), |
|
| 782 | - array(1, 11, 18, 27, 34, 37, 49,), array(14, 17, 52, 55,), |
|
| 783 | - array(1, 11, 27, 34,), array(1, 27, 34,), array(14, 37, 55,), |
|
| 784 | - array(5, 12, 13, 14, 16, 19, 20, 21, 26, 30, 32, 33, 60, 61,), |
|
| 785 | - array(12, 13, 17, 27, 29, 34,), array(12, 13, 17, 27, 29, 34,), |
|
| 786 | - array(12, 13, 17, 27, 34,), array(12, 13, 17, 27, 34,), array(14, 37, 55,), |
|
| 787 | - array(1, 27, 34,), array(1, 27, 34,), array(18, 46, 53,), |
|
| 788 | - array(14, 37, 55,), array(1, 2,), array(1, 11, 27, 28, 34,), |
|
| 789 | - array(11, 23, 27, 34, 47,), array(11, 23, 27, 34, 47,), |
|
| 790 | - array(1, 11, 27, 34,), array(1, 11, 27, 34,), array(13, 14, 17, 55,), |
|
| 791 | - array(12, 13, 17, 51,), array(15, 18, 49,), array(12, 13, 17,), |
|
| 792 | - array(8, 9, 10,), array(15, 18, 49,), array(12, 13, 17,), array(27, 34,), |
|
| 793 | - array(1, 54,), array(14, 55,), array(1, 11,), array(18, 49,), |
|
| 794 | - array(27, 34,), array(14, 17,), array(14, 17,), array(1, 18,), |
|
| 795 | - array(27, 34,), array(1, 29,), array(1,), array(1,), array(18,), array(1,), |
|
| 796 | - array(1,), array(1,), array(1,), array(1,), array(1,), array(18,), |
|
| 797 | - array(1,), array(), array(2, 12, 13, 15, 17, 18, 46, 49, 51, 53,), |
|
| 798 | - array(2, 12, 13, 17, 18, 46, 49, 51, 53, 54,), |
|
| 799 | - array(2, 12, 13, 15, 17, 18, 46, 49, 51, 53,), |
|
| 800 | - array(2, 12, 13, 17, 18, 46, 49, 51, 53,), |
|
| 801 | - array(2, 12, 13, 17, 18, 46, 49, 51, 53,), |
|
| 802 | - array(12, 13, 17, 18, 46, 49, 51, 53,), array(13, 14, 17, 35, 55,), |
|
| 803 | - array(12, 13, 17, 51,), array(15, 46, 53,), array(12, 13, 17,), |
|
| 804 | - array(27, 34,), array(14, 55,), array(27, 34,), array(27, 34,), |
|
| 805 | - array(27, 34,), array(27, 34,), array(27, 34,), array(27, 34,), |
|
| 806 | - array(27, 34,), array(27, 34,), array(27, 34,), array(27, 34,), |
|
| 807 | - array(46, 53,), array(27, 34,), array(14, 55,), array(27, 34,), |
|
| 808 | - array(14, 55,), array(27, 34,), array(27, 34,), array(27, 34,), |
|
| 809 | - array(27, 34,), array(27, 34,), array(46, 53,), array(46, 53,), |
|
| 810 | - array(13, 37,), array(46, 53,), array(15, 23,), array(46, 53,), |
|
| 811 | - array(46, 53,), array(46, 53,), array(46, 53,), array(27, 34,), |
|
| 812 | - array(14, 55,), array(46, 53,), array(46, 53,), array(1,), array(1,), |
|
| 813 | - array(9,), array(2,), array(2,), array(1,), array(18,), array(37,), |
|
| 814 | - array(1,), array(18,), array(18,), array(1,), array(), array(), array(), |
|
| 815 | - array(), array(), array(1, 2, 37, 39, 40, 41, 49, 56, 57, 58, 59,), |
|
| 816 | - array(11, 22, 24, 27, 34, 36, 38, 46,), array(11, 15, 27, 34, 37, 49,), |
|
| 817 | - array(37, 46, 49, 54,), array(12, 13, 17, 51,), array(29, 37, 49,), |
|
| 818 | - array(23, 47, 54,), array(23, 47, 61,), array(22, 36,), array(36, 54,), |
|
| 819 | - array(36, 38,), array(37, 49,), array(37, 49,), array(46, 54,), |
|
| 820 | - array(36, 38,), array(36, 38,), array(23, 47,), array(37, 49,), |
|
| 821 | - array(17, 51,), array(15, 46,), array(35,), array(37,), array(11,), |
|
| 822 | - array(17,), array(5,), array(17,), array(14,), array(17,), array(17,), |
|
| 823 | - array(15,), array(46,), array(17,), array(17,), array(42,), array(17,), |
|
| 824 | - array(52,), array(17,), array(24,), array(52,), array(35,), array(17,), |
|
| 825 | - array(37,), array(17,), array(54,), array(54,), array(38,), array(), |
|
| 826 | - array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 827 | - array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 828 | - array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 829 | - array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 830 | - array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 831 | - array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 832 | - array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 833 | - array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 834 | - array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 835 | - array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 836 | - array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 837 | - array(), array(), array(), array(), array(), array(), array(), array(),); |
|
| 838 | - |
|
| 839 | - static public $yy_default = array(339, 517, 496, 532, 532, 496, 496, 532, 532, 532, 532, 532, 532, 532, 532, 532, |
|
| 840 | - 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, |
|
| 841 | - 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 398, 532, 361, |
|
| 842 | - 398, 398, 374, 364, 336, 532, 532, 403, 532, 532, 532, 532, 532, 532, 532, 532, |
|
| 843 | - 400, 494, 518, 403, 409, 520, 379, 519, 405, 495, 410, 420, 425, 424, 532, 532, |
|
| 844 | - 436, 532, 412, 398, 532, 532, 398, 398, 398, 398, 532, 398, 398, 508, 532, 388, |
|
| 845 | - 412, 426, 426, 412, 412, 532, 461, 451, 461, 532, 451, 461, 398, 412, 532, 412, |
|
| 846 | - 451, 398, 532, 532, 392, 376, 412, 419, 394, 505, 427, 416, 428, 429, 415, 423, |
|
| 847 | - 451, 412, 503, 450, 450, 450, 450, 450, 450, 532, 463, 477, 461, 384, 532, 372, |
|
| 848 | - 383, 371, 366, 365, 368, 370, 360, 362, 385, 454, 386, 532, 358, 532, 387, 377, |
|
| 849 | - 382, 381, 375, 457, 486, 461, 487, 532, 489, 456, 455, 488, 378, 532, 458, 459, |
|
| 850 | - 445, 393, 352, 497, 498, 389, 506, 461, 418, 509, 483, 395, 461, 461, 502, 502, |
|
| 851 | - 502, 436, 432, 436, 436, 462, 436, 426, 426, 532, 532, 532, 532, 436, 432, 532, |
|
| 852 | - 532, 426, 446, 532, 432, 532, 477, 532, 532, 344, 532, 532, 532, 532, 532, 432, |
|
| 853 | - 532, 532, 438, 532, 532, 532, 406, 532, 434, 532, 507, 532, 441, 532, 532, 340, |
|
| 854 | - 504, 492, 338, 337, 491, 438, 467, 482, 396, 341, 441, 477, 413, 349, 343, 350, |
|
| 855 | - 466, 351, 411, 348, 431, 346, 345, 347, 433, 407, 465, 355, 464, 356, 414, 437, |
|
| 856 | - 399, 353, 435, 380, 354, 342, 421, 417, 513, 479, 440, 439, 480, 512, 390, 511, |
|
| 857 | - 510, 523, 522, 521, 481, 484, 493, 500, 478, 453, 485, 499, 452, 529, 430, 501, |
|
| 858 | - 528, 391, 526, 525, 443, 373, 460, 490, 444, 422, 473, 471, 476, 442, 470, 469, |
|
| 859 | - 468, 447, 449, 524, 475, 531, 530, 527, 448, 397, 515, 474, 516, 472, 514, 367,); |
|
| 860 | - |
|
| 861 | - const YYNOCODE = 108; |
|
| 862 | - |
|
| 863 | - const YYSTACKDEPTH = 500; |
|
| 864 | - |
|
| 865 | - const YYNSTATE = 336; |
|
| 866 | - |
|
| 867 | - const YYNRULE = 196; |
|
| 868 | - |
|
| 869 | - const YYERRORSYMBOL = 62; |
|
| 870 | - |
|
| 871 | - const YYERRSYMDT = 'yy0'; |
|
| 872 | - |
|
| 873 | - const YYFALLBACK = 0; |
|
| 874 | - |
|
| 875 | - public static $yyFallback = array(); |
|
| 876 | - |
|
| 877 | - public function Trace($TraceFILE, $zTracePrompt) |
|
| 878 | - { |
|
| 879 | - if (!$TraceFILE) { |
|
| 880 | - $zTracePrompt = 0; |
|
| 881 | - } elseif (!$zTracePrompt) { |
|
| 882 | - $TraceFILE = 0; |
|
| 883 | - } |
|
| 884 | - $this->yyTraceFILE = $TraceFILE; |
|
| 885 | - $this->yyTracePrompt = $zTracePrompt; |
|
| 886 | - } |
|
| 887 | - |
|
| 888 | - public function PrintTrace() |
|
| 889 | - { |
|
| 890 | - $this->yyTraceFILE = fopen('php://output', 'w'); |
|
| 891 | - $this->yyTracePrompt = '<br>'; |
|
| 892 | - } |
|
| 893 | - |
|
| 894 | - public $yyTraceFILE; |
|
| 895 | - |
|
| 896 | - public $yyTracePrompt; |
|
| 897 | - |
|
| 898 | - public $yyidx; /* Index of top element in stack */ |
|
| 899 | - public $yyerrcnt; /* Shifts left before out of the error */ |
|
| 900 | - public $yystack = array(); /* The parser's stack */ |
|
| 901 | - |
|
| 902 | - public $yyTokenName = array('$', 'VERT', 'COLON', 'PHP', 'NOCACHE', 'TEXT', 'STRIPON', 'STRIPOFF', 'LITERALSTART', |
|
| 903 | - 'LITERALEND', 'LITERAL', 'RDEL', 'SIMPELOUTPUT', 'LDEL', 'DOLLARID', 'EQUAL', |
|
| 904 | - 'SIMPLETAG', 'ID', 'PTR', 'LDELMAKENOCACHE', 'LDELIF', 'LDELFOR', 'SEMICOLON', 'INCDEC', |
|
| 905 | - 'TO', 'STEP', 'LDELFOREACH', 'SPACE', 'AS', 'APTR', 'LDELSETFILTER', |
|
| 906 | - 'SMARTYBLOCKCHILDPARENT', 'CLOSETAG', 'LDELSLASH', 'ATTR', 'INTEGER', 'COMMA', 'OPENP', |
|
| 907 | - 'CLOSEP', 'MATH', 'UNIMATH', 'ISIN', 'QMARK', 'NOT', 'TYPECAST', 'HEX', 'DOT', |
|
| 908 | - 'INSTANCEOF', 'SINGLEQUOTESTRING', 'DOUBLECOLON', 'NAMESPACE', 'AT', 'HATCH', 'OPENB', |
|
| 909 | - 'CLOSEB', 'DOLLAR', 'LOGOP', 'SLOGOP', 'TLOGOP', 'SINGLECOND', 'QUOTE', 'BACKTICK', |
|
| 910 | - 'error', 'start', 'template', 'template_element', 'smartytag', 'literal', |
|
| 911 | - 'text_content', 'literal_elements', 'literal_element', 'tag', 'variable', 'attributes', |
|
| 912 | - 'value', 'expr', 'varindexed', 'modifierlist', 'statement', 'statements', 'foraction', |
|
| 913 | - 'varvar', 'modparameters', 'attribute', 'ternary', 'array', 'tlop', 'lop', 'scond', |
|
| 914 | - 'function', 'ns1', 'doublequoted_with_quotes', 'static_class_access', 'object', |
|
| 915 | - 'arrayindex', 'indexdef', 'varvarele', 'objectchain', 'objectelement', 'method', |
|
| 916 | - 'params', 'modifier', 'modparameter', 'arrayelements', 'arrayelement', 'doublequoted', |
|
| 917 | - 'doublequotedcontent',); |
|
| 918 | - |
|
| 919 | - public static $yyRuleName = array('start ::= template', 'template ::= template_element', |
|
| 920 | - 'template ::= template template_element', 'template ::=', |
|
| 921 | - 'template_element ::= smartytag', 'template_element ::= literal', |
|
| 922 | - 'template_element ::= PHP', 'template_element ::= NOCACHE', |
|
| 923 | - 'template_element ::= text_content', 'text_content ::= TEXT', |
|
| 924 | - 'text_content ::= text_content TEXT', 'template_element ::= STRIPON', |
|
| 925 | - 'template_element ::= STRIPOFF', 'literal ::= LITERALSTART LITERALEND', |
|
| 926 | - 'literal ::= LITERALSTART literal_elements LITERALEND', |
|
| 927 | - 'literal_elements ::= literal_elements literal_element', 'literal_elements ::=', |
|
| 928 | - 'literal_element ::= literal', 'literal_element ::= LITERAL', |
|
| 929 | - 'smartytag ::= tag RDEL', 'smartytag ::= SIMPELOUTPUT', 'tag ::= LDEL variable', |
|
| 930 | - 'tag ::= LDEL variable attributes', 'tag ::= LDEL value', |
|
| 931 | - 'tag ::= LDEL value attributes', 'tag ::= LDEL expr', |
|
| 932 | - 'tag ::= LDEL expr attributes', 'tag ::= LDEL DOLLARID EQUAL value', |
|
| 933 | - 'tag ::= LDEL DOLLARID EQUAL expr', 'tag ::= LDEL DOLLARID EQUAL expr attributes', |
|
| 934 | - 'tag ::= LDEL varindexed EQUAL expr attributes', 'smartytag ::= SIMPLETAG', |
|
| 935 | - 'tag ::= LDEL ID attributes', 'tag ::= LDEL ID', |
|
| 936 | - 'tag ::= LDEL ID modifierlist attributes', 'tag ::= LDEL ID PTR ID attributes', |
|
| 937 | - 'tag ::= LDEL ID PTR ID modifierlist attributes', |
|
| 938 | - 'tag ::= LDELMAKENOCACHE DOLLARID', 'tag ::= LDELIF expr', |
|
| 939 | - 'tag ::= LDELIF expr attributes', 'tag ::= LDELIF statement', |
|
| 940 | - 'tag ::= LDELIF statement attributes', |
|
| 941 | - 'tag ::= LDELFOR statements SEMICOLON expr SEMICOLON varindexed foraction attributes', |
|
| 942 | - 'foraction ::= EQUAL expr', 'foraction ::= INCDEC', |
|
| 943 | - 'tag ::= LDELFOR statement TO expr attributes', |
|
| 944 | - 'tag ::= LDELFOR statement TO expr STEP expr attributes', |
|
| 945 | - 'tag ::= LDELFOREACH attributes', |
|
| 946 | - 'tag ::= LDELFOREACH SPACE value AS varvar attributes', |
|
| 947 | - 'tag ::= LDELFOREACH SPACE value AS varvar APTR varvar attributes', |
|
| 948 | - 'tag ::= LDELFOREACH SPACE expr AS varvar attributes', |
|
| 949 | - 'tag ::= LDELFOREACH SPACE expr AS varvar APTR varvar attributes', |
|
| 950 | - 'tag ::= LDELSETFILTER ID modparameters', |
|
| 951 | - 'tag ::= LDELSETFILTER ID modparameters modifierlist', |
|
| 952 | - 'tag ::= LDEL SMARTYBLOCKCHILDPARENT', 'smartytag ::= CLOSETAG', |
|
| 953 | - 'tag ::= LDELSLASH ID', 'tag ::= LDELSLASH ID modifierlist', |
|
| 954 | - 'tag ::= LDELSLASH ID PTR ID', 'tag ::= LDELSLASH ID PTR ID modifierlist', |
|
| 955 | - 'attributes ::= attributes attribute', 'attributes ::= attribute', |
|
| 956 | - 'attributes ::=', 'attribute ::= SPACE ID EQUAL ID', 'attribute ::= ATTR expr', |
|
| 957 | - 'attribute ::= ATTR value', 'attribute ::= SPACE ID', 'attribute ::= SPACE expr', |
|
| 958 | - 'attribute ::= SPACE value', 'attribute ::= SPACE INTEGER EQUAL expr', |
|
| 959 | - 'statements ::= statement', 'statements ::= statements COMMA statement', |
|
| 960 | - 'statement ::= DOLLARID EQUAL INTEGER', 'statement ::= DOLLARID EQUAL expr', |
|
| 961 | - 'statement ::= varindexed EQUAL expr', 'statement ::= OPENP statement CLOSEP', |
|
| 962 | - 'expr ::= value', 'expr ::= ternary', 'expr ::= DOLLARID COLON ID', |
|
| 963 | - 'expr ::= expr MATH value', 'expr ::= expr UNIMATH value', 'expr ::= array', |
|
| 964 | - 'expr ::= expr modifierlist', 'expr ::= expr tlop value', |
|
| 965 | - 'expr ::= expr lop expr', 'expr ::= expr scond', 'expr ::= expr ISIN array', |
|
| 966 | - 'expr ::= expr ISIN value', |
|
| 967 | - 'ternary ::= OPENP expr CLOSEP QMARK DOLLARID COLON expr', |
|
| 968 | - 'ternary ::= OPENP expr CLOSEP QMARK expr COLON expr', 'value ::= variable', |
|
| 969 | - 'value ::= UNIMATH value', 'value ::= NOT value', 'value ::= TYPECAST value', |
|
| 970 | - 'value ::= variable INCDEC', 'value ::= HEX', 'value ::= INTEGER', |
|
| 971 | - 'value ::= INTEGER DOT INTEGER', 'value ::= INTEGER DOT', 'value ::= DOT INTEGER', |
|
| 972 | - 'value ::= ID', 'value ::= function', 'value ::= OPENP expr CLOSEP', |
|
| 973 | - 'value ::= variable INSTANCEOF ns1', 'value ::= variable INSTANCEOF variable', |
|
| 974 | - 'value ::= SINGLEQUOTESTRING', 'value ::= doublequoted_with_quotes', |
|
| 975 | - 'value ::= varindexed DOUBLECOLON static_class_access', 'value ::= smartytag', |
|
| 976 | - 'value ::= value modifierlist', 'value ::= NAMESPACE', |
|
| 977 | - 'value ::= ns1 DOUBLECOLON static_class_access', 'ns1 ::= ID', |
|
| 978 | - 'ns1 ::= NAMESPACE', 'variable ::= DOLLARID', 'variable ::= varindexed', |
|
| 979 | - 'variable ::= varvar AT ID', 'variable ::= object', 'variable ::= HATCH ID HATCH', |
|
| 980 | - 'variable ::= HATCH ID HATCH arrayindex', 'variable ::= HATCH variable HATCH', |
|
| 981 | - 'variable ::= HATCH variable HATCH arrayindex', |
|
| 982 | - 'varindexed ::= DOLLARID arrayindex', 'varindexed ::= varvar arrayindex', |
|
| 983 | - 'arrayindex ::= arrayindex indexdef', 'arrayindex ::=', |
|
| 984 | - 'indexdef ::= DOT DOLLARID', 'indexdef ::= DOT varvar', |
|
| 985 | - 'indexdef ::= DOT varvar AT ID', 'indexdef ::= DOT ID', |
|
| 986 | - 'indexdef ::= DOT INTEGER', 'indexdef ::= DOT LDEL expr RDEL', |
|
| 987 | - 'indexdef ::= OPENB ID CLOSEB', 'indexdef ::= OPENB ID DOT ID CLOSEB', |
|
| 988 | - 'indexdef ::= OPENB SINGLEQUOTESTRING CLOSEB', |
|
| 989 | - 'indexdef ::= OPENB INTEGER CLOSEB', 'indexdef ::= OPENB DOLLARID CLOSEB', |
|
| 990 | - 'indexdef ::= OPENB variable CLOSEB', 'indexdef ::= OPENB value CLOSEB', |
|
| 991 | - 'indexdef ::= OPENB expr CLOSEB', 'indexdef ::= OPENB CLOSEB', |
|
| 992 | - 'varvar ::= DOLLARID', 'varvar ::= DOLLAR', 'varvar ::= varvar varvarele', |
|
| 993 | - 'varvarele ::= ID', 'varvarele ::= SIMPELOUTPUT', 'varvarele ::= LDEL expr RDEL', |
|
| 994 | - 'object ::= varindexed objectchain', 'objectchain ::= objectelement', |
|
| 995 | - 'objectchain ::= objectchain objectelement', |
|
| 996 | - 'objectelement ::= PTR ID arrayindex', 'objectelement ::= PTR varvar arrayindex', |
|
| 997 | - 'objectelement ::= PTR LDEL expr RDEL arrayindex', |
|
| 998 | - 'objectelement ::= PTR ID LDEL expr RDEL arrayindex', |
|
| 999 | - 'objectelement ::= PTR method', 'function ::= ns1 OPENP params CLOSEP', |
|
| 1000 | - 'method ::= ID OPENP params CLOSEP', 'method ::= DOLLARID OPENP params CLOSEP', |
|
| 1001 | - 'params ::= params COMMA expr', 'params ::= expr', 'params ::=', |
|
| 1002 | - 'modifierlist ::= modifierlist modifier modparameters', |
|
| 1003 | - 'modifierlist ::= modifier modparameters', 'modifier ::= VERT AT ID', |
|
| 1004 | - 'modifier ::= VERT ID', 'modparameters ::= modparameters modparameter', |
|
| 1005 | - 'modparameters ::=', 'modparameter ::= COLON value', |
|
| 1006 | - 'modparameter ::= COLON array', 'static_class_access ::= method', |
|
| 1007 | - 'static_class_access ::= method objectchain', 'static_class_access ::= ID', |
|
| 1008 | - 'static_class_access ::= DOLLARID arrayindex', |
|
| 1009 | - 'static_class_access ::= DOLLARID arrayindex objectchain', 'lop ::= LOGOP', |
|
| 1010 | - 'lop ::= SLOGOP', 'tlop ::= TLOGOP', 'scond ::= SINGLECOND', |
|
| 1011 | - 'array ::= OPENB arrayelements CLOSEB', 'arrayelements ::= arrayelement', |
|
| 1012 | - 'arrayelements ::= arrayelements COMMA arrayelement', 'arrayelements ::=', |
|
| 1013 | - 'arrayelement ::= value APTR expr', 'arrayelement ::= ID APTR expr', |
|
| 1014 | - 'arrayelement ::= expr', 'doublequoted_with_quotes ::= QUOTE QUOTE', |
|
| 1015 | - 'doublequoted_with_quotes ::= QUOTE doublequoted QUOTE', |
|
| 1016 | - 'doublequoted ::= doublequoted doublequotedcontent', |
|
| 1017 | - 'doublequoted ::= doublequotedcontent', |
|
| 1018 | - 'doublequotedcontent ::= BACKTICK variable BACKTICK', |
|
| 1019 | - 'doublequotedcontent ::= BACKTICK expr BACKTICK', |
|
| 1020 | - 'doublequotedcontent ::= DOLLARID', 'doublequotedcontent ::= LDEL variable RDEL', |
|
| 1021 | - 'doublequotedcontent ::= LDEL expr RDEL', 'doublequotedcontent ::= smartytag', |
|
| 1022 | - 'doublequotedcontent ::= TEXT',); |
|
| 1023 | - |
|
| 1024 | - public function tokenName($tokenType) |
|
| 1025 | - { |
|
| 1026 | - if ($tokenType === 0) { |
|
| 1027 | - return 'End of Input'; |
|
| 1028 | - } |
|
| 1029 | - if ($tokenType > 0 && $tokenType < count($this->yyTokenName)) { |
|
| 1030 | - return $this->yyTokenName[ $tokenType ]; |
|
| 1031 | - } else { |
|
| 1032 | - return "Unknown"; |
|
| 1033 | - } |
|
| 1034 | - } |
|
| 1035 | - |
|
| 1036 | - public static function yy_destructor($yymajor, $yypminor) |
|
| 1037 | - { |
|
| 1038 | - switch ($yymajor) { |
|
| 1039 | - default: |
|
| 1040 | - break; /* If no destructor action specified: do nothing */ |
|
| 1041 | - } |
|
| 1042 | - } |
|
| 1043 | - |
|
| 1044 | - public function yy_pop_parser_stack() |
|
| 1045 | - { |
|
| 1046 | - if (empty($this->yystack)) { |
|
| 1047 | - return; |
|
| 1048 | - } |
|
| 1049 | - $yytos = array_pop($this->yystack); |
|
| 1050 | - if ($this->yyTraceFILE && $this->yyidx >= 0) { |
|
| 1051 | - fwrite($this->yyTraceFILE, $this->yyTracePrompt . 'Popping ' . $this->yyTokenName[ $yytos->major ] . "\n"); |
|
| 1052 | - } |
|
| 1053 | - $yymajor = $yytos->major; |
|
| 1054 | - self::yy_destructor($yymajor, $yytos->minor); |
|
| 1055 | - $this->yyidx --; |
|
| 1056 | - |
|
| 1057 | - return $yymajor; |
|
| 1058 | - } |
|
| 1059 | - |
|
| 1060 | - public function __destruct() |
|
| 1061 | - { |
|
| 1062 | - while ($this->yystack !== Array()) { |
|
| 1063 | - $this->yy_pop_parser_stack(); |
|
| 1064 | - } |
|
| 1065 | - if (is_resource($this->yyTraceFILE)) { |
|
| 1066 | - fclose($this->yyTraceFILE); |
|
| 1067 | - } |
|
| 1068 | - } |
|
| 1069 | - |
|
| 1070 | - public function yy_get_expected_tokens($token) |
|
| 1071 | - { |
|
| 1072 | - static $res3 = array(); |
|
| 1073 | - static $res4 = array(); |
|
| 1074 | - $state = $this->yystack[ $this->yyidx ]->stateno; |
|
| 1075 | - $expected = self::$yyExpectedTokens[ $state ]; |
|
| 1076 | - if (isset($res3[ $state ][ $token ])) { |
|
| 1077 | - if ($res3[ $state ][ $token ]) { |
|
| 1078 | - return $expected; |
|
| 1079 | - } |
|
| 1080 | - } else { |
|
| 1081 | - if ($res3[ $state ][ $token ] = in_array($token, self::$yyExpectedTokens[ $state ], true)) { |
|
| 1082 | - return $expected; |
|
| 1083 | - } |
|
| 1084 | - } |
|
| 1085 | - $stack = $this->yystack; |
|
| 1086 | - $yyidx = $this->yyidx; |
|
| 1087 | - do { |
|
| 1088 | - $yyact = $this->yy_find_shift_action($token); |
|
| 1089 | - if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) { |
|
| 1090 | - // reduce action |
|
| 1091 | - $done = 0; |
|
| 1092 | - do { |
|
| 1093 | - if ($done ++ == 100) { |
|
| 1094 | - $this->yyidx = $yyidx; |
|
| 1095 | - $this->yystack = $stack; |
|
| 1096 | - // too much recursion prevents proper detection |
|
| 1097 | - // so give up |
|
| 1098 | - return array_unique($expected); |
|
| 1099 | - } |
|
| 1100 | - $yyruleno = $yyact - self::YYNSTATE; |
|
| 1101 | - $this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ]; |
|
| 1102 | - $nextstate = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, |
|
| 1103 | - self::$yyRuleInfo[ $yyruleno ][ 0 ]); |
|
| 1104 | - if (isset(self::$yyExpectedTokens[ $nextstate ])) { |
|
| 1105 | - $expected = array_merge($expected, self::$yyExpectedTokens[ $nextstate ]); |
|
| 1106 | - if (isset($res4[ $nextstate ][ $token ])) { |
|
| 1107 | - if ($res4[ $nextstate ][ $token ]) { |
|
| 1108 | - $this->yyidx = $yyidx; |
|
| 1109 | - $this->yystack = $stack; |
|
| 1110 | - return array_unique($expected); |
|
| 1111 | - } |
|
| 1112 | - } else { |
|
| 1113 | - if ($res4[ $nextstate ][ $token ] = |
|
| 1114 | - in_array($token, self::$yyExpectedTokens[ $nextstate ], true) |
|
| 1115 | - ) { |
|
| 1116 | - $this->yyidx = $yyidx; |
|
| 1117 | - $this->yystack = $stack; |
|
| 1118 | - return array_unique($expected); |
|
| 1119 | - } |
|
| 1120 | - } |
|
| 1121 | - } |
|
| 1122 | - if ($nextstate < self::YYNSTATE) { |
|
| 1123 | - // we need to shift a non-terminal |
|
| 1124 | - $this->yyidx ++; |
|
| 1125 | - $x = new TP_yyStackEntry; |
|
| 1126 | - $x->stateno = $nextstate; |
|
| 1127 | - $x->major = self::$yyRuleInfo[ $yyruleno ][ 0 ]; |
|
| 1128 | - $this->yystack[ $this->yyidx ] = $x; |
|
| 1129 | - continue 2; |
|
| 1130 | - } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { |
|
| 1131 | - $this->yyidx = $yyidx; |
|
| 1132 | - $this->yystack = $stack; |
|
| 1133 | - // the last token was just ignored, we can't accept |
|
| 1134 | - // by ignoring input, this is in essence ignoring a |
|
| 1135 | - // syntax error! |
|
| 1136 | - return array_unique($expected); |
|
| 1137 | - } elseif ($nextstate === self::YY_NO_ACTION) { |
|
| 1138 | - $this->yyidx = $yyidx; |
|
| 1139 | - $this->yystack = $stack; |
|
| 1140 | - // input accepted, but not shifted (I guess) |
|
| 1141 | - return $expected; |
|
| 1142 | - } else { |
|
| 1143 | - $yyact = $nextstate; |
|
| 1144 | - } |
|
| 1145 | - } |
|
| 1146 | - while (true); |
|
| 1147 | - } |
|
| 1148 | - break; |
|
| 1149 | - } |
|
| 1150 | - while (true); |
|
| 1151 | - $this->yyidx = $yyidx; |
|
| 1152 | - $this->yystack = $stack; |
|
| 1153 | - |
|
| 1154 | - return array_unique($expected); |
|
| 1155 | - } |
|
| 1156 | - |
|
| 1157 | - public function yy_is_expected_token($token) |
|
| 1158 | - { |
|
| 1159 | - static $res = array(); |
|
| 1160 | - static $res2 = array(); |
|
| 1161 | - if ($token === 0) { |
|
| 1162 | - return true; // 0 is not part of this |
|
| 1163 | - } |
|
| 1164 | - $state = $this->yystack[ $this->yyidx ]->stateno; |
|
| 1165 | - if (isset($res[ $state ][ $token ])) { |
|
| 1166 | - if ($res[ $state ][ $token ]) { |
|
| 1167 | - return true; |
|
| 1168 | - } |
|
| 1169 | - } else { |
|
| 1170 | - if ($res[ $state ][ $token ] = in_array($token, self::$yyExpectedTokens[ $state ], true)) { |
|
| 1171 | - return true; |
|
| 1172 | - } |
|
| 1173 | - } |
|
| 1174 | - $stack = $this->yystack; |
|
| 1175 | - $yyidx = $this->yyidx; |
|
| 1176 | - do { |
|
| 1177 | - $yyact = $this->yy_find_shift_action($token); |
|
| 1178 | - if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) { |
|
| 1179 | - // reduce action |
|
| 1180 | - $done = 0; |
|
| 1181 | - do { |
|
| 1182 | - if ($done ++ == 100) { |
|
| 1183 | - $this->yyidx = $yyidx; |
|
| 1184 | - $this->yystack = $stack; |
|
| 1185 | - // too much recursion prevents proper detection |
|
| 1186 | - // so give up |
|
| 1187 | - return true; |
|
| 1188 | - } |
|
| 1189 | - $yyruleno = $yyact - self::YYNSTATE; |
|
| 1190 | - $this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ]; |
|
| 1191 | - $nextstate = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, |
|
| 1192 | - self::$yyRuleInfo[ $yyruleno ][ 0 ]); |
|
| 1193 | - if (isset($res2[ $nextstate ][ $token ])) { |
|
| 1194 | - if ($res2[ $nextstate ][ $token ]) { |
|
| 1195 | - $this->yyidx = $yyidx; |
|
| 1196 | - $this->yystack = $stack; |
|
| 1197 | - return true; |
|
| 1198 | - } |
|
| 1199 | - } else { |
|
| 1200 | - if ($res2[ $nextstate ][ $token ] = (isset(self::$yyExpectedTokens[ $nextstate ]) && |
|
| 1201 | - in_array($token, self::$yyExpectedTokens[ $nextstate ], |
|
| 1202 | - true)) |
|
| 1203 | - ) { |
|
| 1204 | - $this->yyidx = $yyidx; |
|
| 1205 | - $this->yystack = $stack; |
|
| 1206 | - return true; |
|
| 1207 | - } |
|
| 1208 | - } |
|
| 1209 | - if ($nextstate < self::YYNSTATE) { |
|
| 1210 | - // we need to shift a non-terminal |
|
| 1211 | - $this->yyidx ++; |
|
| 1212 | - $x = new TP_yyStackEntry; |
|
| 1213 | - $x->stateno = $nextstate; |
|
| 1214 | - $x->major = self::$yyRuleInfo[ $yyruleno ][ 0 ]; |
|
| 1215 | - $this->yystack[ $this->yyidx ] = $x; |
|
| 1216 | - continue 2; |
|
| 1217 | - } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { |
|
| 1218 | - $this->yyidx = $yyidx; |
|
| 1219 | - $this->yystack = $stack; |
|
| 1220 | - if (!$token) { |
|
| 1221 | - // end of input: this is valid |
|
| 1222 | - return true; |
|
| 1223 | - } |
|
| 1224 | - // the last token was just ignored, we can't accept |
|
| 1225 | - // by ignoring input, this is in essence ignoring a |
|
| 1226 | - // syntax error! |
|
| 1227 | - return false; |
|
| 1228 | - } elseif ($nextstate === self::YY_NO_ACTION) { |
|
| 1229 | - $this->yyidx = $yyidx; |
|
| 1230 | - $this->yystack = $stack; |
|
| 1231 | - // input accepted, but not shifted (I guess) |
|
| 1232 | - return true; |
|
| 1233 | - } else { |
|
| 1234 | - $yyact = $nextstate; |
|
| 1235 | - } |
|
| 1236 | - } |
|
| 1237 | - while (true); |
|
| 1238 | - } |
|
| 1239 | - break; |
|
| 1240 | - } |
|
| 1241 | - while (true); |
|
| 1242 | - $this->yyidx = $yyidx; |
|
| 1243 | - $this->yystack = $stack; |
|
| 1244 | - |
|
| 1245 | - return true; |
|
| 1246 | - } |
|
| 1247 | - |
|
| 1248 | - public function yy_find_shift_action($iLookAhead) |
|
| 1249 | - { |
|
| 1250 | - $stateno = $this->yystack[ $this->yyidx ]->stateno; |
|
| 1251 | - |
|
| 1252 | - /* if ($this->yyidx < 0) return self::YY_NO_ACTION; */ |
|
| 1253 | - if (!isset(self::$yy_shift_ofst[ $stateno ])) { |
|
| 1254 | - // no shift actions |
|
| 1255 | - return self::$yy_default[ $stateno ]; |
|
| 1256 | - } |
|
| 1257 | - $i = self::$yy_shift_ofst[ $stateno ]; |
|
| 1258 | - if ($i === self::YY_SHIFT_USE_DFLT) { |
|
| 1259 | - return self::$yy_default[ $stateno ]; |
|
| 1260 | - } |
|
| 1261 | - if ($iLookAhead == self::YYNOCODE) { |
|
| 1262 | - return self::YY_NO_ACTION; |
|
| 1263 | - } |
|
| 1264 | - $i += $iLookAhead; |
|
| 1265 | - if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[ $i ] != $iLookAhead) { |
|
| 1266 | - if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback) && |
|
| 1267 | - ($iFallback = self::$yyFallback[ $iLookAhead ]) != 0 |
|
| 1268 | - ) { |
|
| 1269 | - if ($this->yyTraceFILE) { |
|
| 1270 | - fwrite($this->yyTraceFILE, |
|
| 1271 | - $this->yyTracePrompt . "FALLBACK " . $this->yyTokenName[ $iLookAhead ] . " => " . |
|
| 1272 | - $this->yyTokenName[ $iFallback ] . "\n"); |
|
| 1273 | - } |
|
| 1274 | - |
|
| 1275 | - return $this->yy_find_shift_action($iFallback); |
|
| 1276 | - } |
|
| 1277 | - |
|
| 1278 | - return self::$yy_default[ $stateno ]; |
|
| 1279 | - } else { |
|
| 1280 | - return self::$yy_action[ $i ]; |
|
| 1281 | - } |
|
| 1282 | - } |
|
| 1283 | - |
|
| 1284 | - public function yy_find_reduce_action($stateno, $iLookAhead) |
|
| 1285 | - { |
|
| 1286 | - /* $stateno = $this->yystack[$this->yyidx]->stateno; */ |
|
| 1287 | - |
|
| 1288 | - if (!isset(self::$yy_reduce_ofst[ $stateno ])) { |
|
| 1289 | - return self::$yy_default[ $stateno ]; |
|
| 1290 | - } |
|
| 1291 | - $i = self::$yy_reduce_ofst[ $stateno ]; |
|
| 1292 | - if ($i == self::YY_REDUCE_USE_DFLT) { |
|
| 1293 | - return self::$yy_default[ $stateno ]; |
|
| 1294 | - } |
|
| 1295 | - if ($iLookAhead == self::YYNOCODE) { |
|
| 1296 | - return self::YY_NO_ACTION; |
|
| 1297 | - } |
|
| 1298 | - $i += $iLookAhead; |
|
| 1299 | - if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[ $i ] != $iLookAhead) { |
|
| 1300 | - return self::$yy_default[ $stateno ]; |
|
| 1301 | - } else { |
|
| 1302 | - return self::$yy_action[ $i ]; |
|
| 1303 | - } |
|
| 1304 | - } |
|
| 1305 | - |
|
| 1306 | - public function yy_shift($yyNewState, $yyMajor, $yypMinor) |
|
| 1307 | - { |
|
| 1308 | - $this->yyidx ++; |
|
| 1309 | - if ($this->yyidx >= self::YYSTACKDEPTH) { |
|
| 1310 | - $this->yyidx --; |
|
| 1311 | - if ($this->yyTraceFILE) { |
|
| 1312 | - fprintf($this->yyTraceFILE, "%sStack Overflow!\n", $this->yyTracePrompt); |
|
| 1313 | - } |
|
| 1314 | - while ($this->yyidx >= 0) { |
|
| 1315 | - $this->yy_pop_parser_stack(); |
|
| 1316 | - } |
|
| 1317 | - #line 207 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1318 | - |
|
| 1319 | - $this->internalError = true; |
|
| 1320 | - $this->compiler->trigger_template_error("Stack overflow in template parser"); |
|
| 1321 | - |
|
| 1322 | - return; |
|
| 1323 | - } |
|
| 1324 | - $yytos = new TP_yyStackEntry; |
|
| 1325 | - $yytos->stateno = $yyNewState; |
|
| 1326 | - $yytos->major = $yyMajor; |
|
| 1327 | - $yytos->minor = $yypMinor; |
|
| 1328 | - $this->yystack[] = $yytos; |
|
| 1329 | - if ($this->yyTraceFILE && $this->yyidx > 0) { |
|
| 1330 | - fprintf($this->yyTraceFILE, "%sShift %d\n", $this->yyTracePrompt, $yyNewState); |
|
| 1331 | - fprintf($this->yyTraceFILE, "%sStack:", $this->yyTracePrompt); |
|
| 1332 | - for ($i = 1; $i <= $this->yyidx; $i ++) { |
|
| 1333 | - fprintf($this->yyTraceFILE, " %s", $this->yyTokenName[ $this->yystack[ $i ]->major ]); |
|
| 1334 | - } |
|
| 1335 | - fwrite($this->yyTraceFILE, "\n"); |
|
| 1336 | - } |
|
| 1337 | - } |
|
| 1338 | - |
|
| 1339 | - public static $yyRuleInfo = array(array(0 => 63, 1 => 1), array(0 => 64, 1 => 1), array(0 => 64, 1 => 2), |
|
| 1340 | - array(0 => 64, 1 => 0), array(0 => 65, 1 => 1), array(0 => 65, 1 => 1), |
|
| 1341 | - array(0 => 65, 1 => 1), array(0 => 65, 1 => 1), array(0 => 65, 1 => 1), |
|
| 1342 | - array(0 => 68, 1 => 1), array(0 => 68, 1 => 2), array(0 => 65, 1 => 1), |
|
| 1343 | - array(0 => 65, 1 => 1), array(0 => 67, 1 => 2), array(0 => 67, 1 => 3), |
|
| 1344 | - array(0 => 69, 1 => 2), array(0 => 69, 1 => 0), array(0 => 70, 1 => 1), |
|
| 1345 | - array(0 => 70, 1 => 1), array(0 => 66, 1 => 2), array(0 => 66, 1 => 1), |
|
| 1346 | - array(0 => 71, 1 => 2), array(0 => 71, 1 => 3), array(0 => 71, 1 => 2), |
|
| 1347 | - array(0 => 71, 1 => 3), array(0 => 71, 1 => 2), array(0 => 71, 1 => 3), |
|
| 1348 | - array(0 => 71, 1 => 4), array(0 => 71, 1 => 4), array(0 => 71, 1 => 5), |
|
| 1349 | - array(0 => 71, 1 => 5), array(0 => 66, 1 => 1), array(0 => 71, 1 => 3), |
|
| 1350 | - array(0 => 71, 1 => 2), array(0 => 71, 1 => 4), array(0 => 71, 1 => 5), |
|
| 1351 | - array(0 => 71, 1 => 6), array(0 => 71, 1 => 2), array(0 => 71, 1 => 2), |
|
| 1352 | - array(0 => 71, 1 => 3), array(0 => 71, 1 => 2), array(0 => 71, 1 => 3), |
|
| 1353 | - array(0 => 71, 1 => 8), array(0 => 80, 1 => 2), array(0 => 80, 1 => 1), |
|
| 1354 | - array(0 => 71, 1 => 5), array(0 => 71, 1 => 7), array(0 => 71, 1 => 2), |
|
| 1355 | - array(0 => 71, 1 => 6), array(0 => 71, 1 => 8), array(0 => 71, 1 => 6), |
|
| 1356 | - array(0 => 71, 1 => 8), array(0 => 71, 1 => 3), array(0 => 71, 1 => 4), |
|
| 1357 | - array(0 => 71, 1 => 2), array(0 => 66, 1 => 1), array(0 => 71, 1 => 2), |
|
| 1358 | - array(0 => 71, 1 => 3), array(0 => 71, 1 => 4), array(0 => 71, 1 => 5), |
|
| 1359 | - array(0 => 73, 1 => 2), array(0 => 73, 1 => 1), array(0 => 73, 1 => 0), |
|
| 1360 | - array(0 => 83, 1 => 4), array(0 => 83, 1 => 2), array(0 => 83, 1 => 2), |
|
| 1361 | - array(0 => 83, 1 => 2), array(0 => 83, 1 => 2), array(0 => 83, 1 => 2), |
|
| 1362 | - array(0 => 83, 1 => 4), array(0 => 79, 1 => 1), array(0 => 79, 1 => 3), |
|
| 1363 | - array(0 => 78, 1 => 3), array(0 => 78, 1 => 3), array(0 => 78, 1 => 3), |
|
| 1364 | - array(0 => 78, 1 => 3), array(0 => 75, 1 => 1), array(0 => 75, 1 => 1), |
|
| 1365 | - array(0 => 75, 1 => 3), array(0 => 75, 1 => 3), array(0 => 75, 1 => 3), |
|
| 1366 | - array(0 => 75, 1 => 1), array(0 => 75, 1 => 2), array(0 => 75, 1 => 3), |
|
| 1367 | - array(0 => 75, 1 => 3), array(0 => 75, 1 => 2), array(0 => 75, 1 => 3), |
|
| 1368 | - array(0 => 75, 1 => 3), array(0 => 84, 1 => 7), array(0 => 84, 1 => 7), |
|
| 1369 | - array(0 => 74, 1 => 1), array(0 => 74, 1 => 2), array(0 => 74, 1 => 2), |
|
| 1370 | - array(0 => 74, 1 => 2), array(0 => 74, 1 => 2), array(0 => 74, 1 => 1), |
|
| 1371 | - array(0 => 74, 1 => 1), array(0 => 74, 1 => 3), array(0 => 74, 1 => 2), |
|
| 1372 | - array(0 => 74, 1 => 2), array(0 => 74, 1 => 1), array(0 => 74, 1 => 1), |
|
| 1373 | - array(0 => 74, 1 => 3), array(0 => 74, 1 => 3), array(0 => 74, 1 => 3), |
|
| 1374 | - array(0 => 74, 1 => 1), array(0 => 74, 1 => 1), array(0 => 74, 1 => 3), |
|
| 1375 | - array(0 => 74, 1 => 1), array(0 => 74, 1 => 2), array(0 => 74, 1 => 1), |
|
| 1376 | - array(0 => 74, 1 => 3), array(0 => 90, 1 => 1), array(0 => 90, 1 => 1), |
|
| 1377 | - array(0 => 72, 1 => 1), array(0 => 72, 1 => 1), array(0 => 72, 1 => 3), |
|
| 1378 | - array(0 => 72, 1 => 1), array(0 => 72, 1 => 3), array(0 => 72, 1 => 4), |
|
| 1379 | - array(0 => 72, 1 => 3), array(0 => 72, 1 => 4), array(0 => 76, 1 => 2), |
|
| 1380 | - array(0 => 76, 1 => 2), array(0 => 94, 1 => 2), array(0 => 94, 1 => 0), |
|
| 1381 | - array(0 => 95, 1 => 2), array(0 => 95, 1 => 2), array(0 => 95, 1 => 4), |
|
| 1382 | - array(0 => 95, 1 => 2), array(0 => 95, 1 => 2), array(0 => 95, 1 => 4), |
|
| 1383 | - array(0 => 95, 1 => 3), array(0 => 95, 1 => 5), array(0 => 95, 1 => 3), |
|
| 1384 | - array(0 => 95, 1 => 3), array(0 => 95, 1 => 3), array(0 => 95, 1 => 3), |
|
| 1385 | - array(0 => 95, 1 => 3), array(0 => 95, 1 => 3), array(0 => 95, 1 => 2), |
|
| 1386 | - array(0 => 81, 1 => 1), array(0 => 81, 1 => 1), array(0 => 81, 1 => 2), |
|
| 1387 | - array(0 => 96, 1 => 1), array(0 => 96, 1 => 1), array(0 => 96, 1 => 3), |
|
| 1388 | - array(0 => 93, 1 => 2), array(0 => 97, 1 => 1), array(0 => 97, 1 => 2), |
|
| 1389 | - array(0 => 98, 1 => 3), array(0 => 98, 1 => 3), array(0 => 98, 1 => 5), |
|
| 1390 | - array(0 => 98, 1 => 6), array(0 => 98, 1 => 2), array(0 => 89, 1 => 4), |
|
| 1391 | - array(0 => 99, 1 => 4), array(0 => 99, 1 => 4), array(0 => 100, 1 => 3), |
|
| 1392 | - array(0 => 100, 1 => 1), array(0 => 100, 1 => 0), array(0 => 77, 1 => 3), |
|
| 1393 | - array(0 => 77, 1 => 2), array(0 => 101, 1 => 3), array(0 => 101, 1 => 2), |
|
| 1394 | - array(0 => 82, 1 => 2), array(0 => 82, 1 => 0), array(0 => 102, 1 => 2), |
|
| 1395 | - array(0 => 102, 1 => 2), array(0 => 92, 1 => 1), array(0 => 92, 1 => 2), |
|
| 1396 | - array(0 => 92, 1 => 1), array(0 => 92, 1 => 2), array(0 => 92, 1 => 3), |
|
| 1397 | - array(0 => 87, 1 => 1), array(0 => 87, 1 => 1), array(0 => 86, 1 => 1), |
|
| 1398 | - array(0 => 88, 1 => 1), array(0 => 85, 1 => 3), array(0 => 103, 1 => 1), |
|
| 1399 | - array(0 => 103, 1 => 3), array(0 => 103, 1 => 0), array(0 => 104, 1 => 3), |
|
| 1400 | - array(0 => 104, 1 => 3), array(0 => 104, 1 => 1), array(0 => 91, 1 => 2), |
|
| 1401 | - array(0 => 91, 1 => 3), array(0 => 105, 1 => 2), array(0 => 105, 1 => 1), |
|
| 1402 | - array(0 => 106, 1 => 3), array(0 => 106, 1 => 3), array(0 => 106, 1 => 1), |
|
| 1403 | - array(0 => 106, 1 => 3), array(0 => 106, 1 => 3), array(0 => 106, 1 => 1), |
|
| 1404 | - array(0 => 106, 1 => 1),); |
|
| 1405 | - |
|
| 1406 | - public static $yyReduceMap = array(0 => 0, 1 => 1, 2 => 2, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 17 => 9, |
|
| 1407 | - 18 => 9, 44 => 9, 67 => 9, 68 => 9, 76 => 9, 77 => 9, 81 => 9, 90 => 9, 95 => 9, |
|
| 1408 | - 96 => 9, 101 => 9, 105 => 9, 106 => 9, 110 => 9, 112 => 9, 117 => 9, 179 => 9, |
|
| 1409 | - 184 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 16 => 13, 14 => 14, 75 => 14, |
|
| 1410 | - 15 => 15, 91 => 15, 93 => 15, 94 => 15, 124 => 15, 19 => 19, 20 => 20, 21 => 21, |
|
| 1411 | - 23 => 21, 25 => 21, 22 => 22, 24 => 22, 26 => 22, 27 => 27, 28 => 27, 29 => 29, |
|
| 1412 | - 30 => 30, 31 => 31, 32 => 32, 33 => 33, 34 => 34, 35 => 35, 36 => 36, 37 => 37, |
|
| 1413 | - 38 => 38, 39 => 39, 41 => 39, 40 => 40, 42 => 42, 43 => 43, 45 => 45, 46 => 46, |
|
| 1414 | - 47 => 47, 48 => 48, 50 => 48, 49 => 49, 51 => 49, 52 => 52, 53 => 53, 54 => 54, |
|
| 1415 | - 55 => 55, 56 => 56, 57 => 57, 58 => 58, 59 => 59, 60 => 60, 61 => 61, 70 => 61, |
|
| 1416 | - 159 => 61, 163 => 61, 167 => 61, 168 => 61, 62 => 62, 160 => 62, 166 => 62, |
|
| 1417 | - 63 => 63, 64 => 64, 65 => 64, 66 => 66, 144 => 66, 69 => 69, 71 => 71, 72 => 72, |
|
| 1418 | - 73 => 72, 74 => 74, 78 => 78, 79 => 79, 80 => 79, 82 => 82, 109 => 82, 83 => 83, |
|
| 1419 | - 84 => 84, 85 => 85, 86 => 86, 87 => 87, 88 => 88, 89 => 89, 92 => 92, 97 => 97, |
|
| 1420 | - 98 => 98, 99 => 99, 100 => 100, 102 => 102, 103 => 103, 104 => 103, 107 => 107, |
|
| 1421 | - 108 => 108, 111 => 111, 113 => 113, 114 => 114, 115 => 115, 116 => 116, |
|
| 1422 | - 118 => 118, 119 => 119, 120 => 120, 121 => 121, 122 => 122, 123 => 123, |
|
| 1423 | - 125 => 125, 181 => 125, 126 => 126, 127 => 127, 128 => 128, 129 => 129, |
|
| 1424 | - 130 => 130, 131 => 131, 139 => 131, 132 => 132, 133 => 133, 134 => 134, |
|
| 1425 | - 135 => 134, 137 => 134, 138 => 134, 136 => 136, 140 => 140, 141 => 141, |
|
| 1426 | - 142 => 142, 185 => 142, 143 => 143, 145 => 145, 146 => 146, 147 => 147, |
|
| 1427 | - 148 => 148, 149 => 149, 150 => 150, 151 => 151, 152 => 152, 153 => 153, |
|
| 1428 | - 154 => 154, 155 => 155, 156 => 156, 157 => 157, 158 => 158, 161 => 161, |
|
| 1429 | - 162 => 162, 164 => 164, 165 => 165, 169 => 169, 170 => 170, 171 => 171, |
|
| 1430 | - 172 => 172, 173 => 173, 174 => 174, 175 => 175, 176 => 176, 177 => 177, |
|
| 1431 | - 178 => 178, 180 => 180, 182 => 182, 183 => 183, 186 => 186, 187 => 187, |
|
| 1432 | - 188 => 188, 189 => 189, 190 => 189, 192 => 189, 191 => 191, 193 => 193, |
|
| 1433 | - 194 => 194, 195 => 195,); |
|
| 1434 | - |
|
| 1435 | - #line 218 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1436 | - public function yy_r0() |
|
| 1437 | - { |
|
| 1438 | - $this->root_buffer->prepend_array($this, $this->template_prefix); |
|
| 1439 | - $this->root_buffer->append_array($this, $this->template_postfix); |
|
| 1440 | - $this->_retvalue = $this->root_buffer->to_smarty_php($this); |
|
| 1441 | - } |
|
| 1442 | - |
|
| 1443 | - #line 228 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1444 | - public function yy_r1() |
|
| 1445 | - { |
|
| 1446 | - if ($this->yystack[ $this->yyidx + 0 ]->minor !== null) { |
|
| 1447 | - $this->current_buffer->append_subtree($this, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1448 | - } |
|
| 1449 | - } |
|
| 1450 | - |
|
| 1451 | - #line 235 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1452 | - public function yy_r2() |
|
| 1453 | - { |
|
| 1454 | - if ($this->yystack[ $this->yyidx + 0 ]->minor !== null) { |
|
| 1455 | - // because of possible code injection |
|
| 1456 | - $this->current_buffer->append_subtree($this, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1457 | - } |
|
| 1458 | - } |
|
| 1459 | - |
|
| 1460 | - #line 249 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1461 | - public function yy_r4() |
|
| 1462 | - { |
|
| 1463 | - if ($this->compiler->has_code) { |
|
| 1464 | - $this->_retvalue = $this->mergePrefixCode($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1465 | - } else { |
|
| 1466 | - $this->_retvalue = null; |
|
| 1467 | - } |
|
| 1468 | - $this->compiler->has_variable_string = false; |
|
| 1469 | - $this->block_nesting_level = count($this->compiler->_tag_stack); |
|
| 1470 | - } |
|
| 1471 | - |
|
| 1472 | - #line 260 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1473 | - public function yy_r5() |
|
| 1474 | - { |
|
| 1475 | - $this->_retvalue = new Smarty_Internal_ParseTree_Text($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1476 | - } |
|
| 1477 | - |
|
| 1478 | - #line 264 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1479 | - public function yy_r6() |
|
| 1480 | - { |
|
| 1481 | - $code = $this->compiler->compileTag('private_php', |
|
| 1482 | - array(array('code' => $this->yystack[ $this->yyidx + 0 ]->minor), |
|
| 1483 | - array('type' => $this->lex->phpType)), array()); |
|
| 1484 | - if ($this->compiler->has_code && !empty($code)) { |
|
| 1485 | - $tmp = ''; |
|
| 1486 | - foreach ($this->compiler->prefix_code as $code) { |
|
| 1487 | - $tmp .= $code; |
|
| 1488 | - } |
|
| 1489 | - $this->compiler->prefix_code = array(); |
|
| 1490 | - $this->_retvalue = |
|
| 1491 | - new Smarty_Internal_ParseTree_Tag($this, $this->compiler->processNocacheCode($tmp . $code, true)); |
|
| 1492 | - } else { |
|
| 1493 | - $this->_retvalue = null; |
|
| 1494 | - } |
|
| 1495 | - } |
|
| 1496 | - |
|
| 1497 | - #line 275 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1498 | - public function yy_r7() |
|
| 1499 | - { |
|
| 1500 | - $this->compiler->tag_nocache = true; |
|
| 1501 | - $save = $this->template->compiled->has_nocache_code; |
|
| 1502 | - $this->_retvalue = new Smarty_Internal_ParseTree_Tag($this, |
|
| 1503 | - $this->compiler->processNocacheCode("<?php echo '{$this->yystack[$this->yyidx + 0]->minor}';?>\n", |
|
| 1504 | - true)); |
|
| 1505 | - $this->template->compiled->has_nocache_code = $save; |
|
| 1506 | - } |
|
| 1507 | - |
|
| 1508 | - #line 282 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1509 | - public function yy_r8() |
|
| 1510 | - { |
|
| 1511 | - $this->_retvalue = $this->compiler->processText($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1512 | - } |
|
| 1513 | - |
|
| 1514 | - #line 286 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1515 | - public function yy_r9() |
|
| 1516 | - { |
|
| 1517 | - $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1518 | - } |
|
| 1519 | - |
|
| 1520 | - #line 290 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1521 | - public function yy_r10() |
|
| 1522 | - { |
|
| 1523 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1524 | - } |
|
| 1525 | - |
|
| 1526 | - #line 295 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1527 | - public function yy_r11() |
|
| 1528 | - { |
|
| 1529 | - $this->strip = true; |
|
| 1530 | - } |
|
| 1531 | - |
|
| 1532 | - #line 299 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1533 | - public function yy_r12() |
|
| 1534 | - { |
|
| 1535 | - $this->strip = false; |
|
| 1536 | - } |
|
| 1537 | - |
|
| 1538 | - #line 304 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1539 | - public function yy_r13() |
|
| 1540 | - { |
|
| 1541 | - $this->_retvalue = ''; |
|
| 1542 | - } |
|
| 1543 | - |
|
| 1544 | - #line 308 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1545 | - public function yy_r14() |
|
| 1546 | - { |
|
| 1547 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor; |
|
| 1548 | - } |
|
| 1549 | - |
|
| 1550 | - #line 312 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1551 | - public function yy_r15() |
|
| 1552 | - { |
|
| 1553 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1554 | - } |
|
| 1555 | - |
|
| 1556 | - #line 328 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1557 | - public function yy_r19() |
|
| 1558 | - { |
|
| 1559 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor; |
|
| 1560 | - } |
|
| 1561 | - |
|
| 1562 | - #line 334 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1563 | - public function yy_r20() |
|
| 1564 | - { |
|
| 1565 | - $var = |
|
| 1566 | - trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length), |
|
| 1567 | - ' $'); |
|
| 1568 | - if (preg_match('/^(.*)(\s+nocache)$/', $var, $match)) { |
|
| 1569 | - $this->_retvalue = $this->compiler->compileTag('private_print_expression', array('nocache'), |
|
| 1570 | - array('value' => $this->compiler->compileVariable('\'' . |
|
| 1571 | - $match[ 1 ] . |
|
| 1572 | - '\''))); |
|
| 1573 | - } else { |
|
| 1574 | - $this->_retvalue = $this->compiler->compileTag('private_print_expression', array(), |
|
| 1575 | - array('value' => $this->compiler->compileVariable('\'' . |
|
| 1576 | - $var . |
|
| 1577 | - '\''))); |
|
| 1578 | - } |
|
| 1579 | - } |
|
| 1580 | - |
|
| 1581 | - #line 344 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1582 | - public function yy_r21() |
|
| 1583 | - { |
|
| 1584 | - $this->_retvalue = $this->compiler->compileTag('private_print_expression', array(), |
|
| 1585 | - array('value' => $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 1586 | - } |
|
| 1587 | - |
|
| 1588 | - #line 348 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1589 | - public function yy_r22() |
|
| 1590 | - { |
|
| 1591 | - $this->_retvalue = |
|
| 1592 | - $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1593 | - array('value' => $this->yystack[ $this->yyidx + - 1 ]->minor)); |
|
| 1594 | - } |
|
| 1595 | - |
|
| 1596 | - #line 371 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1597 | - public function yy_r27() |
|
| 1598 | - { |
|
| 1599 | - $this->_retvalue = $this->compiler->compileTag('assign', array(array('value' => $this->yystack[ $this->yyidx + |
|
| 1600 | - 0 ]->minor), |
|
| 1601 | - array('var' => '\'' . |
|
| 1602 | - substr($this->yystack[ $this->yyidx + |
|
| 1603 | - - 2 ]->minor, |
|
| 1604 | - 1) . '\''))); |
|
| 1605 | - } |
|
| 1606 | - |
|
| 1607 | - #line 379 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1608 | - public function yy_r29() |
|
| 1609 | - { |
|
| 1610 | - $this->_retvalue = $this->compiler->compileTag('assign', |
|
| 1611 | - array_merge(array(array('value' => $this->yystack[ $this->yyidx + |
|
| 1612 | - - 1 ]->minor), |
|
| 1613 | - array('var' => '\'' . |
|
| 1614 | - substr($this->yystack[ $this->yyidx + |
|
| 1615 | - - 3 ]->minor, |
|
| 1616 | - 1) . '\'')), |
|
| 1617 | - $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 1618 | - } |
|
| 1619 | - |
|
| 1620 | - #line 383 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1621 | - public function yy_r30() |
|
| 1622 | - { |
|
| 1623 | - $this->_retvalue = $this->compiler->compileTag('assign', |
|
| 1624 | - array_merge(array(array('value' => $this->yystack[ $this->yyidx + |
|
| 1625 | - - 1 ]->minor), |
|
| 1626 | - array('var' => $this->yystack[ $this->yyidx + |
|
| 1627 | - - 3 ]->minor[ 'var' ])), |
|
| 1628 | - $this->yystack[ $this->yyidx + 0 ]->minor), |
|
| 1629 | - array('smarty_internal_index' => $this->yystack[ $this->yyidx + |
|
| 1630 | - - 3 ]->minor[ 'smarty_internal_index' ])); |
|
| 1631 | - } |
|
| 1632 | - |
|
| 1633 | - #line 388 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1634 | - public function yy_r31() |
|
| 1635 | - { |
|
| 1636 | - $tag = |
|
| 1637 | - trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length)); |
|
| 1638 | - if ($tag == 'strip') { |
|
| 1639 | - $this->strip = true; |
|
| 1640 | - $this->_retvalue = null;; |
|
| 1641 | - } else { |
|
| 1642 | - if (defined($tag)) { |
|
| 1643 | - if ($this->security) { |
|
| 1644 | - $this->security->isTrustedConstant($tag, $this->compiler); |
|
| 1645 | - } |
|
| 1646 | - $this->_retvalue = |
|
| 1647 | - $this->compiler->compileTag('private_print_expression', array(), array('value' => $tag)); |
|
| 1648 | - } else { |
|
| 1649 | - if (preg_match('/^(.*)(\s+nocache)$/', $tag, $match)) { |
|
| 1650 | - $this->_retvalue = $this->compiler->compileTag($match[ 1 ], array("'nocache'")); |
|
| 1651 | - } else { |
|
| 1652 | - $this->_retvalue = $this->compiler->compileTag($tag, array()); |
|
| 1653 | - } |
|
| 1654 | - } |
|
| 1655 | - } |
|
| 1656 | - } |
|
| 1657 | - |
|
| 1658 | - #line 410 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1659 | - public function yy_r32() |
|
| 1660 | - { |
|
| 1661 | - if (defined($this->yystack[ $this->yyidx + - 1 ]->minor)) { |
|
| 1662 | - if ($this->security) { |
|
| 1663 | - $this->security->isTrustedConstant($this->yystack[ $this->yyidx + - 1 ]->minor, $this->compiler); |
|
| 1664 | - } |
|
| 1665 | - $this->_retvalue = |
|
| 1666 | - $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1667 | - array('value' => $this->yystack[ $this->yyidx + - 1 ]->minor)); |
|
| 1668 | - } else { |
|
| 1669 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 1 ]->minor, |
|
| 1670 | - $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1671 | - } |
|
| 1672 | - } |
|
| 1673 | - |
|
| 1674 | - #line 420 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1675 | - public function yy_r33() |
|
| 1676 | - { |
|
| 1677 | - if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) { |
|
| 1678 | - if ($this->security) { |
|
| 1679 | - $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler); |
|
| 1680 | - } |
|
| 1681 | - $this->_retvalue = $this->compiler->compileTag('private_print_expression', array(), |
|
| 1682 | - array('value' => $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 1683 | - } else { |
|
| 1684 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + 0 ]->minor, array()); |
|
| 1685 | - } |
|
| 1686 | - } |
|
| 1687 | - |
|
| 1688 | - #line 433 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1689 | - public function yy_r34() |
|
| 1690 | - { |
|
| 1691 | - if (defined($this->yystack[ $this->yyidx + - 2 ]->minor)) { |
|
| 1692 | - if ($this->security) { |
|
| 1693 | - $this->security->isTrustedConstant($this->yystack[ $this->yyidx + - 2 ]->minor, $this->compiler); |
|
| 1694 | - } |
|
| 1695 | - $this->_retvalue = |
|
| 1696 | - $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1697 | - array('value' => $this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 1698 | - 'modifierlist' => $this->yystack[ $this->yyidx + - 1 ]->minor)); |
|
| 1699 | - } else { |
|
| 1700 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 1701 | - $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1702 | - array('modifierlist' => $this->yystack[ $this->yyidx + |
|
| 1703 | - - 1 ]->minor)); |
|
| 1704 | - } |
|
| 1705 | - } |
|
| 1706 | - |
|
| 1707 | - #line 445 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1708 | - public function yy_r35() |
|
| 1709 | - { |
|
| 1710 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 3 ]->minor, |
|
| 1711 | - $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1712 | - array('object_method' => $this->yystack[ $this->yyidx + |
|
| 1713 | - - 1 ]->minor)); |
|
| 1714 | - } |
|
| 1715 | - |
|
| 1716 | - #line 450 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1717 | - public function yy_r36() |
|
| 1718 | - { |
|
| 1719 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 4 ]->minor, |
|
| 1720 | - $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1721 | - array('modifierlist' => $this->yystack[ $this->yyidx + |
|
| 1722 | - - 1 ]->minor, |
|
| 1723 | - 'object_method' => $this->yystack[ $this->yyidx + |
|
| 1724 | - - 2 ]->minor)); |
|
| 1725 | - } |
|
| 1726 | - |
|
| 1727 | - #line 455 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1728 | - public function yy_r37() |
|
| 1729 | - { |
|
| 1730 | - $this->_retvalue = $this->compiler->compileTag('make_nocache', array(array('var' => '\'' . |
|
| 1731 | - substr($this->yystack[ $this->yyidx + |
|
| 1732 | - 0 ]->minor, |
|
| 1733 | - 1) . '\''))); |
|
| 1734 | - } |
|
| 1735 | - |
|
| 1736 | - #line 460 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1737 | - public function yy_r38() |
|
| 1738 | - { |
|
| 1739 | - $tag = trim(substr($this->yystack[ $this->yyidx + - 1 ]->minor, $this->lex->ldel_length)); |
|
| 1740 | - $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag, array(), |
|
| 1741 | - array('if condition' => $this->yystack[ $this->yyidx + |
|
| 1742 | - 0 ]->minor)); |
|
| 1743 | - } |
|
| 1744 | - |
|
| 1745 | - #line 465 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1746 | - public function yy_r39() |
|
| 1747 | - { |
|
| 1748 | - $tag = trim(substr($this->yystack[ $this->yyidx + - 2 ]->minor, $this->lex->ldel_length)); |
|
| 1749 | - $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag, |
|
| 1750 | - $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1751 | - array('if condition' => $this->yystack[ $this->yyidx + |
|
| 1752 | - - 1 ]->minor)); |
|
| 1753 | - } |
|
| 1754 | - |
|
| 1755 | - #line 470 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1756 | - public function yy_r40() |
|
| 1757 | - { |
|
| 1758 | - $tag = trim(substr($this->yystack[ $this->yyidx + - 1 ]->minor, $this->lex->ldel_length)); |
|
| 1759 | - $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag, array(), |
|
| 1760 | - array('if condition' => $this->yystack[ $this->yyidx + |
|
| 1761 | - 0 ]->minor)); |
|
| 1762 | - } |
|
| 1763 | - |
|
| 1764 | - #line 481 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1765 | - public function yy_r42() |
|
| 1766 | - { |
|
| 1767 | - $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1768 | - array(array('start' => $this->yystack[ $this->yyidx + |
|
| 1769 | - - 6 ]->minor), |
|
| 1770 | - array('ifexp' => $this->yystack[ $this->yyidx + |
|
| 1771 | - - 4 ]->minor), |
|
| 1772 | - array('var' => $this->yystack[ $this->yyidx + |
|
| 1773 | - - 2 ]->minor), |
|
| 1774 | - array('step' => $this->yystack[ $this->yyidx + |
|
| 1775 | - - 1 ]->minor))), |
|
| 1776 | - 1); |
|
| 1777 | - } |
|
| 1778 | - |
|
| 1779 | - #line 485 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1780 | - public function yy_r43() |
|
| 1781 | - { |
|
| 1782 | - $this->_retvalue = '=' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1783 | - } |
|
| 1784 | - |
|
| 1785 | - #line 493 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1786 | - public function yy_r45() |
|
| 1787 | - { |
|
| 1788 | - $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1789 | - array(array('start' => $this->yystack[ $this->yyidx + |
|
| 1790 | - - 3 ]->minor), |
|
| 1791 | - array('to' => $this->yystack[ $this->yyidx + |
|
| 1792 | - - 1 ]->minor))), |
|
| 1793 | - 0); |
|
| 1794 | - } |
|
| 1795 | - |
|
| 1796 | - #line 497 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1797 | - public function yy_r46() |
|
| 1798 | - { |
|
| 1799 | - $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1800 | - array(array('start' => $this->yystack[ $this->yyidx + |
|
| 1801 | - - 5 ]->minor), |
|
| 1802 | - array('to' => $this->yystack[ $this->yyidx + |
|
| 1803 | - - 3 ]->minor), |
|
| 1804 | - array('step' => $this->yystack[ $this->yyidx + |
|
| 1805 | - - 1 ]->minor))), |
|
| 1806 | - 0); |
|
| 1807 | - } |
|
| 1808 | - |
|
| 1809 | - #line 502 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1810 | - public function yy_r47() |
|
| 1811 | - { |
|
| 1812 | - $this->_retvalue = $this->compiler->compileTag('foreach', $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1813 | - } |
|
| 1814 | - |
|
| 1815 | - #line 507 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1816 | - public function yy_r48() |
|
| 1817 | - { |
|
| 1818 | - $this->_retvalue = $this->compiler->compileTag('foreach', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1819 | - array(array('from' => $this->yystack[ $this->yyidx + |
|
| 1820 | - - 3 ]->minor), |
|
| 1821 | - array('item' => $this->yystack[ $this->yyidx + |
|
| 1822 | - - 1 ]->minor)))); |
|
| 1823 | - } |
|
| 1824 | - |
|
| 1825 | - #line 511 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1826 | - public function yy_r49() |
|
| 1827 | - { |
|
| 1828 | - $this->_retvalue = $this->compiler->compileTag('foreach', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1829 | - array(array('from' => $this->yystack[ $this->yyidx + |
|
| 1830 | - - 5 ]->minor), |
|
| 1831 | - array('item' => $this->yystack[ $this->yyidx + |
|
| 1832 | - - 1 ]->minor), |
|
| 1833 | - array('key' => $this->yystack[ $this->yyidx + |
|
| 1834 | - - 3 ]->minor)))); |
|
| 1835 | - } |
|
| 1836 | - |
|
| 1837 | - #line 524 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1838 | - public function yy_r52() |
|
| 1839 | - { |
|
| 1840 | - $this->_retvalue = $this->compiler->compileTag('setfilter', array(), |
|
| 1841 | - array('modifier_list' => array(array_merge(array($this->yystack[ $this->yyidx + |
|
| 1842 | - - 1 ]->minor), |
|
| 1843 | - $this->yystack[ $this->yyidx + |
|
| 1844 | - 0 ]->minor)))); |
|
| 1845 | - } |
|
| 1846 | - |
|
| 1847 | - #line 528 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1848 | - public function yy_r53() |
|
| 1849 | - { |
|
| 1850 | - $this->_retvalue = $this->compiler->compileTag('setfilter', array(), |
|
| 1851 | - array('modifier_list' => array_merge(array(array_merge(array($this->yystack[ $this->yyidx + |
|
| 1852 | - - 2 ]->minor), |
|
| 1853 | - $this->yystack[ $this->yyidx + |
|
| 1854 | - - 1 ]->minor)), |
|
| 1855 | - $this->yystack[ $this->yyidx + |
|
| 1856 | - 0 ]->minor))); |
|
| 1857 | - } |
|
| 1858 | - |
|
| 1859 | - #line 533 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1860 | - public function yy_r54() |
|
| 1861 | - { |
|
| 1862 | - $j = strrpos($this->yystack[ $this->yyidx + 0 ]->minor, '.'); |
|
| 1863 | - if ($this->yystack[ $this->yyidx + 0 ]->minor[ $j + 1 ] == 'c') { |
|
| 1864 | - // {$smarty.block.child} |
|
| 1865 | - $this->_retvalue = SMARTY_INTERNAL_COMPILE_BLOCK::compileChildBlock($this->compiler); |
|
| 1866 | - } else { |
|
| 1867 | - // {$smarty.block.parent} |
|
| 1868 | - $this->_retvalue = SMARTY_INTERNAL_COMPILE_BLOCK::compileParentBlock($this->compiler); |
|
| 1869 | - } |
|
| 1870 | - } |
|
| 1871 | - |
|
| 1872 | - #line 546 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1873 | - public function yy_r55() |
|
| 1874 | - { |
|
| 1875 | - $tag = |
|
| 1876 | - trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length), |
|
| 1877 | - ' /'); |
|
| 1878 | - if ($tag == 'strip') { |
|
| 1879 | - $this->strip = false; |
|
| 1880 | - $this->_retvalue = null; |
|
| 1881 | - } else { |
|
| 1882 | - $this->_retvalue = $this->compiler->compileTag($tag . 'close', array()); |
|
| 1883 | - } |
|
| 1884 | - } |
|
| 1885 | - |
|
| 1886 | - #line 555 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1887 | - public function yy_r56() |
|
| 1888 | - { |
|
| 1889 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + 0 ]->minor . 'close', array()); |
|
| 1890 | - } |
|
| 1891 | - |
|
| 1892 | - #line 559 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1893 | - public function yy_r57() |
|
| 1894 | - { |
|
| 1895 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 1 ]->minor . 'close', array(), |
|
| 1896 | - array('modifier_list' => $this->yystack[ $this->yyidx + |
|
| 1897 | - 0 ]->minor)); |
|
| 1898 | - } |
|
| 1899 | - |
|
| 1900 | - #line 564 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1901 | - public function yy_r58() |
|
| 1902 | - { |
|
| 1903 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 2 ]->minor . 'close', array(), |
|
| 1904 | - array('object_method' => $this->yystack[ $this->yyidx + |
|
| 1905 | - 0 ]->minor)); |
|
| 1906 | - } |
|
| 1907 | - |
|
| 1908 | - #line 568 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1909 | - public function yy_r59() |
|
| 1910 | - { |
|
| 1911 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 3 ]->minor . 'close', array(), |
|
| 1912 | - array('object_method' => $this->yystack[ $this->yyidx + |
|
| 1913 | - - 1 ]->minor, |
|
| 1914 | - 'modifier_list' => $this->yystack[ $this->yyidx + |
|
| 1915 | - 0 ]->minor)); |
|
| 1916 | - } |
|
| 1917 | - |
|
| 1918 | - #line 576 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1919 | - public function yy_r60() |
|
| 1920 | - { |
|
| 1921 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor; |
|
| 1922 | - $this->_retvalue[] = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1923 | - } |
|
| 1924 | - |
|
| 1925 | - #line 582 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1926 | - public function yy_r61() |
|
| 1927 | - { |
|
| 1928 | - $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1929 | - } |
|
| 1930 | - |
|
| 1931 | - #line 587 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1932 | - public function yy_r62() |
|
| 1933 | - { |
|
| 1934 | - $this->_retvalue = array(); |
|
| 1935 | - } |
|
| 1936 | - |
|
| 1937 | - #line 592 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1938 | - public function yy_r63() |
|
| 1939 | - { |
|
| 1940 | - if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) { |
|
| 1941 | - if ($this->security) { |
|
| 1942 | - $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler); |
|
| 1943 | - } |
|
| 1944 | - $this->_retvalue = |
|
| 1945 | - array($this->yystack[ $this->yyidx + - 2 ]->minor => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1946 | - } else { |
|
| 1947 | - $this->_retvalue = |
|
| 1948 | - array($this->yystack[ $this->yyidx + - 2 ]->minor => '\'' . $this->yystack[ $this->yyidx + 0 ]->minor . |
|
| 1949 | - '\''); |
|
| 1950 | - } |
|
| 1951 | - } |
|
| 1952 | - |
|
| 1953 | - #line 603 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1954 | - public function yy_r64() |
|
| 1955 | - { |
|
| 1956 | - $this->_retvalue = |
|
| 1957 | - array(trim($this->yystack[ $this->yyidx + - 1 ]->minor, " =\n\r\t") => $this->yystack[ $this->yyidx + |
|
| 1958 | - 0 ]->minor); |
|
| 1959 | - } |
|
| 1960 | - |
|
| 1961 | - #line 611 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1962 | - public function yy_r66() |
|
| 1963 | - { |
|
| 1964 | - $this->_retvalue = '\'' . $this->yystack[ $this->yyidx + 0 ]->minor . '\''; |
|
| 1965 | - } |
|
| 1966 | - |
|
| 1967 | - #line 623 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1968 | - public function yy_r69() |
|
| 1969 | - { |
|
| 1970 | - $this->_retvalue = |
|
| 1971 | - array($this->yystack[ $this->yyidx + - 2 ]->minor => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1972 | - } |
|
| 1973 | - |
|
| 1974 | - #line 636 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1975 | - public function yy_r71() |
|
| 1976 | - { |
|
| 1977 | - $this->yystack[ $this->yyidx + - 2 ]->minor[] = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1978 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 2 ]->minor; |
|
| 1979 | - } |
|
| 1980 | - |
|
| 1981 | - #line 641 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1982 | - public function yy_r72() |
|
| 1983 | - { |
|
| 1984 | - $this->_retvalue = array('var' => '\'' . substr($this->yystack[ $this->yyidx + - 2 ]->minor, 1) . '\'', |
|
| 1985 | - 'value' => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1986 | - } |
|
| 1987 | - |
|
| 1988 | - #line 648 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1989 | - public function yy_r74() |
|
| 1990 | - { |
|
| 1991 | - $this->_retvalue = array('var' => $this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 1992 | - 'value' => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1993 | - } |
|
| 1994 | - |
|
| 1995 | - #line 672 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1996 | - public function yy_r78() |
|
| 1997 | - { |
|
| 1998 | - $this->_retvalue = |
|
| 1999 | - '$_smarty_tpl->getStreamVariable(\'' . substr($this->yystack[ $this->yyidx + - 2 ]->minor, 1) . '://' . |
|
| 2000 | - $this->yystack[ $this->yyidx + 0 ]->minor . '\')'; |
|
| 2001 | - } |
|
| 2002 | - |
|
| 2003 | - #line 677 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2004 | - public function yy_r79() |
|
| 2005 | - { |
|
| 2006 | - $this->_retvalue = |
|
| 2007 | - $this->yystack[ $this->yyidx + - 2 ]->minor . trim($this->yystack[ $this->yyidx + - 1 ]->minor) . |
|
| 2008 | - $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2009 | - } |
|
| 2010 | - |
|
| 2011 | - #line 691 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2012 | - public function yy_r82() |
|
| 2013 | - { |
|
| 2014 | - $this->_retvalue = $this->compiler->compileTag('private_modifier', array(), |
|
| 2015 | - array('value' => $this->yystack[ $this->yyidx + - 1 ]->minor, |
|
| 2016 | - 'modifierlist' => $this->yystack[ $this->yyidx + |
|
| 2017 | - 0 ]->minor)); |
|
| 2018 | - } |
|
| 2019 | - |
|
| 2020 | - #line 697 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2021 | - public function yy_r83() |
|
| 2022 | - { |
|
| 2023 | - $this->_retvalue = |
|
| 2024 | - $this->yystack[ $this->yyidx + - 1 ]->minor[ 'pre' ] . $this->yystack[ $this->yyidx + - 2 ]->minor . |
|
| 2025 | - $this->yystack[ $this->yyidx + - 1 ]->minor[ 'op' ] . $this->yystack[ $this->yyidx + 0 ]->minor . ')'; |
|
| 2026 | - } |
|
| 2027 | - |
|
| 2028 | - #line 701 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2029 | - public function yy_r84() |
|
| 2030 | - { |
|
| 2031 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + - 1 ]->minor . |
|
| 2032 | - $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2033 | - } |
|
| 2034 | - |
|
| 2035 | - #line 705 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2036 | - public function yy_r85() |
|
| 2037 | - { |
|
| 2038 | - $this->_retvalue = |
|
| 2039 | - $this->yystack[ $this->yyidx + 0 ]->minor . $this->yystack[ $this->yyidx + - 1 ]->minor . ')'; |
|
| 2040 | - } |
|
| 2041 | - |
|
| 2042 | - #line 709 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2043 | - public function yy_r86() |
|
| 2044 | - { |
|
| 2045 | - $this->_retvalue = 'in_array(' . $this->yystack[ $this->yyidx + - 2 ]->minor . ',' . |
|
| 2046 | - $this->yystack[ $this->yyidx + 0 ]->minor . ')'; |
|
| 2047 | - } |
|
| 2048 | - |
|
| 2049 | - #line 713 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2050 | - public function yy_r87() |
|
| 2051 | - { |
|
| 2052 | - $this->_retvalue = 'in_array(' . $this->yystack[ $this->yyidx + - 2 ]->minor . ',(array)' . |
|
| 2053 | - $this->yystack[ $this->yyidx + 0 ]->minor . ')'; |
|
| 2054 | - } |
|
| 2055 | - |
|
| 2056 | - #line 721 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2057 | - public function yy_r88() |
|
| 2058 | - { |
|
| 2059 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 5 ]->minor . ' ? ' . $this->compiler->compileVariable('\'' . |
|
| 2060 | - substr($this->yystack[ $this->yyidx + |
|
| 2061 | - - 2 ]->minor, |
|
| 2062 | - 1) . |
|
| 2063 | - '\'') . |
|
| 2064 | - ' : ' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2065 | - } |
|
| 2066 | - |
|
| 2067 | - #line 725 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2068 | - public function yy_r89() |
|
| 2069 | - { |
|
| 2070 | - $this->_retvalue = |
|
| 2071 | - $this->yystack[ $this->yyidx + - 5 ]->minor . ' ? ' . $this->yystack[ $this->yyidx + - 2 ]->minor . ' : ' . |
|
| 2072 | - $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2073 | - } |
|
| 2074 | - |
|
| 2075 | - #line 740 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2076 | - public function yy_r92() |
|
| 2077 | - { |
|
| 2078 | - $this->_retvalue = '!' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2079 | - } |
|
| 2080 | - |
|
| 2081 | - #line 761 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2082 | - public function yy_r97() |
|
| 2083 | - { |
|
| 2084 | - $this->_retvalue = |
|
| 2085 | - $this->yystack[ $this->yyidx + - 2 ]->minor . '.' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2086 | - } |
|
| 2087 | - |
|
| 2088 | - #line 765 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2089 | - public function yy_r98() |
|
| 2090 | - { |
|
| 2091 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . '.'; |
|
| 2092 | - } |
|
| 2093 | - |
|
| 2094 | - #line 769 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2095 | - public function yy_r99() |
|
| 2096 | - { |
|
| 2097 | - $this->_retvalue = '.' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2098 | - } |
|
| 2099 | - |
|
| 2100 | - #line 774 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2101 | - public function yy_r100() |
|
| 2102 | - { |
|
| 2103 | - if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) { |
|
| 2104 | - if ($this->security) { |
|
| 2105 | - $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler); |
|
| 2106 | - } |
|
| 2107 | - $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2108 | - } else { |
|
| 2109 | - $this->_retvalue = '\'' . $this->yystack[ $this->yyidx + 0 ]->minor . '\''; |
|
| 2110 | - } |
|
| 2111 | - } |
|
| 2112 | - |
|
| 2113 | - #line 791 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2114 | - public function yy_r102() |
|
| 2115 | - { |
|
| 2116 | - $this->_retvalue = "(" . $this->yystack[ $this->yyidx + - 1 ]->minor . ")"; |
|
| 2117 | - } |
|
| 2118 | - |
|
| 2119 | - #line 795 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2120 | - public function yy_r103() |
|
| 2121 | - { |
|
| 2122 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + - 1 ]->minor . |
|
| 2123 | - $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2124 | - } |
|
| 2125 | - |
|
| 2126 | - #line 813 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2127 | - public function yy_r107() |
|
| 2128 | - { |
|
| 2129 | - $prefixVar = $this->compiler->getNewPrefixVariable(); |
|
| 2130 | - if ($this->yystack[ $this->yyidx + - 2 ]->minor[ 'var' ] == '\'smarty\'') { |
|
| 2131 | - $this->compiler->appendPrefixCode("<?php $prefixVar" . ' = ' . |
|
| 2132 | - $this->compiler->compileTag('private_special_variable', array(), |
|
| 2133 | - $this->yystack[ $this->yyidx + |
|
| 2134 | - - 2 ]->minor[ 'smarty_internal_index' ]) . |
|
| 2135 | - ';?>'); |
|
| 2136 | - } else { |
|
| 2137 | - $this->compiler->appendPrefixCode("<?php $prefixVar" . ' = ' . |
|
| 2138 | - $this->compiler->compileVariable($this->yystack[ $this->yyidx + |
|
| 2139 | - - 2 ]->minor[ 'var' ]) . |
|
| 2140 | - $this->yystack[ $this->yyidx + - 2 ]->minor[ 'smarty_internal_index' ] . |
|
| 2141 | - ';?>'); |
|
| 2142 | - } |
|
| 2143 | - $this->_retvalue = $prefixVar . '::' . $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] . |
|
| 2144 | - $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ]; |
|
| 2145 | - } |
|
| 2146 | - |
|
| 2147 | - #line 824 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2148 | - public function yy_r108() |
|
| 2149 | - { |
|
| 2150 | - $prefixVar = $this->compiler->getNewPrefixVariable(); |
|
| 2151 | - $tmp = $this->compiler->appendCode('<?php ob_start();?>', $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2152 | - $this->compiler->appendPrefixCode($this->compiler->appendCode($tmp, "<?php $prefixVar" . '=ob_get_clean();?>')); |
|
| 2153 | - $this->_retvalue = $prefixVar; |
|
| 2154 | - } |
|
| 2155 | - |
|
| 2156 | - #line 841 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2157 | - public function yy_r111() |
|
| 2158 | - { |
|
| 2159 | - if (!in_array(strtolower($this->yystack[ $this->yyidx + - 2 ]->minor), array('self', 'parent')) && |
|
| 2160 | - (!$this->security || |
|
| 2161 | - $this->security->isTrustedStaticClassAccess($this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 2162 | - $this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler)) |
|
| 2163 | - ) { |
|
| 2164 | - if (isset($this->smarty->registered_classes[ $this->yystack[ $this->yyidx + - 2 ]->minor ])) { |
|
| 2165 | - $this->_retvalue = |
|
| 2166 | - $this->smarty->registered_classes[ $this->yystack[ $this->yyidx + - 2 ]->minor ] . '::' . |
|
| 2167 | - $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] . $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ]; |
|
| 2168 | - } else { |
|
| 2169 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 2 ]->minor . '::' . |
|
| 2170 | - $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] . |
|
| 2171 | - $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ]; |
|
| 2172 | - } |
|
| 2173 | - } else { |
|
| 2174 | - $this->compiler->trigger_template_error("static class '" . $this->yystack[ $this->yyidx + - 2 ]->minor . |
|
| 2175 | - "' is undefined or not allowed by security setting"); |
|
| 2176 | - } |
|
| 2177 | - } |
|
| 2178 | - |
|
| 2179 | - #line 860 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2180 | - public function yy_r113() |
|
| 2181 | - { |
|
| 2182 | - $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2183 | - } |
|
| 2184 | - |
|
| 2185 | - #line 871 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2186 | - public function yy_r114() |
|
| 2187 | - { |
|
| 2188 | - $this->_retvalue = |
|
| 2189 | - $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\''); |
|
| 2190 | - } |
|
| 2191 | - |
|
| 2192 | - #line 874 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2193 | - public function yy_r115() |
|
| 2194 | - { |
|
| 2195 | - if ($this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ] == '\'smarty\'') { |
|
| 2196 | - $smarty_var = $this->compiler->compileTag('private_special_variable', array(), |
|
| 2197 | - $this->yystack[ $this->yyidx + |
|
| 2198 | - 0 ]->minor[ 'smarty_internal_index' ]); |
|
| 2199 | - $this->_retvalue = $smarty_var; |
|
| 2200 | - } else { |
|
| 2201 | - // used for array reset,next,prev,end,current |
|
| 2202 | - $this->last_variable = $this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ]; |
|
| 2203 | - $this->last_index = $this->yystack[ $this->yyidx + 0 ]->minor[ 'smarty_internal_index' ]; |
|
| 2204 | - $this->_retvalue = $this->compiler->compileVariable($this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ]) . |
|
| 2205 | - $this->yystack[ $this->yyidx + 0 ]->minor[ 'smarty_internal_index' ]; |
|
| 2206 | - } |
|
| 2207 | - } |
|
| 2208 | - |
|
| 2209 | - #line 887 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2210 | - public function yy_r116() |
|
| 2211 | - { |
|
| 2212 | - $this->_retvalue = '$_smarty_tpl->tpl_vars[' . $this->yystack[ $this->yyidx + - 2 ]->minor . ']->' . |
|
| 2213 | - $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2214 | - } |
|
| 2215 | - |
|
| 2216 | - #line 897 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2217 | - public function yy_r118() |
|
| 2218 | - { |
|
| 2219 | - $this->_retvalue = |
|
| 2220 | - $this->compiler->compileConfigVariable("'" . $this->yystack[ $this->yyidx + - 1 ]->minor . "'"); |
|
| 2221 | - } |
|
| 2222 | - |
|
| 2223 | - #line 901 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2224 | - public function yy_r119() |
|
| 2225 | - { |
|
| 2226 | - $this->_retvalue = '(is_array($tmp = ' . |
|
| 2227 | - $this->compiler->compileConfigVariable("'" . $this->yystack[ $this->yyidx + - 2 ]->minor . |
|
| 2228 | - "'") . ') ? $tmp' . |
|
| 2229 | - $this->yystack[ $this->yyidx + 0 ]->minor . ' :null)'; |
|
| 2230 | - } |
|
| 2231 | - |
|
| 2232 | - #line 905 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2233 | - public function yy_r120() |
|
| 2234 | - { |
|
| 2235 | - $this->_retvalue = $this->compiler->compileConfigVariable($this->yystack[ $this->yyidx + - 1 ]->minor); |
|
| 2236 | - } |
|
| 2237 | - |
|
| 2238 | - #line 909 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2239 | - public function yy_r121() |
|
| 2240 | - { |
|
| 2241 | - $this->_retvalue = |
|
| 2242 | - '(is_array($tmp = ' . $this->compiler->compileConfigVariable($this->yystack[ $this->yyidx + - 2 ]->minor) . |
|
| 2243 | - ') ? $tmp' . $this->yystack[ $this->yyidx + 0 ]->minor . ' : null)'; |
|
| 2244 | - } |
|
| 2245 | - |
|
| 2246 | - #line 913 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2247 | - public function yy_r122() |
|
| 2248 | - { |
|
| 2249 | - $this->_retvalue = array('var' => '\'' . substr($this->yystack[ $this->yyidx + - 1 ]->minor, 1) . '\'', |
|
| 2250 | - 'smarty_internal_index' => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2251 | - } |
|
| 2252 | - |
|
| 2253 | - #line 916 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2254 | - public function yy_r123() |
|
| 2255 | - { |
|
| 2256 | - $this->_retvalue = array('var' => $this->yystack[ $this->yyidx + - 1 ]->minor, |
|
| 2257 | - 'smarty_internal_index' => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2258 | - } |
|
| 2259 | - |
|
| 2260 | - #line 929 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2261 | - public function yy_r125() |
|
| 2262 | - { |
|
| 2263 | - return; |
|
| 2264 | - } |
|
| 2265 | - |
|
| 2266 | - #line 935 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2267 | - public function yy_r126() |
|
| 2268 | - { |
|
| 2269 | - $this->_retvalue = |
|
| 2270 | - '[' . $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\'') . |
|
| 2271 | - ']'; |
|
| 2272 | - } |
|
| 2273 | - |
|
| 2274 | - #line 938 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2275 | - public function yy_r127() |
|
| 2276 | - { |
|
| 2277 | - $this->_retvalue = '[' . $this->compiler->compileVariable($this->yystack[ $this->yyidx + 0 ]->minor) . ']'; |
|
| 2278 | - } |
|
| 2279 | - |
|
| 2280 | - #line 942 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2281 | - public function yy_r128() |
|
| 2282 | - { |
|
| 2283 | - $this->_retvalue = '[' . $this->compiler->compileVariable($this->yystack[ $this->yyidx + - 2 ]->minor) . '->' . |
|
| 2284 | - $this->yystack[ $this->yyidx + 0 ]->minor . ']'; |
|
| 2285 | - } |
|
| 2286 | - |
|
| 2287 | - #line 946 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2288 | - public function yy_r129() |
|
| 2289 | - { |
|
| 2290 | - $this->_retvalue = "['" . $this->yystack[ $this->yyidx + 0 ]->minor . "']"; |
|
| 2291 | - } |
|
| 2292 | - |
|
| 2293 | - #line 950 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2294 | - public function yy_r130() |
|
| 2295 | - { |
|
| 2296 | - $this->_retvalue = '[' . $this->yystack[ $this->yyidx + 0 ]->minor . ']'; |
|
| 2297 | - } |
|
| 2298 | - |
|
| 2299 | - #line 955 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2300 | - public function yy_r131() |
|
| 2301 | - { |
|
| 2302 | - $this->_retvalue = '[' . $this->yystack[ $this->yyidx + - 1 ]->minor . ']'; |
|
| 2303 | - } |
|
| 2304 | - |
|
| 2305 | - #line 960 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2306 | - public function yy_r132() |
|
| 2307 | - { |
|
| 2308 | - $this->_retvalue = '[' . $this->compiler->compileTag('private_special_variable', array(), '[\'section\'][\'' . |
|
| 2309 | - $this->yystack[ $this->yyidx + |
|
| 2310 | - - 1 ]->minor . |
|
| 2311 | - '\'][\'index\']') . |
|
| 2312 | - ']'; |
|
| 2313 | - } |
|
| 2314 | - |
|
| 2315 | - #line 964 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2316 | - public function yy_r133() |
|
| 2317 | - { |
|
| 2318 | - $this->_retvalue = '[' . $this->compiler->compileTag('private_special_variable', array(), '[\'section\'][\'' . |
|
| 2319 | - $this->yystack[ $this->yyidx + |
|
| 2320 | - - 3 ]->minor . |
|
| 2321 | - '\'][\'' . |
|
| 2322 | - $this->yystack[ $this->yyidx + |
|
| 2323 | - - 1 ]->minor . |
|
| 2324 | - '\']') . ']'; |
|
| 2325 | - } |
|
| 2326 | - |
|
| 2327 | - #line 967 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2328 | - public function yy_r134() |
|
| 2329 | - { |
|
| 2330 | - $this->_retvalue = '[' . $this->yystack[ $this->yyidx + - 1 ]->minor . ']'; |
|
| 2331 | - } |
|
| 2332 | - |
|
| 2333 | - #line 973 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2334 | - public function yy_r136() |
|
| 2335 | - { |
|
| 2336 | - $this->_retvalue = '[' . $this->compiler->compileVariable('\'' . |
|
| 2337 | - substr($this->yystack[ $this->yyidx + - 1 ]->minor, |
|
| 2338 | - 1) . '\'') . ']';; |
|
| 2339 | - } |
|
| 2340 | - |
|
| 2341 | - #line 989 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2342 | - public function yy_r140() |
|
| 2343 | - { |
|
| 2344 | - $this->_retvalue = '[]'; |
|
| 2345 | - } |
|
| 2346 | - |
|
| 2347 | - #line 999 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2348 | - public function yy_r141() |
|
| 2349 | - { |
|
| 2350 | - $this->_retvalue = '\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\''; |
|
| 2351 | - } |
|
| 2352 | - |
|
| 2353 | - #line 1003 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2354 | - public function yy_r142() |
|
| 2355 | - { |
|
| 2356 | - $this->_retvalue = "''"; |
|
| 2357 | - } |
|
| 2358 | - |
|
| 2359 | - #line 1008 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2360 | - public function yy_r143() |
|
| 2361 | - { |
|
| 2362 | - $this->_retvalue = |
|
| 2363 | - $this->yystack[ $this->yyidx + - 1 ]->minor . '.' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2364 | - } |
|
| 2365 | - |
|
| 2366 | - #line 1016 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2367 | - public function yy_r145() |
|
| 2368 | - { |
|
| 2369 | - $var = |
|
| 2370 | - trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length), |
|
| 2371 | - ' $'); |
|
| 2372 | - $this->_retvalue = $this->compiler->compileVariable('\'' . $var . '\''); |
|
| 2373 | - } |
|
| 2374 | - |
|
| 2375 | - #line 1022 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2376 | - public function yy_r146() |
|
| 2377 | - { |
|
| 2378 | - $this->_retvalue = '(' . $this->yystack[ $this->yyidx + - 1 ]->minor . ')'; |
|
| 2379 | - } |
|
| 2380 | - |
|
| 2381 | - #line 1029 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2382 | - public function yy_r147() |
|
| 2383 | - { |
|
| 2384 | - if ($this->yystack[ $this->yyidx + - 1 ]->minor[ 'var' ] == '\'smarty\'') { |
|
| 2385 | - $this->_retvalue = $this->compiler->compileTag('private_special_variable', array(), |
|
| 2386 | - $this->yystack[ $this->yyidx + |
|
| 2387 | - - 1 ]->minor[ 'smarty_internal_index' ]) . |
|
| 2388 | - $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2389 | - } else { |
|
| 2390 | - $this->_retvalue = $this->compiler->compileVariable($this->yystack[ $this->yyidx + - 1 ]->minor[ 'var' ]) . |
|
| 2391 | - $this->yystack[ $this->yyidx + - 1 ]->minor[ 'smarty_internal_index' ] . |
|
| 2392 | - $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2393 | - } |
|
| 2394 | - } |
|
| 2395 | - |
|
| 2396 | - #line 1038 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2397 | - public function yy_r148() |
|
| 2398 | - { |
|
| 2399 | - $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2400 | - } |
|
| 2401 | - |
|
| 2402 | - #line 1043 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2403 | - public function yy_r149() |
|
| 2404 | - { |
|
| 2405 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2406 | - } |
|
| 2407 | - |
|
| 2408 | - #line 1048 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2409 | - public function yy_r150() |
|
| 2410 | - { |
|
| 2411 | - if ($this->security && substr($this->yystack[ $this->yyidx + - 1 ]->minor, 0, 1) == '_') { |
|
| 2412 | - $this->compiler->trigger_template_error(self::Err1); |
|
| 2413 | - } |
|
| 2414 | - $this->_retvalue = |
|
| 2415 | - '->' . $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2416 | - } |
|
| 2417 | - |
|
| 2418 | - #line 1055 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2419 | - public function yy_r151() |
|
| 2420 | - { |
|
| 2421 | - if ($this->security) { |
|
| 2422 | - $this->compiler->trigger_template_error(self::Err2); |
|
| 2423 | - } |
|
| 2424 | - $this->_retvalue = '->{' . $this->compiler->compileVariable($this->yystack[ $this->yyidx + - 1 ]->minor) . |
|
| 2425 | - $this->yystack[ $this->yyidx + 0 ]->minor . '}'; |
|
| 2426 | - } |
|
| 2427 | - |
|
| 2428 | - #line 1062 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2429 | - public function yy_r152() |
|
| 2430 | - { |
|
| 2431 | - if ($this->security) { |
|
| 2432 | - $this->compiler->trigger_template_error(self::Err2); |
|
| 2433 | - } |
|
| 2434 | - $this->_retvalue = |
|
| 2435 | - '->{' . $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor . '}'; |
|
| 2436 | - } |
|
| 2437 | - |
|
| 2438 | - #line 1069 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2439 | - public function yy_r153() |
|
| 2440 | - { |
|
| 2441 | - if ($this->security) { |
|
| 2442 | - $this->compiler->trigger_template_error(self::Err2); |
|
| 2443 | - } |
|
| 2444 | - $this->_retvalue = '->{\'' . $this->yystack[ $this->yyidx + - 4 ]->minor . '\'.' . |
|
| 2445 | - $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor . |
|
| 2446 | - '}'; |
|
| 2447 | - } |
|
| 2448 | - |
|
| 2449 | - #line 1077 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2450 | - public function yy_r154() |
|
| 2451 | - { |
|
| 2452 | - $this->_retvalue = '->' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2453 | - } |
|
| 2454 | - |
|
| 2455 | - #line 1085 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2456 | - public function yy_r155() |
|
| 2457 | - { |
|
| 2458 | - if (!$this->security || |
|
| 2459 | - $this->security->isTrustedPhpFunction($this->yystack[ $this->yyidx + - 3 ]->minor, $this->compiler) |
|
| 2460 | - ) { |
|
| 2461 | - if (strcasecmp($this->yystack[ $this->yyidx + - 3 ]->minor, 'isset') === 0 || |
|
| 2462 | - strcasecmp($this->yystack[ $this->yyidx + - 3 ]->minor, 'empty') === 0 || |
|
| 2463 | - strcasecmp($this->yystack[ $this->yyidx + - 3 ]->minor, 'array') === 0 || |
|
| 2464 | - is_callable($this->yystack[ $this->yyidx + - 3 ]->minor) |
|
| 2465 | - ) { |
|
| 2466 | - $func_name = strtolower($this->yystack[ $this->yyidx + - 3 ]->minor); |
|
| 2467 | - if ($func_name == 'isset') { |
|
| 2468 | - if (count($this->yystack[ $this->yyidx + - 1 ]->minor) == 0) { |
|
| 2469 | - $this->compiler->trigger_template_error('Illegal number of paramer in "isset()"'); |
|
| 2470 | - } |
|
| 2471 | - $par = implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor); |
|
| 2472 | - if (strncasecmp($par, '$_smarty_tpl->smarty->ext->_config->_getConfigVariable', |
|
| 2473 | - strlen('$_smarty_tpl->smarty->ext->_config->_getConfigVariable')) === 0 |
|
| 2474 | - ) { |
|
| 2475 | - $prefixVar = $this->compiler->getNewPrefixVariable(); |
|
| 2476 | - $this->compiler->appendPrefixCode("<?php $prefixVar" . '=' . |
|
| 2477 | - str_replace(')', ', false)', $par) . ';?>'); |
|
| 2478 | - $isset_par = $prefixVar; |
|
| 2479 | - } else { |
|
| 2480 | - $isset_par = str_replace("')->value", "',null,true,false)->value", $par); |
|
| 2481 | - } |
|
| 2482 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 3 ]->minor . "(" . $isset_par . ")"; |
|
| 2483 | - } elseif (in_array($func_name, array('empty', 'reset', 'current', 'end', 'prev', 'next'))) { |
|
| 2484 | - if (count($this->yystack[ $this->yyidx + - 1 ]->minor) != 1) { |
|
| 2485 | - $this->compiler->trigger_template_error('Illegal number of paramer in "empty()"'); |
|
| 2486 | - } |
|
| 2487 | - if ($func_name == 'empty') { |
|
| 2488 | - $this->_retvalue = $func_name . '(' . str_replace("')->value", "',null,true,false)->value", |
|
| 2489 | - $this->yystack[ $this->yyidx + |
|
| 2490 | - - 1 ]->minor[ 0 ]) . ')'; |
|
| 2491 | - } else { |
|
| 2492 | - $this->_retvalue = $func_name . '(' . $this->yystack[ $this->yyidx + - 1 ]->minor[ 0 ] . ')'; |
|
| 2493 | - } |
|
| 2494 | - } else { |
|
| 2495 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 3 ]->minor . "(" . |
|
| 2496 | - implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor) . ")"; |
|
| 2497 | - } |
|
| 2498 | - } else { |
|
| 2499 | - $this->compiler->trigger_template_error("unknown function \"" . |
|
| 2500 | - $this->yystack[ $this->yyidx + - 3 ]->minor . "\""); |
|
| 2501 | - } |
|
| 2502 | - } |
|
| 2503 | - } |
|
| 2504 | - |
|
| 2505 | - #line 1124 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2506 | - public function yy_r156() |
|
| 2507 | - { |
|
| 2508 | - if ($this->security && substr($this->yystack[ $this->yyidx + - 3 ]->minor, 0, 1) == '_') { |
|
| 2509 | - $this->compiler->trigger_template_error(self::Err1); |
|
| 2510 | - } |
|
| 2511 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 3 ]->minor . "(" . |
|
| 2512 | - implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor) . ")"; |
|
| 2513 | - } |
|
| 2514 | - |
|
| 2515 | - #line 1131 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2516 | - public function yy_r157() |
|
| 2517 | - { |
|
| 2518 | - if ($this->security) { |
|
| 2519 | - $this->compiler->trigger_template_error(self::Err2); |
|
| 2520 | - } |
|
| 2521 | - $prefixVar = $this->compiler->getNewPrefixVariable(); |
|
| 2522 | - $this->compiler->appendPrefixCode("<?php $prefixVar" . '=' . $this->compiler->compileVariable('\'' . |
|
| 2523 | - substr($this->yystack[ $this->yyidx + |
|
| 2524 | - - 3 ]->minor, |
|
| 2525 | - 1) . |
|
| 2526 | - '\'') . ';?>'); |
|
| 2527 | - $this->_retvalue = $prefixVar . '(' . implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor) . ')'; |
|
| 2528 | - } |
|
| 2529 | - |
|
| 2530 | - #line 1142 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2531 | - public function yy_r158() |
|
| 2532 | - { |
|
| 2533 | - $this->_retvalue = |
|
| 2534 | - array_merge($this->yystack[ $this->yyidx + - 2 ]->minor, array($this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 2535 | - } |
|
| 2536 | - |
|
| 2537 | - #line 1159 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2538 | - public function yy_r161() |
|
| 2539 | - { |
|
| 2540 | - $this->_retvalue = array_merge($this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 2541 | - array(array_merge($this->yystack[ $this->yyidx + - 1 ]->minor, |
|
| 2542 | - $this->yystack[ $this->yyidx + 0 ]->minor))); |
|
| 2543 | - } |
|
| 2544 | - |
|
| 2545 | - #line 1163 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2546 | - public function yy_r162() |
|
| 2547 | - { |
|
| 2548 | - $this->_retvalue = |
|
| 2549 | - array(array_merge($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 2550 | - } |
|
| 2551 | - |
|
| 2552 | - #line 1171 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2553 | - public function yy_r164() |
|
| 2554 | - { |
|
| 2555 | - $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2556 | - } |
|
| 2557 | - |
|
| 2558 | - #line 1179 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2559 | - public function yy_r165() |
|
| 2560 | - { |
|
| 2561 | - $this->_retvalue = |
|
| 2562 | - array_merge($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2563 | - } |
|
| 2564 | - |
|
| 2565 | - #line 1198 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2566 | - public function yy_r169() |
|
| 2567 | - { |
|
| 2568 | - $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor, '', 'method'); |
|
| 2569 | - } |
|
| 2570 | - |
|
| 2571 | - #line 1203 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2572 | - public function yy_r170() |
|
| 2573 | - { |
|
| 2574 | - $this->_retvalue = |
|
| 2575 | - array($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor, 'method'); |
|
| 2576 | - } |
|
| 2577 | - |
|
| 2578 | - #line 1208 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2579 | - public function yy_r171() |
|
| 2580 | - { |
|
| 2581 | - $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor, ''); |
|
| 2582 | - } |
|
| 2583 | - |
|
| 2584 | - #line 1213 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2585 | - public function yy_r172() |
|
| 2586 | - { |
|
| 2587 | - $this->_retvalue = |
|
| 2588 | - array($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor, 'property'); |
|
| 2589 | - } |
|
| 2590 | - |
|
| 2591 | - #line 1218 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2592 | - public function yy_r173() |
|
| 2593 | - { |
|
| 2594 | - $this->_retvalue = array($this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 2595 | - $this->yystack[ $this->yyidx + - 1 ]->minor . |
|
| 2596 | - $this->yystack[ $this->yyidx + 0 ]->minor, 'property'); |
|
| 2597 | - } |
|
| 2598 | - |
|
| 2599 | - #line 1224 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2600 | - public function yy_r174() |
|
| 2601 | - { |
|
| 2602 | - $this->_retvalue = ' ' . trim($this->yystack[ $this->yyidx + 0 ]->minor) . ' '; |
|
| 2603 | - } |
|
| 2604 | - |
|
| 2605 | - #line 1228 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2606 | - public function yy_r175() |
|
| 2607 | - { |
|
| 2608 | - static $lops = |
|
| 2609 | - array('eq' => ' == ', 'ne' => ' != ', 'neq' => ' != ', 'gt' => ' > ', 'ge' => ' >= ', 'gte' => ' >= ', |
|
| 2610 | - 'lt' => ' < ', 'le' => ' <= ', 'lte' => ' <= ', 'mod' => ' % ', 'and' => ' && ', 'or' => ' || ', |
|
| 2611 | - 'xor' => ' xor ',); |
|
| 2612 | - $op = strtolower(preg_replace('/\s*/', '', $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 2613 | - $this->_retvalue = $lops[ $op ]; |
|
| 2614 | - } |
|
| 2615 | - |
|
| 2616 | - #line 1247 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2617 | - public function yy_r176() |
|
| 2618 | - { |
|
| 2619 | - static $tlops = |
|
| 2620 | - array('isdivby' => array('op' => ' % ', 'pre' => '!('), 'isnotdivby' => array('op' => ' % ', 'pre' => '('), |
|
| 2621 | - 'isevenby' => array('op' => ' / ', 'pre' => '!(1 & '), |
|
| 2622 | - 'isnotevenby' => array('op' => ' / ', 'pre' => '(1 & '), |
|
| 2623 | - 'isoddby' => array('op' => ' / ', 'pre' => '(1 & '), |
|
| 2624 | - 'isnotoddby' => array('op' => ' / ', 'pre' => '!(1 & '),); |
|
| 2625 | - $op = strtolower(preg_replace('/\s*/', '', $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 2626 | - $this->_retvalue = $tlops[ $op ]; |
|
| 2627 | - } |
|
| 2628 | - |
|
| 2629 | - #line 1260 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2630 | - public function yy_r177() |
|
| 2631 | - { |
|
| 2632 | - static $scond = |
|
| 2633 | - array('iseven' => '!(1 & ', 'isnoteven' => '(1 & ', 'isodd' => '(1 & ', 'isnotodd' => '!(1 & ',); |
|
| 2634 | - $op = strtolower(str_replace(' ', '', $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 2635 | - $this->_retvalue = $scond[ $op ]; |
|
| 2636 | - } |
|
| 2637 | - |
|
| 2638 | - #line 1274 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2639 | - public function yy_r178() |
|
| 2640 | - { |
|
| 2641 | - $this->_retvalue = 'array(' . $this->yystack[ $this->yyidx + - 1 ]->minor . ')'; |
|
| 2642 | - } |
|
| 2643 | - |
|
| 2644 | - #line 1282 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2645 | - public function yy_r180() |
|
| 2646 | - { |
|
| 2647 | - $this->_retvalue = |
|
| 2648 | - $this->yystack[ $this->yyidx + - 2 ]->minor . ',' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2649 | - } |
|
| 2650 | - |
|
| 2651 | - #line 1290 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2652 | - public function yy_r182() |
|
| 2653 | - { |
|
| 2654 | - $this->_retvalue = |
|
| 2655 | - $this->yystack[ $this->yyidx + - 2 ]->minor . '=>' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2656 | - } |
|
| 2657 | - |
|
| 2658 | - #line 1294 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2659 | - public function yy_r183() |
|
| 2660 | - { |
|
| 2661 | - $this->_retvalue = |
|
| 2662 | - '\'' . $this->yystack[ $this->yyidx + - 2 ]->minor . '\'=>' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2663 | - } |
|
| 2664 | - |
|
| 2665 | - #line 1310 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2666 | - public function yy_r186() |
|
| 2667 | - { |
|
| 2668 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor->to_smarty_php($this); |
|
| 2669 | - } |
|
| 2670 | - |
|
| 2671 | - #line 1315 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2672 | - public function yy_r187() |
|
| 2673 | - { |
|
| 2674 | - $this->yystack[ $this->yyidx + - 1 ]->minor->append_subtree($this, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2675 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor; |
|
| 2676 | - } |
|
| 2677 | - |
|
| 2678 | - #line 1320 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2679 | - public function yy_r188() |
|
| 2680 | - { |
|
| 2681 | - $this->_retvalue = new Smarty_Internal_ParseTree_Dq($this, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2682 | - } |
|
| 2683 | - |
|
| 2684 | - #line 1324 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2685 | - public function yy_r189() |
|
| 2686 | - { |
|
| 2687 | - $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)' . $this->yystack[ $this->yyidx + - 1 ]->minor); |
|
| 2688 | - } |
|
| 2689 | - |
|
| 2690 | - #line 1332 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2691 | - public function yy_r191() |
|
| 2692 | - { |
|
| 2693 | - $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)$_smarty_tpl->tpl_vars[\'' . |
|
| 2694 | - substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . |
|
| 2695 | - '\']->value'); |
|
| 2696 | - } |
|
| 2697 | - |
|
| 2698 | - #line 1340 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2699 | - public function yy_r193() |
|
| 2700 | - { |
|
| 2701 | - $this->_retvalue = |
|
| 2702 | - new Smarty_Internal_ParseTree_Code('(string)(' . $this->yystack[ $this->yyidx + - 1 ]->minor . ')'); |
|
| 2703 | - } |
|
| 2704 | - |
|
| 2705 | - #line 1344 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2706 | - public function yy_r194() |
|
| 2707 | - { |
|
| 2708 | - $this->_retvalue = new Smarty_Internal_ParseTree_Tag($this, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2709 | - } |
|
| 2710 | - |
|
| 2711 | - #line 1348 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2712 | - public function yy_r195() |
|
| 2713 | - { |
|
| 2714 | - $this->_retvalue = new Smarty_Internal_ParseTree_DqContent($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2715 | - } |
|
| 2716 | - |
|
| 2717 | - private $_retvalue; |
|
| 2718 | - |
|
| 2719 | - public function yy_reduce($yyruleno) |
|
| 2720 | - { |
|
| 2721 | - if ($this->yyTraceFILE && $yyruleno >= 0 && $yyruleno < count(self::$yyRuleName)) { |
|
| 2722 | - fprintf($this->yyTraceFILE, "%sReduce (%d) [%s].\n", $this->yyTracePrompt, $yyruleno, |
|
| 2723 | - self::$yyRuleName[ $yyruleno ]); |
|
| 2724 | - } |
|
| 2725 | - |
|
| 2726 | - $this->_retvalue = $yy_lefthand_side = null; |
|
| 2727 | - if (isset(self::$yyReduceMap[ $yyruleno ])) { |
|
| 2728 | - // call the action |
|
| 2729 | - $this->_retvalue = null; |
|
| 2730 | - $this->{'yy_r' . self::$yyReduceMap[ $yyruleno ]}(); |
|
| 2731 | - $yy_lefthand_side = $this->_retvalue; |
|
| 2732 | - } |
|
| 2733 | - $yygoto = self::$yyRuleInfo[ $yyruleno ][ 0 ]; |
|
| 2734 | - $yysize = self::$yyRuleInfo[ $yyruleno ][ 1 ]; |
|
| 2735 | - $this->yyidx -= $yysize; |
|
| 2736 | - for ($i = $yysize; $i; $i --) { |
|
| 2737 | - // pop all of the right-hand side parameters |
|
| 2738 | - array_pop($this->yystack); |
|
| 2739 | - } |
|
| 2740 | - $yyact = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, $yygoto); |
|
| 2741 | - if ($yyact < self::YYNSTATE) { |
|
| 2742 | - if (!$this->yyTraceFILE && $yysize) { |
|
| 2743 | - $this->yyidx ++; |
|
| 2744 | - $x = new TP_yyStackEntry; |
|
| 2745 | - $x->stateno = $yyact; |
|
| 2746 | - $x->major = $yygoto; |
|
| 2747 | - $x->minor = $yy_lefthand_side; |
|
| 2748 | - $this->yystack[ $this->yyidx ] = $x; |
|
| 2749 | - } else { |
|
| 2750 | - $this->yy_shift($yyact, $yygoto, $yy_lefthand_side); |
|
| 2751 | - } |
|
| 2752 | - } elseif ($yyact == self::YYNSTATE + self::YYNRULE + 1) { |
|
| 2753 | - $this->yy_accept(); |
|
| 2754 | - } |
|
| 2755 | - } |
|
| 2756 | - |
|
| 2757 | - public function yy_parse_failed() |
|
| 2758 | - { |
|
| 2759 | - if ($this->yyTraceFILE) { |
|
| 2760 | - fprintf($this->yyTraceFILE, "%sFail!\n", $this->yyTracePrompt); |
|
| 2761 | - } |
|
| 2762 | - while ($this->yyidx >= 0) { |
|
| 2763 | - $this->yy_pop_parser_stack(); |
|
| 2764 | - } |
|
| 2765 | - } |
|
| 2766 | - |
|
| 2767 | - public function yy_syntax_error($yymajor, $TOKEN) |
|
| 2768 | - { |
|
| 2769 | - #line 200 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2770 | - |
|
| 2771 | - $this->internalError = true; |
|
| 2772 | - $this->yymajor = $yymajor; |
|
| 2773 | - $this->compiler->trigger_template_error(); |
|
| 2774 | - } |
|
| 2775 | - |
|
| 2776 | - public function yy_accept() |
|
| 2777 | - { |
|
| 2778 | - if ($this->yyTraceFILE) { |
|
| 2779 | - fprintf($this->yyTraceFILE, "%sAccept!\n", $this->yyTracePrompt); |
|
| 2780 | - } |
|
| 2781 | - while ($this->yyidx >= 0) { |
|
| 2782 | - $this->yy_pop_parser_stack(); |
|
| 2783 | - } |
|
| 2784 | - #line 193 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2785 | - |
|
| 2786 | - $this->successful = !$this->internalError; |
|
| 2787 | - $this->internalError = false; |
|
| 2788 | - $this->retvalue = $this->_retvalue; |
|
| 2789 | - } |
|
| 2790 | - |
|
| 2791 | - public function doParse($yymajor, $yytokenvalue) |
|
| 2792 | - { |
|
| 2793 | - $yyerrorhit = 0; /* True if yymajor has invoked an error */ |
|
| 2794 | - |
|
| 2795 | - if ($this->yyidx === null || $this->yyidx < 0) { |
|
| 2796 | - $this->yyidx = 0; |
|
| 2797 | - $this->yyerrcnt = - 1; |
|
| 2798 | - $x = new TP_yyStackEntry; |
|
| 2799 | - $x->stateno = 0; |
|
| 2800 | - $x->major = 0; |
|
| 2801 | - $this->yystack = array(); |
|
| 2802 | - $this->yystack[] = $x; |
|
| 2803 | - } |
|
| 2804 | - $yyendofinput = ($yymajor == 0); |
|
| 2805 | - |
|
| 2806 | - if ($this->yyTraceFILE) { |
|
| 2807 | - fprintf($this->yyTraceFILE, "%sInput %s\n", $this->yyTracePrompt, $this->yyTokenName[ $yymajor ]); |
|
| 2808 | - } |
|
| 2809 | - |
|
| 2810 | - do { |
|
| 2811 | - $yyact = $this->yy_find_shift_action($yymajor); |
|
| 2812 | - if ($yymajor < self::YYERRORSYMBOL && !$this->yy_is_expected_token($yymajor)) { |
|
| 2813 | - // force a syntax error |
|
| 2814 | - $yyact = self::YY_ERROR_ACTION; |
|
| 2815 | - } |
|
| 2816 | - if ($yyact < self::YYNSTATE) { |
|
| 2817 | - $this->yy_shift($yyact, $yymajor, $yytokenvalue); |
|
| 2818 | - $this->yyerrcnt --; |
|
| 2819 | - if ($yyendofinput && $this->yyidx >= 0) { |
|
| 2820 | - $yymajor = 0; |
|
| 2821 | - } else { |
|
| 2822 | - $yymajor = self::YYNOCODE; |
|
| 2823 | - } |
|
| 2824 | - } elseif ($yyact < self::YYNSTATE + self::YYNRULE) { |
|
| 2825 | - $this->yy_reduce($yyact - self::YYNSTATE); |
|
| 2826 | - } elseif ($yyact == self::YY_ERROR_ACTION) { |
|
| 2827 | - if ($this->yyTraceFILE) { |
|
| 2828 | - fprintf($this->yyTraceFILE, "%sSyntax Error!\n", $this->yyTracePrompt); |
|
| 2829 | - } |
|
| 2830 | - if (self::YYERRORSYMBOL) { |
|
| 2831 | - if ($this->yyerrcnt < 0) { |
|
| 2832 | - $this->yy_syntax_error($yymajor, $yytokenvalue); |
|
| 2833 | - } |
|
| 2834 | - $yymx = $this->yystack[ $this->yyidx ]->major; |
|
| 2835 | - if ($yymx == self::YYERRORSYMBOL || $yyerrorhit) { |
|
| 2836 | - if ($this->yyTraceFILE) { |
|
| 2837 | - fprintf($this->yyTraceFILE, "%sDiscard input token %s\n", $this->yyTracePrompt, |
|
| 2838 | - $this->yyTokenName[ $yymajor ]); |
|
| 2839 | - } |
|
| 2840 | - $this->yy_destructor($yymajor, $yytokenvalue); |
|
| 2841 | - $yymajor = self::YYNOCODE; |
|
| 2842 | - } else { |
|
| 2843 | - while ($this->yyidx >= 0 && $yymx != self::YYERRORSYMBOL && |
|
| 2844 | - ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE) { |
|
| 2845 | - $this->yy_pop_parser_stack(); |
|
| 2846 | - } |
|
| 2847 | - if ($this->yyidx < 0 || $yymajor == 0) { |
|
| 2848 | - $this->yy_destructor($yymajor, $yytokenvalue); |
|
| 2849 | - $this->yy_parse_failed(); |
|
| 2850 | - $yymajor = self::YYNOCODE; |
|
| 2851 | - } elseif ($yymx != self::YYERRORSYMBOL) { |
|
| 2852 | - $u2 = 0; |
|
| 2853 | - $this->yy_shift($yyact, self::YYERRORSYMBOL, $u2); |
|
| 2854 | - } |
|
| 2855 | - } |
|
| 2856 | - $this->yyerrcnt = 3; |
|
| 2857 | - $yyerrorhit = 1; |
|
| 2858 | - } else { |
|
| 2859 | - if ($this->yyerrcnt <= 0) { |
|
| 2860 | - $this->yy_syntax_error($yymajor, $yytokenvalue); |
|
| 2861 | - } |
|
| 2862 | - $this->yyerrcnt = 3; |
|
| 2863 | - $this->yy_destructor($yymajor, $yytokenvalue); |
|
| 2864 | - if ($yyendofinput) { |
|
| 2865 | - $this->yy_parse_failed(); |
|
| 2866 | - } |
|
| 2867 | - $yymajor = self::YYNOCODE; |
|
| 2868 | - } |
|
| 2869 | - } else { |
|
| 2870 | - $this->yy_accept(); |
|
| 2871 | - $yymajor = self::YYNOCODE; |
|
| 2872 | - } |
|
| 2873 | - } |
|
| 2874 | - while ($yymajor != self::YYNOCODE && $this->yyidx >= 0); |
|
| 2875 | - } |
|
| 390 | + static public $yy_action = array(269, 8, 133, 295, 335, 80, 282, 219, 7, 84, 128, 178, 255, 276, 113, 102, 13, 83, |
|
| 391 | + 227, 286, 305, 220, 36, 223, 283, 21, 32, 297, 41, 14, 90, 40, 44, 260, 213, 231, |
|
| 392 | + 250, 235, 210, 128, 81, 1, 298, 296, 102, 269, 8, 132, 79, 335, 196, 184, 219, 7, |
|
| 393 | + 84, 26, 297, 461, 101, 113, 39, 24, 278, 227, 461, 305, 220, 171, 206, 222, 21, |
|
| 394 | + 230, 201, 41, 104, 192, 40, 44, 260, 213, 18, 236, 241, 210, 251, 81, 1, 316, 296, |
|
| 395 | + 114, 269, 8, 135, 79, 335, 205, 302, 219, 7, 84, 116, 107, 477, 477, 113, 33, 197, |
|
| 396 | + 477, 227, 266, 305, 220, 326, 223, 31, 21, 29, 215, 41, 311, 78, 40, 44, 260, 213, |
|
| 397 | + 296, 250, 256, 210, 190, 81, 1, 3, 296, 307, 269, 8, 134, 79, 335, 205, 302, 219, |
|
| 398 | + 7, 84, 232, 18, 296, 294, 113, 334, 85, 323, 227, 136, 305, 220, 328, 223, 29, 21, |
|
| 399 | + 183, 101, 41, 234, 78, 40, 44, 260, 213, 137, 250, 314, 210, 139, 81, 1, 10, 296, |
|
| 400 | + 101, 269, 8, 135, 79, 335, 195, 154, 219, 7, 84, 322, 232, 81, 114, 113, 296, 329, |
|
| 401 | + 94, 227, 315, 305, 220, 326, 212, 120, 21, 168, 215, 41, 281, 114, 40, 44, 260, |
|
| 402 | + 213, 296, 250, 222, 210, 265, 81, 1, 104, 296, 211, 269, 8, 135, 79, 335, 193, 302, |
|
| 403 | + 219, 7, 84, 242, 239, 249, 217, 113, 11, 215, 289, 227, 136, 305, 220, 228, 223, |
|
| 404 | + 222, 21, 238, 149, 41, 104, 78, 40, 44, 260, 213, 461, 250, 329, 210, 6, 81, 1, |
|
| 405 | + 461, 296, 2, 269, 8, 136, 79, 335, 205, 158, 219, 7, 84, 190, 211, 81, 101, 113, |
|
| 406 | + 296, 329, 93, 227, 12, 305, 220, 18, 223, 244, 34, 268, 448, 41, 281, 449, 40, 44, |
|
| 407 | + 260, 213, 191, 250, 36, 210, 448, 81, 1, 449, 296, 14, 269, 8, 135, 79, 335, 205, |
|
| 408 | + 15, 219, 7, 84, 186, 293, 152, 14, 113, 16, 214, 5, 227, 165, 305, 220, 329, 194, |
|
| 409 | + 20, 21, 140, 101, 41, 115, 448, 40, 44, 260, 213, 281, 250, 303, 210, 264, 81, 1, |
|
| 410 | + 448, 296, 169, 269, 8, 131, 79, 335, 205, 176, 219, 7, 84, 137, 28, 296, 310, 113, |
|
| 411 | + 185, 293, 10, 227, 275, 305, 220, 296, 223, 175, 4, 281, 143, 41, 144, 192, 40, 44, |
|
| 412 | + 260, 213, 35, 250, 329, 210, 329, 81, 1, 270, 296, 308, 269, 8, 135, 79, 335, 198, |
|
| 413 | + 121, 219, 7, 84, 190, 292, 17, 232, 113, 166, 284, 281, 227, 141, 305, 220, 211, |
|
| 414 | + 223, 319, 21, 299, 211, 41, 329, 211, 40, 44, 260, 213, 258, 250, 363, 210, 221, |
|
| 415 | + 81, 1, 281, 296, 6, 269, 8, 136, 79, 335, 205, 177, 219, 7, 84, 167, 211, 159, 22, |
|
| 416 | + 113, 104, 211, 156, 227, 300, 305, 220, 329, 223, 274, 34, 359, 329, 41, 172, 192, |
|
| 417 | + 40, 44, 260, 213, 95, 250, 318, 210, 329, 81, 273, 36, 296, 257, 292, 17, 181, 79, |
|
| 418 | + 14, 284, 309, 277, 254, 262, 263, 259, 178, 211, 25, 36, 269, 8, 187, 331, 335, |
|
| 419 | + 261, 14, 219, 7, 84, 192, 303, 211, 38, 113, 237, 321, 180, 227, 267, 305, 220, |
|
| 420 | + 153, 121, 312, 179, 192, 272, 108, 215, 209, 211, 118, 69, 112, 43, 42, 37, 248, |
|
| 421 | + 102, 86, 189, 252, 279, 182, 293, 150, 271, 204, 317, 176, 297, 288, 287, 285, 280, |
|
| 422 | + 329, 281, 312, 174, 87, 202, 330, 215, 209, 170, 118, 69, 112, 43, 42, 37, 138, |
|
| 423 | + 102, 192, 402, 252, 279, 38, 216, 88, 271, 204, 317, 211, 297, 288, 287, 285, 280, |
|
| 424 | + 310, 402, 105, 253, 404, 164, 332, 312, 402, 211, 89, 448, 215, 209, 305, 129, 61, |
|
| 425 | + 106, 163, 238, 404, 142, 102, 448, 305, 252, 279, 404, 305, 305, 271, 204, 317, |
|
| 426 | + 305, 297, 312, 155, 305, 305, 305, 215, 209, 211, 129, 73, 112, 211, 43, 42, 37, |
|
| 427 | + 102, 305, 404, 252, 279, 305, 292, 17, 271, 204, 317, 284, 297, 305, 288, 287, 285, |
|
| 428 | + 280, 404, 203, 305, 477, 477, 312, 305, 404, 477, 305, 215, 209, 305, 129, 73, 112, |
|
| 429 | + 43, 42, 37, 305, 102, 305, 305, 252, 279, 305, 305, 224, 271, 204, 317, 324, 297, |
|
| 430 | + 288, 287, 285, 280, 305, 305, 208, 312, 305, 477, 305, 305, 215, 209, 211, 129, 50, |
|
| 431 | + 106, 305, 117, 305, 305, 102, 148, 401, 252, 279, 92, 325, 448, 271, 204, 317, 329, |
|
| 432 | + 297, 269, 9, 327, 218, 335, 401, 448, 219, 7, 84, 305, 320, 401, 305, 113, 325, |
|
| 433 | + 192, 305, 227, 305, 305, 220, 269, 9, 327, 305, 335, 305, 305, 219, 7, 84, 305, 43, |
|
| 434 | + 42, 37, 113, 305, 305, 305, 227, 305, 305, 220, 305, 305, 305, 305, 291, 27, 288, |
|
| 435 | + 287, 285, 280, 305, 305, 305, 312, 305, 305, 305, 305, 215, 209, 305, 129, 73, 112, |
|
| 436 | + 211, 305, 290, 27, 102, 305, 305, 252, 279, 305, 369, 305, 271, 204, 317, 305, 297, |
|
| 437 | + 225, 305, 312, 305, 211, 305, 207, 215, 209, 36, 129, 54, 112, 305, 188, 305, 14, |
|
| 438 | + 102, 145, 448, 252, 279, 91, 305, 305, 271, 204, 317, 329, 297, 312, 448, 292, 17, |
|
| 439 | + 305, 215, 209, 284, 129, 65, 112, 305, 43, 42, 37, 102, 192, 305, 252, 279, 305, |
|
| 440 | + 305, 305, 271, 204, 317, 305, 297, 312, 288, 287, 285, 280, 215, 209, 305, 99, 67, |
|
| 441 | + 112, 305, 305, 229, 305, 102, 305, 305, 252, 279, 305, 305, 305, 271, 204, 317, |
|
| 442 | + 312, 297, 211, 305, 305, 215, 209, 305, 129, 45, 112, 305, 246, 305, 305, 102, 162, |
|
| 443 | + 305, 252, 279, 184, 305, 305, 271, 204, 317, 329, 297, 312, 39, 24, 278, 305, 215, |
|
| 444 | + 209, 305, 129, 56, 112, 305, 43, 42, 37, 102, 192, 305, 252, 279, 305, 305, 305, |
|
| 445 | + 271, 204, 317, 305, 297, 312, 288, 287, 285, 280, 215, 209, 305, 96, 55, 112, 305, |
|
| 446 | + 305, 305, 305, 102, 305, 305, 252, 279, 305, 305, 305, 271, 204, 317, 312, 297, |
|
| 447 | + 211, 305, 305, 215, 97, 305, 82, 47, 103, 305, 247, 305, 305, 102, 151, 305, 252, |
|
| 448 | + 279, 184, 305, 305, 271, 204, 317, 329, 297, 312, 39, 24, 278, 305, 215, 209, 305, |
|
| 449 | + 129, 71, 112, 305, 43, 42, 37, 102, 192, 305, 252, 279, 305, 305, 305, 271, 204, |
|
| 450 | + 317, 305, 297, 312, 288, 287, 285, 280, 215, 209, 305, 129, 59, 112, 305, 305, 305, |
|
| 451 | + 305, 102, 305, 305, 252, 279, 305, 305, 305, 271, 204, 317, 312, 297, 211, 305, |
|
| 452 | + 305, 215, 209, 305, 129, 58, 112, 305, 305, 305, 305, 102, 160, 305, 252, 279, 184, |
|
| 453 | + 305, 305, 271, 204, 317, 329, 297, 312, 39, 24, 278, 305, 215, 209, 305, 129, 53, |
|
| 454 | + 112, 226, 43, 42, 37, 102, 192, 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, |
|
| 455 | + 297, 312, 288, 287, 285, 280, 215, 209, 305, 129, 60, 112, 305, 305, 305, 305, 102, |
|
| 456 | + 305, 305, 252, 279, 305, 305, 305, 271, 204, 317, 312, 297, 211, 305, 305, 215, |
|
| 457 | + 209, 305, 100, 64, 112, 305, 305, 305, 305, 102, 146, 305, 252, 279, 184, 305, 305, |
|
| 458 | + 271, 204, 317, 329, 297, 312, 39, 24, 278, 305, 215, 209, 305, 129, 61, 112, 245, |
|
| 459 | + 43, 42, 37, 102, 192, 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, 312, |
|
| 460 | + 288, 287, 285, 280, 215, 200, 305, 129, 63, 112, 305, 305, 305, 305, 102, 305, 305, |
|
| 461 | + 252, 279, 305, 305, 305, 271, 204, 317, 312, 297, 211, 305, 305, 215, 209, 305, |
|
| 462 | + 111, 51, 112, 305, 305, 305, 305, 102, 147, 305, 252, 279, 184, 305, 305, 271, 204, |
|
| 463 | + 317, 329, 297, 312, 39, 24, 278, 305, 215, 209, 305, 129, 49, 112, 305, 43, 42, 37, |
|
| 464 | + 102, 192, 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, 312, 288, 287, |
|
| 465 | + 285, 280, 215, 209, 305, 129, 75, 112, 305, 305, 305, 305, 102, 305, 305, 252, 279, |
|
| 466 | + 305, 305, 305, 271, 204, 317, 312, 297, 305, 305, 305, 215, 209, 305, 129, 76, 112, |
|
| 467 | + 305, 305, 305, 305, 102, 161, 305, 252, 279, 184, 305, 305, 271, 204, 317, 329, |
|
| 468 | + 297, 312, 39, 24, 278, 305, 215, 98, 305, 82, 46, 103, 305, 305, 305, 305, 102, |
|
| 469 | + 192, 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, 312, 305, 305, 305, |
|
| 470 | + 305, 215, 209, 305, 129, 70, 112, 305, 305, 305, 305, 102, 305, 305, 252, 279, 305, |
|
| 471 | + 305, 305, 271, 204, 317, 312, 297, 305, 305, 305, 215, 209, 305, 129, 57, 112, 305, |
|
| 472 | + 305, 305, 305, 102, 305, 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, |
|
| 473 | + 312, 305, 305, 305, 305, 215, 199, 305, 109, 62, 112, 305, 305, 305, 305, 102, 305, |
|
| 474 | + 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, 312, 305, 305, 305, 305, |
|
| 475 | + 215, 209, 305, 129, 72, 112, 305, 305, 305, 305, 102, 305, 305, 252, 279, 305, 305, |
|
| 476 | + 305, 271, 204, 317, 312, 297, 305, 305, 305, 215, 209, 305, 129, 77, 112, 305, 305, |
|
| 477 | + 305, 305, 102, 305, 305, 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, 312, |
|
| 478 | + 305, 305, 305, 305, 215, 209, 305, 129, 68, 112, 305, 305, 305, 305, 102, 305, 305, |
|
| 479 | + 252, 279, 305, 305, 305, 271, 204, 317, 305, 297, 312, 305, 305, 305, 305, 215, |
|
| 480 | + 209, 305, 129, 74, 112, 305, 305, 305, 305, 102, 305, 305, 252, 279, 305, 305, 305, |
|
| 481 | + 271, 204, 317, 312, 297, 305, 305, 305, 215, 209, 305, 129, 48, 112, 305, 305, 305, |
|
| 482 | + 305, 102, 305, 305, 252, 279, 414, 414, 305, 271, 204, 317, 305, 297, 312, 305, |
|
| 483 | + 305, 305, 305, 215, 209, 305, 129, 66, 112, 305, 305, 305, 305, 102, 305, 305, 252, |
|
| 484 | + 279, 211, 305, 305, 271, 204, 317, 305, 297, 448, 305, 414, 414, 414, 533, 52, 243, |
|
| 485 | + 239, 249, 217, 305, 448, 215, 305, 305, 30, 305, 36, 414, 414, 414, 414, 305, 233, |
|
| 486 | + 14, 305, 305, 305, 305, 43, 42, 37, 305, 477, 477, 312, 23, 305, 477, 461, 215, |
|
| 487 | + 209, 211, 127, 305, 112, 288, 287, 285, 280, 102, 305, 301, 357, 313, 305, 292, 17, |
|
| 488 | + 271, 204, 317, 284, 297, 305, 305, 302, 305, 461, 36, 36, 461, 36, 477, 157, 461, |
|
| 489 | + 14, 14, 305, 14, 305, 43, 42, 37, 305, 305, 305, 312, 305, 211, 78, 305, 215, 209, |
|
| 490 | + 305, 130, 305, 112, 288, 287, 285, 280, 102, 305, 305, 305, 240, 305, 292, 17, 271, |
|
| 491 | + 204, 317, 284, 297, 36, 305, 305, 305, 305, 305, 305, 14, 36, 305, 173, 312, 43, |
|
| 492 | + 42, 37, 14, 215, 209, 305, 122, 305, 112, 305, 305, 305, 305, 102, 304, 305, 288, |
|
| 493 | + 287, 285, 280, 305, 271, 204, 317, 305, 297, 302, 305, 312, 305, 36, 305, 305, 215, |
|
| 494 | + 209, 305, 123, 14, 112, 312, 305, 305, 305, 102, 215, 209, 305, 124, 305, 112, 78, |
|
| 495 | + 271, 204, 317, 102, 297, 305, 305, 305, 305, 305, 305, 271, 204, 317, 312, 297, |
|
| 496 | + 305, 305, 305, 215, 209, 305, 119, 305, 112, 305, 305, 305, 305, 102, 305, 305, |
|
| 497 | + 233, 305, 305, 305, 305, 271, 204, 317, 305, 297, 477, 477, 312, 32, 305, 477, 461, |
|
| 498 | + 215, 209, 305, 126, 305, 112, 305, 305, 305, 305, 102, 305, 305, 233, 305, 305, |
|
| 499 | + 305, 305, 271, 204, 317, 305, 297, 477, 477, 305, 305, 461, 477, 461, 461, 312, |
|
| 500 | + 477, 19, 461, 211, 215, 209, 305, 125, 305, 112, 305, 477, 477, 305, 102, 305, 477, |
|
| 501 | + 461, 305, 305, 305, 305, 271, 204, 317, 461, 297, 305, 461, 305, 477, 305, 461, |
|
| 502 | + 333, 305, 211, 305, 305, 305, 305, 305, 43, 42, 37, 305, 461, 305, 305, 461, 305, |
|
| 503 | + 477, 305, 461, 305, 305, 233, 110, 305, 288, 287, 285, 280, 305, 306, 305, 477, |
|
| 504 | + 477, 305, 305, 305, 477, 461, 305, 43, 42, 37, 477, 477, 305, 305, 305, 477, 461, |
|
| 505 | + 305, 305, 305, 305, 305, 305, 305, 288, 287, 285, 280, 305, 305, 305, 305, 305, |
|
| 506 | + 461, 305, 305, 461, 408, 477, 305, 461, 305, 305, 305, 461, 305, 305, 461, 408, |
|
| 507 | + 477, 408, 461, 305, 408, 305, 305, 305, 305, 305, 305, 408, 305, 408, 305, 408, |
|
| 508 | + 305, 305, 305, 305, 305, 305, 305, 232,); |
|
| 509 | + |
|
| 510 | + static public $yy_lookahead = array(12, 13, 14, 17, 16, 17, 72, 19, 20, 21, 76, 8, 9, 10, 26, 81, 22, 17, 30, 31, |
|
| 511 | + 32, 33, 27, 35, 90, 37, 15, 93, 40, 34, 36, 43, 44, 45, 46, 72, 48, 51, 50, 76, |
|
| 512 | + 52, 53, 98, 55, 81, 12, 13, 14, 60, 16, 17, 77, 19, 20, 21, 15, 93, 46, 18, 26, |
|
| 513 | + 86, 87, 88, 30, 53, 32, 33, 94, 35, 76, 37, 78, 79, 40, 81, 101, 43, 44, 45, 46, |
|
| 514 | + 36, 48, 38, 50, 14, 52, 53, 54, 55, 49, 12, 13, 14, 60, 16, 17, 23, 19, 20, 21, |
|
| 515 | + 17, 81, 12, 13, 26, 13, 14, 17, 30, 17, 32, 33, 66, 35, 15, 37, 15, 71, 40, 99, |
|
| 516 | + 47, 43, 44, 45, 46, 55, 48, 35, 50, 101, 52, 53, 36, 55, 61, 12, 13, 14, 60, 16, |
|
| 517 | + 17, 23, 19, 20, 21, 46, 36, 55, 38, 26, 54, 105, 106, 30, 14, 32, 33, 17, 35, |
|
| 518 | + 15, 37, 14, 18, 40, 17, 47, 43, 44, 45, 46, 46, 48, 54, 50, 14, 52, 53, 53, 55, |
|
| 519 | + 18, 12, 13, 14, 60, 16, 17, 73, 19, 20, 21, 50, 46, 52, 49, 26, 55, 83, 37, 30, |
|
| 520 | + 54, 32, 33, 66, 35, 17, 37, 94, 71, 40, 96, 49, 43, 44, 45, 46, 55, 48, 76, 50, |
|
| 521 | + 78, 52, 53, 81, 55, 1, 12, 13, 14, 60, 16, 17, 23, 19, 20, 21, 65, 66, 67, 68, |
|
| 522 | + 26, 13, 71, 106, 30, 14, 32, 33, 17, 35, 76, 37, 78, 73, 40, 81, 47, 43, 44, 45, |
|
| 523 | + 46, 46, 48, 83, 50, 37, 52, 53, 53, 55, 37, 12, 13, 14, 60, 16, 17, 73, 19, 20, |
|
| 524 | + 21, 101, 1, 52, 18, 26, 55, 83, 94, 30, 29, 32, 33, 36, 35, 38, 37, 17, 37, 40, |
|
| 525 | + 96, 37, 43, 44, 45, 46, 17, 48, 27, 50, 49, 52, 53, 49, 55, 34, 12, 13, 14, 60, |
|
| 526 | + 16, 17, 27, 19, 20, 21, 97, 98, 73, 34, 26, 13, 14, 37, 30, 17, 32, 33, 83, 35, |
|
| 527 | + 42, 37, 14, 18, 40, 49, 37, 43, 44, 45, 46, 96, 48, 102, 50, 35, 52, 53, 49, 55, |
|
| 528 | + 52, 12, 13, 14, 60, 16, 17, 77, 19, 20, 21, 46, 15, 55, 95, 26, 97, 98, 53, 30, |
|
| 529 | + 23, 32, 33, 55, 35, 94, 37, 96, 73, 40, 73, 101, 43, 44, 45, 46, 24, 48, 83, 50, |
|
| 530 | + 83, 52, 53, 17, 55, 92, 12, 13, 14, 60, 16, 17, 99, 19, 20, 21, 101, 12, 13, 46, |
|
| 531 | + 26, 94, 17, 96, 30, 73, 32, 33, 1, 35, 54, 37, 17, 1, 40, 83, 1, 43, 44, 45, 46, |
|
| 532 | + 38, 48, 11, 50, 18, 52, 53, 96, 55, 37, 12, 13, 14, 60, 16, 17, 77, 19, 20, 21, |
|
| 533 | + 76, 1, 73, 29, 26, 81, 1, 73, 30, 17, 32, 33, 83, 35, 35, 37, 11, 83, 40, 73, |
|
| 534 | + 101, 43, 44, 45, 46, 82, 48, 54, 50, 83, 52, 67, 27, 55, 70, 12, 13, 77, 60, 34, |
|
| 535 | + 17, 14, 3, 4, 5, 6, 7, 8, 1, 2, 27, 12, 13, 77, 54, 16, 5, 34, 19, 20, 21, 101, |
|
| 536 | + 102, 1, 2, 26, 17, 92, 82, 30, 11, 32, 33, 52, 99, 66, 82, 101, 17, 80, 71, 72, |
|
| 537 | + 1, 74, 75, 76, 39, 40, 41, 83, 81, 81, 11, 84, 85, 97, 98, 73, 89, 90, 91, 77, |
|
| 538 | + 93, 56, 57, 58, 59, 83, 96, 66, 94, 81, 103, 104, 71, 72, 94, 74, 75, 76, 39, |
|
| 539 | + 40, 41, 81, 81, 101, 11, 84, 85, 2, 15, 81, 89, 90, 91, 1, 93, 56, 57, 58, 59, |
|
| 540 | + 95, 27, 69, 9, 11, 94, 104, 66, 34, 1, 81, 37, 71, 72, 107, 74, 75, 76, 94, 78, |
|
| 541 | + 27, 28, 81, 49, 107, 84, 85, 34, 107, 107, 89, 90, 91, 107, 93, 66, 28, 107, |
|
| 542 | + 107, 107, 71, 72, 1, 74, 75, 76, 1, 39, 40, 41, 81, 107, 11, 84, 85, 107, 12, |
|
| 543 | + 13, 89, 90, 91, 17, 93, 107, 56, 57, 58, 59, 27, 100, 107, 12, 13, 66, 107, 34, |
|
| 544 | + 17, 107, 71, 72, 107, 74, 75, 76, 39, 40, 41, 107, 81, 107, 107, 84, 85, 107, |
|
| 545 | + 107, 51, 89, 90, 91, 54, 93, 56, 57, 58, 59, 107, 107, 100, 66, 107, 51, 107, |
|
| 546 | + 107, 71, 72, 1, 74, 75, 76, 107, 78, 107, 107, 81, 73, 11, 84, 85, 77, 5, 37, |
|
| 547 | + 89, 90, 91, 83, 93, 12, 13, 14, 46, 16, 27, 49, 19, 20, 21, 107, 54, 34, 107, |
|
| 548 | + 26, 5, 101, 107, 30, 107, 32, 33, 12, 13, 14, 107, 16, 107, 107, 19, 20, 21, |
|
| 549 | + 107, 39, 40, 41, 26, 107, 107, 107, 30, 107, 32, 33, 107, 107, 107, 107, 60, 61, |
|
| 550 | + 56, 57, 58, 59, 107, 107, 107, 66, 107, 107, 107, 107, 71, 72, 107, 74, 75, 76, |
|
| 551 | + 1, 107, 60, 61, 81, 107, 107, 84, 85, 107, 11, 107, 89, 90, 91, 107, 93, 18, |
|
| 552 | + 107, 66, 107, 1, 107, 100, 71, 72, 27, 74, 75, 76, 107, 11, 107, 34, 81, 73, 37, |
|
| 553 | + 84, 85, 77, 107, 107, 89, 90, 91, 83, 93, 66, 49, 12, 13, 107, 71, 72, 17, 74, |
|
| 554 | + 75, 76, 107, 39, 40, 41, 81, 101, 107, 84, 85, 107, 107, 107, 89, 90, 91, 107, |
|
| 555 | + 93, 66, 56, 57, 58, 59, 71, 72, 107, 74, 75, 76, 107, 107, 51, 107, 81, 107, |
|
| 556 | + 107, 84, 85, 107, 107, 107, 89, 90, 91, 66, 93, 1, 107, 107, 71, 72, 107, 74, |
|
| 557 | + 75, 76, 107, 11, 107, 107, 81, 73, 107, 84, 85, 77, 107, 107, 89, 90, 91, 83, |
|
| 558 | + 93, 66, 86, 87, 88, 107, 71, 72, 107, 74, 75, 76, 107, 39, 40, 41, 81, 101, 107, |
|
| 559 | + 84, 85, 107, 107, 107, 89, 90, 91, 107, 93, 66, 56, 57, 58, 59, 71, 72, 107, 74, |
|
| 560 | + 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, 66, |
|
| 561 | + 93, 1, 107, 107, 71, 72, 107, 74, 75, 76, 107, 11, 107, 107, 81, 73, 107, 84, |
|
| 562 | + 85, 77, 107, 107, 89, 90, 91, 83, 93, 66, 86, 87, 88, 107, 71, 72, 107, 74, 75, |
|
| 563 | + 76, 107, 39, 40, 41, 81, 101, 107, 84, 85, 107, 107, 107, 89, 90, 91, 107, 93, |
|
| 564 | + 66, 56, 57, 58, 59, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 107, 107, |
|
| 565 | + 84, 85, 107, 107, 107, 89, 90, 91, 66, 93, 1, 107, 107, 71, 72, 107, 74, 75, 76, |
|
| 566 | + 107, 107, 107, 107, 81, 73, 107, 84, 85, 77, 107, 107, 89, 90, 91, 83, 93, 66, |
|
| 567 | + 86, 87, 88, 107, 71, 72, 107, 74, 75, 76, 38, 39, 40, 41, 81, 101, 107, 84, 85, |
|
| 568 | + 107, 107, 107, 89, 90, 91, 107, 93, 66, 56, 57, 58, 59, 71, 72, 107, 74, 75, 76, |
|
| 569 | + 107, 107, 107, 107, 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, 66, 93, 1, |
|
| 570 | + 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 73, 107, 84, 85, 77, |
|
| 571 | + 107, 107, 89, 90, 91, 83, 93, 66, 86, 87, 88, 107, 71, 72, 107, 74, 75, 76, 38, |
|
| 572 | + 39, 40, 41, 81, 101, 107, 84, 85, 107, 107, 107, 89, 90, 91, 107, 93, 66, 56, |
|
| 573 | + 57, 58, 59, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, 85, |
|
| 574 | + 107, 107, 107, 89, 90, 91, 66, 93, 1, 107, 107, 71, 72, 107, 74, 75, 76, 107, |
|
| 575 | + 107, 107, 107, 81, 73, 107, 84, 85, 77, 107, 107, 89, 90, 91, 83, 93, 66, 86, |
|
| 576 | + 87, 88, 107, 71, 72, 107, 74, 75, 76, 107, 39, 40, 41, 81, 101, 107, 84, 85, |
|
| 577 | + 107, 107, 107, 89, 90, 91, 107, 93, 66, 56, 57, 58, 59, 71, 72, 107, 74, 75, 76, |
|
| 578 | + 107, 107, 107, 107, 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, 66, 93, |
|
| 579 | + 107, 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 73, 107, 84, 85, |
|
| 580 | + 77, 107, 107, 89, 90, 91, 83, 93, 66, 86, 87, 88, 107, 71, 72, 107, 74, 75, 76, |
|
| 581 | + 107, 107, 107, 107, 81, 101, 107, 84, 85, 107, 107, 107, 89, 90, 91, 107, 93, |
|
| 582 | + 66, 107, 107, 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 107, |
|
| 583 | + 107, 84, 85, 107, 107, 107, 89, 90, 91, 66, 93, 107, 107, 107, 71, 72, 107, 74, |
|
| 584 | + 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, |
|
| 585 | + 107, 93, 66, 107, 107, 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, |
|
| 586 | + 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, 107, 93, 66, 107, 107, 107, |
|
| 587 | + 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, 85, 107, |
|
| 588 | + 107, 107, 89, 90, 91, 66, 93, 107, 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, |
|
| 589 | + 107, 107, 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, 107, 93, 66, 107, |
|
| 590 | + 107, 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, |
|
| 591 | + 85, 107, 107, 107, 89, 90, 91, 107, 93, 66, 107, 107, 107, 107, 71, 72, 107, 74, |
|
| 592 | + 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, 85, 107, 107, 107, 89, 90, 91, 66, |
|
| 593 | + 93, 107, 107, 107, 71, 72, 107, 74, 75, 76, 107, 107, 107, 107, 81, 107, 107, |
|
| 594 | + 84, 85, 1, 2, 107, 89, 90, 91, 107, 93, 66, 107, 107, 107, 107, 71, 72, 107, 74, |
|
| 595 | + 75, 76, 107, 107, 107, 107, 81, 107, 107, 84, 85, 1, 107, 107, 89, 90, 91, 107, |
|
| 596 | + 93, 37, 107, 39, 40, 41, 63, 64, 65, 66, 67, 68, 107, 49, 71, 107, 107, 25, 107, |
|
| 597 | + 27, 56, 57, 58, 59, 107, 2, 34, 107, 107, 107, 107, 39, 40, 41, 107, 12, 13, 66, |
|
| 598 | + 15, 107, 17, 18, 71, 72, 1, 74, 107, 76, 56, 57, 58, 59, 81, 107, 11, 11, 85, |
|
| 599 | + 107, 12, 13, 89, 90, 91, 17, 93, 107, 107, 23, 107, 46, 27, 27, 49, 27, 51, 29, |
|
| 600 | + 53, 34, 34, 107, 34, 107, 39, 40, 41, 107, 107, 107, 66, 107, 1, 47, 107, 71, |
|
| 601 | + 72, 107, 74, 107, 76, 56, 57, 58, 59, 81, 107, 107, 107, 85, 107, 12, 13, 89, |
|
| 602 | + 90, 91, 17, 93, 27, 107, 107, 107, 107, 107, 107, 34, 27, 107, 29, 66, 39, 40, |
|
| 603 | + 41, 34, 71, 72, 107, 74, 107, 76, 107, 107, 107, 107, 81, 11, 107, 56, 57, 58, |
|
| 604 | + 59, 107, 89, 90, 91, 107, 93, 23, 107, 66, 107, 27, 107, 107, 71, 72, 107, 74, |
|
| 605 | + 34, 76, 66, 107, 107, 107, 81, 71, 72, 107, 74, 107, 76, 47, 89, 90, 91, 81, 93, |
|
| 606 | + 107, 107, 107, 107, 107, 107, 89, 90, 91, 66, 93, 107, 107, 107, 71, 72, 107, |
|
| 607 | + 74, 107, 76, 107, 107, 107, 107, 81, 107, 107, 2, 107, 107, 107, 107, 89, 90, |
|
| 608 | + 91, 107, 93, 12, 13, 66, 15, 107, 17, 18, 71, 72, 107, 74, 107, 76, 107, 107, |
|
| 609 | + 107, 107, 81, 107, 107, 2, 107, 107, 107, 107, 89, 90, 91, 107, 93, 12, 13, 107, |
|
| 610 | + 107, 46, 17, 18, 49, 66, 51, 2, 53, 1, 71, 72, 107, 74, 107, 76, 107, 12, 13, |
|
| 611 | + 107, 81, 107, 17, 18, 107, 107, 107, 107, 89, 90, 91, 46, 93, 107, 49, 107, 51, |
|
| 612 | + 107, 53, 54, 107, 1, 107, 107, 107, 107, 107, 39, 40, 41, 107, 46, 107, 107, 49, |
|
| 613 | + 107, 51, 107, 53, 107, 107, 2, 22, 107, 56, 57, 58, 59, 107, 61, 107, 12, 13, |
|
| 614 | + 107, 107, 107, 17, 18, 107, 39, 40, 41, 12, 13, 107, 107, 107, 17, 18, 107, 107, |
|
| 615 | + 107, 107, 107, 107, 107, 56, 57, 58, 59, 107, 107, 107, 107, 107, 46, 107, 107, |
|
| 616 | + 49, 11, 51, 107, 53, 107, 107, 107, 46, 107, 107, 49, 22, 51, 24, 53, 107, 27, |
|
| 617 | + 107, 107, 107, 107, 107, 107, 34, 107, 36, 107, 38, 107, 107, 107, 107, 107, |
|
| 618 | + 107, 107, 46,); |
|
| 619 | + |
|
| 620 | + const YY_SHIFT_USE_DFLT = - 15; |
|
| 621 | + |
|
| 622 | + const YY_SHIFT_MAX = 238; |
|
| 623 | + |
|
| 624 | + static public $yy_shift_ofst = array(499, 393, 78, 393, 348, 78, 78, 348, - 12, - 12, 33, 78, 78, 78, 78, 168, 78, |
|
| 625 | + 78, 78, 213, 123, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 303, 78, 78, 78, |
|
| 626 | + 168, 258, 258, 438, 438, 438, 438, 438, 438, 1609, 1660, 1706, 1706, 1706, |
|
| 627 | + 1706, 1706, 499, 1912, 1153, 609, 541, 507, 989, 907, 825, 1071, 646, 1880, |
|
| 628 | + 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 731, |
|
| 629 | + 731, 140, 725, 804, 230, 465, 280, 160, 747, 1714, 1663, 483, 483, 160, 280, |
|
| 630 | + 280, 324, 160, 522, 594, 1661, 1749, 642, 715, 317, 842, 40, 404, 3, 144, 404, |
|
| 631 | + - 5, 460, 327, 431, 161, 294, 147, 147, 426, - 5, 434, 223, 223, 265, 223, 223, |
|
| 632 | + 223, 223, 223, 223, 265, 223, - 15, 1827, 1857, 1640, 1877, 1931, 1942, 92, |
|
| 633 | + 645, 11, 90, - 5, 70, - 5, - 5, - 5, - 5, - 5, - 5, - 5, - 5, - 5, - 5, 214, |
|
| 634 | + - 5, 70, - 5, 70, - 5, - 5, - 5, - 5, - 5, 124, 124, 227, 124, 356, 124, 214, |
|
| 635 | + 124, 124, - 5, 70, 124, 124, 223, 223, 595, 587, 587, 223, 265, 232, 223, 265, |
|
| 636 | + 265, 223, - 15, - 15, - 15, - 15, - 15, 1581, 1970, 575, 694, 660, 260, 118, |
|
| 637 | + 73, - 6, 96, 256, 295, 308, 145, 44, 110, 208, 263, - 14, 99, 439, 232, 519, |
|
| 638 | + 521, 511, 509, 487, 83, 187, 101, 372, 279, 0, 297, 288, 481, 452, 371, 307, |
|
| 639 | + 319, 385, 412, 414, 433, 375, 402,); |
|
| 640 | + |
|
| 641 | + const YY_REDUCE_USE_DFLT = - 67; |
|
| 642 | + |
|
| 643 | + const YY_REDUCE_MAX = 192; |
|
| 644 | + |
|
| 645 | + static public $yy_reduce_ofst = array(1560, 469, 608, 503, 542, 570, 728, 643, 922, 1278, 1360, 1060, 950, 1032, |
|
| 646 | + 1086, 896, 868, 1004, 786, 1414, 1332, 1114, 1524, 1168, 1224, 1250, 1196, |
|
| 647 | + 1142, 1306, 1470, 1496, 1388, 1442, 978, 758, 840, 814, 1588, 1639, 1745, |
|
| 648 | + 1719, 1678, 1708, 1775, 1811, 1259, 931, 931, 1013, 1095, 849, 1177, 170, |
|
| 649 | + - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, |
|
| 650 | + - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 26, - 66, |
|
| 651 | + 46, 652, - 37, 484, 767, - 7, 136, 351, 113, 203, 254, 141, 314, 179, 278, |
|
| 652 | + 173, 420, 289, 394, 394, 289, 289, 20, 290, 228, 290, 424, 228, 326, 406, 289, |
|
| 653 | + 384, 289, 228, 316, 312, 435, 379, 389, 289, 289, 436, 458, 289, 289, 289, |
|
| 654 | + 289, 289, 289, 228, 289, 289, 476, 476, 476, 476, 476, 476, 502, 472, 476, |
|
| 655 | + 476, 466, 470, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 482, 466, |
|
| 656 | + 490, 466, 510, 466, 466, 466, 466, 466, 506, 506, 512, 506, 459, 506, 525, |
|
| 657 | + 506, 506, 466, 530, 506, 506, 28, 28, 534, 250, 250, 28, - 56, 193, 28, - 56, |
|
| 658 | + - 56, 28, 112, - 27, 454, 403, 446,); |
|
| 659 | + |
|
| 660 | + static public $yyExpectedTokens = array(array(3, 4, 5, 6, 7, 8, 12, 13, 16, 19, 20, 21, 26, 30, 32, 33,), |
|
| 661 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 662 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 663 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 664 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 665 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 666 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 667 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 668 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 669 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 670 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 671 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 672 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 673 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 674 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 675 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 31, 32, 33, 35, 37, 40, 43, |
|
| 676 | + 44, 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 677 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 31, 32, 33, 35, 37, 40, 43, |
|
| 678 | + 44, 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 679 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 680 | + 45, 46, 48, 50, 52, 53, 54, 55, 60,), |
|
| 681 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 682 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 683 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 684 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 685 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 686 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 687 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 688 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 689 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 690 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 691 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 692 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 693 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 694 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 695 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 696 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 697 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 698 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 699 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 700 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 701 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 702 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 703 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 704 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 705 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 706 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 707 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 708 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 709 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 710 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 711 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 712 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 713 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 714 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 715 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 716 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 717 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 718 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 719 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 720 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 721 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 722 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 723 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 724 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 725 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 726 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 727 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 728 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 729 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 730 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 731 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 732 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 733 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 734 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 735 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 736 | + 45, 46, 48, 50, 52, 53, 55, 60,), |
|
| 737 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 738 | + 45, 46, 48, 50, 52, 55, 60,), |
|
| 739 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 740 | + 45, 46, 48, 50, 52, 55, 60,), |
|
| 741 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 742 | + 45, 46, 48, 50, 52, 55, 60,), |
|
| 743 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 744 | + 45, 46, 48, 50, 52, 55, 60,), |
|
| 745 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 746 | + 45, 46, 48, 50, 52, 55, 60,), |
|
| 747 | + array(12, 13, 14, 16, 17, 19, 20, 21, 26, 30, 32, 33, 35, 37, 40, 43, 44, |
|
| 748 | + 45, 46, 48, 50, 52, 55, 60,), |
|
| 749 | + array(1, 25, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 750 | + array(1, 11, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 751 | + array(1, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 752 | + array(1, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 753 | + array(1, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 754 | + array(1, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 755 | + array(1, 27, 34, 39, 40, 41, 56, 57, 58, 59,), |
|
| 756 | + array(3, 4, 5, 6, 7, 8, 12, 13, 16, 19, 20, 21, 26, 30, 32, 33,), |
|
| 757 | + array(1, 22, 39, 40, 41, 56, 57, 58, 59,), |
|
| 758 | + array(1, 38, 39, 40, 41, 56, 57, 58, 59,), |
|
| 759 | + array(1, 28, 39, 40, 41, 56, 57, 58, 59,), |
|
| 760 | + array(1, 11, 39, 40, 41, 56, 57, 58, 59,), |
|
| 761 | + array(1, 2, 39, 40, 41, 56, 57, 58, 59,), |
|
| 762 | + array(1, 11, 39, 40, 41, 56, 57, 58, 59,), |
|
| 763 | + array(1, 11, 39, 40, 41, 56, 57, 58, 59,), |
|
| 764 | + array(1, 11, 39, 40, 41, 56, 57, 58, 59,), |
|
| 765 | + array(1, 38, 39, 40, 41, 56, 57, 58, 59,), |
|
| 766 | + array(1, 39, 40, 41, 54, 56, 57, 58, 59,), |
|
| 767 | + array(1, 39, 40, 41, 56, 57, 58, 59, 61,), |
|
| 768 | + array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 769 | + array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 770 | + array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 771 | + array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 772 | + array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 773 | + array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 774 | + array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 775 | + array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 776 | + array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 777 | + array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 778 | + array(1, 39, 40, 41, 56, 57, 58, 59,), |
|
| 779 | + array(1, 39, 40, 41, 56, 57, 58, 59,), array(39, 40, 41, 56, 57, 58, 59,), |
|
| 780 | + array(39, 40, 41, 56, 57, 58, 59,), array(14, 17, 50, 52, 55,), |
|
| 781 | + array(5, 12, 13, 14, 16, 19, 20, 21, 26, 30, 32, 33, 60, 61,), |
|
| 782 | + array(1, 11, 18, 27, 34, 37, 49,), array(14, 17, 52, 55,), |
|
| 783 | + array(1, 11, 27, 34,), array(1, 27, 34,), array(14, 37, 55,), |
|
| 784 | + array(5, 12, 13, 14, 16, 19, 20, 21, 26, 30, 32, 33, 60, 61,), |
|
| 785 | + array(12, 13, 17, 27, 29, 34,), array(12, 13, 17, 27, 29, 34,), |
|
| 786 | + array(12, 13, 17, 27, 34,), array(12, 13, 17, 27, 34,), array(14, 37, 55,), |
|
| 787 | + array(1, 27, 34,), array(1, 27, 34,), array(18, 46, 53,), |
|
| 788 | + array(14, 37, 55,), array(1, 2,), array(1, 11, 27, 28, 34,), |
|
| 789 | + array(11, 23, 27, 34, 47,), array(11, 23, 27, 34, 47,), |
|
| 790 | + array(1, 11, 27, 34,), array(1, 11, 27, 34,), array(13, 14, 17, 55,), |
|
| 791 | + array(12, 13, 17, 51,), array(15, 18, 49,), array(12, 13, 17,), |
|
| 792 | + array(8, 9, 10,), array(15, 18, 49,), array(12, 13, 17,), array(27, 34,), |
|
| 793 | + array(1, 54,), array(14, 55,), array(1, 11,), array(18, 49,), |
|
| 794 | + array(27, 34,), array(14, 17,), array(14, 17,), array(1, 18,), |
|
| 795 | + array(27, 34,), array(1, 29,), array(1,), array(1,), array(18,), array(1,), |
|
| 796 | + array(1,), array(1,), array(1,), array(1,), array(1,), array(18,), |
|
| 797 | + array(1,), array(), array(2, 12, 13, 15, 17, 18, 46, 49, 51, 53,), |
|
| 798 | + array(2, 12, 13, 17, 18, 46, 49, 51, 53, 54,), |
|
| 799 | + array(2, 12, 13, 15, 17, 18, 46, 49, 51, 53,), |
|
| 800 | + array(2, 12, 13, 17, 18, 46, 49, 51, 53,), |
|
| 801 | + array(2, 12, 13, 17, 18, 46, 49, 51, 53,), |
|
| 802 | + array(12, 13, 17, 18, 46, 49, 51, 53,), array(13, 14, 17, 35, 55,), |
|
| 803 | + array(12, 13, 17, 51,), array(15, 46, 53,), array(12, 13, 17,), |
|
| 804 | + array(27, 34,), array(14, 55,), array(27, 34,), array(27, 34,), |
|
| 805 | + array(27, 34,), array(27, 34,), array(27, 34,), array(27, 34,), |
|
| 806 | + array(27, 34,), array(27, 34,), array(27, 34,), array(27, 34,), |
|
| 807 | + array(46, 53,), array(27, 34,), array(14, 55,), array(27, 34,), |
|
| 808 | + array(14, 55,), array(27, 34,), array(27, 34,), array(27, 34,), |
|
| 809 | + array(27, 34,), array(27, 34,), array(46, 53,), array(46, 53,), |
|
| 810 | + array(13, 37,), array(46, 53,), array(15, 23,), array(46, 53,), |
|
| 811 | + array(46, 53,), array(46, 53,), array(46, 53,), array(27, 34,), |
|
| 812 | + array(14, 55,), array(46, 53,), array(46, 53,), array(1,), array(1,), |
|
| 813 | + array(9,), array(2,), array(2,), array(1,), array(18,), array(37,), |
|
| 814 | + array(1,), array(18,), array(18,), array(1,), array(), array(), array(), |
|
| 815 | + array(), array(), array(1, 2, 37, 39, 40, 41, 49, 56, 57, 58, 59,), |
|
| 816 | + array(11, 22, 24, 27, 34, 36, 38, 46,), array(11, 15, 27, 34, 37, 49,), |
|
| 817 | + array(37, 46, 49, 54,), array(12, 13, 17, 51,), array(29, 37, 49,), |
|
| 818 | + array(23, 47, 54,), array(23, 47, 61,), array(22, 36,), array(36, 54,), |
|
| 819 | + array(36, 38,), array(37, 49,), array(37, 49,), array(46, 54,), |
|
| 820 | + array(36, 38,), array(36, 38,), array(23, 47,), array(37, 49,), |
|
| 821 | + array(17, 51,), array(15, 46,), array(35,), array(37,), array(11,), |
|
| 822 | + array(17,), array(5,), array(17,), array(14,), array(17,), array(17,), |
|
| 823 | + array(15,), array(46,), array(17,), array(17,), array(42,), array(17,), |
|
| 824 | + array(52,), array(17,), array(24,), array(52,), array(35,), array(17,), |
|
| 825 | + array(37,), array(17,), array(54,), array(54,), array(38,), array(), |
|
| 826 | + array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 827 | + array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 828 | + array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 829 | + array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 830 | + array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 831 | + array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 832 | + array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 833 | + array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 834 | + array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 835 | + array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 836 | + array(), array(), array(), array(), array(), array(), array(), array(), |
|
| 837 | + array(), array(), array(), array(), array(), array(), array(), array(),); |
|
| 838 | + |
|
| 839 | + static public $yy_default = array(339, 517, 496, 532, 532, 496, 496, 532, 532, 532, 532, 532, 532, 532, 532, 532, |
|
| 840 | + 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, |
|
| 841 | + 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 398, 532, 361, |
|
| 842 | + 398, 398, 374, 364, 336, 532, 532, 403, 532, 532, 532, 532, 532, 532, 532, 532, |
|
| 843 | + 400, 494, 518, 403, 409, 520, 379, 519, 405, 495, 410, 420, 425, 424, 532, 532, |
|
| 844 | + 436, 532, 412, 398, 532, 532, 398, 398, 398, 398, 532, 398, 398, 508, 532, 388, |
|
| 845 | + 412, 426, 426, 412, 412, 532, 461, 451, 461, 532, 451, 461, 398, 412, 532, 412, |
|
| 846 | + 451, 398, 532, 532, 392, 376, 412, 419, 394, 505, 427, 416, 428, 429, 415, 423, |
|
| 847 | + 451, 412, 503, 450, 450, 450, 450, 450, 450, 532, 463, 477, 461, 384, 532, 372, |
|
| 848 | + 383, 371, 366, 365, 368, 370, 360, 362, 385, 454, 386, 532, 358, 532, 387, 377, |
|
| 849 | + 382, 381, 375, 457, 486, 461, 487, 532, 489, 456, 455, 488, 378, 532, 458, 459, |
|
| 850 | + 445, 393, 352, 497, 498, 389, 506, 461, 418, 509, 483, 395, 461, 461, 502, 502, |
|
| 851 | + 502, 436, 432, 436, 436, 462, 436, 426, 426, 532, 532, 532, 532, 436, 432, 532, |
|
| 852 | + 532, 426, 446, 532, 432, 532, 477, 532, 532, 344, 532, 532, 532, 532, 532, 432, |
|
| 853 | + 532, 532, 438, 532, 532, 532, 406, 532, 434, 532, 507, 532, 441, 532, 532, 340, |
|
| 854 | + 504, 492, 338, 337, 491, 438, 467, 482, 396, 341, 441, 477, 413, 349, 343, 350, |
|
| 855 | + 466, 351, 411, 348, 431, 346, 345, 347, 433, 407, 465, 355, 464, 356, 414, 437, |
|
| 856 | + 399, 353, 435, 380, 354, 342, 421, 417, 513, 479, 440, 439, 480, 512, 390, 511, |
|
| 857 | + 510, 523, 522, 521, 481, 484, 493, 500, 478, 453, 485, 499, 452, 529, 430, 501, |
|
| 858 | + 528, 391, 526, 525, 443, 373, 460, 490, 444, 422, 473, 471, 476, 442, 470, 469, |
|
| 859 | + 468, 447, 449, 524, 475, 531, 530, 527, 448, 397, 515, 474, 516, 472, 514, 367,); |
|
| 860 | + |
|
| 861 | + const YYNOCODE = 108; |
|
| 862 | + |
|
| 863 | + const YYSTACKDEPTH = 500; |
|
| 864 | + |
|
| 865 | + const YYNSTATE = 336; |
|
| 866 | + |
|
| 867 | + const YYNRULE = 196; |
|
| 868 | + |
|
| 869 | + const YYERRORSYMBOL = 62; |
|
| 870 | + |
|
| 871 | + const YYERRSYMDT = 'yy0'; |
|
| 872 | + |
|
| 873 | + const YYFALLBACK = 0; |
|
| 874 | + |
|
| 875 | + public static $yyFallback = array(); |
|
| 876 | + |
|
| 877 | + public function Trace($TraceFILE, $zTracePrompt) |
|
| 878 | + { |
|
| 879 | + if (!$TraceFILE) { |
|
| 880 | + $zTracePrompt = 0; |
|
| 881 | + } elseif (!$zTracePrompt) { |
|
| 882 | + $TraceFILE = 0; |
|
| 883 | + } |
|
| 884 | + $this->yyTraceFILE = $TraceFILE; |
|
| 885 | + $this->yyTracePrompt = $zTracePrompt; |
|
| 886 | + } |
|
| 887 | + |
|
| 888 | + public function PrintTrace() |
|
| 889 | + { |
|
| 890 | + $this->yyTraceFILE = fopen('php://output', 'w'); |
|
| 891 | + $this->yyTracePrompt = '<br>'; |
|
| 892 | + } |
|
| 893 | + |
|
| 894 | + public $yyTraceFILE; |
|
| 895 | + |
|
| 896 | + public $yyTracePrompt; |
|
| 897 | + |
|
| 898 | + public $yyidx; /* Index of top element in stack */ |
|
| 899 | + public $yyerrcnt; /* Shifts left before out of the error */ |
|
| 900 | + public $yystack = array(); /* The parser's stack */ |
|
| 901 | + |
|
| 902 | + public $yyTokenName = array('$', 'VERT', 'COLON', 'PHP', 'NOCACHE', 'TEXT', 'STRIPON', 'STRIPOFF', 'LITERALSTART', |
|
| 903 | + 'LITERALEND', 'LITERAL', 'RDEL', 'SIMPELOUTPUT', 'LDEL', 'DOLLARID', 'EQUAL', |
|
| 904 | + 'SIMPLETAG', 'ID', 'PTR', 'LDELMAKENOCACHE', 'LDELIF', 'LDELFOR', 'SEMICOLON', 'INCDEC', |
|
| 905 | + 'TO', 'STEP', 'LDELFOREACH', 'SPACE', 'AS', 'APTR', 'LDELSETFILTER', |
|
| 906 | + 'SMARTYBLOCKCHILDPARENT', 'CLOSETAG', 'LDELSLASH', 'ATTR', 'INTEGER', 'COMMA', 'OPENP', |
|
| 907 | + 'CLOSEP', 'MATH', 'UNIMATH', 'ISIN', 'QMARK', 'NOT', 'TYPECAST', 'HEX', 'DOT', |
|
| 908 | + 'INSTANCEOF', 'SINGLEQUOTESTRING', 'DOUBLECOLON', 'NAMESPACE', 'AT', 'HATCH', 'OPENB', |
|
| 909 | + 'CLOSEB', 'DOLLAR', 'LOGOP', 'SLOGOP', 'TLOGOP', 'SINGLECOND', 'QUOTE', 'BACKTICK', |
|
| 910 | + 'error', 'start', 'template', 'template_element', 'smartytag', 'literal', |
|
| 911 | + 'text_content', 'literal_elements', 'literal_element', 'tag', 'variable', 'attributes', |
|
| 912 | + 'value', 'expr', 'varindexed', 'modifierlist', 'statement', 'statements', 'foraction', |
|
| 913 | + 'varvar', 'modparameters', 'attribute', 'ternary', 'array', 'tlop', 'lop', 'scond', |
|
| 914 | + 'function', 'ns1', 'doublequoted_with_quotes', 'static_class_access', 'object', |
|
| 915 | + 'arrayindex', 'indexdef', 'varvarele', 'objectchain', 'objectelement', 'method', |
|
| 916 | + 'params', 'modifier', 'modparameter', 'arrayelements', 'arrayelement', 'doublequoted', |
|
| 917 | + 'doublequotedcontent',); |
|
| 918 | + |
|
| 919 | + public static $yyRuleName = array('start ::= template', 'template ::= template_element', |
|
| 920 | + 'template ::= template template_element', 'template ::=', |
|
| 921 | + 'template_element ::= smartytag', 'template_element ::= literal', |
|
| 922 | + 'template_element ::= PHP', 'template_element ::= NOCACHE', |
|
| 923 | + 'template_element ::= text_content', 'text_content ::= TEXT', |
|
| 924 | + 'text_content ::= text_content TEXT', 'template_element ::= STRIPON', |
|
| 925 | + 'template_element ::= STRIPOFF', 'literal ::= LITERALSTART LITERALEND', |
|
| 926 | + 'literal ::= LITERALSTART literal_elements LITERALEND', |
|
| 927 | + 'literal_elements ::= literal_elements literal_element', 'literal_elements ::=', |
|
| 928 | + 'literal_element ::= literal', 'literal_element ::= LITERAL', |
|
| 929 | + 'smartytag ::= tag RDEL', 'smartytag ::= SIMPELOUTPUT', 'tag ::= LDEL variable', |
|
| 930 | + 'tag ::= LDEL variable attributes', 'tag ::= LDEL value', |
|
| 931 | + 'tag ::= LDEL value attributes', 'tag ::= LDEL expr', |
|
| 932 | + 'tag ::= LDEL expr attributes', 'tag ::= LDEL DOLLARID EQUAL value', |
|
| 933 | + 'tag ::= LDEL DOLLARID EQUAL expr', 'tag ::= LDEL DOLLARID EQUAL expr attributes', |
|
| 934 | + 'tag ::= LDEL varindexed EQUAL expr attributes', 'smartytag ::= SIMPLETAG', |
|
| 935 | + 'tag ::= LDEL ID attributes', 'tag ::= LDEL ID', |
|
| 936 | + 'tag ::= LDEL ID modifierlist attributes', 'tag ::= LDEL ID PTR ID attributes', |
|
| 937 | + 'tag ::= LDEL ID PTR ID modifierlist attributes', |
|
| 938 | + 'tag ::= LDELMAKENOCACHE DOLLARID', 'tag ::= LDELIF expr', |
|
| 939 | + 'tag ::= LDELIF expr attributes', 'tag ::= LDELIF statement', |
|
| 940 | + 'tag ::= LDELIF statement attributes', |
|
| 941 | + 'tag ::= LDELFOR statements SEMICOLON expr SEMICOLON varindexed foraction attributes', |
|
| 942 | + 'foraction ::= EQUAL expr', 'foraction ::= INCDEC', |
|
| 943 | + 'tag ::= LDELFOR statement TO expr attributes', |
|
| 944 | + 'tag ::= LDELFOR statement TO expr STEP expr attributes', |
|
| 945 | + 'tag ::= LDELFOREACH attributes', |
|
| 946 | + 'tag ::= LDELFOREACH SPACE value AS varvar attributes', |
|
| 947 | + 'tag ::= LDELFOREACH SPACE value AS varvar APTR varvar attributes', |
|
| 948 | + 'tag ::= LDELFOREACH SPACE expr AS varvar attributes', |
|
| 949 | + 'tag ::= LDELFOREACH SPACE expr AS varvar APTR varvar attributes', |
|
| 950 | + 'tag ::= LDELSETFILTER ID modparameters', |
|
| 951 | + 'tag ::= LDELSETFILTER ID modparameters modifierlist', |
|
| 952 | + 'tag ::= LDEL SMARTYBLOCKCHILDPARENT', 'smartytag ::= CLOSETAG', |
|
| 953 | + 'tag ::= LDELSLASH ID', 'tag ::= LDELSLASH ID modifierlist', |
|
| 954 | + 'tag ::= LDELSLASH ID PTR ID', 'tag ::= LDELSLASH ID PTR ID modifierlist', |
|
| 955 | + 'attributes ::= attributes attribute', 'attributes ::= attribute', |
|
| 956 | + 'attributes ::=', 'attribute ::= SPACE ID EQUAL ID', 'attribute ::= ATTR expr', |
|
| 957 | + 'attribute ::= ATTR value', 'attribute ::= SPACE ID', 'attribute ::= SPACE expr', |
|
| 958 | + 'attribute ::= SPACE value', 'attribute ::= SPACE INTEGER EQUAL expr', |
|
| 959 | + 'statements ::= statement', 'statements ::= statements COMMA statement', |
|
| 960 | + 'statement ::= DOLLARID EQUAL INTEGER', 'statement ::= DOLLARID EQUAL expr', |
|
| 961 | + 'statement ::= varindexed EQUAL expr', 'statement ::= OPENP statement CLOSEP', |
|
| 962 | + 'expr ::= value', 'expr ::= ternary', 'expr ::= DOLLARID COLON ID', |
|
| 963 | + 'expr ::= expr MATH value', 'expr ::= expr UNIMATH value', 'expr ::= array', |
|
| 964 | + 'expr ::= expr modifierlist', 'expr ::= expr tlop value', |
|
| 965 | + 'expr ::= expr lop expr', 'expr ::= expr scond', 'expr ::= expr ISIN array', |
|
| 966 | + 'expr ::= expr ISIN value', |
|
| 967 | + 'ternary ::= OPENP expr CLOSEP QMARK DOLLARID COLON expr', |
|
| 968 | + 'ternary ::= OPENP expr CLOSEP QMARK expr COLON expr', 'value ::= variable', |
|
| 969 | + 'value ::= UNIMATH value', 'value ::= NOT value', 'value ::= TYPECAST value', |
|
| 970 | + 'value ::= variable INCDEC', 'value ::= HEX', 'value ::= INTEGER', |
|
| 971 | + 'value ::= INTEGER DOT INTEGER', 'value ::= INTEGER DOT', 'value ::= DOT INTEGER', |
|
| 972 | + 'value ::= ID', 'value ::= function', 'value ::= OPENP expr CLOSEP', |
|
| 973 | + 'value ::= variable INSTANCEOF ns1', 'value ::= variable INSTANCEOF variable', |
|
| 974 | + 'value ::= SINGLEQUOTESTRING', 'value ::= doublequoted_with_quotes', |
|
| 975 | + 'value ::= varindexed DOUBLECOLON static_class_access', 'value ::= smartytag', |
|
| 976 | + 'value ::= value modifierlist', 'value ::= NAMESPACE', |
|
| 977 | + 'value ::= ns1 DOUBLECOLON static_class_access', 'ns1 ::= ID', |
|
| 978 | + 'ns1 ::= NAMESPACE', 'variable ::= DOLLARID', 'variable ::= varindexed', |
|
| 979 | + 'variable ::= varvar AT ID', 'variable ::= object', 'variable ::= HATCH ID HATCH', |
|
| 980 | + 'variable ::= HATCH ID HATCH arrayindex', 'variable ::= HATCH variable HATCH', |
|
| 981 | + 'variable ::= HATCH variable HATCH arrayindex', |
|
| 982 | + 'varindexed ::= DOLLARID arrayindex', 'varindexed ::= varvar arrayindex', |
|
| 983 | + 'arrayindex ::= arrayindex indexdef', 'arrayindex ::=', |
|
| 984 | + 'indexdef ::= DOT DOLLARID', 'indexdef ::= DOT varvar', |
|
| 985 | + 'indexdef ::= DOT varvar AT ID', 'indexdef ::= DOT ID', |
|
| 986 | + 'indexdef ::= DOT INTEGER', 'indexdef ::= DOT LDEL expr RDEL', |
|
| 987 | + 'indexdef ::= OPENB ID CLOSEB', 'indexdef ::= OPENB ID DOT ID CLOSEB', |
|
| 988 | + 'indexdef ::= OPENB SINGLEQUOTESTRING CLOSEB', |
|
| 989 | + 'indexdef ::= OPENB INTEGER CLOSEB', 'indexdef ::= OPENB DOLLARID CLOSEB', |
|
| 990 | + 'indexdef ::= OPENB variable CLOSEB', 'indexdef ::= OPENB value CLOSEB', |
|
| 991 | + 'indexdef ::= OPENB expr CLOSEB', 'indexdef ::= OPENB CLOSEB', |
|
| 992 | + 'varvar ::= DOLLARID', 'varvar ::= DOLLAR', 'varvar ::= varvar varvarele', |
|
| 993 | + 'varvarele ::= ID', 'varvarele ::= SIMPELOUTPUT', 'varvarele ::= LDEL expr RDEL', |
|
| 994 | + 'object ::= varindexed objectchain', 'objectchain ::= objectelement', |
|
| 995 | + 'objectchain ::= objectchain objectelement', |
|
| 996 | + 'objectelement ::= PTR ID arrayindex', 'objectelement ::= PTR varvar arrayindex', |
|
| 997 | + 'objectelement ::= PTR LDEL expr RDEL arrayindex', |
|
| 998 | + 'objectelement ::= PTR ID LDEL expr RDEL arrayindex', |
|
| 999 | + 'objectelement ::= PTR method', 'function ::= ns1 OPENP params CLOSEP', |
|
| 1000 | + 'method ::= ID OPENP params CLOSEP', 'method ::= DOLLARID OPENP params CLOSEP', |
|
| 1001 | + 'params ::= params COMMA expr', 'params ::= expr', 'params ::=', |
|
| 1002 | + 'modifierlist ::= modifierlist modifier modparameters', |
|
| 1003 | + 'modifierlist ::= modifier modparameters', 'modifier ::= VERT AT ID', |
|
| 1004 | + 'modifier ::= VERT ID', 'modparameters ::= modparameters modparameter', |
|
| 1005 | + 'modparameters ::=', 'modparameter ::= COLON value', |
|
| 1006 | + 'modparameter ::= COLON array', 'static_class_access ::= method', |
|
| 1007 | + 'static_class_access ::= method objectchain', 'static_class_access ::= ID', |
|
| 1008 | + 'static_class_access ::= DOLLARID arrayindex', |
|
| 1009 | + 'static_class_access ::= DOLLARID arrayindex objectchain', 'lop ::= LOGOP', |
|
| 1010 | + 'lop ::= SLOGOP', 'tlop ::= TLOGOP', 'scond ::= SINGLECOND', |
|
| 1011 | + 'array ::= OPENB arrayelements CLOSEB', 'arrayelements ::= arrayelement', |
|
| 1012 | + 'arrayelements ::= arrayelements COMMA arrayelement', 'arrayelements ::=', |
|
| 1013 | + 'arrayelement ::= value APTR expr', 'arrayelement ::= ID APTR expr', |
|
| 1014 | + 'arrayelement ::= expr', 'doublequoted_with_quotes ::= QUOTE QUOTE', |
|
| 1015 | + 'doublequoted_with_quotes ::= QUOTE doublequoted QUOTE', |
|
| 1016 | + 'doublequoted ::= doublequoted doublequotedcontent', |
|
| 1017 | + 'doublequoted ::= doublequotedcontent', |
|
| 1018 | + 'doublequotedcontent ::= BACKTICK variable BACKTICK', |
|
| 1019 | + 'doublequotedcontent ::= BACKTICK expr BACKTICK', |
|
| 1020 | + 'doublequotedcontent ::= DOLLARID', 'doublequotedcontent ::= LDEL variable RDEL', |
|
| 1021 | + 'doublequotedcontent ::= LDEL expr RDEL', 'doublequotedcontent ::= smartytag', |
|
| 1022 | + 'doublequotedcontent ::= TEXT',); |
|
| 1023 | + |
|
| 1024 | + public function tokenName($tokenType) |
|
| 1025 | + { |
|
| 1026 | + if ($tokenType === 0) { |
|
| 1027 | + return 'End of Input'; |
|
| 1028 | + } |
|
| 1029 | + if ($tokenType > 0 && $tokenType < count($this->yyTokenName)) { |
|
| 1030 | + return $this->yyTokenName[ $tokenType ]; |
|
| 1031 | + } else { |
|
| 1032 | + return "Unknown"; |
|
| 1033 | + } |
|
| 1034 | + } |
|
| 1035 | + |
|
| 1036 | + public static function yy_destructor($yymajor, $yypminor) |
|
| 1037 | + { |
|
| 1038 | + switch ($yymajor) { |
|
| 1039 | + default: |
|
| 1040 | + break; /* If no destructor action specified: do nothing */ |
|
| 1041 | + } |
|
| 1042 | + } |
|
| 1043 | + |
|
| 1044 | + public function yy_pop_parser_stack() |
|
| 1045 | + { |
|
| 1046 | + if (empty($this->yystack)) { |
|
| 1047 | + return; |
|
| 1048 | + } |
|
| 1049 | + $yytos = array_pop($this->yystack); |
|
| 1050 | + if ($this->yyTraceFILE && $this->yyidx >= 0) { |
|
| 1051 | + fwrite($this->yyTraceFILE, $this->yyTracePrompt . 'Popping ' . $this->yyTokenName[ $yytos->major ] . "\n"); |
|
| 1052 | + } |
|
| 1053 | + $yymajor = $yytos->major; |
|
| 1054 | + self::yy_destructor($yymajor, $yytos->minor); |
|
| 1055 | + $this->yyidx --; |
|
| 1056 | + |
|
| 1057 | + return $yymajor; |
|
| 1058 | + } |
|
| 1059 | + |
|
| 1060 | + public function __destruct() |
|
| 1061 | + { |
|
| 1062 | + while ($this->yystack !== Array()) { |
|
| 1063 | + $this->yy_pop_parser_stack(); |
|
| 1064 | + } |
|
| 1065 | + if (is_resource($this->yyTraceFILE)) { |
|
| 1066 | + fclose($this->yyTraceFILE); |
|
| 1067 | + } |
|
| 1068 | + } |
|
| 1069 | + |
|
| 1070 | + public function yy_get_expected_tokens($token) |
|
| 1071 | + { |
|
| 1072 | + static $res3 = array(); |
|
| 1073 | + static $res4 = array(); |
|
| 1074 | + $state = $this->yystack[ $this->yyidx ]->stateno; |
|
| 1075 | + $expected = self::$yyExpectedTokens[ $state ]; |
|
| 1076 | + if (isset($res3[ $state ][ $token ])) { |
|
| 1077 | + if ($res3[ $state ][ $token ]) { |
|
| 1078 | + return $expected; |
|
| 1079 | + } |
|
| 1080 | + } else { |
|
| 1081 | + if ($res3[ $state ][ $token ] = in_array($token, self::$yyExpectedTokens[ $state ], true)) { |
|
| 1082 | + return $expected; |
|
| 1083 | + } |
|
| 1084 | + } |
|
| 1085 | + $stack = $this->yystack; |
|
| 1086 | + $yyidx = $this->yyidx; |
|
| 1087 | + do { |
|
| 1088 | + $yyact = $this->yy_find_shift_action($token); |
|
| 1089 | + if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) { |
|
| 1090 | + // reduce action |
|
| 1091 | + $done = 0; |
|
| 1092 | + do { |
|
| 1093 | + if ($done ++ == 100) { |
|
| 1094 | + $this->yyidx = $yyidx; |
|
| 1095 | + $this->yystack = $stack; |
|
| 1096 | + // too much recursion prevents proper detection |
|
| 1097 | + // so give up |
|
| 1098 | + return array_unique($expected); |
|
| 1099 | + } |
|
| 1100 | + $yyruleno = $yyact - self::YYNSTATE; |
|
| 1101 | + $this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ]; |
|
| 1102 | + $nextstate = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, |
|
| 1103 | + self::$yyRuleInfo[ $yyruleno ][ 0 ]); |
|
| 1104 | + if (isset(self::$yyExpectedTokens[ $nextstate ])) { |
|
| 1105 | + $expected = array_merge($expected, self::$yyExpectedTokens[ $nextstate ]); |
|
| 1106 | + if (isset($res4[ $nextstate ][ $token ])) { |
|
| 1107 | + if ($res4[ $nextstate ][ $token ]) { |
|
| 1108 | + $this->yyidx = $yyidx; |
|
| 1109 | + $this->yystack = $stack; |
|
| 1110 | + return array_unique($expected); |
|
| 1111 | + } |
|
| 1112 | + } else { |
|
| 1113 | + if ($res4[ $nextstate ][ $token ] = |
|
| 1114 | + in_array($token, self::$yyExpectedTokens[ $nextstate ], true) |
|
| 1115 | + ) { |
|
| 1116 | + $this->yyidx = $yyidx; |
|
| 1117 | + $this->yystack = $stack; |
|
| 1118 | + return array_unique($expected); |
|
| 1119 | + } |
|
| 1120 | + } |
|
| 1121 | + } |
|
| 1122 | + if ($nextstate < self::YYNSTATE) { |
|
| 1123 | + // we need to shift a non-terminal |
|
| 1124 | + $this->yyidx ++; |
|
| 1125 | + $x = new TP_yyStackEntry; |
|
| 1126 | + $x->stateno = $nextstate; |
|
| 1127 | + $x->major = self::$yyRuleInfo[ $yyruleno ][ 0 ]; |
|
| 1128 | + $this->yystack[ $this->yyidx ] = $x; |
|
| 1129 | + continue 2; |
|
| 1130 | + } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { |
|
| 1131 | + $this->yyidx = $yyidx; |
|
| 1132 | + $this->yystack = $stack; |
|
| 1133 | + // the last token was just ignored, we can't accept |
|
| 1134 | + // by ignoring input, this is in essence ignoring a |
|
| 1135 | + // syntax error! |
|
| 1136 | + return array_unique($expected); |
|
| 1137 | + } elseif ($nextstate === self::YY_NO_ACTION) { |
|
| 1138 | + $this->yyidx = $yyidx; |
|
| 1139 | + $this->yystack = $stack; |
|
| 1140 | + // input accepted, but not shifted (I guess) |
|
| 1141 | + return $expected; |
|
| 1142 | + } else { |
|
| 1143 | + $yyact = $nextstate; |
|
| 1144 | + } |
|
| 1145 | + } |
|
| 1146 | + while (true); |
|
| 1147 | + } |
|
| 1148 | + break; |
|
| 1149 | + } |
|
| 1150 | + while (true); |
|
| 1151 | + $this->yyidx = $yyidx; |
|
| 1152 | + $this->yystack = $stack; |
|
| 1153 | + |
|
| 1154 | + return array_unique($expected); |
|
| 1155 | + } |
|
| 1156 | + |
|
| 1157 | + public function yy_is_expected_token($token) |
|
| 1158 | + { |
|
| 1159 | + static $res = array(); |
|
| 1160 | + static $res2 = array(); |
|
| 1161 | + if ($token === 0) { |
|
| 1162 | + return true; // 0 is not part of this |
|
| 1163 | + } |
|
| 1164 | + $state = $this->yystack[ $this->yyidx ]->stateno; |
|
| 1165 | + if (isset($res[ $state ][ $token ])) { |
|
| 1166 | + if ($res[ $state ][ $token ]) { |
|
| 1167 | + return true; |
|
| 1168 | + } |
|
| 1169 | + } else { |
|
| 1170 | + if ($res[ $state ][ $token ] = in_array($token, self::$yyExpectedTokens[ $state ], true)) { |
|
| 1171 | + return true; |
|
| 1172 | + } |
|
| 1173 | + } |
|
| 1174 | + $stack = $this->yystack; |
|
| 1175 | + $yyidx = $this->yyidx; |
|
| 1176 | + do { |
|
| 1177 | + $yyact = $this->yy_find_shift_action($token); |
|
| 1178 | + if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) { |
|
| 1179 | + // reduce action |
|
| 1180 | + $done = 0; |
|
| 1181 | + do { |
|
| 1182 | + if ($done ++ == 100) { |
|
| 1183 | + $this->yyidx = $yyidx; |
|
| 1184 | + $this->yystack = $stack; |
|
| 1185 | + // too much recursion prevents proper detection |
|
| 1186 | + // so give up |
|
| 1187 | + return true; |
|
| 1188 | + } |
|
| 1189 | + $yyruleno = $yyact - self::YYNSTATE; |
|
| 1190 | + $this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ]; |
|
| 1191 | + $nextstate = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, |
|
| 1192 | + self::$yyRuleInfo[ $yyruleno ][ 0 ]); |
|
| 1193 | + if (isset($res2[ $nextstate ][ $token ])) { |
|
| 1194 | + if ($res2[ $nextstate ][ $token ]) { |
|
| 1195 | + $this->yyidx = $yyidx; |
|
| 1196 | + $this->yystack = $stack; |
|
| 1197 | + return true; |
|
| 1198 | + } |
|
| 1199 | + } else { |
|
| 1200 | + if ($res2[ $nextstate ][ $token ] = (isset(self::$yyExpectedTokens[ $nextstate ]) && |
|
| 1201 | + in_array($token, self::$yyExpectedTokens[ $nextstate ], |
|
| 1202 | + true)) |
|
| 1203 | + ) { |
|
| 1204 | + $this->yyidx = $yyidx; |
|
| 1205 | + $this->yystack = $stack; |
|
| 1206 | + return true; |
|
| 1207 | + } |
|
| 1208 | + } |
|
| 1209 | + if ($nextstate < self::YYNSTATE) { |
|
| 1210 | + // we need to shift a non-terminal |
|
| 1211 | + $this->yyidx ++; |
|
| 1212 | + $x = new TP_yyStackEntry; |
|
| 1213 | + $x->stateno = $nextstate; |
|
| 1214 | + $x->major = self::$yyRuleInfo[ $yyruleno ][ 0 ]; |
|
| 1215 | + $this->yystack[ $this->yyidx ] = $x; |
|
| 1216 | + continue 2; |
|
| 1217 | + } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { |
|
| 1218 | + $this->yyidx = $yyidx; |
|
| 1219 | + $this->yystack = $stack; |
|
| 1220 | + if (!$token) { |
|
| 1221 | + // end of input: this is valid |
|
| 1222 | + return true; |
|
| 1223 | + } |
|
| 1224 | + // the last token was just ignored, we can't accept |
|
| 1225 | + // by ignoring input, this is in essence ignoring a |
|
| 1226 | + // syntax error! |
|
| 1227 | + return false; |
|
| 1228 | + } elseif ($nextstate === self::YY_NO_ACTION) { |
|
| 1229 | + $this->yyidx = $yyidx; |
|
| 1230 | + $this->yystack = $stack; |
|
| 1231 | + // input accepted, but not shifted (I guess) |
|
| 1232 | + return true; |
|
| 1233 | + } else { |
|
| 1234 | + $yyact = $nextstate; |
|
| 1235 | + } |
|
| 1236 | + } |
|
| 1237 | + while (true); |
|
| 1238 | + } |
|
| 1239 | + break; |
|
| 1240 | + } |
|
| 1241 | + while (true); |
|
| 1242 | + $this->yyidx = $yyidx; |
|
| 1243 | + $this->yystack = $stack; |
|
| 1244 | + |
|
| 1245 | + return true; |
|
| 1246 | + } |
|
| 1247 | + |
|
| 1248 | + public function yy_find_shift_action($iLookAhead) |
|
| 1249 | + { |
|
| 1250 | + $stateno = $this->yystack[ $this->yyidx ]->stateno; |
|
| 1251 | + |
|
| 1252 | + /* if ($this->yyidx < 0) return self::YY_NO_ACTION; */ |
|
| 1253 | + if (!isset(self::$yy_shift_ofst[ $stateno ])) { |
|
| 1254 | + // no shift actions |
|
| 1255 | + return self::$yy_default[ $stateno ]; |
|
| 1256 | + } |
|
| 1257 | + $i = self::$yy_shift_ofst[ $stateno ]; |
|
| 1258 | + if ($i === self::YY_SHIFT_USE_DFLT) { |
|
| 1259 | + return self::$yy_default[ $stateno ]; |
|
| 1260 | + } |
|
| 1261 | + if ($iLookAhead == self::YYNOCODE) { |
|
| 1262 | + return self::YY_NO_ACTION; |
|
| 1263 | + } |
|
| 1264 | + $i += $iLookAhead; |
|
| 1265 | + if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[ $i ] != $iLookAhead) { |
|
| 1266 | + if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback) && |
|
| 1267 | + ($iFallback = self::$yyFallback[ $iLookAhead ]) != 0 |
|
| 1268 | + ) { |
|
| 1269 | + if ($this->yyTraceFILE) { |
|
| 1270 | + fwrite($this->yyTraceFILE, |
|
| 1271 | + $this->yyTracePrompt . "FALLBACK " . $this->yyTokenName[ $iLookAhead ] . " => " . |
|
| 1272 | + $this->yyTokenName[ $iFallback ] . "\n"); |
|
| 1273 | + } |
|
| 1274 | + |
|
| 1275 | + return $this->yy_find_shift_action($iFallback); |
|
| 1276 | + } |
|
| 1277 | + |
|
| 1278 | + return self::$yy_default[ $stateno ]; |
|
| 1279 | + } else { |
|
| 1280 | + return self::$yy_action[ $i ]; |
|
| 1281 | + } |
|
| 1282 | + } |
|
| 1283 | + |
|
| 1284 | + public function yy_find_reduce_action($stateno, $iLookAhead) |
|
| 1285 | + { |
|
| 1286 | + /* $stateno = $this->yystack[$this->yyidx]->stateno; */ |
|
| 1287 | + |
|
| 1288 | + if (!isset(self::$yy_reduce_ofst[ $stateno ])) { |
|
| 1289 | + return self::$yy_default[ $stateno ]; |
|
| 1290 | + } |
|
| 1291 | + $i = self::$yy_reduce_ofst[ $stateno ]; |
|
| 1292 | + if ($i == self::YY_REDUCE_USE_DFLT) { |
|
| 1293 | + return self::$yy_default[ $stateno ]; |
|
| 1294 | + } |
|
| 1295 | + if ($iLookAhead == self::YYNOCODE) { |
|
| 1296 | + return self::YY_NO_ACTION; |
|
| 1297 | + } |
|
| 1298 | + $i += $iLookAhead; |
|
| 1299 | + if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[ $i ] != $iLookAhead) { |
|
| 1300 | + return self::$yy_default[ $stateno ]; |
|
| 1301 | + } else { |
|
| 1302 | + return self::$yy_action[ $i ]; |
|
| 1303 | + } |
|
| 1304 | + } |
|
| 1305 | + |
|
| 1306 | + public function yy_shift($yyNewState, $yyMajor, $yypMinor) |
|
| 1307 | + { |
|
| 1308 | + $this->yyidx ++; |
|
| 1309 | + if ($this->yyidx >= self::YYSTACKDEPTH) { |
|
| 1310 | + $this->yyidx --; |
|
| 1311 | + if ($this->yyTraceFILE) { |
|
| 1312 | + fprintf($this->yyTraceFILE, "%sStack Overflow!\n", $this->yyTracePrompt); |
|
| 1313 | + } |
|
| 1314 | + while ($this->yyidx >= 0) { |
|
| 1315 | + $this->yy_pop_parser_stack(); |
|
| 1316 | + } |
|
| 1317 | + #line 207 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1318 | + |
|
| 1319 | + $this->internalError = true; |
|
| 1320 | + $this->compiler->trigger_template_error("Stack overflow in template parser"); |
|
| 1321 | + |
|
| 1322 | + return; |
|
| 1323 | + } |
|
| 1324 | + $yytos = new TP_yyStackEntry; |
|
| 1325 | + $yytos->stateno = $yyNewState; |
|
| 1326 | + $yytos->major = $yyMajor; |
|
| 1327 | + $yytos->minor = $yypMinor; |
|
| 1328 | + $this->yystack[] = $yytos; |
|
| 1329 | + if ($this->yyTraceFILE && $this->yyidx > 0) { |
|
| 1330 | + fprintf($this->yyTraceFILE, "%sShift %d\n", $this->yyTracePrompt, $yyNewState); |
|
| 1331 | + fprintf($this->yyTraceFILE, "%sStack:", $this->yyTracePrompt); |
|
| 1332 | + for ($i = 1; $i <= $this->yyidx; $i ++) { |
|
| 1333 | + fprintf($this->yyTraceFILE, " %s", $this->yyTokenName[ $this->yystack[ $i ]->major ]); |
|
| 1334 | + } |
|
| 1335 | + fwrite($this->yyTraceFILE, "\n"); |
|
| 1336 | + } |
|
| 1337 | + } |
|
| 1338 | + |
|
| 1339 | + public static $yyRuleInfo = array(array(0 => 63, 1 => 1), array(0 => 64, 1 => 1), array(0 => 64, 1 => 2), |
|
| 1340 | + array(0 => 64, 1 => 0), array(0 => 65, 1 => 1), array(0 => 65, 1 => 1), |
|
| 1341 | + array(0 => 65, 1 => 1), array(0 => 65, 1 => 1), array(0 => 65, 1 => 1), |
|
| 1342 | + array(0 => 68, 1 => 1), array(0 => 68, 1 => 2), array(0 => 65, 1 => 1), |
|
| 1343 | + array(0 => 65, 1 => 1), array(0 => 67, 1 => 2), array(0 => 67, 1 => 3), |
|
| 1344 | + array(0 => 69, 1 => 2), array(0 => 69, 1 => 0), array(0 => 70, 1 => 1), |
|
| 1345 | + array(0 => 70, 1 => 1), array(0 => 66, 1 => 2), array(0 => 66, 1 => 1), |
|
| 1346 | + array(0 => 71, 1 => 2), array(0 => 71, 1 => 3), array(0 => 71, 1 => 2), |
|
| 1347 | + array(0 => 71, 1 => 3), array(0 => 71, 1 => 2), array(0 => 71, 1 => 3), |
|
| 1348 | + array(0 => 71, 1 => 4), array(0 => 71, 1 => 4), array(0 => 71, 1 => 5), |
|
| 1349 | + array(0 => 71, 1 => 5), array(0 => 66, 1 => 1), array(0 => 71, 1 => 3), |
|
| 1350 | + array(0 => 71, 1 => 2), array(0 => 71, 1 => 4), array(0 => 71, 1 => 5), |
|
| 1351 | + array(0 => 71, 1 => 6), array(0 => 71, 1 => 2), array(0 => 71, 1 => 2), |
|
| 1352 | + array(0 => 71, 1 => 3), array(0 => 71, 1 => 2), array(0 => 71, 1 => 3), |
|
| 1353 | + array(0 => 71, 1 => 8), array(0 => 80, 1 => 2), array(0 => 80, 1 => 1), |
|
| 1354 | + array(0 => 71, 1 => 5), array(0 => 71, 1 => 7), array(0 => 71, 1 => 2), |
|
| 1355 | + array(0 => 71, 1 => 6), array(0 => 71, 1 => 8), array(0 => 71, 1 => 6), |
|
| 1356 | + array(0 => 71, 1 => 8), array(0 => 71, 1 => 3), array(0 => 71, 1 => 4), |
|
| 1357 | + array(0 => 71, 1 => 2), array(0 => 66, 1 => 1), array(0 => 71, 1 => 2), |
|
| 1358 | + array(0 => 71, 1 => 3), array(0 => 71, 1 => 4), array(0 => 71, 1 => 5), |
|
| 1359 | + array(0 => 73, 1 => 2), array(0 => 73, 1 => 1), array(0 => 73, 1 => 0), |
|
| 1360 | + array(0 => 83, 1 => 4), array(0 => 83, 1 => 2), array(0 => 83, 1 => 2), |
|
| 1361 | + array(0 => 83, 1 => 2), array(0 => 83, 1 => 2), array(0 => 83, 1 => 2), |
|
| 1362 | + array(0 => 83, 1 => 4), array(0 => 79, 1 => 1), array(0 => 79, 1 => 3), |
|
| 1363 | + array(0 => 78, 1 => 3), array(0 => 78, 1 => 3), array(0 => 78, 1 => 3), |
|
| 1364 | + array(0 => 78, 1 => 3), array(0 => 75, 1 => 1), array(0 => 75, 1 => 1), |
|
| 1365 | + array(0 => 75, 1 => 3), array(0 => 75, 1 => 3), array(0 => 75, 1 => 3), |
|
| 1366 | + array(0 => 75, 1 => 1), array(0 => 75, 1 => 2), array(0 => 75, 1 => 3), |
|
| 1367 | + array(0 => 75, 1 => 3), array(0 => 75, 1 => 2), array(0 => 75, 1 => 3), |
|
| 1368 | + array(0 => 75, 1 => 3), array(0 => 84, 1 => 7), array(0 => 84, 1 => 7), |
|
| 1369 | + array(0 => 74, 1 => 1), array(0 => 74, 1 => 2), array(0 => 74, 1 => 2), |
|
| 1370 | + array(0 => 74, 1 => 2), array(0 => 74, 1 => 2), array(0 => 74, 1 => 1), |
|
| 1371 | + array(0 => 74, 1 => 1), array(0 => 74, 1 => 3), array(0 => 74, 1 => 2), |
|
| 1372 | + array(0 => 74, 1 => 2), array(0 => 74, 1 => 1), array(0 => 74, 1 => 1), |
|
| 1373 | + array(0 => 74, 1 => 3), array(0 => 74, 1 => 3), array(0 => 74, 1 => 3), |
|
| 1374 | + array(0 => 74, 1 => 1), array(0 => 74, 1 => 1), array(0 => 74, 1 => 3), |
|
| 1375 | + array(0 => 74, 1 => 1), array(0 => 74, 1 => 2), array(0 => 74, 1 => 1), |
|
| 1376 | + array(0 => 74, 1 => 3), array(0 => 90, 1 => 1), array(0 => 90, 1 => 1), |
|
| 1377 | + array(0 => 72, 1 => 1), array(0 => 72, 1 => 1), array(0 => 72, 1 => 3), |
|
| 1378 | + array(0 => 72, 1 => 1), array(0 => 72, 1 => 3), array(0 => 72, 1 => 4), |
|
| 1379 | + array(0 => 72, 1 => 3), array(0 => 72, 1 => 4), array(0 => 76, 1 => 2), |
|
| 1380 | + array(0 => 76, 1 => 2), array(0 => 94, 1 => 2), array(0 => 94, 1 => 0), |
|
| 1381 | + array(0 => 95, 1 => 2), array(0 => 95, 1 => 2), array(0 => 95, 1 => 4), |
|
| 1382 | + array(0 => 95, 1 => 2), array(0 => 95, 1 => 2), array(0 => 95, 1 => 4), |
|
| 1383 | + array(0 => 95, 1 => 3), array(0 => 95, 1 => 5), array(0 => 95, 1 => 3), |
|
| 1384 | + array(0 => 95, 1 => 3), array(0 => 95, 1 => 3), array(0 => 95, 1 => 3), |
|
| 1385 | + array(0 => 95, 1 => 3), array(0 => 95, 1 => 3), array(0 => 95, 1 => 2), |
|
| 1386 | + array(0 => 81, 1 => 1), array(0 => 81, 1 => 1), array(0 => 81, 1 => 2), |
|
| 1387 | + array(0 => 96, 1 => 1), array(0 => 96, 1 => 1), array(0 => 96, 1 => 3), |
|
| 1388 | + array(0 => 93, 1 => 2), array(0 => 97, 1 => 1), array(0 => 97, 1 => 2), |
|
| 1389 | + array(0 => 98, 1 => 3), array(0 => 98, 1 => 3), array(0 => 98, 1 => 5), |
|
| 1390 | + array(0 => 98, 1 => 6), array(0 => 98, 1 => 2), array(0 => 89, 1 => 4), |
|
| 1391 | + array(0 => 99, 1 => 4), array(0 => 99, 1 => 4), array(0 => 100, 1 => 3), |
|
| 1392 | + array(0 => 100, 1 => 1), array(0 => 100, 1 => 0), array(0 => 77, 1 => 3), |
|
| 1393 | + array(0 => 77, 1 => 2), array(0 => 101, 1 => 3), array(0 => 101, 1 => 2), |
|
| 1394 | + array(0 => 82, 1 => 2), array(0 => 82, 1 => 0), array(0 => 102, 1 => 2), |
|
| 1395 | + array(0 => 102, 1 => 2), array(0 => 92, 1 => 1), array(0 => 92, 1 => 2), |
|
| 1396 | + array(0 => 92, 1 => 1), array(0 => 92, 1 => 2), array(0 => 92, 1 => 3), |
|
| 1397 | + array(0 => 87, 1 => 1), array(0 => 87, 1 => 1), array(0 => 86, 1 => 1), |
|
| 1398 | + array(0 => 88, 1 => 1), array(0 => 85, 1 => 3), array(0 => 103, 1 => 1), |
|
| 1399 | + array(0 => 103, 1 => 3), array(0 => 103, 1 => 0), array(0 => 104, 1 => 3), |
|
| 1400 | + array(0 => 104, 1 => 3), array(0 => 104, 1 => 1), array(0 => 91, 1 => 2), |
|
| 1401 | + array(0 => 91, 1 => 3), array(0 => 105, 1 => 2), array(0 => 105, 1 => 1), |
|
| 1402 | + array(0 => 106, 1 => 3), array(0 => 106, 1 => 3), array(0 => 106, 1 => 1), |
|
| 1403 | + array(0 => 106, 1 => 3), array(0 => 106, 1 => 3), array(0 => 106, 1 => 1), |
|
| 1404 | + array(0 => 106, 1 => 1),); |
|
| 1405 | + |
|
| 1406 | + public static $yyReduceMap = array(0 => 0, 1 => 1, 2 => 2, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 17 => 9, |
|
| 1407 | + 18 => 9, 44 => 9, 67 => 9, 68 => 9, 76 => 9, 77 => 9, 81 => 9, 90 => 9, 95 => 9, |
|
| 1408 | + 96 => 9, 101 => 9, 105 => 9, 106 => 9, 110 => 9, 112 => 9, 117 => 9, 179 => 9, |
|
| 1409 | + 184 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 16 => 13, 14 => 14, 75 => 14, |
|
| 1410 | + 15 => 15, 91 => 15, 93 => 15, 94 => 15, 124 => 15, 19 => 19, 20 => 20, 21 => 21, |
|
| 1411 | + 23 => 21, 25 => 21, 22 => 22, 24 => 22, 26 => 22, 27 => 27, 28 => 27, 29 => 29, |
|
| 1412 | + 30 => 30, 31 => 31, 32 => 32, 33 => 33, 34 => 34, 35 => 35, 36 => 36, 37 => 37, |
|
| 1413 | + 38 => 38, 39 => 39, 41 => 39, 40 => 40, 42 => 42, 43 => 43, 45 => 45, 46 => 46, |
|
| 1414 | + 47 => 47, 48 => 48, 50 => 48, 49 => 49, 51 => 49, 52 => 52, 53 => 53, 54 => 54, |
|
| 1415 | + 55 => 55, 56 => 56, 57 => 57, 58 => 58, 59 => 59, 60 => 60, 61 => 61, 70 => 61, |
|
| 1416 | + 159 => 61, 163 => 61, 167 => 61, 168 => 61, 62 => 62, 160 => 62, 166 => 62, |
|
| 1417 | + 63 => 63, 64 => 64, 65 => 64, 66 => 66, 144 => 66, 69 => 69, 71 => 71, 72 => 72, |
|
| 1418 | + 73 => 72, 74 => 74, 78 => 78, 79 => 79, 80 => 79, 82 => 82, 109 => 82, 83 => 83, |
|
| 1419 | + 84 => 84, 85 => 85, 86 => 86, 87 => 87, 88 => 88, 89 => 89, 92 => 92, 97 => 97, |
|
| 1420 | + 98 => 98, 99 => 99, 100 => 100, 102 => 102, 103 => 103, 104 => 103, 107 => 107, |
|
| 1421 | + 108 => 108, 111 => 111, 113 => 113, 114 => 114, 115 => 115, 116 => 116, |
|
| 1422 | + 118 => 118, 119 => 119, 120 => 120, 121 => 121, 122 => 122, 123 => 123, |
|
| 1423 | + 125 => 125, 181 => 125, 126 => 126, 127 => 127, 128 => 128, 129 => 129, |
|
| 1424 | + 130 => 130, 131 => 131, 139 => 131, 132 => 132, 133 => 133, 134 => 134, |
|
| 1425 | + 135 => 134, 137 => 134, 138 => 134, 136 => 136, 140 => 140, 141 => 141, |
|
| 1426 | + 142 => 142, 185 => 142, 143 => 143, 145 => 145, 146 => 146, 147 => 147, |
|
| 1427 | + 148 => 148, 149 => 149, 150 => 150, 151 => 151, 152 => 152, 153 => 153, |
|
| 1428 | + 154 => 154, 155 => 155, 156 => 156, 157 => 157, 158 => 158, 161 => 161, |
|
| 1429 | + 162 => 162, 164 => 164, 165 => 165, 169 => 169, 170 => 170, 171 => 171, |
|
| 1430 | + 172 => 172, 173 => 173, 174 => 174, 175 => 175, 176 => 176, 177 => 177, |
|
| 1431 | + 178 => 178, 180 => 180, 182 => 182, 183 => 183, 186 => 186, 187 => 187, |
|
| 1432 | + 188 => 188, 189 => 189, 190 => 189, 192 => 189, 191 => 191, 193 => 193, |
|
| 1433 | + 194 => 194, 195 => 195,); |
|
| 1434 | + |
|
| 1435 | + #line 218 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1436 | + public function yy_r0() |
|
| 1437 | + { |
|
| 1438 | + $this->root_buffer->prepend_array($this, $this->template_prefix); |
|
| 1439 | + $this->root_buffer->append_array($this, $this->template_postfix); |
|
| 1440 | + $this->_retvalue = $this->root_buffer->to_smarty_php($this); |
|
| 1441 | + } |
|
| 1442 | + |
|
| 1443 | + #line 228 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1444 | + public function yy_r1() |
|
| 1445 | + { |
|
| 1446 | + if ($this->yystack[ $this->yyidx + 0 ]->minor !== null) { |
|
| 1447 | + $this->current_buffer->append_subtree($this, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1448 | + } |
|
| 1449 | + } |
|
| 1450 | + |
|
| 1451 | + #line 235 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1452 | + public function yy_r2() |
|
| 1453 | + { |
|
| 1454 | + if ($this->yystack[ $this->yyidx + 0 ]->minor !== null) { |
|
| 1455 | + // because of possible code injection |
|
| 1456 | + $this->current_buffer->append_subtree($this, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1457 | + } |
|
| 1458 | + } |
|
| 1459 | + |
|
| 1460 | + #line 249 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1461 | + public function yy_r4() |
|
| 1462 | + { |
|
| 1463 | + if ($this->compiler->has_code) { |
|
| 1464 | + $this->_retvalue = $this->mergePrefixCode($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1465 | + } else { |
|
| 1466 | + $this->_retvalue = null; |
|
| 1467 | + } |
|
| 1468 | + $this->compiler->has_variable_string = false; |
|
| 1469 | + $this->block_nesting_level = count($this->compiler->_tag_stack); |
|
| 1470 | + } |
|
| 1471 | + |
|
| 1472 | + #line 260 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1473 | + public function yy_r5() |
|
| 1474 | + { |
|
| 1475 | + $this->_retvalue = new Smarty_Internal_ParseTree_Text($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1476 | + } |
|
| 1477 | + |
|
| 1478 | + #line 264 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1479 | + public function yy_r6() |
|
| 1480 | + { |
|
| 1481 | + $code = $this->compiler->compileTag('private_php', |
|
| 1482 | + array(array('code' => $this->yystack[ $this->yyidx + 0 ]->minor), |
|
| 1483 | + array('type' => $this->lex->phpType)), array()); |
|
| 1484 | + if ($this->compiler->has_code && !empty($code)) { |
|
| 1485 | + $tmp = ''; |
|
| 1486 | + foreach ($this->compiler->prefix_code as $code) { |
|
| 1487 | + $tmp .= $code; |
|
| 1488 | + } |
|
| 1489 | + $this->compiler->prefix_code = array(); |
|
| 1490 | + $this->_retvalue = |
|
| 1491 | + new Smarty_Internal_ParseTree_Tag($this, $this->compiler->processNocacheCode($tmp . $code, true)); |
|
| 1492 | + } else { |
|
| 1493 | + $this->_retvalue = null; |
|
| 1494 | + } |
|
| 1495 | + } |
|
| 1496 | + |
|
| 1497 | + #line 275 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1498 | + public function yy_r7() |
|
| 1499 | + { |
|
| 1500 | + $this->compiler->tag_nocache = true; |
|
| 1501 | + $save = $this->template->compiled->has_nocache_code; |
|
| 1502 | + $this->_retvalue = new Smarty_Internal_ParseTree_Tag($this, |
|
| 1503 | + $this->compiler->processNocacheCode("<?php echo '{$this->yystack[$this->yyidx + 0]->minor}';?>\n", |
|
| 1504 | + true)); |
|
| 1505 | + $this->template->compiled->has_nocache_code = $save; |
|
| 1506 | + } |
|
| 1507 | + |
|
| 1508 | + #line 282 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1509 | + public function yy_r8() |
|
| 1510 | + { |
|
| 1511 | + $this->_retvalue = $this->compiler->processText($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1512 | + } |
|
| 1513 | + |
|
| 1514 | + #line 286 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1515 | + public function yy_r9() |
|
| 1516 | + { |
|
| 1517 | + $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1518 | + } |
|
| 1519 | + |
|
| 1520 | + #line 290 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1521 | + public function yy_r10() |
|
| 1522 | + { |
|
| 1523 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1524 | + } |
|
| 1525 | + |
|
| 1526 | + #line 295 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1527 | + public function yy_r11() |
|
| 1528 | + { |
|
| 1529 | + $this->strip = true; |
|
| 1530 | + } |
|
| 1531 | + |
|
| 1532 | + #line 299 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1533 | + public function yy_r12() |
|
| 1534 | + { |
|
| 1535 | + $this->strip = false; |
|
| 1536 | + } |
|
| 1537 | + |
|
| 1538 | + #line 304 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1539 | + public function yy_r13() |
|
| 1540 | + { |
|
| 1541 | + $this->_retvalue = ''; |
|
| 1542 | + } |
|
| 1543 | + |
|
| 1544 | + #line 308 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1545 | + public function yy_r14() |
|
| 1546 | + { |
|
| 1547 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor; |
|
| 1548 | + } |
|
| 1549 | + |
|
| 1550 | + #line 312 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1551 | + public function yy_r15() |
|
| 1552 | + { |
|
| 1553 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1554 | + } |
|
| 1555 | + |
|
| 1556 | + #line 328 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1557 | + public function yy_r19() |
|
| 1558 | + { |
|
| 1559 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor; |
|
| 1560 | + } |
|
| 1561 | + |
|
| 1562 | + #line 334 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1563 | + public function yy_r20() |
|
| 1564 | + { |
|
| 1565 | + $var = |
|
| 1566 | + trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length), |
|
| 1567 | + ' $'); |
|
| 1568 | + if (preg_match('/^(.*)(\s+nocache)$/', $var, $match)) { |
|
| 1569 | + $this->_retvalue = $this->compiler->compileTag('private_print_expression', array('nocache'), |
|
| 1570 | + array('value' => $this->compiler->compileVariable('\'' . |
|
| 1571 | + $match[ 1 ] . |
|
| 1572 | + '\''))); |
|
| 1573 | + } else { |
|
| 1574 | + $this->_retvalue = $this->compiler->compileTag('private_print_expression', array(), |
|
| 1575 | + array('value' => $this->compiler->compileVariable('\'' . |
|
| 1576 | + $var . |
|
| 1577 | + '\''))); |
|
| 1578 | + } |
|
| 1579 | + } |
|
| 1580 | + |
|
| 1581 | + #line 344 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1582 | + public function yy_r21() |
|
| 1583 | + { |
|
| 1584 | + $this->_retvalue = $this->compiler->compileTag('private_print_expression', array(), |
|
| 1585 | + array('value' => $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 1586 | + } |
|
| 1587 | + |
|
| 1588 | + #line 348 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1589 | + public function yy_r22() |
|
| 1590 | + { |
|
| 1591 | + $this->_retvalue = |
|
| 1592 | + $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1593 | + array('value' => $this->yystack[ $this->yyidx + - 1 ]->minor)); |
|
| 1594 | + } |
|
| 1595 | + |
|
| 1596 | + #line 371 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1597 | + public function yy_r27() |
|
| 1598 | + { |
|
| 1599 | + $this->_retvalue = $this->compiler->compileTag('assign', array(array('value' => $this->yystack[ $this->yyidx + |
|
| 1600 | + 0 ]->minor), |
|
| 1601 | + array('var' => '\'' . |
|
| 1602 | + substr($this->yystack[ $this->yyidx + |
|
| 1603 | + - 2 ]->minor, |
|
| 1604 | + 1) . '\''))); |
|
| 1605 | + } |
|
| 1606 | + |
|
| 1607 | + #line 379 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1608 | + public function yy_r29() |
|
| 1609 | + { |
|
| 1610 | + $this->_retvalue = $this->compiler->compileTag('assign', |
|
| 1611 | + array_merge(array(array('value' => $this->yystack[ $this->yyidx + |
|
| 1612 | + - 1 ]->minor), |
|
| 1613 | + array('var' => '\'' . |
|
| 1614 | + substr($this->yystack[ $this->yyidx + |
|
| 1615 | + - 3 ]->minor, |
|
| 1616 | + 1) . '\'')), |
|
| 1617 | + $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 1618 | + } |
|
| 1619 | + |
|
| 1620 | + #line 383 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1621 | + public function yy_r30() |
|
| 1622 | + { |
|
| 1623 | + $this->_retvalue = $this->compiler->compileTag('assign', |
|
| 1624 | + array_merge(array(array('value' => $this->yystack[ $this->yyidx + |
|
| 1625 | + - 1 ]->minor), |
|
| 1626 | + array('var' => $this->yystack[ $this->yyidx + |
|
| 1627 | + - 3 ]->minor[ 'var' ])), |
|
| 1628 | + $this->yystack[ $this->yyidx + 0 ]->minor), |
|
| 1629 | + array('smarty_internal_index' => $this->yystack[ $this->yyidx + |
|
| 1630 | + - 3 ]->minor[ 'smarty_internal_index' ])); |
|
| 1631 | + } |
|
| 1632 | + |
|
| 1633 | + #line 388 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1634 | + public function yy_r31() |
|
| 1635 | + { |
|
| 1636 | + $tag = |
|
| 1637 | + trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length)); |
|
| 1638 | + if ($tag == 'strip') { |
|
| 1639 | + $this->strip = true; |
|
| 1640 | + $this->_retvalue = null;; |
|
| 1641 | + } else { |
|
| 1642 | + if (defined($tag)) { |
|
| 1643 | + if ($this->security) { |
|
| 1644 | + $this->security->isTrustedConstant($tag, $this->compiler); |
|
| 1645 | + } |
|
| 1646 | + $this->_retvalue = |
|
| 1647 | + $this->compiler->compileTag('private_print_expression', array(), array('value' => $tag)); |
|
| 1648 | + } else { |
|
| 1649 | + if (preg_match('/^(.*)(\s+nocache)$/', $tag, $match)) { |
|
| 1650 | + $this->_retvalue = $this->compiler->compileTag($match[ 1 ], array("'nocache'")); |
|
| 1651 | + } else { |
|
| 1652 | + $this->_retvalue = $this->compiler->compileTag($tag, array()); |
|
| 1653 | + } |
|
| 1654 | + } |
|
| 1655 | + } |
|
| 1656 | + } |
|
| 1657 | + |
|
| 1658 | + #line 410 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1659 | + public function yy_r32() |
|
| 1660 | + { |
|
| 1661 | + if (defined($this->yystack[ $this->yyidx + - 1 ]->minor)) { |
|
| 1662 | + if ($this->security) { |
|
| 1663 | + $this->security->isTrustedConstant($this->yystack[ $this->yyidx + - 1 ]->minor, $this->compiler); |
|
| 1664 | + } |
|
| 1665 | + $this->_retvalue = |
|
| 1666 | + $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1667 | + array('value' => $this->yystack[ $this->yyidx + - 1 ]->minor)); |
|
| 1668 | + } else { |
|
| 1669 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 1 ]->minor, |
|
| 1670 | + $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1671 | + } |
|
| 1672 | + } |
|
| 1673 | + |
|
| 1674 | + #line 420 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1675 | + public function yy_r33() |
|
| 1676 | + { |
|
| 1677 | + if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) { |
|
| 1678 | + if ($this->security) { |
|
| 1679 | + $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler); |
|
| 1680 | + } |
|
| 1681 | + $this->_retvalue = $this->compiler->compileTag('private_print_expression', array(), |
|
| 1682 | + array('value' => $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 1683 | + } else { |
|
| 1684 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + 0 ]->minor, array()); |
|
| 1685 | + } |
|
| 1686 | + } |
|
| 1687 | + |
|
| 1688 | + #line 433 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1689 | + public function yy_r34() |
|
| 1690 | + { |
|
| 1691 | + if (defined($this->yystack[ $this->yyidx + - 2 ]->minor)) { |
|
| 1692 | + if ($this->security) { |
|
| 1693 | + $this->security->isTrustedConstant($this->yystack[ $this->yyidx + - 2 ]->minor, $this->compiler); |
|
| 1694 | + } |
|
| 1695 | + $this->_retvalue = |
|
| 1696 | + $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1697 | + array('value' => $this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 1698 | + 'modifierlist' => $this->yystack[ $this->yyidx + - 1 ]->minor)); |
|
| 1699 | + } else { |
|
| 1700 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 1701 | + $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1702 | + array('modifierlist' => $this->yystack[ $this->yyidx + |
|
| 1703 | + - 1 ]->minor)); |
|
| 1704 | + } |
|
| 1705 | + } |
|
| 1706 | + |
|
| 1707 | + #line 445 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1708 | + public function yy_r35() |
|
| 1709 | + { |
|
| 1710 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 3 ]->minor, |
|
| 1711 | + $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1712 | + array('object_method' => $this->yystack[ $this->yyidx + |
|
| 1713 | + - 1 ]->minor)); |
|
| 1714 | + } |
|
| 1715 | + |
|
| 1716 | + #line 450 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1717 | + public function yy_r36() |
|
| 1718 | + { |
|
| 1719 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 4 ]->minor, |
|
| 1720 | + $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1721 | + array('modifierlist' => $this->yystack[ $this->yyidx + |
|
| 1722 | + - 1 ]->minor, |
|
| 1723 | + 'object_method' => $this->yystack[ $this->yyidx + |
|
| 1724 | + - 2 ]->minor)); |
|
| 1725 | + } |
|
| 1726 | + |
|
| 1727 | + #line 455 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1728 | + public function yy_r37() |
|
| 1729 | + { |
|
| 1730 | + $this->_retvalue = $this->compiler->compileTag('make_nocache', array(array('var' => '\'' . |
|
| 1731 | + substr($this->yystack[ $this->yyidx + |
|
| 1732 | + 0 ]->minor, |
|
| 1733 | + 1) . '\''))); |
|
| 1734 | + } |
|
| 1735 | + |
|
| 1736 | + #line 460 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1737 | + public function yy_r38() |
|
| 1738 | + { |
|
| 1739 | + $tag = trim(substr($this->yystack[ $this->yyidx + - 1 ]->minor, $this->lex->ldel_length)); |
|
| 1740 | + $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag, array(), |
|
| 1741 | + array('if condition' => $this->yystack[ $this->yyidx + |
|
| 1742 | + 0 ]->minor)); |
|
| 1743 | + } |
|
| 1744 | + |
|
| 1745 | + #line 465 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1746 | + public function yy_r39() |
|
| 1747 | + { |
|
| 1748 | + $tag = trim(substr($this->yystack[ $this->yyidx + - 2 ]->minor, $this->lex->ldel_length)); |
|
| 1749 | + $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag, |
|
| 1750 | + $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1751 | + array('if condition' => $this->yystack[ $this->yyidx + |
|
| 1752 | + - 1 ]->minor)); |
|
| 1753 | + } |
|
| 1754 | + |
|
| 1755 | + #line 470 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1756 | + public function yy_r40() |
|
| 1757 | + { |
|
| 1758 | + $tag = trim(substr($this->yystack[ $this->yyidx + - 1 ]->minor, $this->lex->ldel_length)); |
|
| 1759 | + $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag, array(), |
|
| 1760 | + array('if condition' => $this->yystack[ $this->yyidx + |
|
| 1761 | + 0 ]->minor)); |
|
| 1762 | + } |
|
| 1763 | + |
|
| 1764 | + #line 481 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1765 | + public function yy_r42() |
|
| 1766 | + { |
|
| 1767 | + $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1768 | + array(array('start' => $this->yystack[ $this->yyidx + |
|
| 1769 | + - 6 ]->minor), |
|
| 1770 | + array('ifexp' => $this->yystack[ $this->yyidx + |
|
| 1771 | + - 4 ]->minor), |
|
| 1772 | + array('var' => $this->yystack[ $this->yyidx + |
|
| 1773 | + - 2 ]->minor), |
|
| 1774 | + array('step' => $this->yystack[ $this->yyidx + |
|
| 1775 | + - 1 ]->minor))), |
|
| 1776 | + 1); |
|
| 1777 | + } |
|
| 1778 | + |
|
| 1779 | + #line 485 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1780 | + public function yy_r43() |
|
| 1781 | + { |
|
| 1782 | + $this->_retvalue = '=' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1783 | + } |
|
| 1784 | + |
|
| 1785 | + #line 493 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1786 | + public function yy_r45() |
|
| 1787 | + { |
|
| 1788 | + $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1789 | + array(array('start' => $this->yystack[ $this->yyidx + |
|
| 1790 | + - 3 ]->minor), |
|
| 1791 | + array('to' => $this->yystack[ $this->yyidx + |
|
| 1792 | + - 1 ]->minor))), |
|
| 1793 | + 0); |
|
| 1794 | + } |
|
| 1795 | + |
|
| 1796 | + #line 497 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1797 | + public function yy_r46() |
|
| 1798 | + { |
|
| 1799 | + $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1800 | + array(array('start' => $this->yystack[ $this->yyidx + |
|
| 1801 | + - 5 ]->minor), |
|
| 1802 | + array('to' => $this->yystack[ $this->yyidx + |
|
| 1803 | + - 3 ]->minor), |
|
| 1804 | + array('step' => $this->yystack[ $this->yyidx + |
|
| 1805 | + - 1 ]->minor))), |
|
| 1806 | + 0); |
|
| 1807 | + } |
|
| 1808 | + |
|
| 1809 | + #line 502 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1810 | + public function yy_r47() |
|
| 1811 | + { |
|
| 1812 | + $this->_retvalue = $this->compiler->compileTag('foreach', $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1813 | + } |
|
| 1814 | + |
|
| 1815 | + #line 507 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1816 | + public function yy_r48() |
|
| 1817 | + { |
|
| 1818 | + $this->_retvalue = $this->compiler->compileTag('foreach', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1819 | + array(array('from' => $this->yystack[ $this->yyidx + |
|
| 1820 | + - 3 ]->minor), |
|
| 1821 | + array('item' => $this->yystack[ $this->yyidx + |
|
| 1822 | + - 1 ]->minor)))); |
|
| 1823 | + } |
|
| 1824 | + |
|
| 1825 | + #line 511 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1826 | + public function yy_r49() |
|
| 1827 | + { |
|
| 1828 | + $this->_retvalue = $this->compiler->compileTag('foreach', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1829 | + array(array('from' => $this->yystack[ $this->yyidx + |
|
| 1830 | + - 5 ]->minor), |
|
| 1831 | + array('item' => $this->yystack[ $this->yyidx + |
|
| 1832 | + - 1 ]->minor), |
|
| 1833 | + array('key' => $this->yystack[ $this->yyidx + |
|
| 1834 | + - 3 ]->minor)))); |
|
| 1835 | + } |
|
| 1836 | + |
|
| 1837 | + #line 524 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1838 | + public function yy_r52() |
|
| 1839 | + { |
|
| 1840 | + $this->_retvalue = $this->compiler->compileTag('setfilter', array(), |
|
| 1841 | + array('modifier_list' => array(array_merge(array($this->yystack[ $this->yyidx + |
|
| 1842 | + - 1 ]->minor), |
|
| 1843 | + $this->yystack[ $this->yyidx + |
|
| 1844 | + 0 ]->minor)))); |
|
| 1845 | + } |
|
| 1846 | + |
|
| 1847 | + #line 528 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1848 | + public function yy_r53() |
|
| 1849 | + { |
|
| 1850 | + $this->_retvalue = $this->compiler->compileTag('setfilter', array(), |
|
| 1851 | + array('modifier_list' => array_merge(array(array_merge(array($this->yystack[ $this->yyidx + |
|
| 1852 | + - 2 ]->minor), |
|
| 1853 | + $this->yystack[ $this->yyidx + |
|
| 1854 | + - 1 ]->minor)), |
|
| 1855 | + $this->yystack[ $this->yyidx + |
|
| 1856 | + 0 ]->minor))); |
|
| 1857 | + } |
|
| 1858 | + |
|
| 1859 | + #line 533 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1860 | + public function yy_r54() |
|
| 1861 | + { |
|
| 1862 | + $j = strrpos($this->yystack[ $this->yyidx + 0 ]->minor, '.'); |
|
| 1863 | + if ($this->yystack[ $this->yyidx + 0 ]->minor[ $j + 1 ] == 'c') { |
|
| 1864 | + // {$smarty.block.child} |
|
| 1865 | + $this->_retvalue = SMARTY_INTERNAL_COMPILE_BLOCK::compileChildBlock($this->compiler); |
|
| 1866 | + } else { |
|
| 1867 | + // {$smarty.block.parent} |
|
| 1868 | + $this->_retvalue = SMARTY_INTERNAL_COMPILE_BLOCK::compileParentBlock($this->compiler); |
|
| 1869 | + } |
|
| 1870 | + } |
|
| 1871 | + |
|
| 1872 | + #line 546 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1873 | + public function yy_r55() |
|
| 1874 | + { |
|
| 1875 | + $tag = |
|
| 1876 | + trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length), |
|
| 1877 | + ' /'); |
|
| 1878 | + if ($tag == 'strip') { |
|
| 1879 | + $this->strip = false; |
|
| 1880 | + $this->_retvalue = null; |
|
| 1881 | + } else { |
|
| 1882 | + $this->_retvalue = $this->compiler->compileTag($tag . 'close', array()); |
|
| 1883 | + } |
|
| 1884 | + } |
|
| 1885 | + |
|
| 1886 | + #line 555 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1887 | + public function yy_r56() |
|
| 1888 | + { |
|
| 1889 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + 0 ]->minor . 'close', array()); |
|
| 1890 | + } |
|
| 1891 | + |
|
| 1892 | + #line 559 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1893 | + public function yy_r57() |
|
| 1894 | + { |
|
| 1895 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 1 ]->minor . 'close', array(), |
|
| 1896 | + array('modifier_list' => $this->yystack[ $this->yyidx + |
|
| 1897 | + 0 ]->minor)); |
|
| 1898 | + } |
|
| 1899 | + |
|
| 1900 | + #line 564 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1901 | + public function yy_r58() |
|
| 1902 | + { |
|
| 1903 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 2 ]->minor . 'close', array(), |
|
| 1904 | + array('object_method' => $this->yystack[ $this->yyidx + |
|
| 1905 | + 0 ]->minor)); |
|
| 1906 | + } |
|
| 1907 | + |
|
| 1908 | + #line 568 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1909 | + public function yy_r59() |
|
| 1910 | + { |
|
| 1911 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 3 ]->minor . 'close', array(), |
|
| 1912 | + array('object_method' => $this->yystack[ $this->yyidx + |
|
| 1913 | + - 1 ]->minor, |
|
| 1914 | + 'modifier_list' => $this->yystack[ $this->yyidx + |
|
| 1915 | + 0 ]->minor)); |
|
| 1916 | + } |
|
| 1917 | + |
|
| 1918 | + #line 576 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1919 | + public function yy_r60() |
|
| 1920 | + { |
|
| 1921 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor; |
|
| 1922 | + $this->_retvalue[] = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1923 | + } |
|
| 1924 | + |
|
| 1925 | + #line 582 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1926 | + public function yy_r61() |
|
| 1927 | + { |
|
| 1928 | + $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1929 | + } |
|
| 1930 | + |
|
| 1931 | + #line 587 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1932 | + public function yy_r62() |
|
| 1933 | + { |
|
| 1934 | + $this->_retvalue = array(); |
|
| 1935 | + } |
|
| 1936 | + |
|
| 1937 | + #line 592 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1938 | + public function yy_r63() |
|
| 1939 | + { |
|
| 1940 | + if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) { |
|
| 1941 | + if ($this->security) { |
|
| 1942 | + $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler); |
|
| 1943 | + } |
|
| 1944 | + $this->_retvalue = |
|
| 1945 | + array($this->yystack[ $this->yyidx + - 2 ]->minor => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1946 | + } else { |
|
| 1947 | + $this->_retvalue = |
|
| 1948 | + array($this->yystack[ $this->yyidx + - 2 ]->minor => '\'' . $this->yystack[ $this->yyidx + 0 ]->minor . |
|
| 1949 | + '\''); |
|
| 1950 | + } |
|
| 1951 | + } |
|
| 1952 | + |
|
| 1953 | + #line 603 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1954 | + public function yy_r64() |
|
| 1955 | + { |
|
| 1956 | + $this->_retvalue = |
|
| 1957 | + array(trim($this->yystack[ $this->yyidx + - 1 ]->minor, " =\n\r\t") => $this->yystack[ $this->yyidx + |
|
| 1958 | + 0 ]->minor); |
|
| 1959 | + } |
|
| 1960 | + |
|
| 1961 | + #line 611 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1962 | + public function yy_r66() |
|
| 1963 | + { |
|
| 1964 | + $this->_retvalue = '\'' . $this->yystack[ $this->yyidx + 0 ]->minor . '\''; |
|
| 1965 | + } |
|
| 1966 | + |
|
| 1967 | + #line 623 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1968 | + public function yy_r69() |
|
| 1969 | + { |
|
| 1970 | + $this->_retvalue = |
|
| 1971 | + array($this->yystack[ $this->yyidx + - 2 ]->minor => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1972 | + } |
|
| 1973 | + |
|
| 1974 | + #line 636 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1975 | + public function yy_r71() |
|
| 1976 | + { |
|
| 1977 | + $this->yystack[ $this->yyidx + - 2 ]->minor[] = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1978 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 2 ]->minor; |
|
| 1979 | + } |
|
| 1980 | + |
|
| 1981 | + #line 641 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1982 | + public function yy_r72() |
|
| 1983 | + { |
|
| 1984 | + $this->_retvalue = array('var' => '\'' . substr($this->yystack[ $this->yyidx + - 2 ]->minor, 1) . '\'', |
|
| 1985 | + 'value' => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1986 | + } |
|
| 1987 | + |
|
| 1988 | + #line 648 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1989 | + public function yy_r74() |
|
| 1990 | + { |
|
| 1991 | + $this->_retvalue = array('var' => $this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 1992 | + 'value' => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1993 | + } |
|
| 1994 | + |
|
| 1995 | + #line 672 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 1996 | + public function yy_r78() |
|
| 1997 | + { |
|
| 1998 | + $this->_retvalue = |
|
| 1999 | + '$_smarty_tpl->getStreamVariable(\'' . substr($this->yystack[ $this->yyidx + - 2 ]->minor, 1) . '://' . |
|
| 2000 | + $this->yystack[ $this->yyidx + 0 ]->minor . '\')'; |
|
| 2001 | + } |
|
| 2002 | + |
|
| 2003 | + #line 677 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2004 | + public function yy_r79() |
|
| 2005 | + { |
|
| 2006 | + $this->_retvalue = |
|
| 2007 | + $this->yystack[ $this->yyidx + - 2 ]->minor . trim($this->yystack[ $this->yyidx + - 1 ]->minor) . |
|
| 2008 | + $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2009 | + } |
|
| 2010 | + |
|
| 2011 | + #line 691 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2012 | + public function yy_r82() |
|
| 2013 | + { |
|
| 2014 | + $this->_retvalue = $this->compiler->compileTag('private_modifier', array(), |
|
| 2015 | + array('value' => $this->yystack[ $this->yyidx + - 1 ]->minor, |
|
| 2016 | + 'modifierlist' => $this->yystack[ $this->yyidx + |
|
| 2017 | + 0 ]->minor)); |
|
| 2018 | + } |
|
| 2019 | + |
|
| 2020 | + #line 697 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2021 | + public function yy_r83() |
|
| 2022 | + { |
|
| 2023 | + $this->_retvalue = |
|
| 2024 | + $this->yystack[ $this->yyidx + - 1 ]->minor[ 'pre' ] . $this->yystack[ $this->yyidx + - 2 ]->minor . |
|
| 2025 | + $this->yystack[ $this->yyidx + - 1 ]->minor[ 'op' ] . $this->yystack[ $this->yyidx + 0 ]->minor . ')'; |
|
| 2026 | + } |
|
| 2027 | + |
|
| 2028 | + #line 701 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2029 | + public function yy_r84() |
|
| 2030 | + { |
|
| 2031 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + - 1 ]->minor . |
|
| 2032 | + $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2033 | + } |
|
| 2034 | + |
|
| 2035 | + #line 705 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2036 | + public function yy_r85() |
|
| 2037 | + { |
|
| 2038 | + $this->_retvalue = |
|
| 2039 | + $this->yystack[ $this->yyidx + 0 ]->minor . $this->yystack[ $this->yyidx + - 1 ]->minor . ')'; |
|
| 2040 | + } |
|
| 2041 | + |
|
| 2042 | + #line 709 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2043 | + public function yy_r86() |
|
| 2044 | + { |
|
| 2045 | + $this->_retvalue = 'in_array(' . $this->yystack[ $this->yyidx + - 2 ]->minor . ',' . |
|
| 2046 | + $this->yystack[ $this->yyidx + 0 ]->minor . ')'; |
|
| 2047 | + } |
|
| 2048 | + |
|
| 2049 | + #line 713 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2050 | + public function yy_r87() |
|
| 2051 | + { |
|
| 2052 | + $this->_retvalue = 'in_array(' . $this->yystack[ $this->yyidx + - 2 ]->minor . ',(array)' . |
|
| 2053 | + $this->yystack[ $this->yyidx + 0 ]->minor . ')'; |
|
| 2054 | + } |
|
| 2055 | + |
|
| 2056 | + #line 721 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2057 | + public function yy_r88() |
|
| 2058 | + { |
|
| 2059 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 5 ]->minor . ' ? ' . $this->compiler->compileVariable('\'' . |
|
| 2060 | + substr($this->yystack[ $this->yyidx + |
|
| 2061 | + - 2 ]->minor, |
|
| 2062 | + 1) . |
|
| 2063 | + '\'') . |
|
| 2064 | + ' : ' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2065 | + } |
|
| 2066 | + |
|
| 2067 | + #line 725 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2068 | + public function yy_r89() |
|
| 2069 | + { |
|
| 2070 | + $this->_retvalue = |
|
| 2071 | + $this->yystack[ $this->yyidx + - 5 ]->minor . ' ? ' . $this->yystack[ $this->yyidx + - 2 ]->minor . ' : ' . |
|
| 2072 | + $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2073 | + } |
|
| 2074 | + |
|
| 2075 | + #line 740 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2076 | + public function yy_r92() |
|
| 2077 | + { |
|
| 2078 | + $this->_retvalue = '!' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2079 | + } |
|
| 2080 | + |
|
| 2081 | + #line 761 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2082 | + public function yy_r97() |
|
| 2083 | + { |
|
| 2084 | + $this->_retvalue = |
|
| 2085 | + $this->yystack[ $this->yyidx + - 2 ]->minor . '.' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2086 | + } |
|
| 2087 | + |
|
| 2088 | + #line 765 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2089 | + public function yy_r98() |
|
| 2090 | + { |
|
| 2091 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . '.'; |
|
| 2092 | + } |
|
| 2093 | + |
|
| 2094 | + #line 769 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2095 | + public function yy_r99() |
|
| 2096 | + { |
|
| 2097 | + $this->_retvalue = '.' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2098 | + } |
|
| 2099 | + |
|
| 2100 | + #line 774 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2101 | + public function yy_r100() |
|
| 2102 | + { |
|
| 2103 | + if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) { |
|
| 2104 | + if ($this->security) { |
|
| 2105 | + $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler); |
|
| 2106 | + } |
|
| 2107 | + $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2108 | + } else { |
|
| 2109 | + $this->_retvalue = '\'' . $this->yystack[ $this->yyidx + 0 ]->minor . '\''; |
|
| 2110 | + } |
|
| 2111 | + } |
|
| 2112 | + |
|
| 2113 | + #line 791 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2114 | + public function yy_r102() |
|
| 2115 | + { |
|
| 2116 | + $this->_retvalue = "(" . $this->yystack[ $this->yyidx + - 1 ]->minor . ")"; |
|
| 2117 | + } |
|
| 2118 | + |
|
| 2119 | + #line 795 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2120 | + public function yy_r103() |
|
| 2121 | + { |
|
| 2122 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + - 1 ]->minor . |
|
| 2123 | + $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2124 | + } |
|
| 2125 | + |
|
| 2126 | + #line 813 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2127 | + public function yy_r107() |
|
| 2128 | + { |
|
| 2129 | + $prefixVar = $this->compiler->getNewPrefixVariable(); |
|
| 2130 | + if ($this->yystack[ $this->yyidx + - 2 ]->minor[ 'var' ] == '\'smarty\'') { |
|
| 2131 | + $this->compiler->appendPrefixCode("<?php $prefixVar" . ' = ' . |
|
| 2132 | + $this->compiler->compileTag('private_special_variable', array(), |
|
| 2133 | + $this->yystack[ $this->yyidx + |
|
| 2134 | + - 2 ]->minor[ 'smarty_internal_index' ]) . |
|
| 2135 | + ';?>'); |
|
| 2136 | + } else { |
|
| 2137 | + $this->compiler->appendPrefixCode("<?php $prefixVar" . ' = ' . |
|
| 2138 | + $this->compiler->compileVariable($this->yystack[ $this->yyidx + |
|
| 2139 | + - 2 ]->minor[ 'var' ]) . |
|
| 2140 | + $this->yystack[ $this->yyidx + - 2 ]->minor[ 'smarty_internal_index' ] . |
|
| 2141 | + ';?>'); |
|
| 2142 | + } |
|
| 2143 | + $this->_retvalue = $prefixVar . '::' . $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] . |
|
| 2144 | + $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ]; |
|
| 2145 | + } |
|
| 2146 | + |
|
| 2147 | + #line 824 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2148 | + public function yy_r108() |
|
| 2149 | + { |
|
| 2150 | + $prefixVar = $this->compiler->getNewPrefixVariable(); |
|
| 2151 | + $tmp = $this->compiler->appendCode('<?php ob_start();?>', $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2152 | + $this->compiler->appendPrefixCode($this->compiler->appendCode($tmp, "<?php $prefixVar" . '=ob_get_clean();?>')); |
|
| 2153 | + $this->_retvalue = $prefixVar; |
|
| 2154 | + } |
|
| 2155 | + |
|
| 2156 | + #line 841 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2157 | + public function yy_r111() |
|
| 2158 | + { |
|
| 2159 | + if (!in_array(strtolower($this->yystack[ $this->yyidx + - 2 ]->minor), array('self', 'parent')) && |
|
| 2160 | + (!$this->security || |
|
| 2161 | + $this->security->isTrustedStaticClassAccess($this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 2162 | + $this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler)) |
|
| 2163 | + ) { |
|
| 2164 | + if (isset($this->smarty->registered_classes[ $this->yystack[ $this->yyidx + - 2 ]->minor ])) { |
|
| 2165 | + $this->_retvalue = |
|
| 2166 | + $this->smarty->registered_classes[ $this->yystack[ $this->yyidx + - 2 ]->minor ] . '::' . |
|
| 2167 | + $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] . $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ]; |
|
| 2168 | + } else { |
|
| 2169 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 2 ]->minor . '::' . |
|
| 2170 | + $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] . |
|
| 2171 | + $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ]; |
|
| 2172 | + } |
|
| 2173 | + } else { |
|
| 2174 | + $this->compiler->trigger_template_error("static class '" . $this->yystack[ $this->yyidx + - 2 ]->minor . |
|
| 2175 | + "' is undefined or not allowed by security setting"); |
|
| 2176 | + } |
|
| 2177 | + } |
|
| 2178 | + |
|
| 2179 | + #line 860 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2180 | + public function yy_r113() |
|
| 2181 | + { |
|
| 2182 | + $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2183 | + } |
|
| 2184 | + |
|
| 2185 | + #line 871 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2186 | + public function yy_r114() |
|
| 2187 | + { |
|
| 2188 | + $this->_retvalue = |
|
| 2189 | + $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\''); |
|
| 2190 | + } |
|
| 2191 | + |
|
| 2192 | + #line 874 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2193 | + public function yy_r115() |
|
| 2194 | + { |
|
| 2195 | + if ($this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ] == '\'smarty\'') { |
|
| 2196 | + $smarty_var = $this->compiler->compileTag('private_special_variable', array(), |
|
| 2197 | + $this->yystack[ $this->yyidx + |
|
| 2198 | + 0 ]->minor[ 'smarty_internal_index' ]); |
|
| 2199 | + $this->_retvalue = $smarty_var; |
|
| 2200 | + } else { |
|
| 2201 | + // used for array reset,next,prev,end,current |
|
| 2202 | + $this->last_variable = $this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ]; |
|
| 2203 | + $this->last_index = $this->yystack[ $this->yyidx + 0 ]->minor[ 'smarty_internal_index' ]; |
|
| 2204 | + $this->_retvalue = $this->compiler->compileVariable($this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ]) . |
|
| 2205 | + $this->yystack[ $this->yyidx + 0 ]->minor[ 'smarty_internal_index' ]; |
|
| 2206 | + } |
|
| 2207 | + } |
|
| 2208 | + |
|
| 2209 | + #line 887 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2210 | + public function yy_r116() |
|
| 2211 | + { |
|
| 2212 | + $this->_retvalue = '$_smarty_tpl->tpl_vars[' . $this->yystack[ $this->yyidx + - 2 ]->minor . ']->' . |
|
| 2213 | + $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2214 | + } |
|
| 2215 | + |
|
| 2216 | + #line 897 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2217 | + public function yy_r118() |
|
| 2218 | + { |
|
| 2219 | + $this->_retvalue = |
|
| 2220 | + $this->compiler->compileConfigVariable("'" . $this->yystack[ $this->yyidx + - 1 ]->minor . "'"); |
|
| 2221 | + } |
|
| 2222 | + |
|
| 2223 | + #line 901 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2224 | + public function yy_r119() |
|
| 2225 | + { |
|
| 2226 | + $this->_retvalue = '(is_array($tmp = ' . |
|
| 2227 | + $this->compiler->compileConfigVariable("'" . $this->yystack[ $this->yyidx + - 2 ]->minor . |
|
| 2228 | + "'") . ') ? $tmp' . |
|
| 2229 | + $this->yystack[ $this->yyidx + 0 ]->minor . ' :null)'; |
|
| 2230 | + } |
|
| 2231 | + |
|
| 2232 | + #line 905 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2233 | + public function yy_r120() |
|
| 2234 | + { |
|
| 2235 | + $this->_retvalue = $this->compiler->compileConfigVariable($this->yystack[ $this->yyidx + - 1 ]->minor); |
|
| 2236 | + } |
|
| 2237 | + |
|
| 2238 | + #line 909 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2239 | + public function yy_r121() |
|
| 2240 | + { |
|
| 2241 | + $this->_retvalue = |
|
| 2242 | + '(is_array($tmp = ' . $this->compiler->compileConfigVariable($this->yystack[ $this->yyidx + - 2 ]->minor) . |
|
| 2243 | + ') ? $tmp' . $this->yystack[ $this->yyidx + 0 ]->minor . ' : null)'; |
|
| 2244 | + } |
|
| 2245 | + |
|
| 2246 | + #line 913 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2247 | + public function yy_r122() |
|
| 2248 | + { |
|
| 2249 | + $this->_retvalue = array('var' => '\'' . substr($this->yystack[ $this->yyidx + - 1 ]->minor, 1) . '\'', |
|
| 2250 | + 'smarty_internal_index' => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2251 | + } |
|
| 2252 | + |
|
| 2253 | + #line 916 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2254 | + public function yy_r123() |
|
| 2255 | + { |
|
| 2256 | + $this->_retvalue = array('var' => $this->yystack[ $this->yyidx + - 1 ]->minor, |
|
| 2257 | + 'smarty_internal_index' => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2258 | + } |
|
| 2259 | + |
|
| 2260 | + #line 929 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2261 | + public function yy_r125() |
|
| 2262 | + { |
|
| 2263 | + return; |
|
| 2264 | + } |
|
| 2265 | + |
|
| 2266 | + #line 935 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2267 | + public function yy_r126() |
|
| 2268 | + { |
|
| 2269 | + $this->_retvalue = |
|
| 2270 | + '[' . $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\'') . |
|
| 2271 | + ']'; |
|
| 2272 | + } |
|
| 2273 | + |
|
| 2274 | + #line 938 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2275 | + public function yy_r127() |
|
| 2276 | + { |
|
| 2277 | + $this->_retvalue = '[' . $this->compiler->compileVariable($this->yystack[ $this->yyidx + 0 ]->minor) . ']'; |
|
| 2278 | + } |
|
| 2279 | + |
|
| 2280 | + #line 942 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2281 | + public function yy_r128() |
|
| 2282 | + { |
|
| 2283 | + $this->_retvalue = '[' . $this->compiler->compileVariable($this->yystack[ $this->yyidx + - 2 ]->minor) . '->' . |
|
| 2284 | + $this->yystack[ $this->yyidx + 0 ]->minor . ']'; |
|
| 2285 | + } |
|
| 2286 | + |
|
| 2287 | + #line 946 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2288 | + public function yy_r129() |
|
| 2289 | + { |
|
| 2290 | + $this->_retvalue = "['" . $this->yystack[ $this->yyidx + 0 ]->minor . "']"; |
|
| 2291 | + } |
|
| 2292 | + |
|
| 2293 | + #line 950 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2294 | + public function yy_r130() |
|
| 2295 | + { |
|
| 2296 | + $this->_retvalue = '[' . $this->yystack[ $this->yyidx + 0 ]->minor . ']'; |
|
| 2297 | + } |
|
| 2298 | + |
|
| 2299 | + #line 955 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2300 | + public function yy_r131() |
|
| 2301 | + { |
|
| 2302 | + $this->_retvalue = '[' . $this->yystack[ $this->yyidx + - 1 ]->minor . ']'; |
|
| 2303 | + } |
|
| 2304 | + |
|
| 2305 | + #line 960 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2306 | + public function yy_r132() |
|
| 2307 | + { |
|
| 2308 | + $this->_retvalue = '[' . $this->compiler->compileTag('private_special_variable', array(), '[\'section\'][\'' . |
|
| 2309 | + $this->yystack[ $this->yyidx + |
|
| 2310 | + - 1 ]->minor . |
|
| 2311 | + '\'][\'index\']') . |
|
| 2312 | + ']'; |
|
| 2313 | + } |
|
| 2314 | + |
|
| 2315 | + #line 964 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2316 | + public function yy_r133() |
|
| 2317 | + { |
|
| 2318 | + $this->_retvalue = '[' . $this->compiler->compileTag('private_special_variable', array(), '[\'section\'][\'' . |
|
| 2319 | + $this->yystack[ $this->yyidx + |
|
| 2320 | + - 3 ]->minor . |
|
| 2321 | + '\'][\'' . |
|
| 2322 | + $this->yystack[ $this->yyidx + |
|
| 2323 | + - 1 ]->minor . |
|
| 2324 | + '\']') . ']'; |
|
| 2325 | + } |
|
| 2326 | + |
|
| 2327 | + #line 967 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2328 | + public function yy_r134() |
|
| 2329 | + { |
|
| 2330 | + $this->_retvalue = '[' . $this->yystack[ $this->yyidx + - 1 ]->minor . ']'; |
|
| 2331 | + } |
|
| 2332 | + |
|
| 2333 | + #line 973 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2334 | + public function yy_r136() |
|
| 2335 | + { |
|
| 2336 | + $this->_retvalue = '[' . $this->compiler->compileVariable('\'' . |
|
| 2337 | + substr($this->yystack[ $this->yyidx + - 1 ]->minor, |
|
| 2338 | + 1) . '\'') . ']';; |
|
| 2339 | + } |
|
| 2340 | + |
|
| 2341 | + #line 989 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2342 | + public function yy_r140() |
|
| 2343 | + { |
|
| 2344 | + $this->_retvalue = '[]'; |
|
| 2345 | + } |
|
| 2346 | + |
|
| 2347 | + #line 999 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2348 | + public function yy_r141() |
|
| 2349 | + { |
|
| 2350 | + $this->_retvalue = '\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\''; |
|
| 2351 | + } |
|
| 2352 | + |
|
| 2353 | + #line 1003 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2354 | + public function yy_r142() |
|
| 2355 | + { |
|
| 2356 | + $this->_retvalue = "''"; |
|
| 2357 | + } |
|
| 2358 | + |
|
| 2359 | + #line 1008 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2360 | + public function yy_r143() |
|
| 2361 | + { |
|
| 2362 | + $this->_retvalue = |
|
| 2363 | + $this->yystack[ $this->yyidx + - 1 ]->minor . '.' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2364 | + } |
|
| 2365 | + |
|
| 2366 | + #line 1016 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2367 | + public function yy_r145() |
|
| 2368 | + { |
|
| 2369 | + $var = |
|
| 2370 | + trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length), |
|
| 2371 | + ' $'); |
|
| 2372 | + $this->_retvalue = $this->compiler->compileVariable('\'' . $var . '\''); |
|
| 2373 | + } |
|
| 2374 | + |
|
| 2375 | + #line 1022 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2376 | + public function yy_r146() |
|
| 2377 | + { |
|
| 2378 | + $this->_retvalue = '(' . $this->yystack[ $this->yyidx + - 1 ]->minor . ')'; |
|
| 2379 | + } |
|
| 2380 | + |
|
| 2381 | + #line 1029 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2382 | + public function yy_r147() |
|
| 2383 | + { |
|
| 2384 | + if ($this->yystack[ $this->yyidx + - 1 ]->minor[ 'var' ] == '\'smarty\'') { |
|
| 2385 | + $this->_retvalue = $this->compiler->compileTag('private_special_variable', array(), |
|
| 2386 | + $this->yystack[ $this->yyidx + |
|
| 2387 | + - 1 ]->minor[ 'smarty_internal_index' ]) . |
|
| 2388 | + $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2389 | + } else { |
|
| 2390 | + $this->_retvalue = $this->compiler->compileVariable($this->yystack[ $this->yyidx + - 1 ]->minor[ 'var' ]) . |
|
| 2391 | + $this->yystack[ $this->yyidx + - 1 ]->minor[ 'smarty_internal_index' ] . |
|
| 2392 | + $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2393 | + } |
|
| 2394 | + } |
|
| 2395 | + |
|
| 2396 | + #line 1038 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2397 | + public function yy_r148() |
|
| 2398 | + { |
|
| 2399 | + $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2400 | + } |
|
| 2401 | + |
|
| 2402 | + #line 1043 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2403 | + public function yy_r149() |
|
| 2404 | + { |
|
| 2405 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2406 | + } |
|
| 2407 | + |
|
| 2408 | + #line 1048 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2409 | + public function yy_r150() |
|
| 2410 | + { |
|
| 2411 | + if ($this->security && substr($this->yystack[ $this->yyidx + - 1 ]->minor, 0, 1) == '_') { |
|
| 2412 | + $this->compiler->trigger_template_error(self::Err1); |
|
| 2413 | + } |
|
| 2414 | + $this->_retvalue = |
|
| 2415 | + '->' . $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2416 | + } |
|
| 2417 | + |
|
| 2418 | + #line 1055 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2419 | + public function yy_r151() |
|
| 2420 | + { |
|
| 2421 | + if ($this->security) { |
|
| 2422 | + $this->compiler->trigger_template_error(self::Err2); |
|
| 2423 | + } |
|
| 2424 | + $this->_retvalue = '->{' . $this->compiler->compileVariable($this->yystack[ $this->yyidx + - 1 ]->minor) . |
|
| 2425 | + $this->yystack[ $this->yyidx + 0 ]->minor . '}'; |
|
| 2426 | + } |
|
| 2427 | + |
|
| 2428 | + #line 1062 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2429 | + public function yy_r152() |
|
| 2430 | + { |
|
| 2431 | + if ($this->security) { |
|
| 2432 | + $this->compiler->trigger_template_error(self::Err2); |
|
| 2433 | + } |
|
| 2434 | + $this->_retvalue = |
|
| 2435 | + '->{' . $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor . '}'; |
|
| 2436 | + } |
|
| 2437 | + |
|
| 2438 | + #line 1069 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2439 | + public function yy_r153() |
|
| 2440 | + { |
|
| 2441 | + if ($this->security) { |
|
| 2442 | + $this->compiler->trigger_template_error(self::Err2); |
|
| 2443 | + } |
|
| 2444 | + $this->_retvalue = '->{\'' . $this->yystack[ $this->yyidx + - 4 ]->minor . '\'.' . |
|
| 2445 | + $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor . |
|
| 2446 | + '}'; |
|
| 2447 | + } |
|
| 2448 | + |
|
| 2449 | + #line 1077 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2450 | + public function yy_r154() |
|
| 2451 | + { |
|
| 2452 | + $this->_retvalue = '->' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2453 | + } |
|
| 2454 | + |
|
| 2455 | + #line 1085 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2456 | + public function yy_r155() |
|
| 2457 | + { |
|
| 2458 | + if (!$this->security || |
|
| 2459 | + $this->security->isTrustedPhpFunction($this->yystack[ $this->yyidx + - 3 ]->minor, $this->compiler) |
|
| 2460 | + ) { |
|
| 2461 | + if (strcasecmp($this->yystack[ $this->yyidx + - 3 ]->minor, 'isset') === 0 || |
|
| 2462 | + strcasecmp($this->yystack[ $this->yyidx + - 3 ]->minor, 'empty') === 0 || |
|
| 2463 | + strcasecmp($this->yystack[ $this->yyidx + - 3 ]->minor, 'array') === 0 || |
|
| 2464 | + is_callable($this->yystack[ $this->yyidx + - 3 ]->minor) |
|
| 2465 | + ) { |
|
| 2466 | + $func_name = strtolower($this->yystack[ $this->yyidx + - 3 ]->minor); |
|
| 2467 | + if ($func_name == 'isset') { |
|
| 2468 | + if (count($this->yystack[ $this->yyidx + - 1 ]->minor) == 0) { |
|
| 2469 | + $this->compiler->trigger_template_error('Illegal number of paramer in "isset()"'); |
|
| 2470 | + } |
|
| 2471 | + $par = implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor); |
|
| 2472 | + if (strncasecmp($par, '$_smarty_tpl->smarty->ext->_config->_getConfigVariable', |
|
| 2473 | + strlen('$_smarty_tpl->smarty->ext->_config->_getConfigVariable')) === 0 |
|
| 2474 | + ) { |
|
| 2475 | + $prefixVar = $this->compiler->getNewPrefixVariable(); |
|
| 2476 | + $this->compiler->appendPrefixCode("<?php $prefixVar" . '=' . |
|
| 2477 | + str_replace(')', ', false)', $par) . ';?>'); |
|
| 2478 | + $isset_par = $prefixVar; |
|
| 2479 | + } else { |
|
| 2480 | + $isset_par = str_replace("')->value", "',null,true,false)->value", $par); |
|
| 2481 | + } |
|
| 2482 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 3 ]->minor . "(" . $isset_par . ")"; |
|
| 2483 | + } elseif (in_array($func_name, array('empty', 'reset', 'current', 'end', 'prev', 'next'))) { |
|
| 2484 | + if (count($this->yystack[ $this->yyidx + - 1 ]->minor) != 1) { |
|
| 2485 | + $this->compiler->trigger_template_error('Illegal number of paramer in "empty()"'); |
|
| 2486 | + } |
|
| 2487 | + if ($func_name == 'empty') { |
|
| 2488 | + $this->_retvalue = $func_name . '(' . str_replace("')->value", "',null,true,false)->value", |
|
| 2489 | + $this->yystack[ $this->yyidx + |
|
| 2490 | + - 1 ]->minor[ 0 ]) . ')'; |
|
| 2491 | + } else { |
|
| 2492 | + $this->_retvalue = $func_name . '(' . $this->yystack[ $this->yyidx + - 1 ]->minor[ 0 ] . ')'; |
|
| 2493 | + } |
|
| 2494 | + } else { |
|
| 2495 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 3 ]->minor . "(" . |
|
| 2496 | + implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor) . ")"; |
|
| 2497 | + } |
|
| 2498 | + } else { |
|
| 2499 | + $this->compiler->trigger_template_error("unknown function \"" . |
|
| 2500 | + $this->yystack[ $this->yyidx + - 3 ]->minor . "\""); |
|
| 2501 | + } |
|
| 2502 | + } |
|
| 2503 | + } |
|
| 2504 | + |
|
| 2505 | + #line 1124 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2506 | + public function yy_r156() |
|
| 2507 | + { |
|
| 2508 | + if ($this->security && substr($this->yystack[ $this->yyidx + - 3 ]->minor, 0, 1) == '_') { |
|
| 2509 | + $this->compiler->trigger_template_error(self::Err1); |
|
| 2510 | + } |
|
| 2511 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 3 ]->minor . "(" . |
|
| 2512 | + implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor) . ")"; |
|
| 2513 | + } |
|
| 2514 | + |
|
| 2515 | + #line 1131 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2516 | + public function yy_r157() |
|
| 2517 | + { |
|
| 2518 | + if ($this->security) { |
|
| 2519 | + $this->compiler->trigger_template_error(self::Err2); |
|
| 2520 | + } |
|
| 2521 | + $prefixVar = $this->compiler->getNewPrefixVariable(); |
|
| 2522 | + $this->compiler->appendPrefixCode("<?php $prefixVar" . '=' . $this->compiler->compileVariable('\'' . |
|
| 2523 | + substr($this->yystack[ $this->yyidx + |
|
| 2524 | + - 3 ]->minor, |
|
| 2525 | + 1) . |
|
| 2526 | + '\'') . ';?>'); |
|
| 2527 | + $this->_retvalue = $prefixVar . '(' . implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor) . ')'; |
|
| 2528 | + } |
|
| 2529 | + |
|
| 2530 | + #line 1142 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2531 | + public function yy_r158() |
|
| 2532 | + { |
|
| 2533 | + $this->_retvalue = |
|
| 2534 | + array_merge($this->yystack[ $this->yyidx + - 2 ]->minor, array($this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 2535 | + } |
|
| 2536 | + |
|
| 2537 | + #line 1159 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2538 | + public function yy_r161() |
|
| 2539 | + { |
|
| 2540 | + $this->_retvalue = array_merge($this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 2541 | + array(array_merge($this->yystack[ $this->yyidx + - 1 ]->minor, |
|
| 2542 | + $this->yystack[ $this->yyidx + 0 ]->minor))); |
|
| 2543 | + } |
|
| 2544 | + |
|
| 2545 | + #line 1163 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2546 | + public function yy_r162() |
|
| 2547 | + { |
|
| 2548 | + $this->_retvalue = |
|
| 2549 | + array(array_merge($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 2550 | + } |
|
| 2551 | + |
|
| 2552 | + #line 1171 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2553 | + public function yy_r164() |
|
| 2554 | + { |
|
| 2555 | + $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2556 | + } |
|
| 2557 | + |
|
| 2558 | + #line 1179 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2559 | + public function yy_r165() |
|
| 2560 | + { |
|
| 2561 | + $this->_retvalue = |
|
| 2562 | + array_merge($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2563 | + } |
|
| 2564 | + |
|
| 2565 | + #line 1198 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2566 | + public function yy_r169() |
|
| 2567 | + { |
|
| 2568 | + $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor, '', 'method'); |
|
| 2569 | + } |
|
| 2570 | + |
|
| 2571 | + #line 1203 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2572 | + public function yy_r170() |
|
| 2573 | + { |
|
| 2574 | + $this->_retvalue = |
|
| 2575 | + array($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor, 'method'); |
|
| 2576 | + } |
|
| 2577 | + |
|
| 2578 | + #line 1208 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2579 | + public function yy_r171() |
|
| 2580 | + { |
|
| 2581 | + $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor, ''); |
|
| 2582 | + } |
|
| 2583 | + |
|
| 2584 | + #line 1213 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2585 | + public function yy_r172() |
|
| 2586 | + { |
|
| 2587 | + $this->_retvalue = |
|
| 2588 | + array($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor, 'property'); |
|
| 2589 | + } |
|
| 2590 | + |
|
| 2591 | + #line 1218 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2592 | + public function yy_r173() |
|
| 2593 | + { |
|
| 2594 | + $this->_retvalue = array($this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 2595 | + $this->yystack[ $this->yyidx + - 1 ]->minor . |
|
| 2596 | + $this->yystack[ $this->yyidx + 0 ]->minor, 'property'); |
|
| 2597 | + } |
|
| 2598 | + |
|
| 2599 | + #line 1224 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2600 | + public function yy_r174() |
|
| 2601 | + { |
|
| 2602 | + $this->_retvalue = ' ' . trim($this->yystack[ $this->yyidx + 0 ]->minor) . ' '; |
|
| 2603 | + } |
|
| 2604 | + |
|
| 2605 | + #line 1228 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2606 | + public function yy_r175() |
|
| 2607 | + { |
|
| 2608 | + static $lops = |
|
| 2609 | + array('eq' => ' == ', 'ne' => ' != ', 'neq' => ' != ', 'gt' => ' > ', 'ge' => ' >= ', 'gte' => ' >= ', |
|
| 2610 | + 'lt' => ' < ', 'le' => ' <= ', 'lte' => ' <= ', 'mod' => ' % ', 'and' => ' && ', 'or' => ' || ', |
|
| 2611 | + 'xor' => ' xor ',); |
|
| 2612 | + $op = strtolower(preg_replace('/\s*/', '', $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 2613 | + $this->_retvalue = $lops[ $op ]; |
|
| 2614 | + } |
|
| 2615 | + |
|
| 2616 | + #line 1247 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2617 | + public function yy_r176() |
|
| 2618 | + { |
|
| 2619 | + static $tlops = |
|
| 2620 | + array('isdivby' => array('op' => ' % ', 'pre' => '!('), 'isnotdivby' => array('op' => ' % ', 'pre' => '('), |
|
| 2621 | + 'isevenby' => array('op' => ' / ', 'pre' => '!(1 & '), |
|
| 2622 | + 'isnotevenby' => array('op' => ' / ', 'pre' => '(1 & '), |
|
| 2623 | + 'isoddby' => array('op' => ' / ', 'pre' => '(1 & '), |
|
| 2624 | + 'isnotoddby' => array('op' => ' / ', 'pre' => '!(1 & '),); |
|
| 2625 | + $op = strtolower(preg_replace('/\s*/', '', $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 2626 | + $this->_retvalue = $tlops[ $op ]; |
|
| 2627 | + } |
|
| 2628 | + |
|
| 2629 | + #line 1260 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2630 | + public function yy_r177() |
|
| 2631 | + { |
|
| 2632 | + static $scond = |
|
| 2633 | + array('iseven' => '!(1 & ', 'isnoteven' => '(1 & ', 'isodd' => '(1 & ', 'isnotodd' => '!(1 & ',); |
|
| 2634 | + $op = strtolower(str_replace(' ', '', $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 2635 | + $this->_retvalue = $scond[ $op ]; |
|
| 2636 | + } |
|
| 2637 | + |
|
| 2638 | + #line 1274 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2639 | + public function yy_r178() |
|
| 2640 | + { |
|
| 2641 | + $this->_retvalue = 'array(' . $this->yystack[ $this->yyidx + - 1 ]->minor . ')'; |
|
| 2642 | + } |
|
| 2643 | + |
|
| 2644 | + #line 1282 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2645 | + public function yy_r180() |
|
| 2646 | + { |
|
| 2647 | + $this->_retvalue = |
|
| 2648 | + $this->yystack[ $this->yyidx + - 2 ]->minor . ',' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2649 | + } |
|
| 2650 | + |
|
| 2651 | + #line 1290 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2652 | + public function yy_r182() |
|
| 2653 | + { |
|
| 2654 | + $this->_retvalue = |
|
| 2655 | + $this->yystack[ $this->yyidx + - 2 ]->minor . '=>' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2656 | + } |
|
| 2657 | + |
|
| 2658 | + #line 1294 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2659 | + public function yy_r183() |
|
| 2660 | + { |
|
| 2661 | + $this->_retvalue = |
|
| 2662 | + '\'' . $this->yystack[ $this->yyidx + - 2 ]->minor . '\'=>' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2663 | + } |
|
| 2664 | + |
|
| 2665 | + #line 1310 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2666 | + public function yy_r186() |
|
| 2667 | + { |
|
| 2668 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor->to_smarty_php($this); |
|
| 2669 | + } |
|
| 2670 | + |
|
| 2671 | + #line 1315 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2672 | + public function yy_r187() |
|
| 2673 | + { |
|
| 2674 | + $this->yystack[ $this->yyidx + - 1 ]->minor->append_subtree($this, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2675 | + $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor; |
|
| 2676 | + } |
|
| 2677 | + |
|
| 2678 | + #line 1320 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2679 | + public function yy_r188() |
|
| 2680 | + { |
|
| 2681 | + $this->_retvalue = new Smarty_Internal_ParseTree_Dq($this, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2682 | + } |
|
| 2683 | + |
|
| 2684 | + #line 1324 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2685 | + public function yy_r189() |
|
| 2686 | + { |
|
| 2687 | + $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)' . $this->yystack[ $this->yyidx + - 1 ]->minor); |
|
| 2688 | + } |
|
| 2689 | + |
|
| 2690 | + #line 1332 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2691 | + public function yy_r191() |
|
| 2692 | + { |
|
| 2693 | + $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)$_smarty_tpl->tpl_vars[\'' . |
|
| 2694 | + substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . |
|
| 2695 | + '\']->value'); |
|
| 2696 | + } |
|
| 2697 | + |
|
| 2698 | + #line 1340 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2699 | + public function yy_r193() |
|
| 2700 | + { |
|
| 2701 | + $this->_retvalue = |
|
| 2702 | + new Smarty_Internal_ParseTree_Code('(string)(' . $this->yystack[ $this->yyidx + - 1 ]->minor . ')'); |
|
| 2703 | + } |
|
| 2704 | + |
|
| 2705 | + #line 1344 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2706 | + public function yy_r194() |
|
| 2707 | + { |
|
| 2708 | + $this->_retvalue = new Smarty_Internal_ParseTree_Tag($this, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2709 | + } |
|
| 2710 | + |
|
| 2711 | + #line 1348 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2712 | + public function yy_r195() |
|
| 2713 | + { |
|
| 2714 | + $this->_retvalue = new Smarty_Internal_ParseTree_DqContent($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2715 | + } |
|
| 2716 | + |
|
| 2717 | + private $_retvalue; |
|
| 2718 | + |
|
| 2719 | + public function yy_reduce($yyruleno) |
|
| 2720 | + { |
|
| 2721 | + if ($this->yyTraceFILE && $yyruleno >= 0 && $yyruleno < count(self::$yyRuleName)) { |
|
| 2722 | + fprintf($this->yyTraceFILE, "%sReduce (%d) [%s].\n", $this->yyTracePrompt, $yyruleno, |
|
| 2723 | + self::$yyRuleName[ $yyruleno ]); |
|
| 2724 | + } |
|
| 2725 | + |
|
| 2726 | + $this->_retvalue = $yy_lefthand_side = null; |
|
| 2727 | + if (isset(self::$yyReduceMap[ $yyruleno ])) { |
|
| 2728 | + // call the action |
|
| 2729 | + $this->_retvalue = null; |
|
| 2730 | + $this->{'yy_r' . self::$yyReduceMap[ $yyruleno ]}(); |
|
| 2731 | + $yy_lefthand_side = $this->_retvalue; |
|
| 2732 | + } |
|
| 2733 | + $yygoto = self::$yyRuleInfo[ $yyruleno ][ 0 ]; |
|
| 2734 | + $yysize = self::$yyRuleInfo[ $yyruleno ][ 1 ]; |
|
| 2735 | + $this->yyidx -= $yysize; |
|
| 2736 | + for ($i = $yysize; $i; $i --) { |
|
| 2737 | + // pop all of the right-hand side parameters |
|
| 2738 | + array_pop($this->yystack); |
|
| 2739 | + } |
|
| 2740 | + $yyact = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, $yygoto); |
|
| 2741 | + if ($yyact < self::YYNSTATE) { |
|
| 2742 | + if (!$this->yyTraceFILE && $yysize) { |
|
| 2743 | + $this->yyidx ++; |
|
| 2744 | + $x = new TP_yyStackEntry; |
|
| 2745 | + $x->stateno = $yyact; |
|
| 2746 | + $x->major = $yygoto; |
|
| 2747 | + $x->minor = $yy_lefthand_side; |
|
| 2748 | + $this->yystack[ $this->yyidx ] = $x; |
|
| 2749 | + } else { |
|
| 2750 | + $this->yy_shift($yyact, $yygoto, $yy_lefthand_side); |
|
| 2751 | + } |
|
| 2752 | + } elseif ($yyact == self::YYNSTATE + self::YYNRULE + 1) { |
|
| 2753 | + $this->yy_accept(); |
|
| 2754 | + } |
|
| 2755 | + } |
|
| 2756 | + |
|
| 2757 | + public function yy_parse_failed() |
|
| 2758 | + { |
|
| 2759 | + if ($this->yyTraceFILE) { |
|
| 2760 | + fprintf($this->yyTraceFILE, "%sFail!\n", $this->yyTracePrompt); |
|
| 2761 | + } |
|
| 2762 | + while ($this->yyidx >= 0) { |
|
| 2763 | + $this->yy_pop_parser_stack(); |
|
| 2764 | + } |
|
| 2765 | + } |
|
| 2766 | + |
|
| 2767 | + public function yy_syntax_error($yymajor, $TOKEN) |
|
| 2768 | + { |
|
| 2769 | + #line 200 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2770 | + |
|
| 2771 | + $this->internalError = true; |
|
| 2772 | + $this->yymajor = $yymajor; |
|
| 2773 | + $this->compiler->trigger_template_error(); |
|
| 2774 | + } |
|
| 2775 | + |
|
| 2776 | + public function yy_accept() |
|
| 2777 | + { |
|
| 2778 | + if ($this->yyTraceFILE) { |
|
| 2779 | + fprintf($this->yyTraceFILE, "%sAccept!\n", $this->yyTracePrompt); |
|
| 2780 | + } |
|
| 2781 | + while ($this->yyidx >= 0) { |
|
| 2782 | + $this->yy_pop_parser_stack(); |
|
| 2783 | + } |
|
| 2784 | + #line 193 "../smarty/lexer/smarty_internal_templateparser.y" |
|
| 2785 | + |
|
| 2786 | + $this->successful = !$this->internalError; |
|
| 2787 | + $this->internalError = false; |
|
| 2788 | + $this->retvalue = $this->_retvalue; |
|
| 2789 | + } |
|
| 2790 | + |
|
| 2791 | + public function doParse($yymajor, $yytokenvalue) |
|
| 2792 | + { |
|
| 2793 | + $yyerrorhit = 0; /* True if yymajor has invoked an error */ |
|
| 2794 | + |
|
| 2795 | + if ($this->yyidx === null || $this->yyidx < 0) { |
|
| 2796 | + $this->yyidx = 0; |
|
| 2797 | + $this->yyerrcnt = - 1; |
|
| 2798 | + $x = new TP_yyStackEntry; |
|
| 2799 | + $x->stateno = 0; |
|
| 2800 | + $x->major = 0; |
|
| 2801 | + $this->yystack = array(); |
|
| 2802 | + $this->yystack[] = $x; |
|
| 2803 | + } |
|
| 2804 | + $yyendofinput = ($yymajor == 0); |
|
| 2805 | + |
|
| 2806 | + if ($this->yyTraceFILE) { |
|
| 2807 | + fprintf($this->yyTraceFILE, "%sInput %s\n", $this->yyTracePrompt, $this->yyTokenName[ $yymajor ]); |
|
| 2808 | + } |
|
| 2809 | + |
|
| 2810 | + do { |
|
| 2811 | + $yyact = $this->yy_find_shift_action($yymajor); |
|
| 2812 | + if ($yymajor < self::YYERRORSYMBOL && !$this->yy_is_expected_token($yymajor)) { |
|
| 2813 | + // force a syntax error |
|
| 2814 | + $yyact = self::YY_ERROR_ACTION; |
|
| 2815 | + } |
|
| 2816 | + if ($yyact < self::YYNSTATE) { |
|
| 2817 | + $this->yy_shift($yyact, $yymajor, $yytokenvalue); |
|
| 2818 | + $this->yyerrcnt --; |
|
| 2819 | + if ($yyendofinput && $this->yyidx >= 0) { |
|
| 2820 | + $yymajor = 0; |
|
| 2821 | + } else { |
|
| 2822 | + $yymajor = self::YYNOCODE; |
|
| 2823 | + } |
|
| 2824 | + } elseif ($yyact < self::YYNSTATE + self::YYNRULE) { |
|
| 2825 | + $this->yy_reduce($yyact - self::YYNSTATE); |
|
| 2826 | + } elseif ($yyact == self::YY_ERROR_ACTION) { |
|
| 2827 | + if ($this->yyTraceFILE) { |
|
| 2828 | + fprintf($this->yyTraceFILE, "%sSyntax Error!\n", $this->yyTracePrompt); |
|
| 2829 | + } |
|
| 2830 | + if (self::YYERRORSYMBOL) { |
|
| 2831 | + if ($this->yyerrcnt < 0) { |
|
| 2832 | + $this->yy_syntax_error($yymajor, $yytokenvalue); |
|
| 2833 | + } |
|
| 2834 | + $yymx = $this->yystack[ $this->yyidx ]->major; |
|
| 2835 | + if ($yymx == self::YYERRORSYMBOL || $yyerrorhit) { |
|
| 2836 | + if ($this->yyTraceFILE) { |
|
| 2837 | + fprintf($this->yyTraceFILE, "%sDiscard input token %s\n", $this->yyTracePrompt, |
|
| 2838 | + $this->yyTokenName[ $yymajor ]); |
|
| 2839 | + } |
|
| 2840 | + $this->yy_destructor($yymajor, $yytokenvalue); |
|
| 2841 | + $yymajor = self::YYNOCODE; |
|
| 2842 | + } else { |
|
| 2843 | + while ($this->yyidx >= 0 && $yymx != self::YYERRORSYMBOL && |
|
| 2844 | + ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE) { |
|
| 2845 | + $this->yy_pop_parser_stack(); |
|
| 2846 | + } |
|
| 2847 | + if ($this->yyidx < 0 || $yymajor == 0) { |
|
| 2848 | + $this->yy_destructor($yymajor, $yytokenvalue); |
|
| 2849 | + $this->yy_parse_failed(); |
|
| 2850 | + $yymajor = self::YYNOCODE; |
|
| 2851 | + } elseif ($yymx != self::YYERRORSYMBOL) { |
|
| 2852 | + $u2 = 0; |
|
| 2853 | + $this->yy_shift($yyact, self::YYERRORSYMBOL, $u2); |
|
| 2854 | + } |
|
| 2855 | + } |
|
| 2856 | + $this->yyerrcnt = 3; |
|
| 2857 | + $yyerrorhit = 1; |
|
| 2858 | + } else { |
|
| 2859 | + if ($this->yyerrcnt <= 0) { |
|
| 2860 | + $this->yy_syntax_error($yymajor, $yytokenvalue); |
|
| 2861 | + } |
|
| 2862 | + $this->yyerrcnt = 3; |
|
| 2863 | + $this->yy_destructor($yymajor, $yytokenvalue); |
|
| 2864 | + if ($yyendofinput) { |
|
| 2865 | + $this->yy_parse_failed(); |
|
| 2866 | + } |
|
| 2867 | + $yymajor = self::YYNOCODE; |
|
| 2868 | + } |
|
| 2869 | + } else { |
|
| 2870 | + $this->yy_accept(); |
|
| 2871 | + $yymajor = self::YYNOCODE; |
|
| 2872 | + } |
|
| 2873 | + } |
|
| 2874 | + while ($yymajor != self::YYNOCODE && $this->yyidx >= 0); |
|
| 2875 | + } |
|
| 2876 | 2876 | } |
| 2877 | 2877 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | * define shorthand directory separator constant |
| 35 | 35 | */ |
| 36 | 36 | if (!defined('DS')) { |
| 37 | - define('DS', DIRECTORY_SEPARATOR); |
|
| 37 | + define('DS', DIRECTORY_SEPARATOR); |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | /** |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | * Sets SMARTY_DIR only if user application has not already defined it. |
| 43 | 43 | */ |
| 44 | 44 | if (!defined('SMARTY_DIR')) { |
| 45 | - define('SMARTY_DIR', dirname(__FILE__) . DS); |
|
| 45 | + define('SMARTY_DIR', dirname(__FILE__) . DS); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /** |
@@ -50,26 +50,26 @@ discard block |
||
| 50 | 50 | * Sets SMARTY_SYSPLUGINS_DIR only if user application has not already defined it. |
| 51 | 51 | */ |
| 52 | 52 | if (!defined('SMARTY_SYSPLUGINS_DIR')) { |
| 53 | - define('SMARTY_SYSPLUGINS_DIR', SMARTY_DIR . 'sysplugins' . DS); |
|
| 53 | + define('SMARTY_SYSPLUGINS_DIR', SMARTY_DIR . 'sysplugins' . DS); |
|
| 54 | 54 | } |
| 55 | 55 | if (!defined('SMARTY_PLUGINS_DIR')) { |
| 56 | - define('SMARTY_PLUGINS_DIR', SMARTY_DIR . 'plugins' . DS); |
|
| 56 | + define('SMARTY_PLUGINS_DIR', SMARTY_DIR . 'plugins' . DS); |
|
| 57 | 57 | } |
| 58 | 58 | if (!defined('SMARTY_MBSTRING')) { |
| 59 | - define('SMARTY_MBSTRING', function_exists('mb_get_info')); |
|
| 59 | + define('SMARTY_MBSTRING', function_exists('mb_get_info')); |
|
| 60 | 60 | } |
| 61 | 61 | if (!defined('SMARTY_RESOURCE_CHAR_SET')) { |
| 62 | - // UTF-8 can only be done properly when mbstring is available! |
|
| 63 | - /** |
|
| 64 | - * @deprecated in favor of Smarty::$_CHARSET |
|
| 65 | - */ |
|
| 66 | - define('SMARTY_RESOURCE_CHAR_SET', SMARTY_MBSTRING ? 'UTF-8' : 'ISO-8859-1'); |
|
| 62 | + // UTF-8 can only be done properly when mbstring is available! |
|
| 63 | + /** |
|
| 64 | + * @deprecated in favor of Smarty::$_CHARSET |
|
| 65 | + */ |
|
| 66 | + define('SMARTY_RESOURCE_CHAR_SET', SMARTY_MBSTRING ? 'UTF-8' : 'ISO-8859-1'); |
|
| 67 | 67 | } |
| 68 | 68 | if (!defined('SMARTY_RESOURCE_DATE_FORMAT')) { |
| 69 | - /** |
|
| 70 | - * @deprecated in favor of Smarty::$_DATE_FORMAT |
|
| 71 | - */ |
|
| 72 | - define('SMARTY_RESOURCE_DATE_FORMAT', '%b %e, %Y'); |
|
| 69 | + /** |
|
| 70 | + * @deprecated in favor of Smarty::$_DATE_FORMAT |
|
| 71 | + */ |
|
| 72 | + define('SMARTY_RESOURCE_DATE_FORMAT', '%b %e, %Y'); |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | /** |
@@ -78,17 +78,17 @@ discard block |
||
| 78 | 78 | * Otherwise we may have a global autoloader like Composer |
| 79 | 79 | */ |
| 80 | 80 | if (!class_exists('Smarty_Autoloader', false)) { |
| 81 | - if (!class_exists('Smarty_Internal_Data', true)) { |
|
| 82 | - require_once dirname(__FILE__) . '/Autoloader.php'; |
|
| 83 | - Smarty_Autoloader::registerBC(); |
|
| 84 | - } |
|
| 81 | + if (!class_exists('Smarty_Internal_Data', true)) { |
|
| 82 | + require_once dirname(__FILE__) . '/Autoloader.php'; |
|
| 83 | + Smarty_Autoloader::registerBC(); |
|
| 84 | + } |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | /** |
| 88 | 88 | * Load always needed external class files |
| 89 | 89 | */ |
| 90 | 90 | if (!class_exists('Smarty_Internal_Data', false)) { |
| 91 | - require_once SMARTY_SYSPLUGINS_DIR . 'smarty_internal_data.php'; |
|
| 91 | + require_once SMARTY_SYSPLUGINS_DIR . 'smarty_internal_data.php'; |
|
| 92 | 92 | } |
| 93 | 93 | require_once SMARTY_SYSPLUGINS_DIR . 'smarty_internal_extension_handler.php'; |
| 94 | 94 | require_once SMARTY_SYSPLUGINS_DIR . 'smarty_internal_templatebase.php'; |
@@ -114,1385 +114,1385 @@ discard block |
||
| 114 | 114 | */ |
| 115 | 115 | class Smarty extends Smarty_Internal_TemplateBase |
| 116 | 116 | { |
| 117 | - /**#@+ |
|
| 117 | + /**#@+ |
|
| 118 | 118 | * constant definitions |
| 119 | 119 | */ |
| 120 | 120 | |
| 121 | - /** |
|
| 122 | - * smarty version |
|
| 123 | - */ |
|
| 124 | - const SMARTY_VERSION = '3.1.30'; |
|
| 121 | + /** |
|
| 122 | + * smarty version |
|
| 123 | + */ |
|
| 124 | + const SMARTY_VERSION = '3.1.30'; |
|
| 125 | 125 | |
| 126 | - /** |
|
| 127 | - * define variable scopes |
|
| 128 | - */ |
|
| 129 | - const SCOPE_LOCAL = 1; |
|
| 126 | + /** |
|
| 127 | + * define variable scopes |
|
| 128 | + */ |
|
| 129 | + const SCOPE_LOCAL = 1; |
|
| 130 | 130 | |
| 131 | - const SCOPE_PARENT = 2; |
|
| 131 | + const SCOPE_PARENT = 2; |
|
| 132 | 132 | |
| 133 | - const SCOPE_TPL_ROOT = 4; |
|
| 133 | + const SCOPE_TPL_ROOT = 4; |
|
| 134 | 134 | |
| 135 | - const SCOPE_ROOT = 8; |
|
| 135 | + const SCOPE_ROOT = 8; |
|
| 136 | 136 | |
| 137 | - const SCOPE_SMARTY = 16; |
|
| 137 | + const SCOPE_SMARTY = 16; |
|
| 138 | 138 | |
| 139 | - const SCOPE_GLOBAL = 32; |
|
| 139 | + const SCOPE_GLOBAL = 32; |
|
| 140 | 140 | |
| 141 | - /** |
|
| 142 | - * define caching modes |
|
| 143 | - */ |
|
| 144 | - const CACHING_OFF = 0; |
|
| 141 | + /** |
|
| 142 | + * define caching modes |
|
| 143 | + */ |
|
| 144 | + const CACHING_OFF = 0; |
|
| 145 | 145 | |
| 146 | - const CACHING_LIFETIME_CURRENT = 1; |
|
| 146 | + const CACHING_LIFETIME_CURRENT = 1; |
|
| 147 | 147 | |
| 148 | - const CACHING_LIFETIME_SAVED = 2; |
|
| 148 | + const CACHING_LIFETIME_SAVED = 2; |
|
| 149 | 149 | |
| 150 | - /** |
|
| 151 | - * define constant for clearing cache files be saved expiration dates |
|
| 152 | - */ |
|
| 153 | - const CLEAR_EXPIRED = - 1; |
|
| 150 | + /** |
|
| 151 | + * define constant for clearing cache files be saved expiration dates |
|
| 152 | + */ |
|
| 153 | + const CLEAR_EXPIRED = - 1; |
|
| 154 | 154 | |
| 155 | - /** |
|
| 156 | - * define compile check modes |
|
| 157 | - */ |
|
| 158 | - const COMPILECHECK_OFF = 0; |
|
| 155 | + /** |
|
| 156 | + * define compile check modes |
|
| 157 | + */ |
|
| 158 | + const COMPILECHECK_OFF = 0; |
|
| 159 | 159 | |
| 160 | - const COMPILECHECK_ON = 1; |
|
| 160 | + const COMPILECHECK_ON = 1; |
|
| 161 | 161 | |
| 162 | - const COMPILECHECK_CACHEMISS = 2; |
|
| 162 | + const COMPILECHECK_CACHEMISS = 2; |
|
| 163 | 163 | |
| 164 | - /** |
|
| 165 | - * define debug modes |
|
| 166 | - */ |
|
| 167 | - const DEBUG_OFF = 0; |
|
| 164 | + /** |
|
| 165 | + * define debug modes |
|
| 166 | + */ |
|
| 167 | + const DEBUG_OFF = 0; |
|
| 168 | 168 | |
| 169 | - const DEBUG_ON = 1; |
|
| 169 | + const DEBUG_ON = 1; |
|
| 170 | 170 | |
| 171 | - const DEBUG_INDIVIDUAL = 2; |
|
| 171 | + const DEBUG_INDIVIDUAL = 2; |
|
| 172 | 172 | |
| 173 | - /** |
|
| 174 | - * modes for handling of "<?php ... ?>" tags in templates. |
|
| 175 | - */ |
|
| 176 | - const PHP_PASSTHRU = 0; //-> print tags as plain text |
|
| 173 | + /** |
|
| 174 | + * modes for handling of "<?php ... ?>" tags in templates. |
|
| 175 | + */ |
|
| 176 | + const PHP_PASSTHRU = 0; //-> print tags as plain text |
|
| 177 | 177 | |
| 178 | - const PHP_QUOTE = 1; //-> escape tags as entities |
|
| 178 | + const PHP_QUOTE = 1; //-> escape tags as entities |
|
| 179 | 179 | |
| 180 | - const PHP_REMOVE = 2; //-> escape tags as entities |
|
| 180 | + const PHP_REMOVE = 2; //-> escape tags as entities |
|
| 181 | 181 | |
| 182 | - const PHP_ALLOW = 3; //-> escape tags as entities |
|
| 182 | + const PHP_ALLOW = 3; //-> escape tags as entities |
|
| 183 | 183 | |
| 184 | - /** |
|
| 185 | - * filter types |
|
| 186 | - */ |
|
| 187 | - const FILTER_POST = 'post'; |
|
| 184 | + /** |
|
| 185 | + * filter types |
|
| 186 | + */ |
|
| 187 | + const FILTER_POST = 'post'; |
|
| 188 | 188 | |
| 189 | - const FILTER_PRE = 'pre'; |
|
| 189 | + const FILTER_PRE = 'pre'; |
|
| 190 | 190 | |
| 191 | - const FILTER_OUTPUT = 'output'; |
|
| 191 | + const FILTER_OUTPUT = 'output'; |
|
| 192 | 192 | |
| 193 | - const FILTER_VARIABLE = 'variable'; |
|
| 193 | + const FILTER_VARIABLE = 'variable'; |
|
| 194 | 194 | |
| 195 | - /** |
|
| 196 | - * plugin types |
|
| 197 | - */ |
|
| 198 | - const PLUGIN_FUNCTION = 'function'; |
|
| 195 | + /** |
|
| 196 | + * plugin types |
|
| 197 | + */ |
|
| 198 | + const PLUGIN_FUNCTION = 'function'; |
|
| 199 | 199 | |
| 200 | - const PLUGIN_BLOCK = 'block'; |
|
| 200 | + const PLUGIN_BLOCK = 'block'; |
|
| 201 | 201 | |
| 202 | - const PLUGIN_COMPILER = 'compiler'; |
|
| 202 | + const PLUGIN_COMPILER = 'compiler'; |
|
| 203 | 203 | |
| 204 | - const PLUGIN_MODIFIER = 'modifier'; |
|
| 204 | + const PLUGIN_MODIFIER = 'modifier'; |
|
| 205 | 205 | |
| 206 | - const PLUGIN_MODIFIERCOMPILER = 'modifiercompiler'; |
|
| 206 | + const PLUGIN_MODIFIERCOMPILER = 'modifiercompiler'; |
|
| 207 | 207 | |
| 208 | - /** |
|
| 209 | - * Resource caching modes |
|
| 210 | - * (not used since 3.1.30) |
|
| 211 | - */ |
|
| 212 | - const RESOURCE_CACHE_OFF = 0; |
|
| 208 | + /** |
|
| 209 | + * Resource caching modes |
|
| 210 | + * (not used since 3.1.30) |
|
| 211 | + */ |
|
| 212 | + const RESOURCE_CACHE_OFF = 0; |
|
| 213 | 213 | |
| 214 | - const RESOURCE_CACHE_AUTOMATIC = 1; // cache template objects by rules |
|
| 214 | + const RESOURCE_CACHE_AUTOMATIC = 1; // cache template objects by rules |
|
| 215 | 215 | |
| 216 | - const RESOURCE_CACHE_TEMPLATE = 2; // cache all template objects |
|
| 216 | + const RESOURCE_CACHE_TEMPLATE = 2; // cache all template objects |
|
| 217 | 217 | |
| 218 | - const RESOURCE_CACHE_ON = 4; // cache source and compiled resources |
|
| 218 | + const RESOURCE_CACHE_ON = 4; // cache source and compiled resources |
|
| 219 | 219 | |
| 220 | - /**#@-*/ |
|
| 220 | + /**#@-*/ |
|
| 221 | 221 | |
| 222 | - /** |
|
| 223 | - * assigned global tpl vars |
|
| 224 | - */ |
|
| 225 | - public static $global_tpl_vars = array(); |
|
| 222 | + /** |
|
| 223 | + * assigned global tpl vars |
|
| 224 | + */ |
|
| 225 | + public static $global_tpl_vars = array(); |
|
| 226 | 226 | |
| 227 | - /** |
|
| 228 | - * error handler returned by set_error_handler() in Smarty::muteExpectedErrors() |
|
| 229 | - */ |
|
| 230 | - public static $_previous_error_handler = null; |
|
| 227 | + /** |
|
| 228 | + * error handler returned by set_error_handler() in Smarty::muteExpectedErrors() |
|
| 229 | + */ |
|
| 230 | + public static $_previous_error_handler = null; |
|
| 231 | 231 | |
| 232 | - /** |
|
| 233 | - * contains directories outside of SMARTY_DIR that are to be muted by muteExpectedErrors() |
|
| 234 | - */ |
|
| 235 | - public static $_muted_directories = array(); |
|
| 232 | + /** |
|
| 233 | + * contains directories outside of SMARTY_DIR that are to be muted by muteExpectedErrors() |
|
| 234 | + */ |
|
| 235 | + public static $_muted_directories = array(); |
|
| 236 | 236 | |
| 237 | - /** |
|
| 238 | - * Flag denoting if Multibyte String functions are available |
|
| 239 | - */ |
|
| 240 | - public static $_MBSTRING = SMARTY_MBSTRING; |
|
| 237 | + /** |
|
| 238 | + * Flag denoting if Multibyte String functions are available |
|
| 239 | + */ |
|
| 240 | + public static $_MBSTRING = SMARTY_MBSTRING; |
|
| 241 | 241 | |
| 242 | - /** |
|
| 243 | - * The character set to adhere to (e.g. "UTF-8") |
|
| 244 | - */ |
|
| 245 | - public static $_CHARSET = SMARTY_RESOURCE_CHAR_SET; |
|
| 242 | + /** |
|
| 243 | + * The character set to adhere to (e.g. "UTF-8") |
|
| 244 | + */ |
|
| 245 | + public static $_CHARSET = SMARTY_RESOURCE_CHAR_SET; |
|
| 246 | 246 | |
| 247 | - /** |
|
| 248 | - * The date format to be used internally |
|
| 249 | - * (accepts date() and strftime()) |
|
| 250 | - */ |
|
| 251 | - public static $_DATE_FORMAT = SMARTY_RESOURCE_DATE_FORMAT; |
|
| 247 | + /** |
|
| 248 | + * The date format to be used internally |
|
| 249 | + * (accepts date() and strftime()) |
|
| 250 | + */ |
|
| 251 | + public static $_DATE_FORMAT = SMARTY_RESOURCE_DATE_FORMAT; |
|
| 252 | 252 | |
| 253 | - /** |
|
| 254 | - * Flag denoting if PCRE should run in UTF-8 mode |
|
| 255 | - */ |
|
| 256 | - public static $_UTF8_MODIFIER = 'u'; |
|
| 253 | + /** |
|
| 254 | + * Flag denoting if PCRE should run in UTF-8 mode |
|
| 255 | + */ |
|
| 256 | + public static $_UTF8_MODIFIER = 'u'; |
|
| 257 | 257 | |
| 258 | - /** |
|
| 259 | - * Flag denoting if operating system is windows |
|
| 260 | - */ |
|
| 261 | - public static $_IS_WINDOWS = false; |
|
| 258 | + /** |
|
| 259 | + * Flag denoting if operating system is windows |
|
| 260 | + */ |
|
| 261 | + public static $_IS_WINDOWS = false; |
|
| 262 | 262 | |
| 263 | - /**#@+ |
|
| 263 | + /**#@+ |
|
| 264 | 264 | * variables |
| 265 | 265 | */ |
| 266 | 266 | |
| 267 | - /** |
|
| 268 | - * auto literal on delimiters with whitespace |
|
| 269 | - * |
|
| 270 | - * @var boolean |
|
| 271 | - */ |
|
| 272 | - public $auto_literal = true; |
|
| 273 | - |
|
| 274 | - /** |
|
| 275 | - * display error on not assigned variables |
|
| 276 | - * |
|
| 277 | - * @var boolean |
|
| 278 | - */ |
|
| 279 | - public $error_unassigned = false; |
|
| 280 | - |
|
| 281 | - /** |
|
| 282 | - * look up relative file path in include_path |
|
| 283 | - * |
|
| 284 | - * @var boolean |
|
| 285 | - */ |
|
| 286 | - public $use_include_path = false; |
|
| 287 | - |
|
| 288 | - /** |
|
| 289 | - * template directory |
|
| 290 | - * |
|
| 291 | - * @var array |
|
| 292 | - */ |
|
| 293 | - protected $template_dir = array('./templates/'); |
|
| 294 | - |
|
| 295 | - /** |
|
| 296 | - * flags for normalized template directory entries |
|
| 297 | - * |
|
| 298 | - * @var array |
|
| 299 | - */ |
|
| 300 | - protected $_processedTemplateDir = array(); |
|
| 301 | - |
|
| 302 | - /** |
|
| 303 | - * flag if template_dir is normalized |
|
| 304 | - * |
|
| 305 | - * @var bool |
|
| 306 | - */ |
|
| 307 | - public $_templateDirNormalized = false; |
|
| 308 | - |
|
| 309 | - /** |
|
| 310 | - * joined template directory string used in cache keys |
|
| 311 | - * |
|
| 312 | - * @var string |
|
| 313 | - */ |
|
| 314 | - public $_joined_template_dir = null; |
|
| 315 | - |
|
| 316 | - /** |
|
| 317 | - * config directory |
|
| 318 | - * |
|
| 319 | - * @var array |
|
| 320 | - */ |
|
| 321 | - protected $config_dir = array('./configs/'); |
|
| 322 | - |
|
| 323 | - /** |
|
| 324 | - * flags for normalized template directory entries |
|
| 325 | - * |
|
| 326 | - * @var array |
|
| 327 | - */ |
|
| 328 | - protected $_processedConfigDir = array(); |
|
| 329 | - |
|
| 330 | - /** |
|
| 331 | - * flag if config_dir is normalized |
|
| 332 | - * |
|
| 333 | - * @var bool |
|
| 334 | - */ |
|
| 335 | - public $_configDirNormalized = false; |
|
| 336 | - |
|
| 337 | - /** |
|
| 338 | - * joined config directory string used in cache keys |
|
| 339 | - * |
|
| 340 | - * @var string |
|
| 341 | - */ |
|
| 342 | - public $_joined_config_dir = null; |
|
| 343 | - |
|
| 344 | - /** |
|
| 345 | - * default template handler |
|
| 346 | - * |
|
| 347 | - * @var callable |
|
| 348 | - */ |
|
| 349 | - public $default_template_handler_func = null; |
|
| 350 | - |
|
| 351 | - /** |
|
| 352 | - * default config handler |
|
| 353 | - * |
|
| 354 | - * @var callable |
|
| 355 | - */ |
|
| 356 | - public $default_config_handler_func = null; |
|
| 357 | - |
|
| 358 | - /** |
|
| 359 | - * default plugin handler |
|
| 360 | - * |
|
| 361 | - * @var callable |
|
| 362 | - */ |
|
| 363 | - public $default_plugin_handler_func = null; |
|
| 364 | - |
|
| 365 | - /** |
|
| 366 | - * compile directory |
|
| 367 | - * |
|
| 368 | - * @var string |
|
| 369 | - */ |
|
| 370 | - protected $compile_dir = './templates_c/'; |
|
| 371 | - |
|
| 372 | - /** |
|
| 373 | - * flag if template_dir is normalized |
|
| 374 | - * |
|
| 375 | - * @var bool |
|
| 376 | - */ |
|
| 377 | - public $_compileDirNormalized = false; |
|
| 378 | - |
|
| 379 | - /** |
|
| 380 | - * plugins directory |
|
| 381 | - * |
|
| 382 | - * @var array |
|
| 383 | - */ |
|
| 384 | - protected $plugins_dir = array(); |
|
| 385 | - |
|
| 386 | - /** |
|
| 387 | - * flag if plugins_dir is normalized |
|
| 388 | - * |
|
| 389 | - * @var bool |
|
| 390 | - */ |
|
| 391 | - public $_pluginsDirNormalized = false; |
|
| 392 | - |
|
| 393 | - /** |
|
| 394 | - * cache directory |
|
| 395 | - * |
|
| 396 | - * @var string |
|
| 397 | - */ |
|
| 398 | - protected $cache_dir = './cache/'; |
|
| 399 | - |
|
| 400 | - /** |
|
| 401 | - * flag if template_dir is normalized |
|
| 402 | - * |
|
| 403 | - * @var bool |
|
| 404 | - */ |
|
| 405 | - public $_cacheDirNormalized = false; |
|
| 406 | - |
|
| 407 | - /** |
|
| 408 | - * force template compiling? |
|
| 409 | - * |
|
| 410 | - * @var boolean |
|
| 411 | - */ |
|
| 412 | - public $force_compile = false; |
|
| 413 | - |
|
| 414 | - /** |
|
| 415 | - * check template for modifications? |
|
| 416 | - * |
|
| 417 | - * @var boolean |
|
| 418 | - */ |
|
| 419 | - public $compile_check = true; |
|
| 420 | - |
|
| 421 | - /** |
|
| 422 | - * use sub dirs for compiled/cached files? |
|
| 423 | - * |
|
| 424 | - * @var boolean |
|
| 425 | - */ |
|
| 426 | - public $use_sub_dirs = false; |
|
| 427 | - |
|
| 428 | - /** |
|
| 429 | - * allow ambiguous resources (that are made unique by the resource handler) |
|
| 430 | - * |
|
| 431 | - * @var boolean |
|
| 432 | - */ |
|
| 433 | - public $allow_ambiguous_resources = false; |
|
| 434 | - |
|
| 435 | - /** |
|
| 436 | - * merge compiled includes |
|
| 437 | - * |
|
| 438 | - * @var boolean |
|
| 439 | - */ |
|
| 440 | - public $merge_compiled_includes = false; |
|
| 441 | - |
|
| 442 | - /** |
|
| 443 | - * force cache file creation |
|
| 444 | - * |
|
| 445 | - * @var boolean |
|
| 446 | - */ |
|
| 447 | - public $force_cache = false; |
|
| 448 | - |
|
| 449 | - /** |
|
| 450 | - * template left-delimiter |
|
| 451 | - * |
|
| 452 | - * @var string |
|
| 453 | - */ |
|
| 454 | - public $left_delimiter = "{"; |
|
| 455 | - |
|
| 456 | - /** |
|
| 457 | - * template right-delimiter |
|
| 458 | - * |
|
| 459 | - * @var string |
|
| 460 | - */ |
|
| 461 | - public $right_delimiter = "}"; |
|
| 462 | - |
|
| 463 | - /**#@+ |
|
| 267 | + /** |
|
| 268 | + * auto literal on delimiters with whitespace |
|
| 269 | + * |
|
| 270 | + * @var boolean |
|
| 271 | + */ |
|
| 272 | + public $auto_literal = true; |
|
| 273 | + |
|
| 274 | + /** |
|
| 275 | + * display error on not assigned variables |
|
| 276 | + * |
|
| 277 | + * @var boolean |
|
| 278 | + */ |
|
| 279 | + public $error_unassigned = false; |
|
| 280 | + |
|
| 281 | + /** |
|
| 282 | + * look up relative file path in include_path |
|
| 283 | + * |
|
| 284 | + * @var boolean |
|
| 285 | + */ |
|
| 286 | + public $use_include_path = false; |
|
| 287 | + |
|
| 288 | + /** |
|
| 289 | + * template directory |
|
| 290 | + * |
|
| 291 | + * @var array |
|
| 292 | + */ |
|
| 293 | + protected $template_dir = array('./templates/'); |
|
| 294 | + |
|
| 295 | + /** |
|
| 296 | + * flags for normalized template directory entries |
|
| 297 | + * |
|
| 298 | + * @var array |
|
| 299 | + */ |
|
| 300 | + protected $_processedTemplateDir = array(); |
|
| 301 | + |
|
| 302 | + /** |
|
| 303 | + * flag if template_dir is normalized |
|
| 304 | + * |
|
| 305 | + * @var bool |
|
| 306 | + */ |
|
| 307 | + public $_templateDirNormalized = false; |
|
| 308 | + |
|
| 309 | + /** |
|
| 310 | + * joined template directory string used in cache keys |
|
| 311 | + * |
|
| 312 | + * @var string |
|
| 313 | + */ |
|
| 314 | + public $_joined_template_dir = null; |
|
| 315 | + |
|
| 316 | + /** |
|
| 317 | + * config directory |
|
| 318 | + * |
|
| 319 | + * @var array |
|
| 320 | + */ |
|
| 321 | + protected $config_dir = array('./configs/'); |
|
| 322 | + |
|
| 323 | + /** |
|
| 324 | + * flags for normalized template directory entries |
|
| 325 | + * |
|
| 326 | + * @var array |
|
| 327 | + */ |
|
| 328 | + protected $_processedConfigDir = array(); |
|
| 329 | + |
|
| 330 | + /** |
|
| 331 | + * flag if config_dir is normalized |
|
| 332 | + * |
|
| 333 | + * @var bool |
|
| 334 | + */ |
|
| 335 | + public $_configDirNormalized = false; |
|
| 336 | + |
|
| 337 | + /** |
|
| 338 | + * joined config directory string used in cache keys |
|
| 339 | + * |
|
| 340 | + * @var string |
|
| 341 | + */ |
|
| 342 | + public $_joined_config_dir = null; |
|
| 343 | + |
|
| 344 | + /** |
|
| 345 | + * default template handler |
|
| 346 | + * |
|
| 347 | + * @var callable |
|
| 348 | + */ |
|
| 349 | + public $default_template_handler_func = null; |
|
| 350 | + |
|
| 351 | + /** |
|
| 352 | + * default config handler |
|
| 353 | + * |
|
| 354 | + * @var callable |
|
| 355 | + */ |
|
| 356 | + public $default_config_handler_func = null; |
|
| 357 | + |
|
| 358 | + /** |
|
| 359 | + * default plugin handler |
|
| 360 | + * |
|
| 361 | + * @var callable |
|
| 362 | + */ |
|
| 363 | + public $default_plugin_handler_func = null; |
|
| 364 | + |
|
| 365 | + /** |
|
| 366 | + * compile directory |
|
| 367 | + * |
|
| 368 | + * @var string |
|
| 369 | + */ |
|
| 370 | + protected $compile_dir = './templates_c/'; |
|
| 371 | + |
|
| 372 | + /** |
|
| 373 | + * flag if template_dir is normalized |
|
| 374 | + * |
|
| 375 | + * @var bool |
|
| 376 | + */ |
|
| 377 | + public $_compileDirNormalized = false; |
|
| 378 | + |
|
| 379 | + /** |
|
| 380 | + * plugins directory |
|
| 381 | + * |
|
| 382 | + * @var array |
|
| 383 | + */ |
|
| 384 | + protected $plugins_dir = array(); |
|
| 385 | + |
|
| 386 | + /** |
|
| 387 | + * flag if plugins_dir is normalized |
|
| 388 | + * |
|
| 389 | + * @var bool |
|
| 390 | + */ |
|
| 391 | + public $_pluginsDirNormalized = false; |
|
| 392 | + |
|
| 393 | + /** |
|
| 394 | + * cache directory |
|
| 395 | + * |
|
| 396 | + * @var string |
|
| 397 | + */ |
|
| 398 | + protected $cache_dir = './cache/'; |
|
| 399 | + |
|
| 400 | + /** |
|
| 401 | + * flag if template_dir is normalized |
|
| 402 | + * |
|
| 403 | + * @var bool |
|
| 404 | + */ |
|
| 405 | + public $_cacheDirNormalized = false; |
|
| 406 | + |
|
| 407 | + /** |
|
| 408 | + * force template compiling? |
|
| 409 | + * |
|
| 410 | + * @var boolean |
|
| 411 | + */ |
|
| 412 | + public $force_compile = false; |
|
| 413 | + |
|
| 414 | + /** |
|
| 415 | + * check template for modifications? |
|
| 416 | + * |
|
| 417 | + * @var boolean |
|
| 418 | + */ |
|
| 419 | + public $compile_check = true; |
|
| 420 | + |
|
| 421 | + /** |
|
| 422 | + * use sub dirs for compiled/cached files? |
|
| 423 | + * |
|
| 424 | + * @var boolean |
|
| 425 | + */ |
|
| 426 | + public $use_sub_dirs = false; |
|
| 427 | + |
|
| 428 | + /** |
|
| 429 | + * allow ambiguous resources (that are made unique by the resource handler) |
|
| 430 | + * |
|
| 431 | + * @var boolean |
|
| 432 | + */ |
|
| 433 | + public $allow_ambiguous_resources = false; |
|
| 434 | + |
|
| 435 | + /** |
|
| 436 | + * merge compiled includes |
|
| 437 | + * |
|
| 438 | + * @var boolean |
|
| 439 | + */ |
|
| 440 | + public $merge_compiled_includes = false; |
|
| 441 | + |
|
| 442 | + /** |
|
| 443 | + * force cache file creation |
|
| 444 | + * |
|
| 445 | + * @var boolean |
|
| 446 | + */ |
|
| 447 | + public $force_cache = false; |
|
| 448 | + |
|
| 449 | + /** |
|
| 450 | + * template left-delimiter |
|
| 451 | + * |
|
| 452 | + * @var string |
|
| 453 | + */ |
|
| 454 | + public $left_delimiter = "{"; |
|
| 455 | + |
|
| 456 | + /** |
|
| 457 | + * template right-delimiter |
|
| 458 | + * |
|
| 459 | + * @var string |
|
| 460 | + */ |
|
| 461 | + public $right_delimiter = "}"; |
|
| 462 | + |
|
| 463 | + /**#@+ |
|
| 464 | 464 | * security |
| 465 | 465 | */ |
| 466 | - /** |
|
| 467 | - * class name |
|
| 468 | - * This should be instance of Smarty_Security. |
|
| 469 | - * |
|
| 470 | - * @var string |
|
| 471 | - * @see Smarty_Security |
|
| 472 | - */ |
|
| 473 | - public $security_class = 'Smarty_Security'; |
|
| 474 | - |
|
| 475 | - /** |
|
| 476 | - * implementation of security class |
|
| 477 | - * |
|
| 478 | - * @var Smarty_Security |
|
| 479 | - */ |
|
| 480 | - public $security_policy = null; |
|
| 481 | - |
|
| 482 | - /** |
|
| 483 | - * controls handling of PHP-blocks |
|
| 484 | - * |
|
| 485 | - * @var integer |
|
| 486 | - */ |
|
| 487 | - public $php_handling = self::PHP_PASSTHRU; |
|
| 488 | - |
|
| 489 | - /** |
|
| 490 | - * controls if the php template file resource is allowed |
|
| 491 | - * |
|
| 492 | - * @var bool |
|
| 493 | - */ |
|
| 494 | - public $allow_php_templates = false; |
|
| 495 | - |
|
| 496 | - /**#@-*/ |
|
| 497 | - /** |
|
| 498 | - * debug mode |
|
| 499 | - * Setting this to true enables the debug-console. |
|
| 500 | - * |
|
| 501 | - * @var boolean |
|
| 502 | - */ |
|
| 503 | - public $debugging = false; |
|
| 504 | - |
|
| 505 | - /** |
|
| 506 | - * This determines if debugging is enable-able from the browser. |
|
| 507 | - * <ul> |
|
| 508 | - * <li>NONE => no debugging control allowed</li> |
|
| 509 | - * <li>URL => enable debugging when SMARTY_DEBUG is found in the URL.</li> |
|
| 510 | - * </ul> |
|
| 511 | - * |
|
| 512 | - * @var string |
|
| 513 | - */ |
|
| 514 | - public $debugging_ctrl = 'NONE'; |
|
| 515 | - |
|
| 516 | - /** |
|
| 517 | - * Name of debugging URL-param. |
|
| 518 | - * Only used when $debugging_ctrl is set to 'URL'. |
|
| 519 | - * The name of the URL-parameter that activates debugging. |
|
| 520 | - * |
|
| 521 | - * @var string |
|
| 522 | - */ |
|
| 523 | - public $smarty_debug_id = 'SMARTY_DEBUG'; |
|
| 524 | - |
|
| 525 | - /** |
|
| 526 | - * Path of debug template. |
|
| 527 | - * |
|
| 528 | - * @var string |
|
| 529 | - */ |
|
| 530 | - public $debug_tpl = null; |
|
| 531 | - |
|
| 532 | - /** |
|
| 533 | - * When set, smarty uses this value as error_reporting-level. |
|
| 534 | - * |
|
| 535 | - * @var int |
|
| 536 | - */ |
|
| 537 | - public $error_reporting = null; |
|
| 538 | - |
|
| 539 | - /**#@+ |
|
| 466 | + /** |
|
| 467 | + * class name |
|
| 468 | + * This should be instance of Smarty_Security. |
|
| 469 | + * |
|
| 470 | + * @var string |
|
| 471 | + * @see Smarty_Security |
|
| 472 | + */ |
|
| 473 | + public $security_class = 'Smarty_Security'; |
|
| 474 | + |
|
| 475 | + /** |
|
| 476 | + * implementation of security class |
|
| 477 | + * |
|
| 478 | + * @var Smarty_Security |
|
| 479 | + */ |
|
| 480 | + public $security_policy = null; |
|
| 481 | + |
|
| 482 | + /** |
|
| 483 | + * controls handling of PHP-blocks |
|
| 484 | + * |
|
| 485 | + * @var integer |
|
| 486 | + */ |
|
| 487 | + public $php_handling = self::PHP_PASSTHRU; |
|
| 488 | + |
|
| 489 | + /** |
|
| 490 | + * controls if the php template file resource is allowed |
|
| 491 | + * |
|
| 492 | + * @var bool |
|
| 493 | + */ |
|
| 494 | + public $allow_php_templates = false; |
|
| 495 | + |
|
| 496 | + /**#@-*/ |
|
| 497 | + /** |
|
| 498 | + * debug mode |
|
| 499 | + * Setting this to true enables the debug-console. |
|
| 500 | + * |
|
| 501 | + * @var boolean |
|
| 502 | + */ |
|
| 503 | + public $debugging = false; |
|
| 504 | + |
|
| 505 | + /** |
|
| 506 | + * This determines if debugging is enable-able from the browser. |
|
| 507 | + * <ul> |
|
| 508 | + * <li>NONE => no debugging control allowed</li> |
|
| 509 | + * <li>URL => enable debugging when SMARTY_DEBUG is found in the URL.</li> |
|
| 510 | + * </ul> |
|
| 511 | + * |
|
| 512 | + * @var string |
|
| 513 | + */ |
|
| 514 | + public $debugging_ctrl = 'NONE'; |
|
| 515 | + |
|
| 516 | + /** |
|
| 517 | + * Name of debugging URL-param. |
|
| 518 | + * Only used when $debugging_ctrl is set to 'URL'. |
|
| 519 | + * The name of the URL-parameter that activates debugging. |
|
| 520 | + * |
|
| 521 | + * @var string |
|
| 522 | + */ |
|
| 523 | + public $smarty_debug_id = 'SMARTY_DEBUG'; |
|
| 524 | + |
|
| 525 | + /** |
|
| 526 | + * Path of debug template. |
|
| 527 | + * |
|
| 528 | + * @var string |
|
| 529 | + */ |
|
| 530 | + public $debug_tpl = null; |
|
| 531 | + |
|
| 532 | + /** |
|
| 533 | + * When set, smarty uses this value as error_reporting-level. |
|
| 534 | + * |
|
| 535 | + * @var int |
|
| 536 | + */ |
|
| 537 | + public $error_reporting = null; |
|
| 538 | + |
|
| 539 | + /**#@+ |
|
| 540 | 540 | * config var settings |
| 541 | 541 | */ |
| 542 | 542 | |
| 543 | - /** |
|
| 544 | - * Controls whether variables with the same name overwrite each other. |
|
| 545 | - * |
|
| 546 | - * @var boolean |
|
| 547 | - */ |
|
| 548 | - public $config_overwrite = true; |
|
| 543 | + /** |
|
| 544 | + * Controls whether variables with the same name overwrite each other. |
|
| 545 | + * |
|
| 546 | + * @var boolean |
|
| 547 | + */ |
|
| 548 | + public $config_overwrite = true; |
|
| 549 | 549 | |
| 550 | - /** |
|
| 551 | - * Controls whether config values of on/true/yes and off/false/no get converted to boolean. |
|
| 552 | - * |
|
| 553 | - * @var boolean |
|
| 554 | - */ |
|
| 555 | - public $config_booleanize = true; |
|
| 550 | + /** |
|
| 551 | + * Controls whether config values of on/true/yes and off/false/no get converted to boolean. |
|
| 552 | + * |
|
| 553 | + * @var boolean |
|
| 554 | + */ |
|
| 555 | + public $config_booleanize = true; |
|
| 556 | 556 | |
| 557 | - /** |
|
| 558 | - * Controls whether hidden config sections/vars are read from the file. |
|
| 559 | - * |
|
| 560 | - * @var boolean |
|
| 561 | - */ |
|
| 562 | - public $config_read_hidden = false; |
|
| 557 | + /** |
|
| 558 | + * Controls whether hidden config sections/vars are read from the file. |
|
| 559 | + * |
|
| 560 | + * @var boolean |
|
| 561 | + */ |
|
| 562 | + public $config_read_hidden = false; |
|
| 563 | 563 | |
| 564 | - /**#@-*/ |
|
| 564 | + /**#@-*/ |
|
| 565 | 565 | |
| 566 | - /**#@+ |
|
| 566 | + /**#@+ |
|
| 567 | 567 | * resource locking |
| 568 | 568 | */ |
| 569 | 569 | |
| 570 | - /** |
|
| 571 | - * locking concurrent compiles |
|
| 572 | - * |
|
| 573 | - * @var boolean |
|
| 574 | - */ |
|
| 575 | - public $compile_locking = true; |
|
| 576 | - |
|
| 577 | - /** |
|
| 578 | - * Controls whether cache resources should use locking mechanism |
|
| 579 | - * |
|
| 580 | - * @var boolean |
|
| 581 | - */ |
|
| 582 | - public $cache_locking = false; |
|
| 583 | - |
|
| 584 | - /** |
|
| 585 | - * seconds to wait for acquiring a lock before ignoring the write lock |
|
| 586 | - * |
|
| 587 | - * @var float |
|
| 588 | - */ |
|
| 589 | - public $locking_timeout = 10; |
|
| 590 | - |
|
| 591 | - /**#@-*/ |
|
| 592 | - |
|
| 593 | - /** |
|
| 594 | - * resource type used if none given |
|
| 595 | - * Must be an valid key of $registered_resources. |
|
| 596 | - * |
|
| 597 | - * @var string |
|
| 598 | - */ |
|
| 599 | - public $default_resource_type = 'file'; |
|
| 600 | - |
|
| 601 | - /** |
|
| 602 | - * caching type |
|
| 603 | - * Must be an element of $cache_resource_types. |
|
| 604 | - * |
|
| 605 | - * @var string |
|
| 606 | - */ |
|
| 607 | - public $caching_type = 'file'; |
|
| 608 | - |
|
| 609 | - /** |
|
| 610 | - * config type |
|
| 611 | - * |
|
| 612 | - * @var string |
|
| 613 | - */ |
|
| 614 | - public $default_config_type = 'file'; |
|
| 615 | - |
|
| 616 | - /** |
|
| 617 | - * check If-Modified-Since headers |
|
| 618 | - * |
|
| 619 | - * @var boolean |
|
| 620 | - */ |
|
| 621 | - public $cache_modified_check = false; |
|
| 622 | - |
|
| 623 | - /** |
|
| 624 | - * registered plugins |
|
| 625 | - * |
|
| 626 | - * @var array |
|
| 627 | - */ |
|
| 628 | - public $registered_plugins = array(); |
|
| 629 | - |
|
| 630 | - /** |
|
| 631 | - * registered objects |
|
| 632 | - * |
|
| 633 | - * @var array |
|
| 634 | - */ |
|
| 635 | - public $registered_objects = array(); |
|
| 636 | - |
|
| 637 | - /** |
|
| 638 | - * registered classes |
|
| 639 | - * |
|
| 640 | - * @var array |
|
| 641 | - */ |
|
| 642 | - public $registered_classes = array(); |
|
| 643 | - |
|
| 644 | - /** |
|
| 645 | - * registered filters |
|
| 646 | - * |
|
| 647 | - * @var array |
|
| 648 | - */ |
|
| 649 | - public $registered_filters = array(); |
|
| 650 | - |
|
| 651 | - /** |
|
| 652 | - * registered resources |
|
| 653 | - * |
|
| 654 | - * @var array |
|
| 655 | - */ |
|
| 656 | - public $registered_resources = array(); |
|
| 657 | - |
|
| 658 | - /** |
|
| 659 | - * registered cache resources |
|
| 660 | - * |
|
| 661 | - * @var array |
|
| 662 | - */ |
|
| 663 | - public $registered_cache_resources = array(); |
|
| 664 | - |
|
| 665 | - /** |
|
| 666 | - * autoload filter |
|
| 667 | - * |
|
| 668 | - * @var array |
|
| 669 | - */ |
|
| 670 | - public $autoload_filters = array(); |
|
| 671 | - |
|
| 672 | - /** |
|
| 673 | - * default modifier |
|
| 674 | - * |
|
| 675 | - * @var array |
|
| 676 | - */ |
|
| 677 | - public $default_modifiers = array(); |
|
| 678 | - |
|
| 679 | - /** |
|
| 680 | - * autoescape variable output |
|
| 681 | - * |
|
| 682 | - * @var boolean |
|
| 683 | - */ |
|
| 684 | - public $escape_html = false; |
|
| 685 | - |
|
| 686 | - /** |
|
| 687 | - * start time for execution time calculation |
|
| 688 | - * |
|
| 689 | - * @var int |
|
| 690 | - */ |
|
| 691 | - public $start_time = 0; |
|
| 692 | - |
|
| 693 | - /** |
|
| 694 | - * required by the compiler for BC |
|
| 695 | - * |
|
| 696 | - * @var string |
|
| 697 | - */ |
|
| 698 | - public $_current_file = null; |
|
| 699 | - |
|
| 700 | - /** |
|
| 701 | - * internal flag to enable parser debugging |
|
| 702 | - * |
|
| 703 | - * @var bool |
|
| 704 | - */ |
|
| 705 | - public $_parserdebug = false; |
|
| 706 | - |
|
| 707 | - /** |
|
| 708 | - * This object type (Smarty = 1, template = 2, data = 4) |
|
| 709 | - * |
|
| 710 | - * @var int |
|
| 711 | - */ |
|
| 712 | - public $_objType = 1; |
|
| 713 | - |
|
| 714 | - /** |
|
| 715 | - * Debug object |
|
| 716 | - * |
|
| 717 | - * @var Smarty_Internal_Debug |
|
| 718 | - */ |
|
| 719 | - public $_debug = null; |
|
| 720 | - |
|
| 721 | - /** |
|
| 722 | - * removed properties |
|
| 723 | - * |
|
| 724 | - * @var string[] |
|
| 725 | - */ |
|
| 726 | - private $obsoleteProperties = array('resource_caching', 'template_resource_caching', 'direct_access_security', |
|
| 727 | - '_dir_perms', '_file_perms', 'plugin_search_order', |
|
| 728 | - 'inheritance_merge_compiled_includes', 'resource_cache_mode',); |
|
| 729 | - |
|
| 730 | - /** |
|
| 731 | - * List of private properties which will call getter/setter on a direct access |
|
| 732 | - * |
|
| 733 | - * @var string[] |
|
| 734 | - */ |
|
| 735 | - private $accessMap = array('template_dir' => 'TemplateDir', 'config_dir' => 'ConfigDir', |
|
| 736 | - 'plugins_dir' => 'PluginsDir', 'compile_dir' => 'CompileDir', |
|
| 737 | - 'cache_dir' => 'CacheDir',); |
|
| 738 | - |
|
| 739 | - /**#@-*/ |
|
| 740 | - |
|
| 741 | - /** |
|
| 742 | - * Initialize new Smarty object |
|
| 743 | - */ |
|
| 744 | - public function __construct() |
|
| 745 | - { |
|
| 746 | - parent::__construct(); |
|
| 747 | - if (is_callable('mb_internal_encoding')) { |
|
| 748 | - mb_internal_encoding(Smarty::$_CHARSET); |
|
| 749 | - } |
|
| 750 | - $this->start_time = microtime(true); |
|
| 751 | - |
|
| 752 | - if (isset($_SERVER[ 'SCRIPT_NAME' ])) { |
|
| 753 | - Smarty::$global_tpl_vars[ 'SCRIPT_NAME' ] = new Smarty_Variable($_SERVER[ 'SCRIPT_NAME' ]); |
|
| 754 | - } |
|
| 755 | - |
|
| 756 | - // Check if we're running on windows |
|
| 757 | - Smarty::$_IS_WINDOWS = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'; |
|
| 758 | - // let PCRE (preg_*) treat strings as ISO-8859-1 if we're not dealing with UTF-8 |
|
| 759 | - if (Smarty::$_CHARSET !== 'UTF-8') { |
|
| 760 | - Smarty::$_UTF8_MODIFIER = ''; |
|
| 761 | - } |
|
| 762 | - } |
|
| 763 | - |
|
| 764 | - /** |
|
| 765 | - * Check if a template resource exists |
|
| 766 | - * |
|
| 767 | - * @param string $resource_name template name |
|
| 768 | - * |
|
| 769 | - * @return boolean status |
|
| 770 | - */ |
|
| 771 | - public function templateExists($resource_name) |
|
| 772 | - { |
|
| 773 | - // create source object |
|
| 774 | - $source = Smarty_Template_Source::load(null, $this, $resource_name); |
|
| 775 | - return $source->exists; |
|
| 776 | - } |
|
| 777 | - |
|
| 778 | - /** |
|
| 779 | - * Loads security class and enables security |
|
| 780 | - * |
|
| 781 | - * @param string|Smarty_Security $security_class if a string is used, it must be class-name |
|
| 782 | - * |
|
| 783 | - * @return Smarty current Smarty instance for chaining |
|
| 784 | - * @throws SmartyException when an invalid class name is provided |
|
| 785 | - */ |
|
| 786 | - public function enableSecurity($security_class = null) |
|
| 787 | - { |
|
| 788 | - Smarty_Security::enableSecurity($this, $security_class); |
|
| 789 | - return $this; |
|
| 790 | - } |
|
| 791 | - |
|
| 792 | - /** |
|
| 793 | - * Disable security |
|
| 794 | - * |
|
| 795 | - * @return Smarty current Smarty instance for chaining |
|
| 796 | - */ |
|
| 797 | - public function disableSecurity() |
|
| 798 | - { |
|
| 799 | - $this->security_policy = null; |
|
| 800 | - |
|
| 801 | - return $this; |
|
| 802 | - } |
|
| 803 | - |
|
| 804 | - /** |
|
| 805 | - * Set template directory |
|
| 806 | - * |
|
| 807 | - * @param string|array $template_dir directory(s) of template sources |
|
| 808 | - * @param bool $isConfig true for config_dir |
|
| 809 | - * |
|
| 810 | - * @return \Smarty current Smarty instance for chaining |
|
| 811 | - */ |
|
| 812 | - public function setTemplateDir($template_dir, $isConfig = false) |
|
| 813 | - { |
|
| 814 | - if ($isConfig) { |
|
| 815 | - $this->config_dir = array(); |
|
| 816 | - $this->_processedConfigDir = array(); |
|
| 817 | - } else { |
|
| 818 | - $this->template_dir = array(); |
|
| 819 | - $this->_processedTemplateDir = array(); |
|
| 820 | - } |
|
| 821 | - $this->addTemplateDir($template_dir, null, $isConfig); |
|
| 822 | - return $this; |
|
| 823 | - } |
|
| 824 | - |
|
| 825 | - /** |
|
| 826 | - * Add template directory(s) |
|
| 827 | - * |
|
| 828 | - * @param string|array $template_dir directory(s) of template sources |
|
| 829 | - * @param string $key of the array element to assign the template dir to |
|
| 830 | - * @param bool $isConfig true for config_dir |
|
| 831 | - * |
|
| 832 | - * @return Smarty current Smarty instance for chaining |
|
| 833 | - */ |
|
| 834 | - public function addTemplateDir($template_dir, $key = null, $isConfig = false) |
|
| 835 | - { |
|
| 836 | - if ($isConfig) { |
|
| 837 | - $processed = &$this->_processedConfigDir; |
|
| 838 | - $dir = &$this->config_dir; |
|
| 839 | - $this->_configDirNormalized = false; |
|
| 840 | - } else { |
|
| 841 | - $processed = &$this->_processedTemplateDir; |
|
| 842 | - $dir = &$this->template_dir; |
|
| 843 | - $this->_templateDirNormalized = false; |
|
| 844 | - } |
|
| 845 | - if (is_array($template_dir)) { |
|
| 846 | - foreach ($template_dir as $k => $v) { |
|
| 847 | - if (is_int($k)) { |
|
| 848 | - // indexes are not merged but appended |
|
| 849 | - $dir[] = $v; |
|
| 850 | - } else { |
|
| 851 | - // string indexes are overridden |
|
| 852 | - $dir[ $k ] = $v; |
|
| 853 | - unset($processed[ $key ]); |
|
| 854 | - } |
|
| 855 | - } |
|
| 856 | - } else { |
|
| 857 | - if ($key !== null) { |
|
| 858 | - // override directory at specified index |
|
| 859 | - $dir[ $key ] = $template_dir; |
|
| 860 | - unset($processed[ $key ]); |
|
| 861 | - } else { |
|
| 862 | - // append new directory |
|
| 863 | - $dir[] = $template_dir; |
|
| 864 | - } |
|
| 865 | - } |
|
| 866 | - return $this; |
|
| 867 | - } |
|
| 868 | - |
|
| 869 | - /** |
|
| 870 | - * Get template directories |
|
| 871 | - * |
|
| 872 | - * @param mixed $index index of directory to get, null to get all |
|
| 873 | - * @param bool $isConfig true for config_dir |
|
| 874 | - * |
|
| 875 | - * @return array list of template directories, or directory of $index |
|
| 876 | - */ |
|
| 877 | - public function getTemplateDir($index = null, $isConfig = false) |
|
| 878 | - { |
|
| 879 | - if ($isConfig) { |
|
| 880 | - $dir = &$this->config_dir; |
|
| 881 | - } else { |
|
| 882 | - $dir = &$this->template_dir; |
|
| 883 | - } |
|
| 884 | - if ($isConfig ? !$this->_configDirNormalized : !$this->_templateDirNormalized) { |
|
| 885 | - $this->_nomalizeTemplateConfig($isConfig); |
|
| 886 | - } |
|
| 887 | - if ($index !== null) { |
|
| 888 | - return isset($dir[ $index ]) ? $dir[ $index ] : null; |
|
| 889 | - } |
|
| 890 | - return $dir; |
|
| 891 | - } |
|
| 892 | - |
|
| 893 | - /** |
|
| 894 | - * Set config directory |
|
| 895 | - * |
|
| 896 | - * @param $config_dir |
|
| 897 | - * |
|
| 898 | - * @return Smarty current Smarty instance for chaining |
|
| 899 | - */ |
|
| 900 | - public function setConfigDir($config_dir) |
|
| 901 | - { |
|
| 902 | - return $this->setTemplateDir($config_dir, true); |
|
| 903 | - } |
|
| 904 | - |
|
| 905 | - /** |
|
| 906 | - * Add config directory(s) |
|
| 907 | - * |
|
| 908 | - * @param string|array $config_dir directory(s) of config sources |
|
| 909 | - * @param mixed $key key of the array element to assign the config dir to |
|
| 910 | - * |
|
| 911 | - * @return Smarty current Smarty instance for chaining |
|
| 912 | - */ |
|
| 913 | - public function addConfigDir($config_dir, $key = null) |
|
| 914 | - { |
|
| 915 | - return $this->addTemplateDir($config_dir, $key, true); |
|
| 916 | - } |
|
| 917 | - |
|
| 918 | - /** |
|
| 919 | - * Get config directory |
|
| 920 | - * |
|
| 921 | - * @param mixed $index index of directory to get, null to get all |
|
| 922 | - * |
|
| 923 | - * @return array configuration directory |
|
| 924 | - */ |
|
| 925 | - public function getConfigDir($index = null) |
|
| 926 | - { |
|
| 927 | - return $this->getTemplateDir($index, true); |
|
| 928 | - } |
|
| 929 | - |
|
| 930 | - /** |
|
| 931 | - * Set plugins directory |
|
| 932 | - * |
|
| 933 | - * @param string|array $plugins_dir directory(s) of plugins |
|
| 934 | - * |
|
| 935 | - * @return Smarty current Smarty instance for chaining |
|
| 936 | - */ |
|
| 937 | - public function setPluginsDir($plugins_dir) |
|
| 938 | - { |
|
| 939 | - $this->plugins_dir = (array) $plugins_dir; |
|
| 940 | - $this->_pluginsDirNormalized = false; |
|
| 941 | - return $this; |
|
| 942 | - } |
|
| 943 | - |
|
| 944 | - /** |
|
| 945 | - * Adds directory of plugin files |
|
| 946 | - * |
|
| 947 | - * @param null|array $plugins_dir |
|
| 948 | - * |
|
| 949 | - * @return Smarty current Smarty instance for chaining |
|
| 950 | - */ |
|
| 951 | - public function addPluginsDir($plugins_dir) |
|
| 952 | - { |
|
| 953 | - if (empty($this->plugins_dir)) { |
|
| 954 | - $this->plugins_dir[] = SMARTY_PLUGINS_DIR; |
|
| 955 | - } |
|
| 956 | - $this->plugins_dir = array_merge($this->plugins_dir, (array) $plugins_dir); |
|
| 957 | - $this->_pluginsDirNormalized = false; |
|
| 958 | - return $this; |
|
| 959 | - } |
|
| 960 | - |
|
| 961 | - /** |
|
| 962 | - * Get plugin directories |
|
| 963 | - * |
|
| 964 | - * @return array list of plugin directories |
|
| 965 | - */ |
|
| 966 | - public function getPluginsDir() |
|
| 967 | - { |
|
| 968 | - if (empty($this->plugins_dir)) { |
|
| 969 | - $this->plugins_dir[] = SMARTY_PLUGINS_DIR; |
|
| 970 | - $this->_pluginsDirNormalized = false; |
|
| 971 | - } |
|
| 972 | - if (!$this->_pluginsDirNormalized) { |
|
| 973 | - if (!is_array($this->plugins_dir)) { |
|
| 974 | - $this->plugins_dir = (array) $this->plugins_dir; |
|
| 975 | - } |
|
| 976 | - foreach ($this->plugins_dir as $k => $v) { |
|
| 977 | - $this->plugins_dir[ $k ] = $this->_realpath(rtrim($v, "/\\") . DS, true); |
|
| 978 | - } |
|
| 979 | - $this->_cache[ 'plugin_files' ] = array(); |
|
| 980 | - $this->_pluginsDirNormalized = true; |
|
| 981 | - } |
|
| 982 | - return $this->plugins_dir; |
|
| 983 | - } |
|
| 984 | - |
|
| 985 | - /** |
|
| 986 | - * |
|
| 987 | - * @param string $compile_dir directory to store compiled templates in |
|
| 988 | - * |
|
| 989 | - * @return Smarty current Smarty instance for chaining |
|
| 990 | - */ |
|
| 991 | - public function setCompileDir($compile_dir) |
|
| 992 | - { |
|
| 993 | - $this->_normalizeDir('compile_dir', $compile_dir); |
|
| 994 | - $this->_compileDirNormalized = true; |
|
| 995 | - return $this; |
|
| 996 | - } |
|
| 997 | - |
|
| 998 | - /** |
|
| 999 | - * Get compiled directory |
|
| 1000 | - * |
|
| 1001 | - * @return string path to compiled templates |
|
| 1002 | - */ |
|
| 1003 | - public function getCompileDir() |
|
| 1004 | - { |
|
| 1005 | - if (!$this->_compileDirNormalized) { |
|
| 1006 | - $this->_normalizeDir('compile_dir', $this->compile_dir); |
|
| 1007 | - $this->_compileDirNormalized = true; |
|
| 1008 | - } |
|
| 1009 | - return $this->compile_dir; |
|
| 1010 | - } |
|
| 1011 | - |
|
| 1012 | - /** |
|
| 1013 | - * Set cache directory |
|
| 1014 | - * |
|
| 1015 | - * @param string $cache_dir directory to store cached templates in |
|
| 1016 | - * |
|
| 1017 | - * @return Smarty current Smarty instance for chaining |
|
| 1018 | - */ |
|
| 1019 | - public function setCacheDir($cache_dir) |
|
| 1020 | - { |
|
| 1021 | - $this->_normalizeDir('cache_dir', $cache_dir); |
|
| 1022 | - $this->_cacheDirNormalized = true; |
|
| 1023 | - return $this; |
|
| 1024 | - } |
|
| 1025 | - |
|
| 1026 | - /** |
|
| 1027 | - * Get cache directory |
|
| 1028 | - * |
|
| 1029 | - * @return string path of cache directory |
|
| 1030 | - */ |
|
| 1031 | - public function getCacheDir() |
|
| 1032 | - { |
|
| 1033 | - if (!$this->_cacheDirNormalized) { |
|
| 1034 | - $this->_normalizeDir('cache_dir', $this->cache_dir); |
|
| 1035 | - $this->_cacheDirNormalized = true; |
|
| 1036 | - } |
|
| 1037 | - return $this->cache_dir; |
|
| 1038 | - } |
|
| 1039 | - |
|
| 1040 | - /** |
|
| 1041 | - * Normalize and set directory string |
|
| 1042 | - * |
|
| 1043 | - * @param string $dirName cache_dir or compile_dir |
|
| 1044 | - * @param string $dir filepath of folder |
|
| 1045 | - */ |
|
| 1046 | - private function _normalizeDir($dirName, $dir) |
|
| 1047 | - { |
|
| 1048 | - $this->{$dirName} = $this->_realpath(rtrim($dir, "/\\") . DS, true); |
|
| 1049 | - if (!isset(Smarty::$_muted_directories[ $this->{$dirName} ])) { |
|
| 1050 | - Smarty::$_muted_directories[ $this->{$dirName} ] = null; |
|
| 1051 | - } |
|
| 1052 | - } |
|
| 1053 | - |
|
| 1054 | - /** |
|
| 1055 | - * Normalize template_dir or config_dir |
|
| 1056 | - * |
|
| 1057 | - * @param bool $isConfig true for config_dir |
|
| 1058 | - * |
|
| 1059 | - */ |
|
| 1060 | - private function _nomalizeTemplateConfig($isConfig) |
|
| 1061 | - { |
|
| 1062 | - if ($isConfig) { |
|
| 1063 | - $processed = &$this->_processedConfigDir; |
|
| 1064 | - $dir = &$this->config_dir; |
|
| 1065 | - } else { |
|
| 1066 | - $processed = &$this->_processedTemplateDir; |
|
| 1067 | - $dir = &$this->template_dir; |
|
| 1068 | - } |
|
| 1069 | - if (!is_array($dir)) { |
|
| 1070 | - $dir = (array) $dir; |
|
| 1071 | - } |
|
| 1072 | - foreach ($dir as $k => $v) { |
|
| 1073 | - if (!isset($processed[ $k ])) { |
|
| 1074 | - $dir[ $k ] = $v = $this->_realpath(rtrim($v, "/\\") . DS, true); |
|
| 1075 | - $processed[ $k ] = true; |
|
| 1076 | - } |
|
| 1077 | - } |
|
| 1078 | - $isConfig ? $this->_configDirNormalized = true : $this->_templateDirNormalized = true; |
|
| 1079 | - $isConfig ? $this->_joined_config_dir = join('#', $this->config_dir) : |
|
| 1080 | - $this->_joined_template_dir = join('#', $this->template_dir); |
|
| 1081 | - } |
|
| 1082 | - |
|
| 1083 | - /** |
|
| 1084 | - * creates a template object |
|
| 1085 | - * |
|
| 1086 | - * @param string $template the resource handle of the template file |
|
| 1087 | - * @param mixed $cache_id cache id to be used with this template |
|
| 1088 | - * @param mixed $compile_id compile id to be used with this template |
|
| 1089 | - * @param object $parent next higher level of Smarty variables |
|
| 1090 | - * @param boolean $do_clone flag is Smarty object shall be cloned |
|
| 1091 | - * |
|
| 1092 | - * @return object template object |
|
| 1093 | - */ |
|
| 1094 | - public function createTemplate($template, $cache_id = null, $compile_id = null, $parent = null, $do_clone = true) |
|
| 1095 | - { |
|
| 1096 | - if ($cache_id !== null && (is_object($cache_id) || is_array($cache_id))) { |
|
| 1097 | - $parent = $cache_id; |
|
| 1098 | - $cache_id = null; |
|
| 1099 | - } |
|
| 1100 | - if ($parent !== null && is_array($parent)) { |
|
| 1101 | - $data = $parent; |
|
| 1102 | - $parent = null; |
|
| 1103 | - } else { |
|
| 1104 | - $data = null; |
|
| 1105 | - } |
|
| 1106 | - $_templateId = $this->_getTemplateId($template, $cache_id, $compile_id); |
|
| 1107 | - $tpl = null; |
|
| 1108 | - if ($this->caching && isset($this->_cache[ 'isCached' ][ $_templateId ])) { |
|
| 1109 | - $tpl = $do_clone ? clone $this->_cache[ 'isCached' ][ $_templateId ] : |
|
| 1110 | - $this->_cache[ 'isCached' ][ $_templateId ]; |
|
| 1111 | - $tpl->tpl_vars = $tpl->config_vars = array(); |
|
| 1112 | - } else if (!$do_clone && isset($this->_cache[ 'tplObjects' ][ $_templateId ])) { |
|
| 1113 | - $tpl = clone $this->_cache[ 'tplObjects' ][ $_templateId ]; |
|
| 1114 | - } else { |
|
| 1115 | - /* @var Smarty_Internal_Template $tpl */ |
|
| 1116 | - $tpl = new $this->template_class($template, $this, null, $cache_id, $compile_id, null, null); |
|
| 1117 | - $tpl->templateId = $_templateId; |
|
| 1118 | - } |
|
| 1119 | - if ($do_clone) { |
|
| 1120 | - $tpl->smarty = clone $tpl->smarty; |
|
| 1121 | - } |
|
| 1122 | - $tpl->parent = $parent ? $parent : $this; |
|
| 1123 | - // fill data if present |
|
| 1124 | - if (!empty($data) && is_array($data)) { |
|
| 1125 | - // set up variable values |
|
| 1126 | - foreach ($data as $_key => $_val) { |
|
| 1127 | - $tpl->tpl_vars[ $_key ] = new Smarty_Variable($_val); |
|
| 1128 | - } |
|
| 1129 | - } |
|
| 1130 | - if ($this->debugging || $this->debugging_ctrl == 'URL') { |
|
| 1131 | - $tpl->smarty->_debug = new Smarty_Internal_Debug(); |
|
| 1132 | - // check URL debugging control |
|
| 1133 | - if (!$this->debugging && $this->debugging_ctrl == 'URL') { |
|
| 1134 | - $tpl->smarty->_debug->debugUrl($tpl->smarty); |
|
| 1135 | - } |
|
| 1136 | - } |
|
| 1137 | - return $tpl; |
|
| 1138 | - } |
|
| 1139 | - |
|
| 1140 | - /** |
|
| 1141 | - * Takes unknown classes and loads plugin files for them |
|
| 1142 | - * class name format: Smarty_PluginType_PluginName |
|
| 1143 | - * plugin filename format: plugintype.pluginname.php |
|
| 1144 | - * |
|
| 1145 | - * @param string $plugin_name class plugin name to load |
|
| 1146 | - * @param bool $check check if already loaded |
|
| 1147 | - * |
|
| 1148 | - * @throws SmartyException |
|
| 1149 | - * @return string |boolean filepath of loaded file or false |
|
| 1150 | - */ |
|
| 1151 | - public function loadPlugin($plugin_name, $check = true) |
|
| 1152 | - { |
|
| 1153 | - return $this->ext->loadPlugin->loadPlugin($this, $plugin_name, $check); |
|
| 1154 | - } |
|
| 1155 | - |
|
| 1156 | - /** |
|
| 1157 | - * Get unique template id |
|
| 1158 | - * |
|
| 1159 | - * @param string $template_name |
|
| 1160 | - * @param null|mixed $cache_id |
|
| 1161 | - * @param null|mixed $compile_id |
|
| 1162 | - * @param null $caching |
|
| 1163 | - * @param \Smarty_Internal_Template $template |
|
| 1164 | - * |
|
| 1165 | - * @return string |
|
| 1166 | - */ |
|
| 1167 | - public function _getTemplateId($template_name, $cache_id = null, $compile_id = null, $caching = null, |
|
| 1168 | - Smarty_Internal_Template $template = null) |
|
| 1169 | - { |
|
| 1170 | - $template_name = (strpos($template_name, ':') === false) ? "{$this->default_resource_type}:{$template_name}" : |
|
| 1171 | - $template_name; |
|
| 1172 | - $cache_id = $cache_id === null ? $this->cache_id : $cache_id; |
|
| 1173 | - $compile_id = $compile_id === null ? $this->compile_id : $compile_id; |
|
| 1174 | - $caching = (int) ($caching === null ? $this->caching : $caching); |
|
| 1175 | - |
|
| 1176 | - if ((isset($template) && strpos($template_name, ':.') !== false) || $this->allow_ambiguous_resources) { |
|
| 1177 | - $_templateId = |
|
| 1178 | - Smarty_Resource::getUniqueTemplateName((isset($template) ? $template : $this), $template_name) . |
|
| 1179 | - "#{$cache_id}#{$compile_id}#{$caching}"; |
|
| 1180 | - } else { |
|
| 1181 | - $_templateId = $this->_joined_template_dir . "#{$template_name}#{$cache_id}#{$compile_id}#{$caching}"; |
|
| 1182 | - } |
|
| 1183 | - if (isset($_templateId[ 150 ])) { |
|
| 1184 | - $_templateId = sha1($_templateId); |
|
| 1185 | - } |
|
| 1186 | - return $_templateId; |
|
| 1187 | - } |
|
| 1188 | - |
|
| 1189 | - /** |
|
| 1190 | - * Normalize path |
|
| 1191 | - * - remove /./ and /../ |
|
| 1192 | - * - make it absolute if required |
|
| 1193 | - * |
|
| 1194 | - * @param string $path file path |
|
| 1195 | - * @param bool $realpath if true - convert to absolute |
|
| 1196 | - * false - convert to relative |
|
| 1197 | - * null - keep as it is but remove /./ /../ |
|
| 1198 | - * |
|
| 1199 | - * @return string |
|
| 1200 | - */ |
|
| 1201 | - public function _realpath($path, $realpath = null) |
|
| 1202 | - { |
|
| 1203 | - $nds = DS == '/' ? '\\' : '/'; |
|
| 1204 | - // normalize DS |
|
| 1205 | - $path = str_replace($nds, DS, $path); |
|
| 1206 | - preg_match('%^(?<root>(?:[[:alpha:]]:[\\\\]|/|[\\\\]{2}[[:alpha:]]+|[[:print:]]{2,}:[/]{2}|[\\\\])?)(?<path>(?:[[:print:]]*))$%', |
|
| 1207 | - $path, $parts); |
|
| 1208 | - $path = $parts[ 'path' ]; |
|
| 1209 | - if ($parts[ 'root' ] == '\\') { |
|
| 1210 | - $parts[ 'root' ] = substr(getcwd(), 0, 2) . $parts[ 'root' ]; |
|
| 1211 | - } else { |
|
| 1212 | - if ($realpath !== null && !$parts[ 'root' ]) { |
|
| 1213 | - $path = getcwd() . DS . $path; |
|
| 1214 | - } |
|
| 1215 | - } |
|
| 1216 | - // remove noop 'DS DS' and 'DS.DS' patterns |
|
| 1217 | - $path = preg_replace('#([\\\\/]([.]?[\\\\/])+)#', DS, $path); |
|
| 1218 | - // resolve '..DS' pattern, smallest first |
|
| 1219 | - if (strpos($path, '..' . DS) !== false && |
|
| 1220 | - preg_match_all('#(([.]?[\\\\/])*([.][.])[\\\\/]([.]?[\\\\/])*)+#', $path, $match) |
|
| 1221 | - ) { |
|
| 1222 | - $counts = array(); |
|
| 1223 | - foreach ($match[ 0 ] as $m) { |
|
| 1224 | - $counts[] = (int) ((strlen($m) - 1) / 3); |
|
| 1225 | - } |
|
| 1226 | - sort($counts); |
|
| 1227 | - foreach ($counts as $count) { |
|
| 1228 | - $path = preg_replace('#(([\\\\/]([.]?[\\\\/])*[^\\\\/.]+){' . $count . |
|
| 1229 | - '}[\\\\/]([.]?[\\\\/])*([.][.][\\\\/]([.]?[\\\\/])*){' . $count . '})(?=[^.])#', |
|
| 1230 | - DS, $path); |
|
| 1231 | - } |
|
| 1232 | - } |
|
| 1233 | - |
|
| 1234 | - return $parts[ 'root' ] . $path; |
|
| 1235 | - } |
|
| 1236 | - |
|
| 1237 | - /** |
|
| 1238 | - * Empty template objects cache |
|
| 1239 | - */ |
|
| 1240 | - public function _clearTemplateCache() |
|
| 1241 | - { |
|
| 1242 | - $this->_cache[ 'isCached' ] = array(); |
|
| 1243 | - $this->_cache[ 'tplObjects' ] = array(); |
|
| 1244 | - } |
|
| 1245 | - |
|
| 1246 | - /** |
|
| 1247 | - * @param boolean $compile_check |
|
| 1248 | - */ |
|
| 1249 | - public function setCompileCheck($compile_check) |
|
| 1250 | - { |
|
| 1251 | - $this->compile_check = $compile_check; |
|
| 1252 | - } |
|
| 1253 | - |
|
| 1254 | - /** |
|
| 1255 | - * @param boolean $use_sub_dirs |
|
| 1256 | - */ |
|
| 1257 | - public function setUseSubDirs($use_sub_dirs) |
|
| 1258 | - { |
|
| 1259 | - $this->use_sub_dirs = $use_sub_dirs; |
|
| 1260 | - } |
|
| 1261 | - |
|
| 1262 | - /** |
|
| 1263 | - * @param int $error_reporting |
|
| 1264 | - */ |
|
| 1265 | - public function setErrorReporting($error_reporting) |
|
| 1266 | - { |
|
| 1267 | - $this->error_reporting = $error_reporting; |
|
| 1268 | - } |
|
| 1269 | - |
|
| 1270 | - /** |
|
| 1271 | - * @param boolean $escape_html |
|
| 1272 | - */ |
|
| 1273 | - public function setEscapeHtml($escape_html) |
|
| 1274 | - { |
|
| 1275 | - $this->escape_html = $escape_html; |
|
| 1276 | - } |
|
| 1277 | - |
|
| 1278 | - /** |
|
| 1279 | - * @param boolean $auto_literal |
|
| 1280 | - */ |
|
| 1281 | - public function setAutoLiteral($auto_literal) |
|
| 1282 | - { |
|
| 1283 | - $this->auto_literal = $auto_literal; |
|
| 1284 | - } |
|
| 1285 | - |
|
| 1286 | - /** |
|
| 1287 | - * @param boolean $force_compile |
|
| 1288 | - */ |
|
| 1289 | - public function setForceCompile($force_compile) |
|
| 1290 | - { |
|
| 1291 | - $this->force_compile = $force_compile; |
|
| 1292 | - } |
|
| 1293 | - |
|
| 1294 | - /** |
|
| 1295 | - * @param boolean $merge_compiled_includes |
|
| 1296 | - */ |
|
| 1297 | - public function setMergeCompiledIncludes($merge_compiled_includes) |
|
| 1298 | - { |
|
| 1299 | - $this->merge_compiled_includes = $merge_compiled_includes; |
|
| 1300 | - } |
|
| 1301 | - |
|
| 1302 | - /** |
|
| 1303 | - * @param string $left_delimiter |
|
| 1304 | - */ |
|
| 1305 | - public function setLeftDelimiter($left_delimiter) |
|
| 1306 | - { |
|
| 1307 | - $this->left_delimiter = $left_delimiter; |
|
| 1308 | - } |
|
| 1309 | - |
|
| 1310 | - /** |
|
| 1311 | - * @param string $right_delimiter |
|
| 1312 | - */ |
|
| 1313 | - public function setRightDelimiter($right_delimiter) |
|
| 1314 | - { |
|
| 1315 | - $this->right_delimiter = $right_delimiter; |
|
| 1316 | - } |
|
| 1317 | - |
|
| 1318 | - /** |
|
| 1319 | - * @param boolean $debugging |
|
| 1320 | - */ |
|
| 1321 | - public function setDebugging($debugging) |
|
| 1322 | - { |
|
| 1323 | - $this->debugging = $debugging; |
|
| 1324 | - } |
|
| 1325 | - |
|
| 1326 | - /** |
|
| 1327 | - * @param boolean $config_overwrite |
|
| 1328 | - */ |
|
| 1329 | - public function setConfigOverwrite($config_overwrite) |
|
| 1330 | - { |
|
| 1331 | - $this->config_overwrite = $config_overwrite; |
|
| 1332 | - } |
|
| 1333 | - |
|
| 1334 | - /** |
|
| 1335 | - * @param boolean $config_booleanize |
|
| 1336 | - */ |
|
| 1337 | - public function setConfigBooleanize($config_booleanize) |
|
| 1338 | - { |
|
| 1339 | - $this->config_booleanize = $config_booleanize; |
|
| 1340 | - } |
|
| 1341 | - |
|
| 1342 | - /** |
|
| 1343 | - * @param boolean $config_read_hidden |
|
| 1344 | - */ |
|
| 1345 | - public function setConfigReadHidden($config_read_hidden) |
|
| 1346 | - { |
|
| 1347 | - $this->config_read_hidden = $config_read_hidden; |
|
| 1348 | - } |
|
| 1349 | - |
|
| 1350 | - /** |
|
| 1351 | - * @param boolean $compile_locking |
|
| 1352 | - */ |
|
| 1353 | - public function setCompileLocking($compile_locking) |
|
| 1354 | - { |
|
| 1355 | - $this->compile_locking = $compile_locking; |
|
| 1356 | - } |
|
| 1357 | - |
|
| 1358 | - /** |
|
| 1359 | - * @param string $default_resource_type |
|
| 1360 | - */ |
|
| 1361 | - public function setDefaultResourceType($default_resource_type) |
|
| 1362 | - { |
|
| 1363 | - $this->default_resource_type = $default_resource_type; |
|
| 1364 | - } |
|
| 1365 | - |
|
| 1366 | - /** |
|
| 1367 | - * @param string $caching_type |
|
| 1368 | - */ |
|
| 1369 | - public function setCachingType($caching_type) |
|
| 1370 | - { |
|
| 1371 | - $this->caching_type = $caching_type; |
|
| 1372 | - } |
|
| 1373 | - |
|
| 1374 | - /** |
|
| 1375 | - * Test install |
|
| 1376 | - * |
|
| 1377 | - * @param null $errors |
|
| 1378 | - */ |
|
| 1379 | - public function testInstall(&$errors = null) |
|
| 1380 | - { |
|
| 1381 | - Smarty_Internal_TestInstall::testInstall($this, $errors); |
|
| 1382 | - } |
|
| 1383 | - |
|
| 1384 | - /** |
|
| 1385 | - * <<magic>> Generic getter. |
|
| 1386 | - * Calls the appropriate getter function. |
|
| 1387 | - * Issues an E_USER_NOTICE if no valid getter is found. |
|
| 1388 | - * |
|
| 1389 | - * @param string $name property name |
|
| 1390 | - * |
|
| 1391 | - * @return mixed |
|
| 1392 | - */ |
|
| 1393 | - public function __get($name) |
|
| 1394 | - { |
|
| 1395 | - if (isset($this->accessMap[ $name ])) { |
|
| 1396 | - $method = 'get' . $this->accessMap[ $name ]; |
|
| 1397 | - return $this->{$method}(); |
|
| 1398 | - } elseif (isset($this->_cache[ $name ])) { |
|
| 1399 | - return $this->_cache[ $name ]; |
|
| 1400 | - } elseif (in_array($name, $this->obsoleteProperties)) { |
|
| 1401 | - return null; |
|
| 1402 | - } else { |
|
| 1403 | - trigger_error('Undefined property: ' . get_class($this) . '::$' . $name, E_USER_NOTICE); |
|
| 1404 | - } |
|
| 1405 | - return null; |
|
| 1406 | - } |
|
| 1407 | - |
|
| 1408 | - /** |
|
| 1409 | - * <<magic>> Generic setter. |
|
| 1410 | - * Calls the appropriate setter function. |
|
| 1411 | - * Issues an E_USER_NOTICE if no valid setter is found. |
|
| 1412 | - * |
|
| 1413 | - * @param string $name property name |
|
| 1414 | - * @param mixed $value parameter passed to setter |
|
| 1415 | - */ |
|
| 1416 | - public function __set($name, $value) |
|
| 1417 | - { |
|
| 1418 | - if (isset($this->accessMap[ $name ])) { |
|
| 1419 | - $method = 'set' . $this->accessMap[ $name ]; |
|
| 1420 | - $this->{$method}($value); |
|
| 1421 | - } elseif (in_array($name, $this->obsoleteProperties)) { |
|
| 1422 | - return; |
|
| 1423 | - } else { |
|
| 1424 | - if (is_object($value) && method_exists($value, $name)) { |
|
| 1425 | - $this->$name = $value; |
|
| 1426 | - } else { |
|
| 1427 | - trigger_error('Undefined property: ' . get_class($this) . '::$' . $name, E_USER_NOTICE); |
|
| 1428 | - } |
|
| 1429 | - } |
|
| 1430 | - } |
|
| 1431 | - |
|
| 1432 | - /** |
|
| 1433 | - * Error Handler to mute expected messages |
|
| 1434 | - * |
|
| 1435 | - * @link http://php.net/set_error_handler |
|
| 1436 | - * |
|
| 1437 | - * @param integer $errno Error level |
|
| 1438 | - * @param $errstr |
|
| 1439 | - * @param $errfile |
|
| 1440 | - * @param $errline |
|
| 1441 | - * @param $errcontext |
|
| 1442 | - * |
|
| 1443 | - * @return bool|void |
|
| 1444 | - */ |
|
| 1445 | - public static function mutingErrorHandler($errno, $errstr, $errfile, $errline, $errcontext) |
|
| 1446 | - { |
|
| 1447 | - $_is_muted_directory = false; |
|
| 1448 | - |
|
| 1449 | - // add the SMARTY_DIR to the list of muted directories |
|
| 1450 | - if (!isset(Smarty::$_muted_directories[ SMARTY_DIR ])) { |
|
| 1451 | - $smarty_dir = realpath(SMARTY_DIR); |
|
| 1452 | - if ($smarty_dir !== false) { |
|
| 1453 | - Smarty::$_muted_directories[ SMARTY_DIR ] = |
|
| 1454 | - array('file' => $smarty_dir, 'length' => strlen($smarty_dir),); |
|
| 1455 | - } |
|
| 1456 | - } |
|
| 1457 | - |
|
| 1458 | - // walk the muted directories and test against $errfile |
|
| 1459 | - foreach (Smarty::$_muted_directories as $key => &$dir) { |
|
| 1460 | - if (!$dir) { |
|
| 1461 | - // resolve directory and length for speedy comparisons |
|
| 1462 | - $file = realpath($key); |
|
| 1463 | - if ($file === false) { |
|
| 1464 | - // this directory does not exist, remove and skip it |
|
| 1465 | - unset(Smarty::$_muted_directories[ $key ]); |
|
| 1466 | - continue; |
|
| 1467 | - } |
|
| 1468 | - $dir = array('file' => $file, 'length' => strlen($file),); |
|
| 1469 | - } |
|
| 1470 | - if (!strncmp($errfile, $dir[ 'file' ], $dir[ 'length' ])) { |
|
| 1471 | - $_is_muted_directory = true; |
|
| 1472 | - break; |
|
| 1473 | - } |
|
| 1474 | - } |
|
| 1475 | - // pass to next error handler if this error did not occur inside SMARTY_DIR |
|
| 1476 | - // or the error was within smarty but masked to be ignored |
|
| 1477 | - if (!$_is_muted_directory || ($errno && $errno & error_reporting())) { |
|
| 1478 | - if (Smarty::$_previous_error_handler) { |
|
| 1479 | - return call_user_func(Smarty::$_previous_error_handler, $errno, $errstr, $errfile, $errline, |
|
| 1480 | - $errcontext); |
|
| 1481 | - } else { |
|
| 1482 | - return false; |
|
| 1483 | - } |
|
| 1484 | - } |
|
| 1485 | - return; |
|
| 1486 | - } |
|
| 1487 | - |
|
| 1488 | - /** |
|
| 1489 | - * Enable error handler to mute expected messages |
|
| 1490 | - * |
|
| 1491 | - * @return void |
|
| 1492 | - */ |
|
| 1493 | - public static function muteExpectedErrors() |
|
| 1494 | - { |
|
| 1495 | - /* |
|
| 570 | + /** |
|
| 571 | + * locking concurrent compiles |
|
| 572 | + * |
|
| 573 | + * @var boolean |
|
| 574 | + */ |
|
| 575 | + public $compile_locking = true; |
|
| 576 | + |
|
| 577 | + /** |
|
| 578 | + * Controls whether cache resources should use locking mechanism |
|
| 579 | + * |
|
| 580 | + * @var boolean |
|
| 581 | + */ |
|
| 582 | + public $cache_locking = false; |
|
| 583 | + |
|
| 584 | + /** |
|
| 585 | + * seconds to wait for acquiring a lock before ignoring the write lock |
|
| 586 | + * |
|
| 587 | + * @var float |
|
| 588 | + */ |
|
| 589 | + public $locking_timeout = 10; |
|
| 590 | + |
|
| 591 | + /**#@-*/ |
|
| 592 | + |
|
| 593 | + /** |
|
| 594 | + * resource type used if none given |
|
| 595 | + * Must be an valid key of $registered_resources. |
|
| 596 | + * |
|
| 597 | + * @var string |
|
| 598 | + */ |
|
| 599 | + public $default_resource_type = 'file'; |
|
| 600 | + |
|
| 601 | + /** |
|
| 602 | + * caching type |
|
| 603 | + * Must be an element of $cache_resource_types. |
|
| 604 | + * |
|
| 605 | + * @var string |
|
| 606 | + */ |
|
| 607 | + public $caching_type = 'file'; |
|
| 608 | + |
|
| 609 | + /** |
|
| 610 | + * config type |
|
| 611 | + * |
|
| 612 | + * @var string |
|
| 613 | + */ |
|
| 614 | + public $default_config_type = 'file'; |
|
| 615 | + |
|
| 616 | + /** |
|
| 617 | + * check If-Modified-Since headers |
|
| 618 | + * |
|
| 619 | + * @var boolean |
|
| 620 | + */ |
|
| 621 | + public $cache_modified_check = false; |
|
| 622 | + |
|
| 623 | + /** |
|
| 624 | + * registered plugins |
|
| 625 | + * |
|
| 626 | + * @var array |
|
| 627 | + */ |
|
| 628 | + public $registered_plugins = array(); |
|
| 629 | + |
|
| 630 | + /** |
|
| 631 | + * registered objects |
|
| 632 | + * |
|
| 633 | + * @var array |
|
| 634 | + */ |
|
| 635 | + public $registered_objects = array(); |
|
| 636 | + |
|
| 637 | + /** |
|
| 638 | + * registered classes |
|
| 639 | + * |
|
| 640 | + * @var array |
|
| 641 | + */ |
|
| 642 | + public $registered_classes = array(); |
|
| 643 | + |
|
| 644 | + /** |
|
| 645 | + * registered filters |
|
| 646 | + * |
|
| 647 | + * @var array |
|
| 648 | + */ |
|
| 649 | + public $registered_filters = array(); |
|
| 650 | + |
|
| 651 | + /** |
|
| 652 | + * registered resources |
|
| 653 | + * |
|
| 654 | + * @var array |
|
| 655 | + */ |
|
| 656 | + public $registered_resources = array(); |
|
| 657 | + |
|
| 658 | + /** |
|
| 659 | + * registered cache resources |
|
| 660 | + * |
|
| 661 | + * @var array |
|
| 662 | + */ |
|
| 663 | + public $registered_cache_resources = array(); |
|
| 664 | + |
|
| 665 | + /** |
|
| 666 | + * autoload filter |
|
| 667 | + * |
|
| 668 | + * @var array |
|
| 669 | + */ |
|
| 670 | + public $autoload_filters = array(); |
|
| 671 | + |
|
| 672 | + /** |
|
| 673 | + * default modifier |
|
| 674 | + * |
|
| 675 | + * @var array |
|
| 676 | + */ |
|
| 677 | + public $default_modifiers = array(); |
|
| 678 | + |
|
| 679 | + /** |
|
| 680 | + * autoescape variable output |
|
| 681 | + * |
|
| 682 | + * @var boolean |
|
| 683 | + */ |
|
| 684 | + public $escape_html = false; |
|
| 685 | + |
|
| 686 | + /** |
|
| 687 | + * start time for execution time calculation |
|
| 688 | + * |
|
| 689 | + * @var int |
|
| 690 | + */ |
|
| 691 | + public $start_time = 0; |
|
| 692 | + |
|
| 693 | + /** |
|
| 694 | + * required by the compiler for BC |
|
| 695 | + * |
|
| 696 | + * @var string |
|
| 697 | + */ |
|
| 698 | + public $_current_file = null; |
|
| 699 | + |
|
| 700 | + /** |
|
| 701 | + * internal flag to enable parser debugging |
|
| 702 | + * |
|
| 703 | + * @var bool |
|
| 704 | + */ |
|
| 705 | + public $_parserdebug = false; |
|
| 706 | + |
|
| 707 | + /** |
|
| 708 | + * This object type (Smarty = 1, template = 2, data = 4) |
|
| 709 | + * |
|
| 710 | + * @var int |
|
| 711 | + */ |
|
| 712 | + public $_objType = 1; |
|
| 713 | + |
|
| 714 | + /** |
|
| 715 | + * Debug object |
|
| 716 | + * |
|
| 717 | + * @var Smarty_Internal_Debug |
|
| 718 | + */ |
|
| 719 | + public $_debug = null; |
|
| 720 | + |
|
| 721 | + /** |
|
| 722 | + * removed properties |
|
| 723 | + * |
|
| 724 | + * @var string[] |
|
| 725 | + */ |
|
| 726 | + private $obsoleteProperties = array('resource_caching', 'template_resource_caching', 'direct_access_security', |
|
| 727 | + '_dir_perms', '_file_perms', 'plugin_search_order', |
|
| 728 | + 'inheritance_merge_compiled_includes', 'resource_cache_mode',); |
|
| 729 | + |
|
| 730 | + /** |
|
| 731 | + * List of private properties which will call getter/setter on a direct access |
|
| 732 | + * |
|
| 733 | + * @var string[] |
|
| 734 | + */ |
|
| 735 | + private $accessMap = array('template_dir' => 'TemplateDir', 'config_dir' => 'ConfigDir', |
|
| 736 | + 'plugins_dir' => 'PluginsDir', 'compile_dir' => 'CompileDir', |
|
| 737 | + 'cache_dir' => 'CacheDir',); |
|
| 738 | + |
|
| 739 | + /**#@-*/ |
|
| 740 | + |
|
| 741 | + /** |
|
| 742 | + * Initialize new Smarty object |
|
| 743 | + */ |
|
| 744 | + public function __construct() |
|
| 745 | + { |
|
| 746 | + parent::__construct(); |
|
| 747 | + if (is_callable('mb_internal_encoding')) { |
|
| 748 | + mb_internal_encoding(Smarty::$_CHARSET); |
|
| 749 | + } |
|
| 750 | + $this->start_time = microtime(true); |
|
| 751 | + |
|
| 752 | + if (isset($_SERVER[ 'SCRIPT_NAME' ])) { |
|
| 753 | + Smarty::$global_tpl_vars[ 'SCRIPT_NAME' ] = new Smarty_Variable($_SERVER[ 'SCRIPT_NAME' ]); |
|
| 754 | + } |
|
| 755 | + |
|
| 756 | + // Check if we're running on windows |
|
| 757 | + Smarty::$_IS_WINDOWS = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'; |
|
| 758 | + // let PCRE (preg_*) treat strings as ISO-8859-1 if we're not dealing with UTF-8 |
|
| 759 | + if (Smarty::$_CHARSET !== 'UTF-8') { |
|
| 760 | + Smarty::$_UTF8_MODIFIER = ''; |
|
| 761 | + } |
|
| 762 | + } |
|
| 763 | + |
|
| 764 | + /** |
|
| 765 | + * Check if a template resource exists |
|
| 766 | + * |
|
| 767 | + * @param string $resource_name template name |
|
| 768 | + * |
|
| 769 | + * @return boolean status |
|
| 770 | + */ |
|
| 771 | + public function templateExists($resource_name) |
|
| 772 | + { |
|
| 773 | + // create source object |
|
| 774 | + $source = Smarty_Template_Source::load(null, $this, $resource_name); |
|
| 775 | + return $source->exists; |
|
| 776 | + } |
|
| 777 | + |
|
| 778 | + /** |
|
| 779 | + * Loads security class and enables security |
|
| 780 | + * |
|
| 781 | + * @param string|Smarty_Security $security_class if a string is used, it must be class-name |
|
| 782 | + * |
|
| 783 | + * @return Smarty current Smarty instance for chaining |
|
| 784 | + * @throws SmartyException when an invalid class name is provided |
|
| 785 | + */ |
|
| 786 | + public function enableSecurity($security_class = null) |
|
| 787 | + { |
|
| 788 | + Smarty_Security::enableSecurity($this, $security_class); |
|
| 789 | + return $this; |
|
| 790 | + } |
|
| 791 | + |
|
| 792 | + /** |
|
| 793 | + * Disable security |
|
| 794 | + * |
|
| 795 | + * @return Smarty current Smarty instance for chaining |
|
| 796 | + */ |
|
| 797 | + public function disableSecurity() |
|
| 798 | + { |
|
| 799 | + $this->security_policy = null; |
|
| 800 | + |
|
| 801 | + return $this; |
|
| 802 | + } |
|
| 803 | + |
|
| 804 | + /** |
|
| 805 | + * Set template directory |
|
| 806 | + * |
|
| 807 | + * @param string|array $template_dir directory(s) of template sources |
|
| 808 | + * @param bool $isConfig true for config_dir |
|
| 809 | + * |
|
| 810 | + * @return \Smarty current Smarty instance for chaining |
|
| 811 | + */ |
|
| 812 | + public function setTemplateDir($template_dir, $isConfig = false) |
|
| 813 | + { |
|
| 814 | + if ($isConfig) { |
|
| 815 | + $this->config_dir = array(); |
|
| 816 | + $this->_processedConfigDir = array(); |
|
| 817 | + } else { |
|
| 818 | + $this->template_dir = array(); |
|
| 819 | + $this->_processedTemplateDir = array(); |
|
| 820 | + } |
|
| 821 | + $this->addTemplateDir($template_dir, null, $isConfig); |
|
| 822 | + return $this; |
|
| 823 | + } |
|
| 824 | + |
|
| 825 | + /** |
|
| 826 | + * Add template directory(s) |
|
| 827 | + * |
|
| 828 | + * @param string|array $template_dir directory(s) of template sources |
|
| 829 | + * @param string $key of the array element to assign the template dir to |
|
| 830 | + * @param bool $isConfig true for config_dir |
|
| 831 | + * |
|
| 832 | + * @return Smarty current Smarty instance for chaining |
|
| 833 | + */ |
|
| 834 | + public function addTemplateDir($template_dir, $key = null, $isConfig = false) |
|
| 835 | + { |
|
| 836 | + if ($isConfig) { |
|
| 837 | + $processed = &$this->_processedConfigDir; |
|
| 838 | + $dir = &$this->config_dir; |
|
| 839 | + $this->_configDirNormalized = false; |
|
| 840 | + } else { |
|
| 841 | + $processed = &$this->_processedTemplateDir; |
|
| 842 | + $dir = &$this->template_dir; |
|
| 843 | + $this->_templateDirNormalized = false; |
|
| 844 | + } |
|
| 845 | + if (is_array($template_dir)) { |
|
| 846 | + foreach ($template_dir as $k => $v) { |
|
| 847 | + if (is_int($k)) { |
|
| 848 | + // indexes are not merged but appended |
|
| 849 | + $dir[] = $v; |
|
| 850 | + } else { |
|
| 851 | + // string indexes are overridden |
|
| 852 | + $dir[ $k ] = $v; |
|
| 853 | + unset($processed[ $key ]); |
|
| 854 | + } |
|
| 855 | + } |
|
| 856 | + } else { |
|
| 857 | + if ($key !== null) { |
|
| 858 | + // override directory at specified index |
|
| 859 | + $dir[ $key ] = $template_dir; |
|
| 860 | + unset($processed[ $key ]); |
|
| 861 | + } else { |
|
| 862 | + // append new directory |
|
| 863 | + $dir[] = $template_dir; |
|
| 864 | + } |
|
| 865 | + } |
|
| 866 | + return $this; |
|
| 867 | + } |
|
| 868 | + |
|
| 869 | + /** |
|
| 870 | + * Get template directories |
|
| 871 | + * |
|
| 872 | + * @param mixed $index index of directory to get, null to get all |
|
| 873 | + * @param bool $isConfig true for config_dir |
|
| 874 | + * |
|
| 875 | + * @return array list of template directories, or directory of $index |
|
| 876 | + */ |
|
| 877 | + public function getTemplateDir($index = null, $isConfig = false) |
|
| 878 | + { |
|
| 879 | + if ($isConfig) { |
|
| 880 | + $dir = &$this->config_dir; |
|
| 881 | + } else { |
|
| 882 | + $dir = &$this->template_dir; |
|
| 883 | + } |
|
| 884 | + if ($isConfig ? !$this->_configDirNormalized : !$this->_templateDirNormalized) { |
|
| 885 | + $this->_nomalizeTemplateConfig($isConfig); |
|
| 886 | + } |
|
| 887 | + if ($index !== null) { |
|
| 888 | + return isset($dir[ $index ]) ? $dir[ $index ] : null; |
|
| 889 | + } |
|
| 890 | + return $dir; |
|
| 891 | + } |
|
| 892 | + |
|
| 893 | + /** |
|
| 894 | + * Set config directory |
|
| 895 | + * |
|
| 896 | + * @param $config_dir |
|
| 897 | + * |
|
| 898 | + * @return Smarty current Smarty instance for chaining |
|
| 899 | + */ |
|
| 900 | + public function setConfigDir($config_dir) |
|
| 901 | + { |
|
| 902 | + return $this->setTemplateDir($config_dir, true); |
|
| 903 | + } |
|
| 904 | + |
|
| 905 | + /** |
|
| 906 | + * Add config directory(s) |
|
| 907 | + * |
|
| 908 | + * @param string|array $config_dir directory(s) of config sources |
|
| 909 | + * @param mixed $key key of the array element to assign the config dir to |
|
| 910 | + * |
|
| 911 | + * @return Smarty current Smarty instance for chaining |
|
| 912 | + */ |
|
| 913 | + public function addConfigDir($config_dir, $key = null) |
|
| 914 | + { |
|
| 915 | + return $this->addTemplateDir($config_dir, $key, true); |
|
| 916 | + } |
|
| 917 | + |
|
| 918 | + /** |
|
| 919 | + * Get config directory |
|
| 920 | + * |
|
| 921 | + * @param mixed $index index of directory to get, null to get all |
|
| 922 | + * |
|
| 923 | + * @return array configuration directory |
|
| 924 | + */ |
|
| 925 | + public function getConfigDir($index = null) |
|
| 926 | + { |
|
| 927 | + return $this->getTemplateDir($index, true); |
|
| 928 | + } |
|
| 929 | + |
|
| 930 | + /** |
|
| 931 | + * Set plugins directory |
|
| 932 | + * |
|
| 933 | + * @param string|array $plugins_dir directory(s) of plugins |
|
| 934 | + * |
|
| 935 | + * @return Smarty current Smarty instance for chaining |
|
| 936 | + */ |
|
| 937 | + public function setPluginsDir($plugins_dir) |
|
| 938 | + { |
|
| 939 | + $this->plugins_dir = (array) $plugins_dir; |
|
| 940 | + $this->_pluginsDirNormalized = false; |
|
| 941 | + return $this; |
|
| 942 | + } |
|
| 943 | + |
|
| 944 | + /** |
|
| 945 | + * Adds directory of plugin files |
|
| 946 | + * |
|
| 947 | + * @param null|array $plugins_dir |
|
| 948 | + * |
|
| 949 | + * @return Smarty current Smarty instance for chaining |
|
| 950 | + */ |
|
| 951 | + public function addPluginsDir($plugins_dir) |
|
| 952 | + { |
|
| 953 | + if (empty($this->plugins_dir)) { |
|
| 954 | + $this->plugins_dir[] = SMARTY_PLUGINS_DIR; |
|
| 955 | + } |
|
| 956 | + $this->plugins_dir = array_merge($this->plugins_dir, (array) $plugins_dir); |
|
| 957 | + $this->_pluginsDirNormalized = false; |
|
| 958 | + return $this; |
|
| 959 | + } |
|
| 960 | + |
|
| 961 | + /** |
|
| 962 | + * Get plugin directories |
|
| 963 | + * |
|
| 964 | + * @return array list of plugin directories |
|
| 965 | + */ |
|
| 966 | + public function getPluginsDir() |
|
| 967 | + { |
|
| 968 | + if (empty($this->plugins_dir)) { |
|
| 969 | + $this->plugins_dir[] = SMARTY_PLUGINS_DIR; |
|
| 970 | + $this->_pluginsDirNormalized = false; |
|
| 971 | + } |
|
| 972 | + if (!$this->_pluginsDirNormalized) { |
|
| 973 | + if (!is_array($this->plugins_dir)) { |
|
| 974 | + $this->plugins_dir = (array) $this->plugins_dir; |
|
| 975 | + } |
|
| 976 | + foreach ($this->plugins_dir as $k => $v) { |
|
| 977 | + $this->plugins_dir[ $k ] = $this->_realpath(rtrim($v, "/\\") . DS, true); |
|
| 978 | + } |
|
| 979 | + $this->_cache[ 'plugin_files' ] = array(); |
|
| 980 | + $this->_pluginsDirNormalized = true; |
|
| 981 | + } |
|
| 982 | + return $this->plugins_dir; |
|
| 983 | + } |
|
| 984 | + |
|
| 985 | + /** |
|
| 986 | + * |
|
| 987 | + * @param string $compile_dir directory to store compiled templates in |
|
| 988 | + * |
|
| 989 | + * @return Smarty current Smarty instance for chaining |
|
| 990 | + */ |
|
| 991 | + public function setCompileDir($compile_dir) |
|
| 992 | + { |
|
| 993 | + $this->_normalizeDir('compile_dir', $compile_dir); |
|
| 994 | + $this->_compileDirNormalized = true; |
|
| 995 | + return $this; |
|
| 996 | + } |
|
| 997 | + |
|
| 998 | + /** |
|
| 999 | + * Get compiled directory |
|
| 1000 | + * |
|
| 1001 | + * @return string path to compiled templates |
|
| 1002 | + */ |
|
| 1003 | + public function getCompileDir() |
|
| 1004 | + { |
|
| 1005 | + if (!$this->_compileDirNormalized) { |
|
| 1006 | + $this->_normalizeDir('compile_dir', $this->compile_dir); |
|
| 1007 | + $this->_compileDirNormalized = true; |
|
| 1008 | + } |
|
| 1009 | + return $this->compile_dir; |
|
| 1010 | + } |
|
| 1011 | + |
|
| 1012 | + /** |
|
| 1013 | + * Set cache directory |
|
| 1014 | + * |
|
| 1015 | + * @param string $cache_dir directory to store cached templates in |
|
| 1016 | + * |
|
| 1017 | + * @return Smarty current Smarty instance for chaining |
|
| 1018 | + */ |
|
| 1019 | + public function setCacheDir($cache_dir) |
|
| 1020 | + { |
|
| 1021 | + $this->_normalizeDir('cache_dir', $cache_dir); |
|
| 1022 | + $this->_cacheDirNormalized = true; |
|
| 1023 | + return $this; |
|
| 1024 | + } |
|
| 1025 | + |
|
| 1026 | + /** |
|
| 1027 | + * Get cache directory |
|
| 1028 | + * |
|
| 1029 | + * @return string path of cache directory |
|
| 1030 | + */ |
|
| 1031 | + public function getCacheDir() |
|
| 1032 | + { |
|
| 1033 | + if (!$this->_cacheDirNormalized) { |
|
| 1034 | + $this->_normalizeDir('cache_dir', $this->cache_dir); |
|
| 1035 | + $this->_cacheDirNormalized = true; |
|
| 1036 | + } |
|
| 1037 | + return $this->cache_dir; |
|
| 1038 | + } |
|
| 1039 | + |
|
| 1040 | + /** |
|
| 1041 | + * Normalize and set directory string |
|
| 1042 | + * |
|
| 1043 | + * @param string $dirName cache_dir or compile_dir |
|
| 1044 | + * @param string $dir filepath of folder |
|
| 1045 | + */ |
|
| 1046 | + private function _normalizeDir($dirName, $dir) |
|
| 1047 | + { |
|
| 1048 | + $this->{$dirName} = $this->_realpath(rtrim($dir, "/\\") . DS, true); |
|
| 1049 | + if (!isset(Smarty::$_muted_directories[ $this->{$dirName} ])) { |
|
| 1050 | + Smarty::$_muted_directories[ $this->{$dirName} ] = null; |
|
| 1051 | + } |
|
| 1052 | + } |
|
| 1053 | + |
|
| 1054 | + /** |
|
| 1055 | + * Normalize template_dir or config_dir |
|
| 1056 | + * |
|
| 1057 | + * @param bool $isConfig true for config_dir |
|
| 1058 | + * |
|
| 1059 | + */ |
|
| 1060 | + private function _nomalizeTemplateConfig($isConfig) |
|
| 1061 | + { |
|
| 1062 | + if ($isConfig) { |
|
| 1063 | + $processed = &$this->_processedConfigDir; |
|
| 1064 | + $dir = &$this->config_dir; |
|
| 1065 | + } else { |
|
| 1066 | + $processed = &$this->_processedTemplateDir; |
|
| 1067 | + $dir = &$this->template_dir; |
|
| 1068 | + } |
|
| 1069 | + if (!is_array($dir)) { |
|
| 1070 | + $dir = (array) $dir; |
|
| 1071 | + } |
|
| 1072 | + foreach ($dir as $k => $v) { |
|
| 1073 | + if (!isset($processed[ $k ])) { |
|
| 1074 | + $dir[ $k ] = $v = $this->_realpath(rtrim($v, "/\\") . DS, true); |
|
| 1075 | + $processed[ $k ] = true; |
|
| 1076 | + } |
|
| 1077 | + } |
|
| 1078 | + $isConfig ? $this->_configDirNormalized = true : $this->_templateDirNormalized = true; |
|
| 1079 | + $isConfig ? $this->_joined_config_dir = join('#', $this->config_dir) : |
|
| 1080 | + $this->_joined_template_dir = join('#', $this->template_dir); |
|
| 1081 | + } |
|
| 1082 | + |
|
| 1083 | + /** |
|
| 1084 | + * creates a template object |
|
| 1085 | + * |
|
| 1086 | + * @param string $template the resource handle of the template file |
|
| 1087 | + * @param mixed $cache_id cache id to be used with this template |
|
| 1088 | + * @param mixed $compile_id compile id to be used with this template |
|
| 1089 | + * @param object $parent next higher level of Smarty variables |
|
| 1090 | + * @param boolean $do_clone flag is Smarty object shall be cloned |
|
| 1091 | + * |
|
| 1092 | + * @return object template object |
|
| 1093 | + */ |
|
| 1094 | + public function createTemplate($template, $cache_id = null, $compile_id = null, $parent = null, $do_clone = true) |
|
| 1095 | + { |
|
| 1096 | + if ($cache_id !== null && (is_object($cache_id) || is_array($cache_id))) { |
|
| 1097 | + $parent = $cache_id; |
|
| 1098 | + $cache_id = null; |
|
| 1099 | + } |
|
| 1100 | + if ($parent !== null && is_array($parent)) { |
|
| 1101 | + $data = $parent; |
|
| 1102 | + $parent = null; |
|
| 1103 | + } else { |
|
| 1104 | + $data = null; |
|
| 1105 | + } |
|
| 1106 | + $_templateId = $this->_getTemplateId($template, $cache_id, $compile_id); |
|
| 1107 | + $tpl = null; |
|
| 1108 | + if ($this->caching && isset($this->_cache[ 'isCached' ][ $_templateId ])) { |
|
| 1109 | + $tpl = $do_clone ? clone $this->_cache[ 'isCached' ][ $_templateId ] : |
|
| 1110 | + $this->_cache[ 'isCached' ][ $_templateId ]; |
|
| 1111 | + $tpl->tpl_vars = $tpl->config_vars = array(); |
|
| 1112 | + } else if (!$do_clone && isset($this->_cache[ 'tplObjects' ][ $_templateId ])) { |
|
| 1113 | + $tpl = clone $this->_cache[ 'tplObjects' ][ $_templateId ]; |
|
| 1114 | + } else { |
|
| 1115 | + /* @var Smarty_Internal_Template $tpl */ |
|
| 1116 | + $tpl = new $this->template_class($template, $this, null, $cache_id, $compile_id, null, null); |
|
| 1117 | + $tpl->templateId = $_templateId; |
|
| 1118 | + } |
|
| 1119 | + if ($do_clone) { |
|
| 1120 | + $tpl->smarty = clone $tpl->smarty; |
|
| 1121 | + } |
|
| 1122 | + $tpl->parent = $parent ? $parent : $this; |
|
| 1123 | + // fill data if present |
|
| 1124 | + if (!empty($data) && is_array($data)) { |
|
| 1125 | + // set up variable values |
|
| 1126 | + foreach ($data as $_key => $_val) { |
|
| 1127 | + $tpl->tpl_vars[ $_key ] = new Smarty_Variable($_val); |
|
| 1128 | + } |
|
| 1129 | + } |
|
| 1130 | + if ($this->debugging || $this->debugging_ctrl == 'URL') { |
|
| 1131 | + $tpl->smarty->_debug = new Smarty_Internal_Debug(); |
|
| 1132 | + // check URL debugging control |
|
| 1133 | + if (!$this->debugging && $this->debugging_ctrl == 'URL') { |
|
| 1134 | + $tpl->smarty->_debug->debugUrl($tpl->smarty); |
|
| 1135 | + } |
|
| 1136 | + } |
|
| 1137 | + return $tpl; |
|
| 1138 | + } |
|
| 1139 | + |
|
| 1140 | + /** |
|
| 1141 | + * Takes unknown classes and loads plugin files for them |
|
| 1142 | + * class name format: Smarty_PluginType_PluginName |
|
| 1143 | + * plugin filename format: plugintype.pluginname.php |
|
| 1144 | + * |
|
| 1145 | + * @param string $plugin_name class plugin name to load |
|
| 1146 | + * @param bool $check check if already loaded |
|
| 1147 | + * |
|
| 1148 | + * @throws SmartyException |
|
| 1149 | + * @return string |boolean filepath of loaded file or false |
|
| 1150 | + */ |
|
| 1151 | + public function loadPlugin($plugin_name, $check = true) |
|
| 1152 | + { |
|
| 1153 | + return $this->ext->loadPlugin->loadPlugin($this, $plugin_name, $check); |
|
| 1154 | + } |
|
| 1155 | + |
|
| 1156 | + /** |
|
| 1157 | + * Get unique template id |
|
| 1158 | + * |
|
| 1159 | + * @param string $template_name |
|
| 1160 | + * @param null|mixed $cache_id |
|
| 1161 | + * @param null|mixed $compile_id |
|
| 1162 | + * @param null $caching |
|
| 1163 | + * @param \Smarty_Internal_Template $template |
|
| 1164 | + * |
|
| 1165 | + * @return string |
|
| 1166 | + */ |
|
| 1167 | + public function _getTemplateId($template_name, $cache_id = null, $compile_id = null, $caching = null, |
|
| 1168 | + Smarty_Internal_Template $template = null) |
|
| 1169 | + { |
|
| 1170 | + $template_name = (strpos($template_name, ':') === false) ? "{$this->default_resource_type}:{$template_name}" : |
|
| 1171 | + $template_name; |
|
| 1172 | + $cache_id = $cache_id === null ? $this->cache_id : $cache_id; |
|
| 1173 | + $compile_id = $compile_id === null ? $this->compile_id : $compile_id; |
|
| 1174 | + $caching = (int) ($caching === null ? $this->caching : $caching); |
|
| 1175 | + |
|
| 1176 | + if ((isset($template) && strpos($template_name, ':.') !== false) || $this->allow_ambiguous_resources) { |
|
| 1177 | + $_templateId = |
|
| 1178 | + Smarty_Resource::getUniqueTemplateName((isset($template) ? $template : $this), $template_name) . |
|
| 1179 | + "#{$cache_id}#{$compile_id}#{$caching}"; |
|
| 1180 | + } else { |
|
| 1181 | + $_templateId = $this->_joined_template_dir . "#{$template_name}#{$cache_id}#{$compile_id}#{$caching}"; |
|
| 1182 | + } |
|
| 1183 | + if (isset($_templateId[ 150 ])) { |
|
| 1184 | + $_templateId = sha1($_templateId); |
|
| 1185 | + } |
|
| 1186 | + return $_templateId; |
|
| 1187 | + } |
|
| 1188 | + |
|
| 1189 | + /** |
|
| 1190 | + * Normalize path |
|
| 1191 | + * - remove /./ and /../ |
|
| 1192 | + * - make it absolute if required |
|
| 1193 | + * |
|
| 1194 | + * @param string $path file path |
|
| 1195 | + * @param bool $realpath if true - convert to absolute |
|
| 1196 | + * false - convert to relative |
|
| 1197 | + * null - keep as it is but remove /./ /../ |
|
| 1198 | + * |
|
| 1199 | + * @return string |
|
| 1200 | + */ |
|
| 1201 | + public function _realpath($path, $realpath = null) |
|
| 1202 | + { |
|
| 1203 | + $nds = DS == '/' ? '\\' : '/'; |
|
| 1204 | + // normalize DS |
|
| 1205 | + $path = str_replace($nds, DS, $path); |
|
| 1206 | + preg_match('%^(?<root>(?:[[:alpha:]]:[\\\\]|/|[\\\\]{2}[[:alpha:]]+|[[:print:]]{2,}:[/]{2}|[\\\\])?)(?<path>(?:[[:print:]]*))$%', |
|
| 1207 | + $path, $parts); |
|
| 1208 | + $path = $parts[ 'path' ]; |
|
| 1209 | + if ($parts[ 'root' ] == '\\') { |
|
| 1210 | + $parts[ 'root' ] = substr(getcwd(), 0, 2) . $parts[ 'root' ]; |
|
| 1211 | + } else { |
|
| 1212 | + if ($realpath !== null && !$parts[ 'root' ]) { |
|
| 1213 | + $path = getcwd() . DS . $path; |
|
| 1214 | + } |
|
| 1215 | + } |
|
| 1216 | + // remove noop 'DS DS' and 'DS.DS' patterns |
|
| 1217 | + $path = preg_replace('#([\\\\/]([.]?[\\\\/])+)#', DS, $path); |
|
| 1218 | + // resolve '..DS' pattern, smallest first |
|
| 1219 | + if (strpos($path, '..' . DS) !== false && |
|
| 1220 | + preg_match_all('#(([.]?[\\\\/])*([.][.])[\\\\/]([.]?[\\\\/])*)+#', $path, $match) |
|
| 1221 | + ) { |
|
| 1222 | + $counts = array(); |
|
| 1223 | + foreach ($match[ 0 ] as $m) { |
|
| 1224 | + $counts[] = (int) ((strlen($m) - 1) / 3); |
|
| 1225 | + } |
|
| 1226 | + sort($counts); |
|
| 1227 | + foreach ($counts as $count) { |
|
| 1228 | + $path = preg_replace('#(([\\\\/]([.]?[\\\\/])*[^\\\\/.]+){' . $count . |
|
| 1229 | + '}[\\\\/]([.]?[\\\\/])*([.][.][\\\\/]([.]?[\\\\/])*){' . $count . '})(?=[^.])#', |
|
| 1230 | + DS, $path); |
|
| 1231 | + } |
|
| 1232 | + } |
|
| 1233 | + |
|
| 1234 | + return $parts[ 'root' ] . $path; |
|
| 1235 | + } |
|
| 1236 | + |
|
| 1237 | + /** |
|
| 1238 | + * Empty template objects cache |
|
| 1239 | + */ |
|
| 1240 | + public function _clearTemplateCache() |
|
| 1241 | + { |
|
| 1242 | + $this->_cache[ 'isCached' ] = array(); |
|
| 1243 | + $this->_cache[ 'tplObjects' ] = array(); |
|
| 1244 | + } |
|
| 1245 | + |
|
| 1246 | + /** |
|
| 1247 | + * @param boolean $compile_check |
|
| 1248 | + */ |
|
| 1249 | + public function setCompileCheck($compile_check) |
|
| 1250 | + { |
|
| 1251 | + $this->compile_check = $compile_check; |
|
| 1252 | + } |
|
| 1253 | + |
|
| 1254 | + /** |
|
| 1255 | + * @param boolean $use_sub_dirs |
|
| 1256 | + */ |
|
| 1257 | + public function setUseSubDirs($use_sub_dirs) |
|
| 1258 | + { |
|
| 1259 | + $this->use_sub_dirs = $use_sub_dirs; |
|
| 1260 | + } |
|
| 1261 | + |
|
| 1262 | + /** |
|
| 1263 | + * @param int $error_reporting |
|
| 1264 | + */ |
|
| 1265 | + public function setErrorReporting($error_reporting) |
|
| 1266 | + { |
|
| 1267 | + $this->error_reporting = $error_reporting; |
|
| 1268 | + } |
|
| 1269 | + |
|
| 1270 | + /** |
|
| 1271 | + * @param boolean $escape_html |
|
| 1272 | + */ |
|
| 1273 | + public function setEscapeHtml($escape_html) |
|
| 1274 | + { |
|
| 1275 | + $this->escape_html = $escape_html; |
|
| 1276 | + } |
|
| 1277 | + |
|
| 1278 | + /** |
|
| 1279 | + * @param boolean $auto_literal |
|
| 1280 | + */ |
|
| 1281 | + public function setAutoLiteral($auto_literal) |
|
| 1282 | + { |
|
| 1283 | + $this->auto_literal = $auto_literal; |
|
| 1284 | + } |
|
| 1285 | + |
|
| 1286 | + /** |
|
| 1287 | + * @param boolean $force_compile |
|
| 1288 | + */ |
|
| 1289 | + public function setForceCompile($force_compile) |
|
| 1290 | + { |
|
| 1291 | + $this->force_compile = $force_compile; |
|
| 1292 | + } |
|
| 1293 | + |
|
| 1294 | + /** |
|
| 1295 | + * @param boolean $merge_compiled_includes |
|
| 1296 | + */ |
|
| 1297 | + public function setMergeCompiledIncludes($merge_compiled_includes) |
|
| 1298 | + { |
|
| 1299 | + $this->merge_compiled_includes = $merge_compiled_includes; |
|
| 1300 | + } |
|
| 1301 | + |
|
| 1302 | + /** |
|
| 1303 | + * @param string $left_delimiter |
|
| 1304 | + */ |
|
| 1305 | + public function setLeftDelimiter($left_delimiter) |
|
| 1306 | + { |
|
| 1307 | + $this->left_delimiter = $left_delimiter; |
|
| 1308 | + } |
|
| 1309 | + |
|
| 1310 | + /** |
|
| 1311 | + * @param string $right_delimiter |
|
| 1312 | + */ |
|
| 1313 | + public function setRightDelimiter($right_delimiter) |
|
| 1314 | + { |
|
| 1315 | + $this->right_delimiter = $right_delimiter; |
|
| 1316 | + } |
|
| 1317 | + |
|
| 1318 | + /** |
|
| 1319 | + * @param boolean $debugging |
|
| 1320 | + */ |
|
| 1321 | + public function setDebugging($debugging) |
|
| 1322 | + { |
|
| 1323 | + $this->debugging = $debugging; |
|
| 1324 | + } |
|
| 1325 | + |
|
| 1326 | + /** |
|
| 1327 | + * @param boolean $config_overwrite |
|
| 1328 | + */ |
|
| 1329 | + public function setConfigOverwrite($config_overwrite) |
|
| 1330 | + { |
|
| 1331 | + $this->config_overwrite = $config_overwrite; |
|
| 1332 | + } |
|
| 1333 | + |
|
| 1334 | + /** |
|
| 1335 | + * @param boolean $config_booleanize |
|
| 1336 | + */ |
|
| 1337 | + public function setConfigBooleanize($config_booleanize) |
|
| 1338 | + { |
|
| 1339 | + $this->config_booleanize = $config_booleanize; |
|
| 1340 | + } |
|
| 1341 | + |
|
| 1342 | + /** |
|
| 1343 | + * @param boolean $config_read_hidden |
|
| 1344 | + */ |
|
| 1345 | + public function setConfigReadHidden($config_read_hidden) |
|
| 1346 | + { |
|
| 1347 | + $this->config_read_hidden = $config_read_hidden; |
|
| 1348 | + } |
|
| 1349 | + |
|
| 1350 | + /** |
|
| 1351 | + * @param boolean $compile_locking |
|
| 1352 | + */ |
|
| 1353 | + public function setCompileLocking($compile_locking) |
|
| 1354 | + { |
|
| 1355 | + $this->compile_locking = $compile_locking; |
|
| 1356 | + } |
|
| 1357 | + |
|
| 1358 | + /** |
|
| 1359 | + * @param string $default_resource_type |
|
| 1360 | + */ |
|
| 1361 | + public function setDefaultResourceType($default_resource_type) |
|
| 1362 | + { |
|
| 1363 | + $this->default_resource_type = $default_resource_type; |
|
| 1364 | + } |
|
| 1365 | + |
|
| 1366 | + /** |
|
| 1367 | + * @param string $caching_type |
|
| 1368 | + */ |
|
| 1369 | + public function setCachingType($caching_type) |
|
| 1370 | + { |
|
| 1371 | + $this->caching_type = $caching_type; |
|
| 1372 | + } |
|
| 1373 | + |
|
| 1374 | + /** |
|
| 1375 | + * Test install |
|
| 1376 | + * |
|
| 1377 | + * @param null $errors |
|
| 1378 | + */ |
|
| 1379 | + public function testInstall(&$errors = null) |
|
| 1380 | + { |
|
| 1381 | + Smarty_Internal_TestInstall::testInstall($this, $errors); |
|
| 1382 | + } |
|
| 1383 | + |
|
| 1384 | + /** |
|
| 1385 | + * <<magic>> Generic getter. |
|
| 1386 | + * Calls the appropriate getter function. |
|
| 1387 | + * Issues an E_USER_NOTICE if no valid getter is found. |
|
| 1388 | + * |
|
| 1389 | + * @param string $name property name |
|
| 1390 | + * |
|
| 1391 | + * @return mixed |
|
| 1392 | + */ |
|
| 1393 | + public function __get($name) |
|
| 1394 | + { |
|
| 1395 | + if (isset($this->accessMap[ $name ])) { |
|
| 1396 | + $method = 'get' . $this->accessMap[ $name ]; |
|
| 1397 | + return $this->{$method}(); |
|
| 1398 | + } elseif (isset($this->_cache[ $name ])) { |
|
| 1399 | + return $this->_cache[ $name ]; |
|
| 1400 | + } elseif (in_array($name, $this->obsoleteProperties)) { |
|
| 1401 | + return null; |
|
| 1402 | + } else { |
|
| 1403 | + trigger_error('Undefined property: ' . get_class($this) . '::$' . $name, E_USER_NOTICE); |
|
| 1404 | + } |
|
| 1405 | + return null; |
|
| 1406 | + } |
|
| 1407 | + |
|
| 1408 | + /** |
|
| 1409 | + * <<magic>> Generic setter. |
|
| 1410 | + * Calls the appropriate setter function. |
|
| 1411 | + * Issues an E_USER_NOTICE if no valid setter is found. |
|
| 1412 | + * |
|
| 1413 | + * @param string $name property name |
|
| 1414 | + * @param mixed $value parameter passed to setter |
|
| 1415 | + */ |
|
| 1416 | + public function __set($name, $value) |
|
| 1417 | + { |
|
| 1418 | + if (isset($this->accessMap[ $name ])) { |
|
| 1419 | + $method = 'set' . $this->accessMap[ $name ]; |
|
| 1420 | + $this->{$method}($value); |
|
| 1421 | + } elseif (in_array($name, $this->obsoleteProperties)) { |
|
| 1422 | + return; |
|
| 1423 | + } else { |
|
| 1424 | + if (is_object($value) && method_exists($value, $name)) { |
|
| 1425 | + $this->$name = $value; |
|
| 1426 | + } else { |
|
| 1427 | + trigger_error('Undefined property: ' . get_class($this) . '::$' . $name, E_USER_NOTICE); |
|
| 1428 | + } |
|
| 1429 | + } |
|
| 1430 | + } |
|
| 1431 | + |
|
| 1432 | + /** |
|
| 1433 | + * Error Handler to mute expected messages |
|
| 1434 | + * |
|
| 1435 | + * @link http://php.net/set_error_handler |
|
| 1436 | + * |
|
| 1437 | + * @param integer $errno Error level |
|
| 1438 | + * @param $errstr |
|
| 1439 | + * @param $errfile |
|
| 1440 | + * @param $errline |
|
| 1441 | + * @param $errcontext |
|
| 1442 | + * |
|
| 1443 | + * @return bool|void |
|
| 1444 | + */ |
|
| 1445 | + public static function mutingErrorHandler($errno, $errstr, $errfile, $errline, $errcontext) |
|
| 1446 | + { |
|
| 1447 | + $_is_muted_directory = false; |
|
| 1448 | + |
|
| 1449 | + // add the SMARTY_DIR to the list of muted directories |
|
| 1450 | + if (!isset(Smarty::$_muted_directories[ SMARTY_DIR ])) { |
|
| 1451 | + $smarty_dir = realpath(SMARTY_DIR); |
|
| 1452 | + if ($smarty_dir !== false) { |
|
| 1453 | + Smarty::$_muted_directories[ SMARTY_DIR ] = |
|
| 1454 | + array('file' => $smarty_dir, 'length' => strlen($smarty_dir),); |
|
| 1455 | + } |
|
| 1456 | + } |
|
| 1457 | + |
|
| 1458 | + // walk the muted directories and test against $errfile |
|
| 1459 | + foreach (Smarty::$_muted_directories as $key => &$dir) { |
|
| 1460 | + if (!$dir) { |
|
| 1461 | + // resolve directory and length for speedy comparisons |
|
| 1462 | + $file = realpath($key); |
|
| 1463 | + if ($file === false) { |
|
| 1464 | + // this directory does not exist, remove and skip it |
|
| 1465 | + unset(Smarty::$_muted_directories[ $key ]); |
|
| 1466 | + continue; |
|
| 1467 | + } |
|
| 1468 | + $dir = array('file' => $file, 'length' => strlen($file),); |
|
| 1469 | + } |
|
| 1470 | + if (!strncmp($errfile, $dir[ 'file' ], $dir[ 'length' ])) { |
|
| 1471 | + $_is_muted_directory = true; |
|
| 1472 | + break; |
|
| 1473 | + } |
|
| 1474 | + } |
|
| 1475 | + // pass to next error handler if this error did not occur inside SMARTY_DIR |
|
| 1476 | + // or the error was within smarty but masked to be ignored |
|
| 1477 | + if (!$_is_muted_directory || ($errno && $errno & error_reporting())) { |
|
| 1478 | + if (Smarty::$_previous_error_handler) { |
|
| 1479 | + return call_user_func(Smarty::$_previous_error_handler, $errno, $errstr, $errfile, $errline, |
|
| 1480 | + $errcontext); |
|
| 1481 | + } else { |
|
| 1482 | + return false; |
|
| 1483 | + } |
|
| 1484 | + } |
|
| 1485 | + return; |
|
| 1486 | + } |
|
| 1487 | + |
|
| 1488 | + /** |
|
| 1489 | + * Enable error handler to mute expected messages |
|
| 1490 | + * |
|
| 1491 | + * @return void |
|
| 1492 | + */ |
|
| 1493 | + public static function muteExpectedErrors() |
|
| 1494 | + { |
|
| 1495 | + /* |
|
| 1496 | 1496 | error muting is done because some people implemented custom error_handlers using |
| 1497 | 1497 | http://php.net/set_error_handler and for some reason did not understand the following paragraph: |
| 1498 | 1498 | |
@@ -1508,22 +1508,22 @@ discard block |
||
| 1508 | 1508 | - between file_exists() and filemtime() a possible race condition is opened, |
| 1509 | 1509 | which does not exist using the simple @filemtime() approach. |
| 1510 | 1510 | */ |
| 1511 | - $error_handler = array('Smarty', 'mutingErrorHandler'); |
|
| 1512 | - $previous = set_error_handler($error_handler); |
|
| 1513 | - |
|
| 1514 | - // avoid dead loops |
|
| 1515 | - if ($previous !== $error_handler) { |
|
| 1516 | - Smarty::$_previous_error_handler = $previous; |
|
| 1517 | - } |
|
| 1518 | - } |
|
| 1519 | - |
|
| 1520 | - /** |
|
| 1521 | - * Disable error handler muting expected messages |
|
| 1522 | - * |
|
| 1523 | - * @return void |
|
| 1524 | - */ |
|
| 1525 | - public static function unmuteExpectedErrors() |
|
| 1526 | - { |
|
| 1527 | - restore_error_handler(); |
|
| 1528 | - } |
|
| 1511 | + $error_handler = array('Smarty', 'mutingErrorHandler'); |
|
| 1512 | + $previous = set_error_handler($error_handler); |
|
| 1513 | + |
|
| 1514 | + // avoid dead loops |
|
| 1515 | + if ($previous !== $error_handler) { |
|
| 1516 | + Smarty::$_previous_error_handler = $previous; |
|
| 1517 | + } |
|
| 1518 | + } |
|
| 1519 | + |
|
| 1520 | + /** |
|
| 1521 | + * Disable error handler muting expected messages |
|
| 1522 | + * |
|
| 1523 | + * @return void |
|
| 1524 | + */ |
|
| 1525 | + public static function unmuteExpectedErrors() |
|
| 1526 | + { |
|
| 1527 | + restore_error_handler(); |
|
| 1528 | + } |
|
| 1529 | 1529 | } |