Re: Doctrine base class
| From: | Greg Beaver | Date: | Fri, 29 Dec 2006 17:57:27 +0000 |
| Subject: | Re: Doctrine base class | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-45375@lists.php.net to get a copy of this message | ||
Martin Jansen wrote:
> On Fri Dec 29, 2006 at 09:4836AM +0100, Lukas Kahwe Smith wrote:
>> I think in the interest of making it possible of getting rid if
>> conditional includes every new PEAR package should probably also have a
>> file that flat out includes every file in the package.
>
> This is what Rasmus suggested some weeks ago, isn't it? I'm +1 on
> this. I'd go as far as forcing people to name this "include all"-file in
> a consistent way. Something like
>
> DB/Doctrine/Bootstrap.php
>
> seems fine for me if the package is called DB_Doctrine.
>
>> As a result new PEAR packages can leverage autoload, conditionally
>> include all files with a method call or load everything at once with a
>> static unconditional include. This gives ultimate flexibility for all users.
>
> So we are essentially aiming at getting rid of (include|require)_once,
> no?
Yes. pear-core/PEAR2/Autoload.php is another simpler implementation
that assumes include_path is set properly.
Greg