Re: Re: Silenced include(_once) calls
| From: | Lukas Smith | Date: | Fri, 03 Mar 2006 09:58:12 +0000 |
| Subject: | Re: Re: Silenced include(_once) calls | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-41612@lists.php.net to get a copy of this message | ||
bertrand Gugger wrote:
My point is, and if I understood right Alan's one too, such mechanism should be only used when it's really "optional", and not some implementation choice. As Justin's example, Text_Wiki should simply do require_once $parserClass; in this factory, and let PHP die from itself, as here the parser *is* an implementation choice. So, before doing such overload, be sure it's really "optional".the point is .. if its not optional then you should use require .. MDB2 supports loading of optional modules. Even more so these modules can either be RDBMS independent or RDBMS dependent, which leads to having to include different files. For convinience I first made this entirely transparent to the user, but due to the issues with file_exists() and safe_mode I now allow users to specify this explicitly. regards, Lukas