Difference between #1 and #2 of
Integrating with other frameworks

Revision #2 has been created by KJedi on Jun 17, 2009, 7:50:45 AM with the memo:

formatting
« previous (#1)

Changes

Title unchanged

Integrating with other frameworks

Category unchanged

Tutorials

Yii version unchanged

Tags unchanged

Content changed

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'));
[...]
4 1
7 followers
Viewed: 27 831 times
Version: 1.1
Category: Tutorials
Tags:
Written by: KJedi
Last updated by: KJedi
Created on: Jun 17, 2009
Last updated: 14 years ago
Update Article

Revisions

View all history