That's a part of the answer. I was sure my old logic was wrong. No hydrate then.
But how do I 'intent' or 'populate' my object then.
I have my controller with my form validation.
- InputName
- InputFirstname
If validation true then go to my call 'member' and use the function create member :
PHP Code:
public function CheckSignUp ()
{
$this->form_validation->set_rules('InputName', 'Name' ,'trim|required');
$this->form_validation->set_rules('InputFirstName', 'First Name' ,'trim|required');
if ($this->form_validation->run() == false)
{
$this->load->view('sign/signUp');
}
else
{
$this->MemberModel->createmember();
}
}
PHP Code:
function createmember()
{
$member = new Member([
'MEMBER_NAME' => $this->input->post('InputName')
'MEMBER_FRIST_NAME => $this->input->post('InputFirstName')
]);
}
And in my library 'member' :
PHP Code:
class Member
{//ATTRIBUTES
protected $_MEMBER_ID,
$_MEMBER_EMAIL,
$_MEMBER_NAME,
$_MEMBER_FIRST_NAME,
$_MEMBER_BIRTH_DAY,
$_MEMBER_ACCOUNT_MANAGER,
$_MEMBER_CREATION_DATE,
$_MEMBER_ACCOUNT_ID,
$_MEMBER_ADMIN,
$_MEMBER_PASS,
$_MEMBER_LOG_TIME,
$_MEMBER_NUM_CONNECT;
public function __construct()
{
}
}
I still miss something right ? when I do a var_dump of my $member all the value are set to NULL. this is why I wanted a 'hydrate'...