Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function getInheritedMethods()
 {
     $methods = [];
     $allMethods = array_flip(array_map(function (MethodReflectionInterface $methodReflection) {
         return $methodReflection->getName();
     }, $this->reflectionClass->getOwnMethods()));
     foreach ($this->getParentClassesAndInterfaces() as $class) {
         $inheritedMethods = [];
         foreach ($class->getOwnMethods() as $method) {
             if (!array_key_exists($method->getName(), $allMethods) && !$method->isPrivate()) {
                 $inheritedMethods[$method->getName()] = $method;
                 $allMethods[$method->getName()] = null;
             }
         }
         $methods = $this->sortElements($inheritedMethods, $methods, $class);
     }
     return $methods;
 }