[UPHPU] Include file namespace collision detection

David Boucha boucha at gmail.com
Mon Oct 29 21:41:18 MDT 2007


On 10/29/07, Joshua Simpson <std3rr at gmail.com> wrote:
> Does anyone know of a way to inspect include/require files' namespaces?
> Something that will return an array or other iterable that you can then
> compare to other namespaces?  The reasoning behind this is to enable a debug
> feature that raises exceptions on name collisions.
>
> Basically, I'm looking for a way to use get_obj_vars / get_obj_methods on an
> included file.   Anyone have any ideas?

This would be a total hack, but could you just read the file into a
variable and then run some regex-foo to get the names of any classes
and methods?

Sorry, I'm dead tired right now. I may need to look at your question tomorrow.

Dave


More information about the UPHPU mailing list