code: public function getEvents()
      {
          if (isset($this->state[self::VAR_EVENTS_QUEUE])) {
              $events = $this->state[self::VAR_EVENTS_QUEUE];
          } else {
              $events = [];
          }
          return $events;
      }
docs: Gets all events from the queue
  @return array