How to access extension's configuration parameters?

Hi,

assuming an extension component is added to the main config file like this:




'components'=>array(

    'myExt'=>array(

        'class'=>'ext.myExt.myExt',

        'height'=>250,

        'width'=>300,

    ),




How can I access the "height" and "width" parameters inside the extension code?

Thanks :)

Just declare 2 public properties named ‘height’ and ‘width’ in your myExt class, and access them by ‘$this->height’ and ‘$this->width’.