alkativo: Dynamic class

Beitrag lesen

Hi,

how can I do something like this. With string the path is not working

$class = 'Myclassname';
$class = '\Application\Modell\'.$table;
$object = new $class($this->getAdapter());

This is working

$object = new \Application\Modell\Myclassname($this->getAdapter());

Thank you
Al