WorklistDefinitionMapping::getInstanceForClass PHP Метод

getInstanceForClass() защищенный Метод

Abstraction for getting instance of class.
protected getInstanceForClass ( $class, $args = [] ) : mixed
$class
Результат mixed
    protected function getInstanceForClass($class, $args = array())
    {
        if (empty($args)) {
            return new $class();
        }
        $cls = new ReflectionClass($class);
        return $cls->newInstanceArgs($args);
    }