Back to AbstractEvent class

Method __construct

public
__construct
(string $name, array $arguments = [])
Constructor. Overridden to go through the argument setters.
Parameters
  • string $name The event name.
  • array $arguments The event arguments.
Since
  • 4.0.0
Class: AbstractEvent
Project: Joomla

Method __construct - Source code

/**
 * Constructor. Overridden to go through the argument setters.
 *
 * @param   string  $name       The event name.
 * @param   array   $arguments  The event arguments.
 *
 * @since   4.0.0
 */
public function __construct(string $name, array $arguments = [])
{
    parent::__construct($name, $arguments);
    $this->arguments = [];
    foreach ($arguments as $argumentName => $value) {
        $this->setArgument($argumentName, $value);
    }
}