Inherting properties set in app config

Is it possible to inherit class properties set through the application config file?


In config/main.php

	    //COMPONENT  - myFirstClass





class myFirstClass extends CApplicationComponent


 public myProperty;


class mySecondClass extends myFirstClass


public function printMyProperty()


echo $this->myProperty; //Does not work

echo Yii::app()->myFirstClass->myProperty; // Does work but seems messy?



why do you think it looks messy. it looks fine to me

Thank you. Its only because it feels like I should be able to access it via $this->myProperty. However, if that is how it is done and I am not doing it wrong then that’s fine.