Ejemplo n.º 1
0
 public function getInheritanceTree()
 {
     $parent_entries = [];
     $parents = $this->reflection->getParentClassNameList();
     $currentNamespace = $this->reflection->getNamespaceName();
     if (!empty($parents)) {
         foreach ($parents as $key => $parent) {
             $string = ':ref:`';
             $string .= str_replace('\\', '-', $parent) . "`";
             $parent_entries[] = $string;
         }
     } else {
         return "";
     }
     $refs = join(' => ', $parent_entries);
     $title = "**Inheritance Hierarchy:**\n";
     return "{$title}{$refs}\n\n";
 }
Ejemplo n.º 2
0
 /**
  *
  * @param ReflectionClass $reflection
  * @return string
  */
 protected static function getParents(ReflectionClass $reflection)
 {
     return implode("\n", $reflection->getParentClassNameList());
 }