Symfony
3
Вклад в тег
namespace AppBase;
class App
{
protected $loader;
public function __construct()
{
$reflectionClass = new \ReflectionClass($this);
$namespace = $reflectionClass->getNamespaceName(); //AppExample
echo $namespace;
/*Логика*/
}
}
namespace AppBase;
class Loader {}
namespace AppExample;
class App extends \AppBase\App {}
namespace AppExample;
class Loader extends \AppBase\Loader {}
$app = new \AppExample\App();