*/ class GenericEvent implements Event { /** * Event name * * @var string */ private $eventName; /** * Parameters of the event * * @var array() */ private $params; /** * Create a new generic event based on an event name * with optional parameters * * @param string $eventName * @param array $params */ public function __construct($eventName, $params = []) { $this->eventName = (string)$eventName; $this->params = $params; } /** * (non-PHPdoc) * @see \oat\oatbox\event\Event::getName() */ public function getName() { return $this->eventName; } /** * Get parameters * @return array */ public function getParams() { return $this->params; } }