registerAnnotations() public static method

Register out annotation classes with the annotation registry.
public static registerAnnotations ( )
Esempio n. 1
0
 protected function setUp()
 {
     // Register the DREST annotations
     \Drest\Mapping\Driver\AnnotationDriver::registerAnnotations();
     // Register the ORM annotations
     \Doctrine\Common\Annotations\AnnotationRegistry::registerFile(__DIR__ . '/../../vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php');
 }
Esempio n. 2
0
 protected function setUp()
 {
     \Drest\Mapping\Driver\AnnotationDriver::registerAnnotations();
 }
Esempio n. 3
0
 /**
  * Static call to create the Drest Manager instance
  *
  * @param  EntityManager $em
  * @param  Configuration $config
  * @param  Event\Manager $eventManager
  * @return Manager       $manager
  */
 public static function create(EntityManager $em, Configuration $config, Event\Manager $eventManager = null)
 {
     // Register the annotations classes
     Mapping\Driver\AnnotationDriver::registerAnnotations();
     if ($eventManager === null) {
         $eventManager = new Event\Manager();
     }
     return new self($em, $config, $eventManager);
 }