Inter Communication Of Modules

hi,

I have 3 modules in my yii project. these 3 modules operation on a common database.

How these modules communicate with each other?

like, one module required to access a model from other module?

just Add those modules import directories in init of each module like

for each module




class contentModule extends CWebModule

{

public function init()

{

Yii::import('application.modules.content.models.*');

}

}



so all your modules models and even controllers and extensions are accissible to each

so in another module just call Model name lik




class XModule extends CWebModule

{

public function init()

{

$model=new Model();

}

}



i Guess this will work for yoiu

it’s a better choice to have a base, gii created and untouch model into protectected/model dir.

And then every module will have a /model dir with a specifically subclassed model.

Thanks… it’s working for me

this is really a bad solution. but of course it’s working