/** * Gets parent class * * @return AnnotatedClass */ public function getParentClass() { if (false === $this->parent) { $this->parent = parent::getParentClass(); if ($this->parent) { $this->parent = new self($this->parent->getName()); } } return $this->parent; }
/** * Constructor * * @param AnnotatedClass $declaring The declaring class * @param string $name The name of the property * @param array $annotations The property annotations if they are parsed already */ public function __construct(AnnotatedClass $declaring, $name, array $annotations = []) { parent::__construct($declaring->getName(), $name); $this->declaring = $declaring; if ($annotations) { $this->annotations = $annotations; } else { $this->findAnnotations(); } }