Re: [PHP-DEV] Late FQCN resolution using ::class

2013-02-27 Thread Jens Riisom Schultz
On Feb 26, 2013, at 10:00 AM, Benjamin Eberlei kont...@beberlei.de wrote: This is indeed not possible, because strings are not class context independent, you can pass them to anywhere. A string just doesn't know what namespace it belongs to and this does not make sense without providing

Re: [PHP-DEV] Late FQCN resolution using ::class

2013-02-26 Thread Benjamin Eberlei
This is indeed not possible, because strings are not class context independent, you can pass them to anywhere. A string just doesn't know what namespace it belongs to and this does not make sense without providing more context in client libraries (such as docblocks). Also the use statement

Re: [PHP-DEV] Late FQCN resolution using ::class

2013-02-26 Thread Lester Caine
This is an interesting discussion, and since I use phpdoc extensively, it's an area that I have been thinking about, but WHY do you have to make it so difficult to follow by simply bundling more text at the top. THIS needs to be quoted properly and THEN perhaps other people can follow the

Re: [PHP-DEV] Late FQCN resolution using ::class

2013-02-26 Thread Benjamin Eberlei
On Tue, Feb 26, 2013 at 10:08 AM, Lester Caine les...@lsces.co.uk wrote: This is an interesting discussion, and since I use phpdoc extensively, it's an area that I have been thinking about, but WHY do you have to make it so difficult to follow by simply bundling more text at the top. THIS

[PHP-DEV] Late FQCN resolution using ::class

2013-02-25 Thread Jens Riisom Schultz
Hi everybody, I have read up on this, and done some testing. First up, my findings with PHP5.5 alpha5: ?php namespace spacy; class classy { public static function fqcn() { /* This works but is not useful enough: */ //return self::class;

Re: [PHP-DEV] Late FQCN resolution using ::class

2013-02-25 Thread Benjamin Eberlei
You can use the static late static binding keyword for this, it works, see: http://3v4l.org/l9Z5Y On Mon, Feb 25, 2013 at 11:00 AM, Jens Riisom Schultz ibmu...@me.comwrote: Hi everybody, I have read up on this, and done some testing. First up, my findings with PHP5.5 alpha5: ?php

Re: [PHP-DEV] Late FQCN resolution using ::class

2013-02-25 Thread Sebastian Krebs
2013/2/25 Jens Riisom Schultz ibmu...@me.com Hi everybody, I have read up on this, and done some testing. First up, my findings with PHP5.5 alpha5: ?php namespace spacy; class classy { public static function fqcn() { /* This works but is not useful enough: */

Re: [PHP-DEV] Late FQCN resolution using ::class

2013-02-25 Thread Nikita Nefedov
On Mon, 25 Feb 2013 14:00:04 +0400, Jens Riisom Schultz ibmu...@me.com wrote: Hi everybody, I have read up on this, and done some testing. First up, my findings with PHP5.5 alpha5: ?php namespace spacy; class classy { public static function fqcn() { /* This works

Re: [PHP-DEV] Late FQCN resolution using ::class

2013-02-25 Thread Jens Riisom Schultz
Ok I get that, thankyou for the explanation. static::class is not an option. I'm trying to resolve class names defined in docblocks, since phpdoc2 allows for entering type hints (classes) as namespace/use relative. And I can tell there is no current way of resolving class names in strings, to