summaryrefslogtreecommitdiffstats
path: root/system/libraries/Parser.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries/Parser.php')
-rw-r--r--system/libraries/Parser.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/system/libraries/Parser.php b/system/libraries/Parser.php
index d29eede02..faa94b7c9 100644
--- a/system/libraries/Parser.php
+++ b/system/libraries/Parser.php
@@ -58,6 +58,20 @@ class CI_Parser {
*/
protected $CI;
+ // --------------------------------------------------------------------
+
+ /**
+ * Class constructor
+ *
+ * @return void
+ */
+ public function __construct()
+ {
+ $this->CI =& get_instance();
+ }
+
+ // --------------------------------------------------------------------
+
/**
* Parse a template
*
@@ -71,7 +85,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);