From d216b3147bc3f37cf2337acab5767c6a4f74aa2e Mon Sep 17 00:00:00 2001 From: emkael Date: Mon, 31 Oct 2016 21:58:33 +0100 Subject: * PHPTAL library --- lib/phptal/PHPTAL/Dom/Comment.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 lib/phptal/PHPTAL/Dom/Comment.php (limited to 'lib/phptal/PHPTAL/Dom/Comment.php') diff --git a/lib/phptal/PHPTAL/Dom/Comment.php b/lib/phptal/PHPTAL/Dom/Comment.php new file mode 100644 index 0000000..4a3ba3c --- /dev/null +++ b/lib/phptal/PHPTAL/Dom/Comment.php @@ -0,0 +1,28 @@ + + * @author Kornel LesiƄski + * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License + * @version SVN: $Id$ + * @link http://phptal.org/ + */ + +/** + * @package PHPTAL + * @subpackage Dom + */ +class PHPTAL_Dom_Comment extends PHPTAL_Dom_Node +{ + public function generateCode(PHPTAL_Php_CodeWriter $codewriter) + { + if (!preg_match('/^\s*!/', $this->getValueEscaped())) { + $codewriter->pushHTML(''); + } + } +} -- cgit v1.2.3