-- Rob Allen <r...@akrabat.com> wrote
(on Friday, 24 April 2009, 06:23 AM +0100):
> On 23 Apr 2009, at 23:42, Matthew Weier O'Phinney wrote:
> > That said, we're seeing some momentum by shared hosts as well as
> > xAMP stacks to include ZF in the default include_path (Zend Server
> > falls in this category as well). In such cases, you may be able to
> > bootstrap  your ZF application and still use your preferred version
> > of ZF by adding  your include_path.
> >
> > One sitation we considered was having Zend_Application add a minimal
> > include_path to ensure that your ZF include_path includes the path in
> > which it is found, if that makes sense. Basically, in the constructor,
> > we'd do something like this:
> >
> >    $localPath = realpath(dirname(__FILE__) . '/../');
> >    set_include_path($localPath . PATH_SEPARATOR . get_include_path());
> >
> > The problem with this is that it's horribly inefficient if you
> > already have ZF on your include_path, and adds overhead on every
> > call. We  opted to drop it in order to keep bootstrapping as
> > performant as possible.
>
> Does this imply that you (the ZF team) believe that best practice ZF  
> sites do not need the library/ directory on their include_path now?

Not at all. The implications are:

  * It's better to set your include_path at the vhost (preferred) or
    htaccess (second best) level. For performance reasons, these are the
    better locations.
  
  * Having a library/ directory is going to be useful whenever you have
    custom libraries or other 3rd party libraries (including ZF) that
    your application will use.

The primary implication is quite simply that the include_path should be
set prior to execution whenever possible.

-- 
Matthew Weier O'Phinney
Project Lead            | matt...@zend.com
Zend Framework          | http://framework.zend.com/

Reply via email to