/** */ private function readAnnotatedEventHandlers() { /* @var $this EventHandler|AnnotatedEventHandler */ $reader = new EventHandlerAnnotationReader($this); /* @var $annotation \Apha\Annotations\Annotation\EventHandler */ foreach ($reader->readAll() as $annotation) { if (empty($this->annotatedEventHandlers[$annotation->getEventType()])) { $this->annotatedEventHandlers[$annotation->getEventType()] = []; } $this->annotatedEventHandlers[$annotation->getEventType()][] = $annotation->getMethodName(); } }
/** * @test * @expectedException \Apha\Annotations\AnnotationReaderException */ public function readAllThrowsExceptionIfNoParameterToPass() { $handler = new EventHandlerAnnotationReaderTest_EventHandlerWithoutParameter(); $reader = new EventHandlerAnnotationReader($handler); $reader->readAll(); }