I have a membership class I want to use throughout my website. I was wondering what the easiest way would be to load it so I can access it 开发者_高级运维in my Models and Controllers?
Would I need to use Zend Autoload? Also is there a convention for where to put it? Like in /application/business/membership.php?
What about third party classes?
You would turn it into a helper class. This can either be a standalone class, or it could be an action helper which you would register with the Action Helper Broker.
http://framework.zend.com/manual/en/zend.controller.actionhelpers.html
Zend_Controller_Action_HelperBroker::addHelper($helper);
Where $helper is the instantiate class.
精彩评论