protected function getListenerFromAnnotation(Listener $listener): EventListener
    {
        $eventListener = new EventListener();

        $eventListener
            ->setEvent($listener->getEvent())
            ->setId($listener->getId())
            ->setName($listener->getName())
            ->setClass($listener->getClass())
            ->setProperty($listener->getProperty())
            ->setMethod($listener->getMethod())
            ->setStatic($listener->isStatic())
            ->setFunction($listener->getFunction())
            ->setMatches($listener->getMatches())
            ->setDependencies($listener->getDependencies())
            ->setArguments($listener->getArguments());

        return $eventListener;
    }
protected function getListenerFromAnnotation(Listener $listener): EventListener
    {
        $eventListener = new EventListener();

        $eventListener
            ->setEvent($listener->getEvent())
            ->setId($listener->getId())
            ->setName($listener->getName())
            ->setClass($listener->getClass())
            ->setProperty($listener->getProperty())
            ->setMethod($listener->getMethod())
            ->setStatic($listener->isStatic())
            ->setFunction($listener->getFunction())
            ->setMatches($listener->getMatches())
            ->setDependencies($listener->getDependencies())
            ->setArguments($listener->getArguments());

        return $eventListener;
    }
protected function getListenerFromAnnotation ( Listener $ listener ) : EventListener { $ eventListener = new EventListener ( ) ; $ eventListener -> setEvent ( $ listener -> getEvent ( ) ) -> setId ( $ listener -> getId ( ) ) -> setName ( $ listener -> getName ( ) ) -> setClass ( $ listener -> getClass ( ) ) -> setProperty ( $ listener -> getProperty ( ) ) -> setMethod ( $ listener -> getMethod ( ) ) -> setStatic ( $ listener -> isStatic ( ) ) -> setFunction ( $ listener -> getFunction ( ) ) -> setMatches ( $ listener -> getMatches ( ) ) -> setDependencies ( $ listener -> getDependencies ( ) ) -> setArguments ( $ listener -> getArguments ( ) ) ; return $ eventListener ; }
Get a listener from a listener annotation.

@param Listener $listener The listener annotation

@return \Valkyrja\Events\Listener
Get a listener from a listener annotation .