RE : [PHP-DEV] [PATCH] in_class_exists() for detecting __autoload() called by class_exists() and interface_exists()
| From: | P) | Date: | Thu, 04 Oct 2007 09:55:08 +0000 |
| Subject: | RE : [PHP-DEV] [PATCH] in_class_exists() for detecting __autoload() called by class_exists() and interface_exists() | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-32630@lists.php.net to get a copy of this message | ||
> From: Stanislav Malyshev [mailto:stas@zend.com]
>
> But how would you know the class is missing? Maybe next
> loader in chain
> would find it.
IMO, the point, here, is that, if the requested class starts with 'PEAR2', by convention,
this name space is reserved and cannot be resolved by another handler. So, it is legitimate to want
the PEAR2 autoload handler to display a message explaining how to get the missing package. But I
wouldn't attempt to enrich the interpreter's 'not found' message, I would
instead just have the handler trigger a warning message. The user would just receive 2 messages: an
'information' warning and a fatal error.
Regards
Francois