Hope someone can help a php noob out. I’ve created an extension which will use Zend_Search_Lucene to provide ranked search results. In
system/expressionengine/third_party/ranked_search/ext.ranked_search.phpI use the line:
require_once('Zend/Search/Lucene.php');The Zend folder is in the same directory as ext.ranked_search.php and Lucene.php is found with no problems, but it references other files as follows:
require_once 'Zend/Search/Lucene/Document/Docx.php';
require_once 'Zend/Search/Lucene/Document/Pptx.php';
//etcThese files are not found unless I add
set_include_path(get_include_path() . PATH_SEPARATOR . 'expressionengine/third_party/ranked_search/');This seems a bit messy because now the include_path() is changed for all code outside of my extension. Is there a better way of doing this, like setting the include path for my module only?
Also I’d prefer to bundle the Zend code with my extension so that it can be installed in one step, rather than requiring the user to copy it into some libraries folder as a separate step.