Nette\DI\ContainerBuilder::autowireArguments PHP Method

autowireArguments() public method

Creates a list of arguments using autowiring.
public autowireArguments ( $class, $method, array $arguments ) : array
$arguments array
return array
    public function autowireArguments($class, $method, array $arguments)
    {
        $rc = new ReflectionClass($class);
        if (!$rc->hasMethod($method)) {
            if (!Nette\Utils\Arrays::isList($arguments)) {
                throw new ServiceCreationException("Unable to pass specified arguments to {$class}::{$method}().");
            }
            return $arguments;
        }
        $rm = $rc->getMethod($method);
        if (!$rm->isPublic()) {
            throw new ServiceCreationException("{$class}::{$method}() is not callable.");
        }
        $this->addDependency($rm);
        return Helpers::autowireArguments($rm, $arguments, $this);
    }