Using Yii In 3Rd-Party Systems

I’ve read this:

Using Yii in 3rd-Party Systems

But the question is: How to work with


inside my legacy code?

in your legacy code file include this code on top



  'basePath' => dirname(__FILE__),

  'import' => array(




create a folder models and add your AR classes there

Well, I can create my Yii app just for create my models (for example). Then add my Yii app to a Legacy code and work with CActiveRecord with your snippet!? It looks like nice.