Welcome Guest, Not a member yet? Register   Sign In
CI_Parser - allows variables and PHP code?
#1

[eluser]Unknown[/eluser]
When I read the code for the CI_Parser class, the main function reads as follows:

Code:
public function parse($template, $data, $return = FALSE)
{
$CI =& get_instance();
$template = $CI->load->view($template, $data, TRUE);
return $this->_parse($template, $data, $return);
}

Why does the template parser first allow PHP output (making the variables available to PHP) and <i>then</i> parse the result, replacing the {simple_style} variables with the passed values?

This logic looks... well, very needlessly complex.


Messages In This Thread
CI_Parser - allows variables and PHP code? - by El Forum - 05-01-2012, 04:00 PM
CI_Parser - allows variables and PHP code? - by El Forum - 05-01-2012, 04:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB