detect module inside a model

I want to detect the module inside of a model call.

For example I want to return different array based on admin/client module in defaultScope. How do I detect the module?


Yii::app()->controller->module->id

Be careful: the module could be null.