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

        $extendsClassDefinition = $this->getExtendsClassDefinition();
        if ($extendsClassDefinition instanceof ClassDefinitionRuntime) {
            try {
                $extendsClassDefinition = $this->compiler->getInternalClassDefinition(
                    $extendsClassDefinition->getName()
                );
            } catch (\ReflectionException $e) {
                // Do nothing
                return false;
            }
        }

        while ($extendsClassDefinition instanceof self) {
            if ($extendsClassDefinition->hasMethod($methodName)) {
                return true;
            }

            $extendsClassDefinition = $extendsClassDefinition->getExtendsClassDefinition();
        }

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

        $extendsClassDefinition = $this->getExtendsClassDefinition();
        if ($extendsClassDefinition instanceof ClassDefinitionRuntime) {
            try {
                $extendsClassDefinition = $this->compiler->getInternalClassDefinition(
                    $extendsClassDefinition->getName()
                );
            } catch (\ReflectionException $e) {
                // Do nothing
                return false;
            }
        }

        while ($extendsClassDefinition instanceof self) {
            if ($extendsClassDefinition->hasMethod($methodName)) {
                return true;
            }

            $extendsClassDefinition = $extendsClassDefinition->getExtendsClassDefinition();
        }

        return false;
    }
public function hasMethod ( $ methodName ) { $ methodNameLower = strtolower ( $ methodName ) ; foreach ( $ this -> methods as $ name => $ method ) { if ( $ methodNameLower == $ name ) { return true ; } } $ extendsClassDefinition = $ this -> getExtendsClassDefinition ( ) ; if ( $ extendsClassDefinition instanceof ClassDefinitionRuntime ) { try { $ extendsClassDefinition = $ this -> compiler -> getInternalClassDefinition ( $ extendsClassDefinition -> getName ( ) ) ; } catch ( \ ReflectionException $ e ) { // Do nothing return false ; } } while ( $ extendsClassDefinition instanceof self ) { if ( $ extendsClassDefinition -> hasMethod ( $ methodName ) ) { return true ; } $ extendsClassDefinition = $ extendsClassDefinition -> getExtendsClassDefinition ( ) ; } return false ; }
Checks if the class implements an specific name.

@param string $methodName

@return bool
Checks if the class implements an specific name .