RE: [PHP-DEV] Re: Desired namespace behavoir
| From: | Bob Silva | Date: | Thu, 01 Dec 2005 15:17:20 +0000 |
| Subject: | RE: [PHP-DEV] Re: Desired namespace behavoir | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-20952@lists.php.net to get a copy of this message | ||
If Mike doesn't want to use namespaces, then Mike shouldn't use Jessies
package.
Bob
> -----Original Message-----
> From: Bart de Boer [mailto:bart@mediawave.nl]
> Sent: Wednesday, November 30, 2005 11:45 PM
> To: internals@lists.php.net
> Subject: [PHP-DEV] Re: Desired namespace behavoir
>
> >> Let's say: Mike doesn't want to use namespaces but he wants to use a
> >> package from Jessie. Jessie uses namespaces. Mike has his PHP
> configured
> >> to "auto-prefix-import" everything. So if he uses your file foo.php
> >> containg
> >>
> >> namespace JessieStuff{ class Foo { ... } }
> >>
> >> in conjunction with this setting would enable him to
> >>
> >> require_once('foo.php');
> >> $x=new JessieStuff_Foo();
>
> So, if namespace JessieStuff contains multiple classes. They would all
> become JessieStuff_ClassName.
>
> Assuming the package relies on its own classes, it wouldn't be able to
> call them anymore because all their names have changed.
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php