Integrating with other frameworks

Comparing #1 with #2

Revision #2 was created by KJedi KJedi on Jun 17, 2009, 7:50:45 AM.

formatting

Content

When you need to integrate with other frameworks (e.g. Zend Framework), you have to follow these steps:
 
1. Create protected/vendors/<frameworkName> (e.g. protected/vendors/Zend) 2. In your action/controller put `Yii::import('application.vendors.<frameworkName>.*')` 3. If you need more, than just 1-2 classes (e.g. full package in the framework), you should register it's autoload method. Most frameworks implement their own autoload, that is different from Yii's one.
 
 
I saw this hint in this [forum thread](http://www.yiiframework.com/forum/index.php/topic,788.msg4617.html#msg4617) and adopted it to Zend:

```php
require_once 'Zend/Loader/Autoloader.php';
spl_autoload_unregister(array('YiiBase','autoload'));
spl_autoload_register(array('Zend_Loader_Autoloader','autoload'));
[...]