I am trying to extend my yii application with solarium extension (extension for solr in php) .
However , the library for the extension had multiple sub directories . As a result I have to include files from specific sub directories like this :
Yii::import('application.extensions.Library.Solarium.*');
Yii::import('application.extensions.Library.Solarium.Client.*');
Yii::import('application.extensions.Library.Solarium.Client.RequestBuilder.*');
This leads to ugly code as well as unpredictability if I have included all files or not .Though I am doing this in the action currently I will move it to config later for production . Is there any other convenient way to include all files from the directories and sub directories ? There are a lot of sub directories and so mentioning each one would lead into 20-30 lines of code . One option is to place all library files in a single directory for production . However I am not sure if it would affect functionality (I am generically 'new' to implementing extensions/libraries) .