protected function fireFinalEvent($name = null, $resource = null)
    {
        if (empty($name)) {
            $name = $this->getEventName();
        }
        if (empty($resource)) {
            $resource = $this->getEventResource();
        }
        /** @noinspection PhpUnusedLocalVariableInspection */
        $results = \Event::fire(new ApiEvent($name, $this->request, $this->response, $resource));
    }