开发者

Zend Custom Business Class

开发者 https://www.devze.com 2023-03-28 06:46 出处:网络
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?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消