Zephir\ClassDefinition::updateMethod PHP Method

updateMethod() public method

Updates an existing method definition
public updateMethod ( ClassMethod $method, array $statement = null ) : void
$method ClassMethod
$statement array
return void
    public function updateMethod(ClassMethod $method, $statement = null)
    {
        $methodName = strtolower($method->getName());
        if (!isset($this->methods[$methodName])) {
            throw new CompilerException("Method '" . $method->getName() . "' does not exist", $statement);
        }
        $this->methods[$methodName] = $method;
    }