code: public function clearListeners(bool $notSubscribedOnly = false): void
      {
          if ($notSubscribedOnly) {
              $this->clearNotSubscribedListeners();
          } else {
              $this->listeners = [];
          }
      }
docs: Чистит контейнер, удаляя все события.
  
  @param bool $notSubscribedOnly
  
  @return void