[eluser]manix[/eluser]
I've created a custom library using singleton pattern. Why by this way? because I need to be able to call my functions without
$this-> reference, for example, I could execute the code below:
Code:
function foo() { MyLibrary::instance()->foo(); }
then I could call my functions in controllers like this:
instance of
Code:
$this->mylibrary->foo();
I am in trouble because CodeIgniter try to instanciate my library when the best way to do (in my case) is "read" the static instance.