public function getClassMethods(\ReflectionClass $class) : array
    {
        $classes = $this->getClassHierarchy($class);

        $methods = [];

        foreach ($classes as $hClass) {
            $hClassName = $hClass->getName();

            foreach ($hClass->getMethods() as $method) {
                if ($method->isStatic()) {
                    // exclude static methods
                    continue;
                }

                if ($method->getDeclaringClass()->getName() !== $hClassName) {
                    // exclude inherited methods
                    continue;
                }

                $methods[] = $method;
            }
        }

        return $this->filterReflectors($methods);
    }
public function getClassMethods(\ReflectionClass $class) : array
    {
        $classes = $this->getClassHierarchy($class);

        $methods = [];

        foreach ($classes as $hClass) {
            $hClassName = $hClass->getName();

            foreach ($hClass->getMethods() as $method) {
                if ($method->isStatic()) {
                    // exclude static methods
                    continue;
                }

                if ($method->getDeclaringClass()->getName() !== $hClassName) {
                    // exclude inherited methods
                    continue;
                }

                $methods[] = $method;
            }
        }

        return $this->filterReflectors($methods);
    }
public function getClassMethods ( \ ReflectionClass $ class ) : array { $ classes = $ this -> getClassHierarchy ( $ class ) ; $ methods = [ ] ; foreach ( $ classes as $ hClass ) { $ hClassName = $ hClass -> getName ( ) ; foreach ( $ hClass -> getMethods ( ) as $ method ) { if ( $ method -> isStatic ( ) ) { // exclude static methods continue ; } if ( $ method -> getDeclaringClass ( ) -> getName ( ) !== $ hClassName ) { // exclude inherited methods continue ; } $ methods [ ] = $ method ; } } return $ this -> filterReflectors ( $ methods ) ; }
Returns reflections of all the non-static methods that make up one object.

Like ReflectionClass::getMethods(), this method:

- does not return overridden protected or public class methods, and only return the overriding one;
- returns methods inside a class in the order they are declared.

Unlike ReflectionClass::getMethods(), this method:

- returns the private methods of parent classes;
- returns methods in hierarchical order: methods from parent classes are returned first.

@param \ReflectionClass $class

@return \ReflectionMethod[]
Returns reflections of all the non - static methods that make up one object .