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();
var url = Routing.generate('my_route_to_expose_with_defaults', { id: 2 });
foreach( $params as $key=>$value )
{
//if( property_exists(new Class, $key) && is_numeric($value) )
if( property_exists('Ваш класс', $key) && is_numeric($value) )
{
$criteria->compare($key,$value);
}
}