Library/ClassDefinition.php
public function getMethod($methodName, $checkExtends = true)
    {
        $methodNameLower = strtolower($methodName);
        foreach ($this->methods as $name => $method) {
            if ($methodNameLower == $name) {
                return $method;
            }
        }

        if (!$checkExtends) {
            return false;
        }

        $extendsClassDefinition = $this->getExtendsClassDefinition();
        if ($extendsClassDefinition instanceof self) {
            if ($extendsClassDefinition->hasMethod($methodName)) {
                return $extendsClassDefinition->getMethod($methodName);
            }
        }

        return false;
    }
public function getMethod($methodName, $checkExtends = true)
    {
        $methodNameLower = strtolower($methodName);
        foreach ($this->methods as $name => $method) {
            if ($methodNameLower == $name) {
                return $method;
            }
        }

        if (!$checkExtends) {
            return false;
        }

        $extendsClassDefinition = $this->getExtendsClassDefinition();
        if ($extendsClassDefinition instanceof self) {
            if ($extendsClassDefinition->hasMethod($methodName)) {
                return $extendsClassDefinition->getMethod($methodName);
            }
        }

        return false;
    }
public function getMethod ( $ methodName , $ checkExtends = true ) { $ methodNameLower = strtolower ( $ methodName ) ; foreach ( $ this -> methods as $ name => $ method ) { if ( $ methodNameLower == $ name ) { return $ method ; } } if ( ! $ checkExtends ) { return false ; } $ extendsClassDefinition = $ this -> getExtendsClassDefinition ( ) ; if ( $ extendsClassDefinition instanceof self ) { if ( $ extendsClassDefinition -> hasMethod ( $ methodName ) ) { return $ extendsClassDefinition -> getMethod ( $ methodName ) ; } } return false ; }
Returns a method by its name.

@param string $methodName
@param bool   $checkExtends

@return bool|ClassMethod
Returns a method by its name .