src/Weew/Container/Reflector.php
protected function resolveConstructor(
        IContainer $container,
        $className,
        array $args = []
    ) {
        $class = new ReflectionClass($className);
        $constructor = $class->getConstructor();

        if ($constructor !== null) {
            $arguments = $this->resolveMethodArguments($container, $class, $constructor, $args);

            return $class->newInstanceArgs($arguments);
        }

        return $class->newInstance();
    }
protected function resolveConstructor(
        IContainer $container,
        $className,
        array $args = []
    ) {
        $class = new ReflectionClass($className);
        $constructor = $class->getConstructor();

        if ($constructor !== null) {
            $arguments = $this->resolveMethodArguments($container, $class, $constructor, $args);

            return $class->newInstanceArgs($arguments);
        }

        return $class->newInstance();
    }
@param IContainer $container
@param $className
@param array $args

@return object
@throws Exception
@throws UnresolveableArgumentException