public function GenericEvent::getArgument

Get argument by key.

Parameters

string $key Key.:

Return value

mixed Contents of array key.

Throws

\InvalidArgumentException If key is not found.

1 call to GenericEvent::getArgument()
GenericEvent::offsetGet in drupal/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/GenericEvent.php
ArrayAccess for argument getter.

File

drupal/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/GenericEvent.php, line 68

Class

GenericEvent
Event encapsulation class.

Namespace

Symfony\Component\EventDispatcher

Code

public function getArgument($key) {
  if ($this
    ->hasArgument($key)) {
    return $this->arguments[$key];
  }
  throw new \InvalidArgumentException(sprintf('%s not found in %s', $key, $this
    ->getName()));
}