summaryrefslogtreecommitdiffstats
path: root/system/libraries/Parser.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-11-12 20:05:45 +0100
committerAndrey Andreev <narf@bofh.bg>2012-11-12 20:05:45 +0100
commitfe367a9c56f11cc779797e579b2b58c0d96ecf7b (patch)
treece13f1c7160c1404c3f86a8d88e2a38c5be49115 /system/libraries/Parser.php
parentde00a69c162e3af5537175afb7aab216866331f1 (diff)
Fix issue #1992
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);