CodeIgniter Forums
PHP Class VS CI library - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Libraries & Helpers (
+--- Thread: PHP Class VS CI library (/thread-47997.html)

PHP Class VS CI library - El Forum - 12-31-2011

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)

$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