public function removeMethodByName($name)
    {
        foreach ($this->methods as $key => $method) {
            if ($method->getName() == $name) {
                unset($this->methods[$key]);
                return;
            }
        }

        throw new \InvalidArgumentException(sprintf('The method "%s" does not exists.', $name));
    }
public function removeMethodByName($name)
    {
        foreach ($this->methods as $key => $method) {
            if ($method->getName() == $name) {
                unset($this->methods[$key]);
                return;
            }
        }

        throw new \InvalidArgumentException(sprintf('The method "%s" does not exists.', $name));
    }
public function removeMethodByName ( $ name ) { foreach ( $ this -> methods as $ key => $ method ) { if ( $ method -> getName ( ) == $ name ) { unset ( $ this -> methods [ $ key ] ) ; return ; } } throw new \ InvalidArgumentException ( sprintf ( 'The method "%s" does not exists.' , $ name ) ) ; }
Remove a method by name.

@param string $name The method name.

@throws \InvalidArgumentException If the method does not exists.

@api
Remove a method by name .