November 14th, 2008
Posted by Fred Wu
Since my previous post on this topic, Kohana has evolved and changed quite a bit, to the point that the instructions provided are no longer applicable.
So here are the updated instructions for those who would like to integrate Zend Framework into Kohana.
1) Put the ‘Zend’ folder in your application’s ‘vendors’ directory.
2) Put the following code into an appropriate place in your application, it could be in the base controller.
if ($path = Kohana::find_file('vendors', 'Zend/Exception')) { ini_set('include_path', ini_get('include_path').PATH_SEPARATOR.dirname(dirname($path))); }
3) Instanciate the Zend library with the following code:
require_once 'Zend/Mail.php'; $mail = new Zend_Mail;
That’s it! How simple is that? :)
Awesome! So simple… love it. Thanks
So simple!!! Same~ way we can include other classes as well (for example I am used to phpmailer). Wouldn’t it be better to use an autoload functionality (steill new to those frameworks…), so that you include only necessary files and optimise performance? How would this be possible?
good tips.I’ve used CI before,and I’am dout to use Kohana , Yii or ZF ,read some of your articles,I think I should try Konaha.