コード例 #1
0
 /**
  * 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;
 }
コード例 #2
0
 /**
  * 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();
     }
 }