HI there,
I was wondering if there is a way in php 5.3+ to get a list of defined namespaces within an application. so
if
file 1 has namespace FOO
and
file 2 has namespace BAR
Now if i include file 1 and file 2 in file 3 id like to know with some sort of function call that namespace FOO and BAR are loaded.
I want to achieve this to be sure an module in my application is loaded before checking if the class exists ( with is_callable ).
If this is not possible i'd like to know if there is a function to check if a specific namespace is defined, something like is_namespace().
Hope you get the idea. and what i'm trying to achieve
See Question&Answers more detail:os