I want to use Elastica, a PHP client of ElasticSearch - a search engine somewhat similar to solr.
Now the installation guide of Elastica says to use autoload. But as far as I got it, the autoload features of yii work a little different. I anyway tried and created a symbolic link of the main folder Elastica in components and added to my main.php the line
Now the guide says I can instantiate Elastica with $elasticaClient = new Elastica_Client(); which would call components/Elastica/Client.php because they included this nasty str_replace-feature in their autoload approach:
How would I do it right in a yii-way in order to be able to instantiate as mentioned and not touching the Elastica code or file structure?
Now the installation guide of Elastica says to use autoload. But as far as I got it, the autoload features of yii work a little different. I anyway tried and created a symbolic link of the main folder Elastica in components and added to my main.php the line
'import'=>array( 'application.components.Elastica.*',
Now the guide says I can instantiate Elastica with $elasticaClient = new Elastica_Client(); which would call components/Elastica/Client.php because they included this nasty str_replace-feature in their autoload approach:
str_replace('_', '/', $class);Well, Yii is obviously looking for Elastica_Client.php instead.
How would I do it right in a yii-way in order to be able to instantiate as mentioned and not touching the Elastica code or file structure?