/** * Dispatch an event. * * @param string $status * @param array $data Optional data to dispatch with the event. */ protected function dispatchEvent($status, array $data = []) { $name = $this->getEventNamePrefix() . '.' . $status; $event = new GenericEvent($this, $data); $this->client->getEventDispatcher()->dispatch($name, $event); }