Hello,
I am attempting to build a function to add multiple arrays to a class var, I am attemting to do this from within an extension of that same class,
the following is Code Igniter code with comments, it sets $this->_form_data properly trick is that it is loaded into a seperate object
class MultiValid extends CI_Form_validation {
function multi_rules($group = '') {
// Loads the array
$this->CI->config->load('form_validation', TRUE);
$rules = $this->CI->config->item('form_validation');
$set = false;
if (is_array($group)) {
foreach ($group as $grp) {
if ($grp != '' && isset($rules[$grp])) {
$this->set_rules($rules[$grp]);
$set = true;
}
}
}
return $set;
}
}
This code is loaded as $this->multidataa
which fills $this->multidata->_form_data with values
what I'd like to set is $this->form_validation->_form_data
as it is a native library to CI and referenced regularly through other classes
any ideas?