/**
* Add argument to event. It will use a setter method if one exists. The setters have the signature:
*
* set<ArgumentName>($value): mixed
*
* where:
*
* $value is the value being set by the user
* It returns the value to return to set in the $arguments array of the event.
*
* @param string $name Argument name.
* @param mixed $value Value.
*
* @return $this
*
* @since 4.0.0
*/
public function setArgument($name, $value)
{
$methodName = 'set' . ucfirst($name);
if (method_exists($this, $methodName)) {
$value = $this->{$methodName}($value);
}
return parent::setArgument($name, $value);
}