From a7c4dfddc82b3d19f48766a078227d72ae840ef9 Mon Sep 17 00:00:00 2001 From: Vytenis Date: Mon, 17 Apr 2017 16:50:43 +0300 Subject: [PATCH] Update Parser.php --- system/libraries/Parser.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/system/libraries/Parser.php b/system/libraries/Parser.php index b64c78254a8..b23354f094b 100644 --- a/system/libraries/Parser.php +++ b/system/libraries/Parser.php @@ -57,6 +57,18 @@ class CI_Parser { */ protected $CI; + // -------------------------------------------------------------------- + + /** + * Class constructor + */ + public function __construct() + { + $this->CI =& get_instance(); + } + + // -------------------------------------------------------------------- + /** * Parse a template * @@ -70,7 +82,6 @@ class CI_Parser { */ public function parse($template, $data, $return = FALSE) { - $this->CI =& get_instance(); $template = $this->CI->load->view($template, $data, TRUE); return $this->_parse($template, $data, $return); @@ -214,4 +225,4 @@ protected function _match_pair($string, $variable) } /* End of file Parser.php */ -/* Location: ./system/libraries/Parser.php */ \ No newline at end of file +/* Location: ./system/libraries/Parser.php */