public function ArgumentsResolver::getArguments in Service Container 7
Same name and namespace in other branches
- 7.2 lib/Drupal/Component/Utility/ArgumentsResolver.php \Drupal\Component\Utility\ArgumentsResolver::getArguments()
Gets arguments suitable for passing to the given callable.
Return value
array An array of arguments to pass to the callable.
Throws
\RuntimeException When a value for an argument given cannot be resolved.
Overrides ArgumentsResolverInterface::getArguments
File
- lib/
Drupal/ Component/ Utility/ ArgumentsResolver.php, line 56 - Contains \Drupal\Component\Utility\ArgumentsResolver.
Class
- ArgumentsResolver
- Resolves the arguments to pass to a callable.
Namespace
Drupal\Component\UtilityCode
public function getArguments(callable $callable) {
$arguments = array();
foreach ($this
->getReflector($callable)
->getParameters() as $parameter) {
$arguments[] = $this
->getArgument($parameter);
}
return $arguments;
}