@@ -1,17 +1,17 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * PHPTAL templating engine |
|
| 4 | - * |
|
| 5 | - * PHP Version 5 |
|
| 6 | - * |
|
| 7 | - * @category HTML |
|
| 8 | - * @package PHPTAL |
|
| 9 | - * @author Laurent Bedubourg <[email protected]> |
|
| 10 | - * @author Kornel Lesiński <[email protected]> |
|
| 11 | - * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License |
|
| 12 | - * @version SVN: $Id$ |
|
| 13 | - * @link http://phptal.org/ |
|
| 14 | - */ |
|
| 3 | + * PHPTAL templating engine |
|
| 4 | + * |
|
| 5 | + * PHP Version 5 |
|
| 6 | + * |
|
| 7 | + * @category HTML |
|
| 8 | + * @package PHPTAL |
|
| 9 | + * @author Laurent Bedubourg <[email protected]> |
|
| 10 | + * @author Kornel Lesiński <[email protected]> |
|
| 11 | + * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License |
|
| 12 | + * @version SVN: $Id$ |
|
| 13 | + * @link http://phptal.org/ |
|
| 14 | + */ |
|
| 15 | 15 | |
| 16 | 16 | /** |
| 17 | 17 | * Simple sax like xml parser for PHPTAL |
@@ -60,23 +60,23 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | |
| 62 | 62 | static $state_names = array( |
| 63 | - self::ST_ROOT => 'root node', |
|
| 64 | - self::ST_TEXT => 'text', |
|
| 65 | - self::ST_LT => 'start of tag', |
|
| 66 | - self::ST_TAG_NAME => 'tag name', |
|
| 67 | - self::ST_TAG_CLOSE => 'closing tag', |
|
| 68 | - self::ST_TAG_SINGLE => 'self-closing tag', |
|
| 69 | - self::ST_TAG_ATTRIBUTES => 'tag', |
|
| 70 | - self::ST_TAG_BETWEEN_ATTRIBUTE => 'tag attributes', |
|
| 71 | - self::ST_CDATA => 'CDATA', |
|
| 72 | - self::ST_COMMENT => 'comment', |
|
| 73 | - self::ST_DOCTYPE => 'doctype', |
|
| 74 | - self::ST_XMLDEC => 'XML declaration', |
|
| 75 | - self::ST_PREPROC => 'preprocessor directive', |
|
| 76 | - self::ST_ATTR_KEY => 'attribute name', |
|
| 77 | - self::ST_ATTR_EQ => 'attribute value', |
|
| 78 | - self::ST_ATTR_QUOTE => 'quoted attribute value', |
|
| 79 | - self::ST_ATTR_VALUE => 'unquoted attribute value', |
|
| 63 | + self::ST_ROOT => 'root node', |
|
| 64 | + self::ST_TEXT => 'text', |
|
| 65 | + self::ST_LT => 'start of tag', |
|
| 66 | + self::ST_TAG_NAME => 'tag name', |
|
| 67 | + self::ST_TAG_CLOSE => 'closing tag', |
|
| 68 | + self::ST_TAG_SINGLE => 'self-closing tag', |
|
| 69 | + self::ST_TAG_ATTRIBUTES => 'tag', |
|
| 70 | + self::ST_TAG_BETWEEN_ATTRIBUTE => 'tag attributes', |
|
| 71 | + self::ST_CDATA => 'CDATA', |
|
| 72 | + self::ST_COMMENT => 'comment', |
|
| 73 | + self::ST_DOCTYPE => 'doctype', |
|
| 74 | + self::ST_XMLDEC => 'XML declaration', |
|
| 75 | + self::ST_PREPROC => 'preprocessor directive', |
|
| 76 | + self::ST_ATTR_KEY => 'attribute name', |
|
| 77 | + self::ST_ATTR_EQ => 'attribute value', |
|
| 78 | + self::ST_ATTR_QUOTE => 'quoted attribute value', |
|
| 79 | + self::ST_ATTR_VALUE => 'unquoted attribute value', |
|
| 80 | 80 | ); |
| 81 | 81 | |
| 82 | 82 | private $input_encoding; |
@@ -381,15 +381,15 @@ discard block |
||
| 381 | 381 | |
| 382 | 382 | // http://www.w3.org/International/questions/qa-forms-utf-8 |
| 383 | 383 | $match = '[\x09\x0A\x0D\x20-\x7F]' // ASCII |
| 384 | - . '|[\xC2-\xDF][\x80-\xBF]' // non-overlong 2-byte |
|
| 385 | - . '|\xE0[\xA0-\xBF][\x80-\xBF]' // excluding overlongs |
|
| 386 | - . '|[\xE1-\xEC\xEE\xEE][\x80-\xBF]{2}' // straight 3-byte (exclude FFFE and FFFF) |
|
| 387 | - . '|\xEF[\x80-\xBE][\x80-\xBF]' // straight 3-byte |
|
| 388 | - . '|\xEF\xBF[\x80-\xBD]' // straight 3-byte |
|
| 389 | - . '|\xED[\x80-\x9F][\x80-\xBF]' // excluding surrogates |
|
| 390 | - . '|\xF0[\x90-\xBF][\x80-\xBF]{2}' // planes 1-3 |
|
| 391 | - . '|[\xF1-\xF3][\x80-\xBF]{3}' // planes 4-15 |
|
| 392 | - . '|\xF4[\x80-\x8F][\x80-\xBF]{2}'; // plane 16 |
|
| 384 | + . '|[\xC2-\xDF][\x80-\xBF]' // non-overlong 2-byte |
|
| 385 | + . '|\xE0[\xA0-\xBF][\x80-\xBF]' // excluding overlongs |
|
| 386 | + . '|[\xE1-\xEC\xEE\xEE][\x80-\xBF]{2}' // straight 3-byte (exclude FFFE and FFFF) |
|
| 387 | + . '|\xEF[\x80-\xBE][\x80-\xBF]' // straight 3-byte |
|
| 388 | + . '|\xEF\xBF[\x80-\xBD]' // straight 3-byte |
|
| 389 | + . '|\xED[\x80-\x9F][\x80-\xBF]' // excluding surrogates |
|
| 390 | + . '|\xF0[\x90-\xBF][\x80-\xBF]{2}' // planes 1-3 |
|
| 391 | + . '|[\xF1-\xF3][\x80-\xBF]{3}' // planes 4-15 |
|
| 392 | + . '|\xF4[\x80-\x8F][\x80-\xBF]{2}'; // plane 16 |
|
| 393 | 393 | |
| 394 | 394 | if (!preg_match('/^(?:(?>'.$match.'))+$/s',$str)) { |
| 395 | 395 | $res = preg_split('/((?>'.$match.')+)/s',$str,null,PREG_SPLIT_DELIM_CAPTURE); |
@@ -1,17 +1,17 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * PHPTAL templating engine |
|
| 4 | - * |
|
| 5 | - * PHP Version 5 |
|
| 6 | - * |
|
| 7 | - * @category HTML |
|
| 8 | - * @package PHPTAL |
|
| 9 | - * @author Laurent Bedubourg <[email protected]> |
|
| 10 | - * @author Kornel Lesiński <[email protected]> |
|
| 11 | - * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License |
|
| 12 | - * @version SVN: $Id$ |
|
| 13 | - * @link http://phptal.org/ |
|
| 14 | - */ |
|
| 3 | + * PHPTAL templating engine |
|
| 4 | + * |
|
| 5 | + * PHP Version 5 |
|
| 6 | + * |
|
| 7 | + * @category HTML |
|
| 8 | + * @package PHPTAL |
|
| 9 | + * @author Laurent Bedubourg <[email protected]> |
|
| 10 | + * @author Kornel Lesiński <[email protected]> |
|
| 11 | + * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License |
|
| 12 | + * @version SVN: $Id$ |
|
| 13 | + * @link http://phptal.org/ |
|
| 14 | + */ |
|
| 15 | 15 | |
| 16 | 16 | /** |
| 17 | 17 | * You're probably not using PHPTAL class properly |
@@ -1,17 +1,17 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * PHPTAL templating engine |
|
| 4 | - * |
|
| 5 | - * PHP Version 5 |
|
| 6 | - * |
|
| 7 | - * @category HTML |
|
| 8 | - * @package PHPTAL |
|
| 9 | - * @author Laurent Bedubourg <[email protected]> |
|
| 10 | - * @author Kornel Lesiński <[email protected]> |
|
| 11 | - * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License |
|
| 12 | - * @version SVN: $Id$ |
|
| 13 | - * @link http://phptal.org/ |
|
| 14 | - */ |
|
| 3 | + * PHPTAL templating engine |
|
| 4 | + * |
|
| 5 | + * PHP Version 5 |
|
| 6 | + * |
|
| 7 | + * @category HTML |
|
| 8 | + * @package PHPTAL |
|
| 9 | + * @author Laurent Bedubourg <[email protected]> |
|
| 10 | + * @author Kornel Lesiński <[email protected]> |
|
| 11 | + * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License |
|
| 12 | + * @version SVN: $Id$ |
|
| 13 | + * @link http://phptal.org/ |
|
| 14 | + */ |
|
| 15 | 15 | |
| 16 | 16 | /** |
| 17 | 17 | * You're probably not using PHPTAL class properly |
@@ -1,17 +1,17 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * PHPTAL templating engine |
|
| 4 | - * |
|
| 5 | - * PHP Version 5 |
|
| 6 | - * |
|
| 7 | - * @category HTML |
|
| 8 | - * @package PHPTAL |
|
| 9 | - * @author Laurent Bedubourg <[email protected]> |
|
| 10 | - * @author Kornel Lesiński <[email protected]> |
|
| 11 | - * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License |
|
| 12 | - * @version SVN: $Id$ |
|
| 13 | - * @link http://phptal.org/ |
|
| 14 | - */ |
|
| 3 | + * PHPTAL templating engine |
|
| 4 | + * |
|
| 5 | + * PHP Version 5 |
|
| 6 | + * |
|
| 7 | + * @category HTML |
|
| 8 | + * @package PHPTAL |
|
| 9 | + * @author Laurent Bedubourg <[email protected]> |
|
| 10 | + * @author Kornel Lesiński <[email protected]> |
|
| 11 | + * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License |
|
| 12 | + * @version SVN: $Id$ |
|
| 13 | + * @link http://phptal.org/ |
|
| 14 | + */ |
|
| 15 | 15 | |
| 16 | 16 | define('PHPTAL_VERSION', '1_3_0'); |
| 17 | 17 | |
@@ -966,10 +966,10 @@ discard block |
||
| 966 | 966 | */ |
| 967 | 967 | public function getFunctionName() |
| 968 | 968 | { |
| 969 | - // function name is used as base for caching, so it must be unique for |
|
| 970 | - // every combination of settings that changes code in compiled template |
|
| 969 | + // function name is used as base for caching, so it must be unique for |
|
| 970 | + // every combination of settings that changes code in compiled template |
|
| 971 | 971 | |
| 972 | - if (!$this->_functionName) { |
|
| 972 | + if (!$this->_functionName) { |
|
| 973 | 973 | |
| 974 | 974 | // just to make tempalte name recognizable |
| 975 | 975 | $basename = preg_replace('/\.[a-z]{3,5}$/', '', basename($this->_source->getRealPath())); |
@@ -989,7 +989,7 @@ discard block |
||
| 989 | 989 | $hash = strtr(rtrim(base64_encode($hash),"="),"+/=","_A_"); |
| 990 | 990 | |
| 991 | 991 | $this->_functionName = $this->getFunctionNamePrefix($this->_source->getLastModifiedTime()) . |
| 992 | - $basename . '__' . $hash; |
|
| 992 | + $basename . '__' . $hash; |
|
| 993 | 993 | } |
| 994 | 994 | return $this->_functionName; |
| 995 | 995 | } |