Welcome Guest, Not a member yet? Register   Sign In
simple PHP class
#3

[eluser]Ajaxian64[/eluser]
Thanks

But isn't there another method ? I'm not so please to do it so.
Mainly because library syntax is "huge" for this.

Consider that in a model I shall create 1 message :
Code:
$this->load->library('Msg');
if (pb 1) {$this->Msg->status = FALSE; $this->Msg->why='blablabla'; return $this->Msg; }
And in controller
Code:
$msg = $this->my_model->test(); // which returns the previous line of code.
Seems to me strange.

I juste want :
Code:
If (pb1) return new Msg('blablabla',FALSE);
and In controller
Code:
$msg = $this->my_model->test();
if ($msg->status == FALSE) ....
which it seems to me better


Messages In This Thread
simple PHP class - by El Forum - 09-08-2010, 09:28 AM
simple PHP class - by El Forum - 09-08-2010, 09:33 AM
simple PHP class - by El Forum - 09-08-2010, 09:46 AM
simple PHP class - by El Forum - 09-08-2010, 09:51 AM
simple PHP class - by El Forum - 09-08-2010, 10:02 AM
simple PHP class - by El Forum - 09-08-2010, 10:05 AM
simple PHP class - by El Forum - 09-08-2010, 10:07 AM
simple PHP class - by El Forum - 09-08-2010, 10:10 AM
simple PHP class - by El Forum - 09-08-2010, 10:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB