Welcome Guest, Not a member yet? Register   Sign In
objects in the template parser
#2

[eluser]heavenquake[/eluser]
Another possible solution which might be more consistent with the approach used in views could be to deploy _ci_object_to_array($val) on the value just before the type-check. Like the following:

Code:
foreach ($row as $key => $val)
{
   $val = $CI->load->_ci_object_to_array($val);
   if ( ! is_array($val))
   {
      $temp = $this->_parse_single($key, $val, $temp);
   }
   else
   {
      $temp = $this->_parse_pair($key, $val, $temp);
   }
}


Messages In This Thread
objects in the template parser - by El Forum - 02-20-2010, 08:36 PM
objects in the template parser - by El Forum - 02-20-2010, 09:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB