doctrine2 - fetch all data from table using doctrine in codeigniter -


i had integrated doctrine 2 in codeigniter 2. had database convert entity in store in models/entity

my controller goes ..

  public function __construct() {         parent::__construct();          $this->em = $this->doctrine->em;         $this->load->model('doctrine_model');        }     public function index()      {         $this->doctrine_model->get_object();                           } 

}

and model goes this....

    class doctrine_model extends ci_controller {      function __construct() {         parent::__construct();         //$this->load->library('doctrine');         //$accounttable = doctrine_core::gettable('ss_class');          $this->em = $this->doctrine->em;     }       function get_object()     {        $records = $this->em->getrepository("entity\ssclass")->findall();     } } 

when run code error

fatal error: cannot redeclare class ssclass in d:\xampp\htdocs\new_doctrine\application\models\entity\ssclass.php on line 14 

as had loaded doctrine library in autoload cannot figure out going on here...

getrepository method load entity automatically entity class autoload in other place such config.php or require function.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -