Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Including An External Folder With Subfolders And Libraries

$
0
0
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
			'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?

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>