original_string: protected function collectListeners($event)
  	{
  		$tmp = is_object($event) ? get_class($event) : (string)$event;
  		
  		if(isset($this->listeners[$tmp]))
  		{
  			$listeners = clone $this->listeners[$tmp];
  		}
  		else
  		{
  			$listeners = new \SplPriorityQueue();
  		}
  		
  		while(false !== ($tmp = get_parent_class($tmp)))
  		{
  			if(isset($this->listeners[$tmp]) && !$this->listeners[$tmp]->isEmpty())
  			{
  				foreach(clone $this->listeners[$tmp] as $listener)
  				{
  					$listeners->insert($listener, $listener->getPriority());
  				}
  			}
  		}
  		
  		return $listeners;
  	}
code: protected function collectListeners($event)
  	{
  		$tmp = is_object($event) ? get_class($event) : (string)$event;
  		
  		if(isset($this->listeners[$tmp]))
  		{
  			$listeners = clone $this->listeners[$tmp];
  		}
  		else
  		{
  			$listeners = new \SplPriorityQueue();
  		}
  		
  		while(false !== ($tmp = get_parent_class($tmp)))
  		{
  			if(isset($this->listeners[$tmp]) && !$this->listeners[$tmp]->isEmpty())
  			{
  				foreach(clone $this->listeners[$tmp] as $listener)
  				{
  					$listeners->insert($listener, $listener->getPriority());
  				}
  			}
  		}
  		
  		return $listeners;
  	}
code_tokens: protected function collectListeners ( $ event ) { $ tmp = is_object ( $ event ) ? get_class ( $ event ) : ( string ) $ event ; if ( isset ( $ this -> listeners [ $ tmp ] ) ) { $ listeners = clone $ this -> listeners [ $ tmp ] ; } else { $ listeners = new \ SplPriorityQueue ( ) ; } while ( false !== ( $ tmp = get_parent_class ( $ tmp ) ) ) { if ( isset ( $ this -> listeners [ $ tmp ] ) && ! $ this -> listeners [ $ tmp ] -> isEmpty ( ) ) { foreach ( clone $ this -> listeners [ $ tmp ] as $ listener ) { $ listeners -> insert ( $ listener , $ listener -> getPriority ( ) ) ; } } } return $ listeners ; }
docstring: Collect all event listeners for the given event including inherited listeners.
  
  @param mixed $event Event object or name.
  @return \SplPriorityQueue
docstring_tokens: Collect all event listeners for the given event including inherited listeners .