RE: [PEAR-CVS] cvs: pear /MDB common.php
| From: | Brent Cook | Date: | Tue, 09 Jul 2002 15:52:40 +0000 |
| Subject: | RE: [PEAR-CVS] cvs: pear /MDB common.php | ||
| References: | 1 | Groups: | php.pear.cvs |
| Request: | Send a blank email to pear-cvs+get-4988@lists.php.net to get a copy of this message | ||
Yes, I believe so. I placed that require_once so that I could do a
spot-check 'php common.php' and see if there were syntax errors before
moving on. But there are more reasons than that.
First, if you always use 'require_once', there is no problem or overhead
if it is required multiple times. Also, if something outside of the MDB
framework reuses a specific file in MDB, the require is necessary because
you cannot assume that anything outside of MDB has a specific file already
included.
This is similar to having #include <stdio.h> in a C header file, even
though it's an almost forgone conclusion that a program will include stdio
too.
- Brent
On Tue, 9 Jul 2002, Lukas Smith wrote:
> Should PEAR.php be required in all files where the PEAR class is
> extended, even if the framework would normally expect the PEAR.php to be
> included anyways (in this case in MDB.php)?
>
> PEAR DB does not include PEAR.php in the common.php for example
>
> Not a big issue really
>
> And thx again for the formatting improvements
>
> Best regards,
> Lukas
>
> > -----Original Message-----
> > From: Brent Cook [mailto:busterb@mail.utexas.edu]
> > Sent: Tuesday, July 09, 2002 4:54 PM
> > To: pear-cvs@lists.php.net
> > Subject: [PEAR-CVS] cvs: pear /MDB common.php
> >
> > busterb Tue Jul 9 10:53:59 2002 EDT
> >
> > Modified files:
> > /pear/MDB common.php
> > Log:
> > more PHPDoc reformatting, some minor doc corrections, added
> require_once
> > 'PEAR.php', removed EOL whitespace
> >
> >
>
>