/** * Gets the 'annotations.parser' service. * * This service is shared. * This method always returns the same instance of the service. * * @return Doctrine\Common\Annotations\Parser A Doctrine\Common\Annotations\Parser instance. */ protected function getAnnotations_ParserService() { $this->services['annotations.parser'] = $instance = new \Doctrine\Common\Annotations\Parser(); $instance->setAutoloadAnnotations(true); $instance->setAnnotationNamespaceAlias('Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\', 'extra'); return $instance; }
/** * Sets a flag whether to try to autoload annotation classes, as well as to distinguish * between what is an annotation and what not by triggering autoloading. * * NOTE: Autoloading of annotation classes is inefficient and requires silently failing * autoloaders. In particular, setting this option to TRUE renders this AnnotationReader * incompatible with a {@link ClassLoader}. * @param boolean $bool Boolean flag. */ public function setAutoloadAnnotations($bool) { $this->parser->setAutoloadAnnotations($bool); }