/**
  * 
  * @param string $class
  * @param array $config
  * @return ClassAnnotationHolder
  */
 public function parse($class, array $config = array())
 {
     $annotationManager = new AnnotationManager();
     $parser = new DoctrineAnnotationParser();
     $parser->registerAnnotation(Route::class);
     $parser->registerAnnotation(Service::class);
     $parser->registerAnnotation(Controller::class);
     $parser->registerAnnotation(ControllerPlugin::class);
     $parser->registerAnnotation(Filter::class);
     $parser->registerAnnotation(FormElement::class);
     $parser->registerAnnotation(Hydrator::class);
     $parser->registerAnnotation(InputFilter::class);
     $parser->registerAnnotation(LogProcessor::class);
     $parser->registerAnnotation(LogWriter::class);
     $parser->registerAnnotation(Route::class);
     $parser->registerAnnotation(RoutePlugin::class);
     $parser->registerAnnotation(Serializer::class);
     $parser->registerAnnotation(Validator::class);
     $parser->registerAnnotation(ViewHelper::class);
     $annotationManager->attach($parser);
     $scanner = new DirectoryScanner('.');
     $class = $scanner->getClass($class);
     $eventManager = new EventManager();
     $parser = new ClassParser($config, $annotationManager, $eventManager);
     return $this->handleClassAnnotations($parser->parseClass($class), $config);
 }
 /**
  * 
  * @param string $class
  * @param array $config
  * @return ClassAnnotationHolder
  */
 public function parse($class, array $config = array())
 {
     $annotationReader = AnnotationReaderFactory::factory(['annotations' => [], 'cache' => null, 'cache_debug' => false, 'ignored_annotations' => ['events'], 'namespaces' => ['ZfAnnotation\\Annotation' => __DIR__ . '/../../src']]);
     $eventManager = new EventManager();
     $parser = new ClassParser($config, $annotationReader, $eventManager);
     return $this->handleClassAnnotations($parser->parseClass($class), $config);
 }
 /**
  * 
  * @param array $config
  * @param EventManagerInterface $eventManager
  * @return ClassParser
  */
 public static function factory(array $config, EventManagerInterface $eventManager)
 {
     $parser = new ClassParser($config, AnnotationManagerFactory::factory($config['zf_annotation']['annotations']), $eventManager);
     foreach ($config['zf_annotation']['event_listeners'] as $listener) {
         $parser->attach(new $listener());
     }
     return $parser;
 }
 /**
  * 
  * @param array $config
  * @param EventManagerInterface $eventManager
  * @param Reader $annotationReader
  * @return ClassParser
  */
 public static function factory(array $config, EventManagerInterface $eventManager, Reader $annotationReader = null)
 {
     if (null === $annotationReader) {
         $annotationReader = AnnotationReaderFactory::factory($config['zf_annotation']);
     }
     $parser = new ClassParser($config, $annotationReader, $eventManager);
     foreach ($config['zf_annotation']['event_listeners'] as $listener) {
         $parser->attach(new $listener());
     }
     return $parser;
 }