Adamgoose\Events\Annotations\Scanner::getEventDefinitions PHP Method

getEventDefinitions() public method

Convert the scanned annotations into route definitions.
public getEventDefinitions ( ) : string
return string
    public function getEventDefinitions()
    {
        $output = '';
        $reader = $this->getReader();
        foreach ($this->getClassesToScan() as $class) {
            foreach ($class->getMethods() as $method) {
                foreach ($reader->getMethodAnnotations($method) as $annotation) {
                    $output .= $this->buildListener($class->name, $method->name, $annotation->events);
                }
            }
        }
        return trim($output);
    }