Re: AW: [PHP-DEV] Importing namespaced functions

2013-04-24 Thread Martin Keckeis
Hello together, if you got a namespace with more than one functions, why not just create a container class and make the methods static? I know it's not exactly the same, but how many times you need this So you can write: namespace Abc\Def; class Something{ public static function

Re: AW: [PHP-DEV] Importing namespaced functions

2013-04-24 Thread Florian Anderiasch
On 04/24/2013 08:15 AM, Martin Keckeis wrote: class Something{ public static function blubb(); public static function blubb2(); } use Abc\Def\Something; Something::blubb(); Something::blubb2(); Yes of course you can do that as an ugly workaround - but I wouldn't call that a

Re: AW: [PHP-DEV] Importing namespaced functions

2013-04-24 Thread Alexander Deruwe
On Wed, Apr 24, 2013 at 10:54 AM, Florian Anderiasch m...@anderiasch.de wrote: Additionally, it's either semantically wrong to group unrelated functions in static tool classes, it's even a well-known antipattern. It also doesn't address a point made by Igor before: It's distracting to have

Re: AW: [PHP-DEV] Importing namespaced functions

2013-04-24 Thread Pascal Chevrel
Le 24/04/2013 08:15, Martin Keckeis a écrit : Hello together, if you got a namespace with more than one functions, why not just create a container class and make the methods static? I know it's not exactly the same, but how many times you need this So you can write: namespace Abc\Def;

Re: AW: [PHP-DEV] Importing namespaced functions

2013-04-23 Thread Daniele Orlando
+1 The current behavior is really annoying. 2013/4/22 Florian Anderiasch m...@anderiasch.de On 04/22/2013 12:55 AM, Robert Stoll wrote: I agree with Igor. The readability could be improved and I do not see the problem of hiding built-in php functions (however, I would not recommend it).

Re: AW: [PHP-DEV] Importing namespaced functions

2013-04-22 Thread Florian Anderiasch
On 04/22/2013 12:55 AM, Robert Stoll wrote: I agree with Igor. The readability could be improved and I do not see the problem of hiding built-in php functions (however, I would not recommend it). I would say, if someone hides the normal php built-in function then he or she is doing that on

AW: [PHP-DEV] Importing namespaced functions

2013-04-21 Thread Robert Stoll
I agree with Igor. The readability could be improved and I do not see the problem of hiding built-in php functions (however, I would not recommend it). I would say, if someone hides the normal php built-in function then he or she is doing that on purpose and is aware of the consequences. Thus it

AW: [PHP-DEV] Importing namespaced functions

2013-04-19 Thread Robert Stoll
You can import a namespace and use an alias. For instance use com\example\cms as c; c\foo(); -Ursprüngliche Nachricht- Von: Christoph Rosse [mailto:cro...@2bepublished.at] Gesendet: Freitag, 19. April 2013 14:48 An: internals@lists.php.net Betreff: Re: [PHP-DEV] Importing namespaced