Library/ClassDefinition.php
public function addMethod(ClassMethod $method, $statement = null)
    {
        $methodName = strtolower($method->getName());
        if (isset($this->methods[$methodName])) {
            throw new CompilerException("Method '".$method->getName()."' was defined more than one time", $statement);
        }

        $this->methods[$methodName] = $method;
    }
public function addMethod(ClassMethod $method, $statement = null)
    {
        $methodName = strtolower($method->getName());
        if (isset($this->methods[$methodName])) {
            throw new CompilerException("Method '".$method->getName()."' was defined more than one time", $statement);
        }

        $this->methods[$methodName] = $method;
    }
public function addMethod ( ClassMethod $ method , $ statement = null ) { $ methodName = strtolower ( $ method -> getName ( ) ) ; if ( isset ( $ this -> methods [ $ methodName ] ) ) { throw new CompilerException ( "Method '" . $ method -> getName ( ) . "' was defined more than one time" , $ statement ) ; } $ this -> methods [ $ methodName ] = $ method ; }
Adds a method to the class definition.

@param ClassMethod $method
@param array       $statement

@throws CompilerException
Adds a method to the class definition .