When i'm adding 3rd party classes to Yii, i put them in a folder under protected/components/
, like /protected/components/solr
.
Then in the main configuration i add the following lines to the import section:
'import' => array(
'application.components.solr.*',
...
But you need to add each subfolder one by one, this is due to perfomance issues, Yii's developers removed recursive import some releases ago. If you think that'll sucks, then you can use namespaces to do what you want, but you'll need PHP 5.3