2008年12月3日星期三

Re: [fw-formats] include_path assumption elimination

-- gherson <gherson@snet.net> wrote
(on Wednesday, 03 December 2008, 10:48 AM -0800):
> The create-a-bootstrap-file page wasn't there when I started use of ZF. Why
> make unnecessary assumptions about the user keeping up with your best
> practices in any case? If 2 lines to make this setup item go away is too
> much, add 1 assertion to save him time on the fix. E.g.,
> assert('strstr(get_ini("include_path"),"Zend")!==false')

The issue is that we'd need to do that for *each and every class file*.
This would be a ridiculous requirement that would also generate a ton of
performance overhead. Don't believe me? head over to the pear-dev
mailing list archives and look at the debates about include_path usage
surrounding PEAR2 coding standards.

While the "create-a-bootstrap-file" page may not have been there when
you started using ZF (it's been present for around 3 months, btw),
*every* intro tutorial to ZF I've ever read or written shows setting up
the include_path to point to the ZF installation. This is often a
one-liner for your ZF-consuming applications:

set_include_path('path/to/framework/library' . PATH_SEPARATOR . get_include_path());

Alternately, set it explicitly in your .htaccess or vhost.

This requirement is *not* going away anytime soon.

--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/

没有评论: