How to list all namespaces from a specific one?

0

I need to instantiate a class by just passing its name and trying to instantiate it in several different nemapaces until I can. I have a class with a namespace, but I can not get the namespace to instantiate it, but the problem is that this class will not always have that same namespace.

I have the namespace:

  

App \ Program

I wanted to list all namespaces from the namespace quoted above, eg:

  

App \ Program \ Test

     

App \ Program \ Control

     

App \ Program \ Domain \ Base

Is there any way to list this?

    
asked by anonymous 16.04.2018 / 17:06

1 answer

0

I was able to solve this problem using psr-4, and mapped the namespaces the way I wanted it.

    
19.06.2018 / 14:28