Back to AbstractImmutableEvent class

Method offsetSet

public void
offsetSet
(mixed $name, mixed $value)
Set the value of an event argument.
Parameters
  • string $name The argument name.
  • mixed $value The argument value.
Returns
  • void
Since
  • 4.0.0
-
  • \BadMethodCallException

Method offsetSet - Source code

/**
 * Set the value of an event argument.
 *
 * @param   string  $name   The argument name.
 * @param   mixed   $value  The argument value.
 *
 * @return  void
 *
 * @since   4.0.0
 * @throws  BadMethodCallException
 */
public function offsetSet($name, $value)
{
    throw new BadMethodCallException(sprintf('Cannot set the argument %s of the immutable event %s.', $name, $this->name));
}