src/MethodListener.php
public function getEventName()
	{
		if($this->eventName !== NULL)
		{
			return $this->eventName;
		}
		
		if($this->reflection === NULL)
		{
			$this->reflection = new \ReflectionMethod($this->object, $this->methodName);
		}
		
		$params = $this->reflection->getParameters();
			
		if(empty($params))
		{
			throw new \InvalidArgumentException(sprintf('Method listener %s->%s() must accept an event argument', $this->reflection->getDeclaringClass()->name, $this->reflection->name));
		}
			
		if(NULL !== ($paramTypeName = $this->getParamType($params[0])))
		{
			$this->eventName = $paramTypeName;
		}
		else
		{
			throw new \InvalidArgumentException(sprintf('Event callback param "%s" of %s->%s() must declare an event type hint', $params[0]->name, $this->reflection->getDeclaringClass()->name, $this->reflection->name));
		}
		
		return $this->eventName;
	}
public function getEventName()
	{
		if($this->eventName !== NULL)
		{
			return $this->eventName;
		}
		
		if($this->reflection === NULL)
		{
			$this->reflection = new \ReflectionMethod($this->object, $this->methodName);
		}
		
		$params = $this->reflection->getParameters();
			
		if(empty($params))
		{
			throw new \InvalidArgumentException(sprintf('Method listener %s->%s() must accept an event argument', $this->reflection->getDeclaringClass()->name, $this->reflection->name));
		}
			
		if(NULL !== ($paramTypeName = $this->getParamType($params[0])))
		{
			$this->eventName = $paramTypeName;
		}
		else
		{
			throw new \InvalidArgumentException(sprintf('Event callback param "%s" of %s->%s() must declare an event type hint', $params[0]->name, $this->reflection->getDeclaringClass()->name, $this->reflection->name));
		}
		
		return $this->eventName;
	}
public function getEventName ( ) { if ( $ this -> eventName !== NULL ) { return $ this -> eventName ; } if ( $ this -> reflection === NULL ) { $ this -> reflection = new \ ReflectionMethod ( $ this -> object , $ this -> methodName ) ; } $ params = $ this -> reflection -> getParameters ( ) ; if ( empty ( $ params ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Method listener %s->%s() must accept an event argument' , $ this -> reflection -> getDeclaringClass ( ) -> name , $ this -> reflection -> name ) ) ; } if ( NULL !== ( $ paramTypeName = $ this -> getParamType ( $ params [ 0 ] ) ) ) { $ this -> eventName = $ paramTypeName ; } else { throw new \ InvalidArgumentException ( sprintf ( 'Event callback param "%s" of %s->%s() must declare an event type hint' , $ params [ 0 ] -> name , $ this -> reflection -> getDeclaringClass ( ) -> name , $ this -> reflection -> name ) ) ; } return $ this -> eventName ; }
Get the name of the event being assembled using reflection.

@return string
Get the name of the event being assembled using reflection .