title: Zend Framework 2.0 Interface not found
body: <h3>Short version</h3>
  
  <p>Where does the Client class look for the <code>DispatchableInterface</code> interface?</p>
  
  <pre><code>class Client implements Libraries\Stdlib\DispatchableInterface
  </code></pre>
  
  <hr>
  
  <p>I'm trying to add the ZF2 libraries to a CodeIgniter installation. The whole Zend folder sits in:</p>
  
  <pre><code> /Users/stef/Sites/site_name/application/libraries/
  </code></pre>
  
  <p>In my CI controller I have</p>
  
  <pre><code>public function run()
  {
      $CI =&amp; get_instance();
      $CI-&gt;load-&gt;library('Zend');
      $CI-&gt;load-&gt;library('Zend/Http/Client');
      $client = new Client($url);
  
      //Do stuff
  }
  </code></pre>
  
  <p>When I access the run() method I get a fatal error:</p>
  
  <blockquote>
    <p>Fatal error: Interface <code>'Zend\Stdlib\DispatchableInterface'</code> not found in /Users/stef/Sites/site_name/application/libraries/Zend/Http/Client.php on line 27</p>
  </blockquote>
  
  <p>In libraries/Zend.php (a file I added, not part of the ZF) I have</p>
  
  <pre><code>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/');
      }
  </code></pre>
  
  <p>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 <code>DispatchableInterface</code> doesn't make use of the include_path.</p>
  
  <p>How can I get Client.php to "find" the interface, which it tries to do so here:</p>
  
  <pre><code>class Client implements Libraries\Stdlib\DispatchableInterface
  </code></pre>