RE: [PHP-DEV] Re: cvs: php-src /ext/spl php_spl.c
| From: | Jared Williams | Date: | Tue, 05 Apr 2005 11:58:04 +0000 |
| Subject: | RE: [PHP-DEV] Re: cvs: php-src /ext/spl php_spl.c | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-15812@lists.php.net to get a copy of this message | ||
>
> I'd say that all extensions should really follow the 1 prefix
> per ext for anything that ends up in the global namespace
> (classes, functions.
> constants ..) rule. Just as we did in the past with new
> procudural extensions.
>
> This has the advantage of:
> - limiting the number of namespace clashes with user code
> - makes it clear what extensions may/are colliding and what
> steps need to be taken to fix the situation
>
I'd prefered explicit importing of classes.
<?php
spl_import('File');
?>
To bring in the File class (and any dependancies) into the global namespace, at run time.
Jared