Zend Framework

Zend Framework – Adding Your Plugins

This is rather a short port. I have just injected a plugin to my Zend Framework project. The plugin is a Calendar creator which i renamed to make it compatible with Zend Framework’s Zend_Loader mechanism.

Assuming that I have this plugin called Calender (the class name), I have to rename it into a certain class name compatible with Zend Frameworks class naming conventions.

Now I named it: Dc_Plugin_Calendar

It’s location is inside the library folder just beside Zend’s directory so it maps like this:

library/Zend/[Zend Framework Library here]
library/Dc/Plugin/Calender.php – this is my plugin

Then I will name the class like: Dc_Plugin_Calendar

To use it on my controllers, I will simply use the class name anywhere then Zend_Loader will handle it automatically without using require_once commands.

Leave a reply

Your email address will not be published. Required fields are marked *