Re: Desired namespace behavoir

From: Date: Thu, 01 Dec 2005 07:45:19 +0000
Subject: Re: Desired namespace behavoir
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-20932@lists.php.net to get a copy of this message
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.

« previous php.internals (#20932) next »