/** * Set annotation manager to use when building form from annotations * * @param AnnotationManager $annotationManager * @return AnnotationBuilder */ public function setAnnotationManager(AnnotationManager $annotationManager) { foreach ($this->defaultAnnotations as $annotationName) { $class = __NAMESPACE__ . '\\' . $annotationName; $annotationManager->registerAnnotation(new $class()); } $this->annotationManager = $annotationManager; return $this; }
public function createDefaultAnnotationManager() { $annotationManager = new AnnotationManager; $annotationManager->registerAnnotation(new Annotation\Inject()); return $annotationManager; }