[eluser]gh0st[/eluser]
I am in the process of building a modular cms, and have used Jamie Rumbelow's MY_Model; which I believe is automatically loaded.
However, if you autoload the Doctrine plugin via (/config/autoload.php) and then have a basic model, a la:
Code:
class Events_m extends Doctrine_Record
{
public function __construct()
{
parent::__construct();
}
}
This seems to work fine, but when I go to another pre-existing module (ie: news) it complains it can no longer find MY_Model.
Quote:Class 'MY_Model' not found in /modules/third_party/news/models/news_m.php
-> Note news_m.php extends MY_Model.
If I remove doctrine from autoload the errors disappear.
If I try to make the plugin load on specific controllers, it complains:
Quote:Undefined variable: db
plugins/doctrine_pi.php
This means that Doctrine can only be loaded on auto-load.
Ideally I want to be able to use MY_Model and Doctrine together.
The only solution I have found is in autoload.php to force it to load MY_Model.
But is this right? Are you meant to force load MY_Model?
Any help on this would be appreciated.