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);
}