AbstractBuilder.php
public static function newObject(string $class, array $args = [], $callGetClass = false)
    {
        $class = $callGetClass ? static::getClass($class) : $class;
        $rc = new \ReflectionClass($class);
        return $rc->newInstanceArgs($args);
    }
public static function newObject(string $class, array $args = [], $callGetClass = false)
    {
        $class = $callGetClass ? static::getClass($class) : $class;
        $rc = new \ReflectionClass($class);
        return $rc->newInstanceArgs($args);
    }
public static function newObject ( string $ class , array $ args = [ ] , $ callGetClass = false ) { $ class = $ callGetClass ? static :: getClass ( $ class ) : $ class ; $ rc = new \ ReflectionClass ( $ class ) ; return $ rc -> newInstanceArgs ( $ args ) ; }
Instanciate a class dynamically
@param string $class
@param array $args
@return stdClass
Instanciate a class dynamically