How do I create my own application component?
I’ve gone as far as creating a class and loading it in the config like this:
'preload'=>array('log','myclass'), 'components'=>array( 'myclass'=>array( 'class' => 'application.components.myclass', 'enable'=>true, ),
It works ok in that it’s initialized and one instance is created. But how do I access that instance? Yii::app()->myclass doesn’t work.