/**
  * Finds all parent classes of the given class
  *
  * @param ClassReflection $class The class to reflect
  * @param array $parentClasses Array of parent classes
  * @return array<ClassReflection>
  */
 protected function getParentClasses(ClassReflection $class, array $parentClasses = [])
 {
     $parentClass = $class->getParentClass();
     if ($parentClass !== false) {
         $parentClasses[] = $parentClass;
         $parentClasses = $this->getParentClasses($parentClass, $parentClasses);
     }
     return $parentClasses;
 }
예제 #2
0
 /**
  * @return ClassReflection
  */
 protected function getCommandReflection()
 {
     if ($this->commandReflection === NULL) {
         $commandReflection = new ClassReflection($this->controllerCommandName);
         $this->commandReflection = $commandReflection->getParentClass();
     }
     return $this->commandReflection;
 }