ArgumentsResolver::getArguments

public ArgumentsResolver::getArguments(callable $callable)

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

core/lib/Drupal/Component/Utility/ArgumentsResolver.php, line 51

Class

ArgumentsResolver
Resolves the arguments to pass to a callable.

Namespace

Drupal\Component\Utility

Code

public function getArguments(callable $callable) {
  $arguments = array();
  foreach ($this->getReflector($callable)->getParameters() as $parameter) {
    $arguments[] = $this->getArgument($parameter);
  }
  return $arguments;
}
doc_Drupal
2016-10-29 08:44:45
Comments
Leave a Comment

Please login to continue.