How to setup for Yii a "similar way" to find php files that comes with "include" php sentence?

Hi,

I’m very noob with Yii, but i’m developing php web pages from many years ago.

In my old webs, i have this setup:

In my bootstrap file of MyFramework, i have this line:


ini_set('include_path','C:\MyFramework\'.ini_get("include_path"));

ini_set('include_path','C:\InetPub\WebRoot\code\'.ini_get("include_path"));

Then, if i want to put a ‘custom’ Mail.php file in one of my webpages, i only need to put in C:\InetPub\WebRoot\code\Mail.php and the webpage will use it.

[b]Ok, now i have two question:

¿How i can do a similar way in Yii with any class file?¿How i can do a similar way in Yii with Views?[/b]

I have this Yii workspace:

This setup it’s working very well and all my Yii web applications are sharing the same protected folder (the same views, controllers, etc…)

I have a custom bootstrap file in C:\Yii_1.1.8\Protected that find for C:\InetPub\WebRoot\protected\config.php and if exists, merge this config with global Yii config.

I want to make the same for Yii class files and for views.

Sample

[indent]If i go to url /site/login

My application have to find C:\InetPub\WebRoot\protected\views\site\login.php and use if exists or use C:\Yii_1.1.8\Protected\views\site\login.php if not.

Also, my application have to find C:\InetPub\WebRoot\protected\models\LoginForm.php before use C:\Yii_1.1.8\protected\models\LoginForm.php

[/indent]

May be, i can do for views overwriting the getViewPath() of SiteController or similar?

And how to do for the others Yii file class?

Thank you in advance.

PS: Sorry, i’m spanish and don’t speak english very well