Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Parser.php #5

Open
wants to merge 1 commit into
base: hmvc_unit
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update Parser.php
  • Loading branch information
FDiskas authored Apr 17, 2017
commit a7c4dfddc82b3d19f48766a078227d72ae840ef9
15 changes: 13 additions & 2 deletions system/libraries/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@ class CI_Parser {
*/
protected $CI;

// --------------------------------------------------------------------

/**
* Class constructor
*/
public function __construct()
{
$this->CI =& get_instance();
}

// --------------------------------------------------------------------

/**
* Parse a template
*
Expand All @@ -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);
Expand Down Expand Up @@ -214,4 +225,4 @@ protected function _match_pair($string, $variable)
}

/* End of file Parser.php */
/* Location: ./system/libraries/Parser.php */
/* Location: ./system/libraries/Parser.php */