code: public function detach(EventManagerInterface $events)
      {
          foreach ($this->listeners as $i => $listener) {
              if ($events->detach($listener)) {
                  unset($this->listeners[$i]);
              }
          }
  
          return empty($this->listeners);
      }
docs: Detach all listener creation and invokation callbacks.
  
  @param EventManagerInterface $events
  
  @return boolean