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

[eluser]Ajaxian64[/eluser]
Thanks smilie,
then To sum up

I put the class Msg in library folder (of my application or core)
==> then I must respect the construct form :
Code:
public function __construct($msg,$status)
    {
             $this->ci =& get_instance(); // If I need CI facilities I presume...
           $this->status  = $status;
         $this->msg      = $msg;
    }
And then I autoload this
And after I can use this syntax:
Code:
new Msg('bbll',FALSE) ;

But the syntax of Msg construct is not good and MUST be function __construct() without parameter due to the fact that entering in CI process with load->library or autoloading means no parameters in construct function.
Then new Msg(param1,param2) is, I presume, not possible with library loading...
Thanks


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