Ok I'm trying to pass parameteres to the constructor of my library I created to extend the CI_Form_validation class. Anyway, here is what I'm passing from my model:
$this->load->library('MY_Form_validation', array('config' => '', 'post' => $this->input->post()));
Then here is the MY_Form_validation library:
private $post;
public function __construct($params) {
parent::__construct($params['config']);
$this->post = $params['post'];
}
But it's saying I'm not passing anything in. Here are the error messages:
Message: Missing argument 1 for MY_Form_validation::__construct(), called in H:\WD SmartWare.swstor\HALEY-HP\Source\DStable\stable\core\Loader.php on line 1099 and defined
Message: Undefined variable: params
EDIT On request, the whole class:
class MY_Form_validation extends CI_Form_validation {
private $post;
public function __construct($params) {
parent::__construct($params['config']);
$this->post = $params['post'];
}
}