in Service.php
require_once('Apache/Solr/Document.php'); require_once('Apache/Solr/Response.php');
It's much easier to use the library if it's something like:
require_once(dirname(FILE) . '/Document.php'); require_once(dirname(FILE) . '/Response.php');
Comment #1
Posted on Jan 28, 2009 by Happy BirdOn the one hand, I'm against this because it's not in the preferred style and standard of Zend Framework or PEAR. Libraries like this are intended to be on the include path so that through their Class naming conventions and file structures they can take advantage of the __autoload magic function for dependency injection.
On the other hand, I AM already doing require_once's to save the 10-20ms or so of overhead using __autoload since my Service class will directly use both other classes in most of its use cases. In addition I have fielded a number of email complaining about my "broken" requires.
So, for the sake of convenience to the user I'm willing to break with the preferred conventions. I'll commit a change shortly
Comment #2
Posted on Jan 28, 2009 by Happy BirdFixed in http://code.google.com/p/solr-php-client/source/detail?r=4
Status: Fixed
Labels:
Type-Enhancement
Priority-Medium