Migrating Modules to YII from old Framework/converting


need help, now have a framework, with many modules, someone could help me with some idea how to migrate within each module within the yii, someone has done this before know where to start?

The current structure is that I have (briefly):


















each module of the original file is like this:

include "../../config.php";

include_once ONE_PATH.'/classes/dao_user.php';

include_once ONE_MODULO_PATH.'/user/user.php';

$titulo="User config";



//$mod=module called





  switch ($p)


       case "eti"     : 

	   $principal .=eti($_REQUEST'r_cod']);





include "../../header.php";


include "../../footer.php";

the config.php

call another file for defines and includes libs and start ajax, smarty, etc

like this:

    define("CACHE_DIR", ONE_ROOT_PATH."/cache");

    define("UPLOAD_DIR", ONE_ROOT_PATH."/uploads");

more deifnes...


* carregando ajax                                           *


$ajaxClasse = new xajax();




* carregando conexao ao db                                  *


$one = &ADONewConnection(ONE_DB_TYPE);



global $oneDB;



global $db;

well, I would like to exchange ideas with has the same problem or who want to help / make a suggestion, any idea to migrate to the yiiframework



I think most of your code can be placed into controller, view and model in Yii. You don't need to use Yii modules.

First, your index.php should remain to be the entry script.

config.php should be the app config.

header/footer be the main layout.

dao_xyz be model classes.

/modules/xyz be XyzController, and modules/xyz/view be the view files for the controller.

That's pretty much all.

is a good idea;

I forged this:

to acess any module currently we access:


for any action:


I tried this:

I have created a module called 'one' using cli and latter I put all complete system with their own modules under this created module:


my modules name 'mods' now is:


and  when I type in  browser this:


work normal, ferfectly.

in the first stage

the question is, how both system come work together INITIAL

any chances??


the idea is rewrite all modules from scratch and add to the correct path one to one


acording we can advance the develop task and deactivate the old modules [now under yii submodules]

at end of task;

all code willbe rewrited to Yii,

(an of course general type module  will share to comunity to download /expand)

any possiblity


Kind regards