php - How do you add abstract class library in the Codeigniter framework? -
i have following code in file called abstractclass.php in libraries folder 
abstract class abstractclass {   abstract protected dosomething (); }  class concreteclass extends abstractclass {   public function dosomething () {};  } when try load abstractclass controllers follows:
$this->load->library('abstractclass'); i unable load requested class: abstractclass error.
what doing wrong? should include file rather loading it?
thanks
well cannot load abstract class directly goes against point of abstract class.
you can put abstract class in file along library, bit pointless , goes against "one class 1 file" standard ci (and standards) suggest.
you can include file include() in library files, or set __autoload() function you. best place __autoload() bottom of config.php.
Comments
Post a Comment