Welcome Guest, Not a member yet? Register   Sign In
PHP Class VS CI library
#1

[eluser]transformer[/eluser]
I have learned that CI library is "just" a class (right?). we can make a lot of class instance or object and we can access their function and property of each object. how can we do this with CI custom (or not) library? can we also make a lot of "CI custom (or not) library instance"?

class something
{
public $somevar1;
public $somevar2;
public function somefunction($someparam)
{
//whatever
}
}

$obj1=new class something; //is it same with $obj1=$this->load->library("something");
$obj2=new class something;
//I think we cannot do like this $obj2=$this->load->library("something");

$obj1->somevar1=5; //how can we get/set the library property of each "object"
$obj1->somefunction($someparam); //how can we use the library function of each "object"

or may be there is any other solution??
Thanks before




Theme © iAndrew 2016 - Forum software by © MyBB