Welcome Guest, Not a member yet? Register   Sign In
Instantiate model from helper
#1

[eluser]nebulom[/eluser]
Is there a way I can instantiate my model from helper? I would like to it like this:

Code:
# user_helper.php
function user_form_session($session) {
$user = new User_model();
$user->email = $session['email'];
$user->password = $session['password'];
return $user;
}

Thanks.


Messages In This Thread
Instantiate model from helper - by El Forum - 06-10-2012, 11:21 PM
Instantiate model from helper - by El Forum - 06-11-2012, 01:36 AM
Instantiate model from helper - by El Forum - 06-11-2012, 06:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB