Re: [PHP-DEV] ReflectionFile missing

2012-01-30 Thread Johannes Schlüter
On Mon, 2012-01-30 at 12:15 -0500, Rasmus Schultz wrote: > > > Well, my thinking was, in my annotation engine, rather than globally > registering aliases for fully-qualified annotation-type class-names, I > would support the use-statement. > > This is generally how it works in other languages (s

Re: [PHP-DEV] ReflectionFile missing

2012-01-30 Thread Rasmus Schultz
Well, my thinking was, in my annotation engine, rather than globally registering aliases for fully-qualified annotation-type class-names, I would support the use-statement. This is generally how it works in other languages (such as C#) that have built-in support for annotations. So you'd be able

Re: [PHP-DEV] ReflectionFile missing

2012-01-30 Thread Johannes Schlüter
On Mon, 2012-01-30 at 09:33 -0500, Rasmus Schultz wrote: > From my point of view, the concept of a "file" has become semantically more > important, and increasingly relevant to Reflection, with the latest PHP > features added in the past couple of years. > > I can see what you mean though - it's p

Re: [PHP-DEV] ReflectionFile missing

2012-01-30 Thread Rasmus Schultz
>From my point of view, the concept of a "file" has become semantically more important, and increasingly relevant to Reflection, with the latest PHP features added in the past couple of years. I can see what you mean though - it's probably not a small effort, and there are probably more important

Re: [PHP-DEV] ReflectionFile missing

2012-01-30 Thread Ryan McCue
Johannes Schlüter wrote: > Right, I can see the need. But I think it is a different project from > the simple "ReflectionFile" thing, as long as that is supposed to work > with the current reflection system. Definitely, I just thought I'd note the motivation behind that class. In any case, a Refle

Re: [PHP-DEV] ReflectionFile missing

2012-01-30 Thread Johannes Schlüter
On Mon, 2012-01-30 at 11:48 +1000, Ryan McCue wrote: > Johannes Schlüter wrote: > > PS. Mind that the example you've given even works on files not included > > by parsing files, whereas internal reflection provides information what > > actually is available from engine point of view ... > > The or

Re: [PHP-DEV] ReflectionFile missing

2012-01-29 Thread Ryan McCue
Ryan McCue wrote: > For some purposes, you need to be able to reflect files and classes > without loading them, which I think is a huge gap in the Reflection API. > That said, a proper ReflectionFile would be welcome, even if it did load > the file. Forgot to mention: it is also, as far as I know,

Re: [PHP-DEV] ReflectionFile missing

2012-01-29 Thread Ryan McCue
Johannes Schlüter wrote: > PS. Mind that the example you've given even works on files not included > by parsing files, whereas internal reflection provides information what > actually is available from engine point of view ... The original reason I wrote that class was for a documentation tool, so

Re: [PHP-DEV] ReflectionFile missing

2012-01-29 Thread Johannes Schlüter
Hi, On Sun, 2012-01-29 at 18:51 -0500, Rasmus Schultz wrote: > I realized the other day that ReflectionFile is missing from the Reflection > API. As is ReflectionNamespace and some others one might think about. In the end it boils down to the fact that we don't have structures internally represe