protected function getParentMethods($className, array &$methods = array()) { $className = $this->resolveClassName($className); if (!$this->isIndexed($className)) { $methods[$className] = array(); /** @todo Internals **/ return; } $classes = $this->project->getClasses(); $interpret = new Interpret($classes[$className]); try { $reflector = $interpret->getClass(trim($className)); } catch (Exception $e) { $expl = explode('\\', $className); $reflector = $interpret->getClass(array_pop($expl)); } $methods[$className] = $reflector->getMethods(); $parent = $reflector->getParentClass(); if (!empty($parent)) { $full = $this->resolveClassName($parent, $reflector); $this->getParentMethods($full, $methods); } }
public function getNamespaceFunctions($ns) { $this->index(); $funcs = array(); $countRoot = count(explode('\\', $ns)); foreach ($this->functions as $funcName => $file) { $xpl = explode('\\', $funcName); if (\strpos($funcName, $ns) === 0 && count($xpl) == $countRoot + 1) { $interpret = new Interpret($file); array_push($funcs, $interpret->getFunction(array_pop($xpl))); } } return $funcs; }