*/ protected $entityAnnotationClasses = []; /** * Initializes a new AnnotationDriver that uses the given AnnotationReader for reading * docblock annotations. * * @param Reader $reader The AnnotationReader to use, duck-typed. * @param string|string[]|null $paths One or multiple paths where mapping classes can be found. */ public function __construct($reader, $paths = null) { $this->reader = $reader; $this->addPaths((array) $paths); } /** * Retrieve the current annotation reader * * @return Reader */ public function getReader() { return $this->reader; } /** * {@inheritDoc} */ public function isTransient($className) { $classAnnotations = $this->reader->getClassAnnotations(new ReflectionClass($className)); foreach ($classAnnotations as $annot) { if (isset($this->entityAnnotationClasses[get_class($annot)])) { return false; } } return true; } }