From: Roland Haeder Date: Sun, 9 Feb 2014 00:34:48 +0000 (+0100) Subject: Moved regex to variable. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0863fd5b23f495444beda544a83b13eba1acd6ff;p=core.git Moved regex to variable. Signed-off-by: Roland Häder --- diff --git a/inc/classes/main/template/class_BaseTemplateEngine.php b/inc/classes/main/template/class_BaseTemplateEngine.php index 6b8145f4..e7592c00 100644 --- a/inc/classes/main/template/class_BaseTemplateEngine.php +++ b/inc/classes/main/template/class_BaseTemplateEngine.php @@ -106,6 +106,11 @@ class BaseTemplateEngine extends BaseFrameworkSystem { */ private $regExpCodeTags = '/\{\?([a-z_]+)(:("[^"]+"|[^?}]+)+)?\?\}/'; + /** + * A regular expression to find template comments like + */ + private $regExpComments = '//'; + /** * Loaded helpers */ @@ -1592,7 +1597,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem { $compactedContent = str_replace(chr(9), '', str_replace(chr(10), '', str_replace(chr(13), '', $uncompactedContent))); // Then regex all comments like away - preg_match_all('//', $compactedContent, $matches); + preg_match_all($this->regExpComments, $compactedContent, $matches); // Do we have entries? if (isset($matches[0][0])) {