original_string: public static function removeListener($callback, $eventName, $priority = EventPriority::NORMAL)
      {
          if (EventPriority::getPriority($priority) == false) {
              throw new EventException('Unknown priority '.$priority);
          }
  
          if (!isset(self::$listeners[$eventName]) || !isset(self::$listeners[$eventName][$priority])) {
              return;
          }
  
          foreach (self::$listeners[$eventName][$priority] as $i => $_callback) {
              if ($_callback[0] == $callback) {
                  unset(self::$listeners[$eventName][$priority][$i]);
  
                  return;
              }
          }
      }
code: public static function removeListener($callback, $eventName, $priority = EventPriority::NORMAL)
      {
          if (EventPriority::getPriority($priority) == false) {
              throw new EventException('Unknown priority '.$priority);
          }
  
          if (!isset(self::$listeners[$eventName]) || !isset(self::$listeners[$eventName][$priority])) {
              return;
          }
  
          foreach (self::$listeners[$eventName][$priority] as $i => $_callback) {
              if ($_callback[0] == $callback) {
                  unset(self::$listeners[$eventName][$priority][$i]);
  
                  return;
              }
          }
      }
code_tokens: public static function removeListener ( $ callback , $ eventName , $ priority = EventPriority :: NORMAL ) { if ( EventPriority :: getPriority ( $ priority ) == false ) { throw new EventException ( 'Unknown priority ' . $ priority ) ; } if ( ! isset ( self :: $ listeners [ $ eventName ] ) || ! isset ( self :: $ listeners [ $ eventName ] [ $ priority ] ) ) { return ; } foreach ( self :: $ listeners [ $ eventName ] [ $ priority ] as $ i => $ _callback ) { if ( $ _callback [ 0 ] == $ callback ) { unset ( self :: $ listeners [ $ eventName ] [ $ priority ] [ $ i ] ) ; return ; } } }
docstring: Removes a function as listener.
  
  @param mixed callback The callback when the events get fired, see {@link http://php.net/manual/en/language.types.callable.php PHP.net}
  @param string $eventName The name of the event
  @param int    $priority  The priority, even though integers are valid, please use EventPriority (for example EventPriority::Lowest)
  
  @see EventPriority
  
  @throws EventException
docstring_tokens: Removes a function as listener .