Short version
Where does the Client class look for the DispatchableInterface
interface?
class Client implements Libraries\Stdlib\DispatchableInterface
I'm trying to add the ZF2 libraries to a CodeIgniter installation. The whole Zend folder sits in:
/Users/stef/Sites/site_name/application/libraries/
In my CI controller I have
public function run()
{
$CI =& get_instance();
$CI->load->library('Zend');
$CI->load->library('Zend/Http/Client');
$client = new Client($url);
//Do stuff
}
When I access the run() method I get a fatal error:
Fatal error: Interface
'Zend\Stdlib\DispatchableInterface'
not found in /Users/stef/Sites/site_name/application/libraries/Zend/Http/Client.php on line 27
In libraries/Zend.php (a file I added, not part of the ZF) I have
function __construct($class = NULL)
{
// include path for Zend Framework
// alter it accordingly if you have put the 'Zend' folder elsewhere
ini_set('include_path',ini_get('include_path') . PATH_SEPARATOR . APPPATH . 'libraries/Zend/');
}
It doesn't seem to matter what I set the include_path to be, even when I put bogus values the fatal error stays the same. So it seems that the loading of the interface DispatchableInterface
doesn't make use of the include_path.
How can I get Client.php to "find" the interface, which it tries to do so here:
class Client implements Libraries\Stdlib\DispatchableInterface