[Zend]

Discussion for various published PHP frameworks, including Zend Framework, CodeIgniter, Kohana, CakePHP, Yii, Symfony, and others.

Moderator: General Moderators

Post Reply
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

[Zend]

Post by VladSun »

First I am relatively new to Zend (I'm just in a process of migrating to it). Two questions...
1) Where do I have to put "$front->registerPlugin()" - in the BootStrap file or somerhwere else?
2) Do I have the Application_* classes ready to be used with the internal autoloader?

PS: Sorry to be lazy :) I've read some articles but they are not the "quick start" I've expected them to be.
There are 10 types of people in this world, those who understand binary and those who don't
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: [Zend]

Post by josh »

#1 - bootstrap would be the typical place.
#2 - I don't understand? Are you asking how auto loading works?
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: [Zend]

Post by VladSun »

#1 Thanks

#2

Code: Select all

class Application_Plugin_Dummy extends Zend_Controller_Plugin_Abstract { ...
Is there an easy way to autoload it - i.e. some special paths in the "application" folder?
There are 10 types of people in this world, those who understand binary and those who don't
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: [Zend]

Post by josh »

Put it in a path Application/Plugin/ relative to a path on your include path. The other option is to simply use a require_once() Make sure your application's namespace is either added to the auto loader, or you've enabled 'fallback auto loading' (fallback auto loading just loads anywhere on the include_path regardless of class prefix, that's what I currently use)
Post Reply