Re: [PHP-DEV] Getting a list of registered namespaces.

2011-06-16 Thread Lars Schultz
Am 16.06.2011 20:12, schrieb Stas Malyshev: Well, we could - you could actually do it right now with list of classes and some simple regexp-ing. The question is a value of it. I think get_declared_classes works as well, if you create a script that loads all your classes you could then extract

Re: [PHP-DEV] Getting a list of registered namespaces.

2011-06-16 Thread Stas Malyshev
Hi! Okay, so namespaces doesn't exists for the engine, because they are added to the classnames in compile-time, but we could add some --rX argument for the php binary, which would iterate over the classes and functions and so for a given extension, and fetch and list the introduced namespaces.

Re: [PHP-DEV] Getting a list of registered namespaces.

2011-06-16 Thread Johannes Schlüter
On Thu, 2011-06-16 at 19:54 +0200, Ferenc Kovacs wrote: > Okay, so namespaces doesn't exists for the engine, because they are added to > the classnames in compile-time, but we could add some --rX argument for the > php binary, which would iterate over the classes and functions and so for a > given

Re: [PHP-DEV] Getting a list of registered namespaces.

2011-06-16 Thread Ferenc Kovacs
On Thu, Jun 16, 2011 at 7:48 PM, Richard Quadling wrote: > On 16 June 2011 17:40, Stas Malyshev wrote: > > Hi! > > > > On 6/16/11 8:37 AM, Richard Quadling wrote: > >> > >> Maybe, but because of a lack of convention on naming, we have > namespaces. > > > > No, we have namespaces not because we co

Re: [PHP-DEV] Getting a list of registered namespaces.

2011-06-16 Thread Richard Quadling
On 16 June 2011 17:40, Stas Malyshev wrote: > Hi! > > On 6/16/11 8:37 AM, Richard Quadling wrote: >> >> Maybe, but because of a lack of convention on naming, we have namespaces. > > No, we have namespaces not because we couldn't agree on naming convention, > but because any naming convention witho

Re: [PHP-DEV] Getting a list of registered namespaces.

2011-06-16 Thread Stas Malyshev
Hi! Currently, I can find the names of functions, classes and interfaces - be they from an extension or userland code. But I can't get namespaces, or their aliases. Names of functions and classes _are_ namespaces. As for aliases, these are purely compile-time concepts, so there's nothing to

Re: [PHP-DEV] Getting a list of registered namespaces.

2011-06-16 Thread Stas Malyshev
Hi! On 6/16/11 8:37 AM, Richard Quadling wrote: Maybe, but because of a lack of convention on naming, we have namespaces. No, we have namespaces not because we couldn't agree on naming convention, but because any naming convention without namespaces would lead to ugly code (which you call "s

Re: [PHP-DEV] Getting a list of registered namespaces.

2011-06-16 Thread Richard Quadling
On 16 June 2011 14:03, Martin Scotta wrote: > >  Martin Scotta > > > On Thu, Jun 16, 2011 at 9:40 AM, Richard Quadling > wrote: >> >> On 15 June 2011 17:23, Stas Malyshev wrote: >> > Hi! >> > >> >> With pecl/http (DEV-2 branch) and the Functional extension (on github) >> >> both creating namespa

Re: [PHP-DEV] Getting a list of registered namespaces.

2011-06-16 Thread Richard Quadling
On 15 June 2011 17:23, Stas Malyshev wrote: > Hi! > >> With pecl/http (DEV-2 branch) and the Functional extension (on github) >> both creating namespaces within the extension, I think there is a >> requirement for a mechanism to allow an extension to record the >> namespace(s) that it has, in a si

Re: [PHP-DEV] Getting a list of registered namespaces.

2011-06-15 Thread Stas Malyshev
Hi! With pecl/http (DEV-2 branch) and the Functional extension (on github) both creating namespaces within the extension, I think there is a requirement for a mechanism to allow an extension to record the namespace(s) that it has, in a similar fashion to how functions and classes are known to co

[PHP-DEV] Getting a list of registered namespaces.

2011-06-15 Thread Richard Quadling
Hi. With pecl/http (DEV-2 branch) and the Functional extension (on github) both creating namespaces within the extension, I think there is a requirement for a mechanism to allow an extension to record the namespace(s) that it has, in a similar fashion to how functions and classes are known to core