I want to pass a variable to my extension but directly to the contructor
Yii::app()->setComponents(array('mycomponent' => array(
'class' => 'ext.myext.myextfile',
'varToConstructor' => Yii::app()->db, //of course not works on contructor but on init
)));
My extension extends a class of yii that has a constructor with argument parameter the database component.
How to achieve that?
Thanks!
Notes: The method createComponent of Yiibase pass to contructor only if func_num_args is creater than 1.