public function addMethod($name, callable $method)
    {
        $this->methods[$name] = \Closure::bind($method, $this, $this);

        return $this;
    }
public function addMethod($name, callable $method)
    {
        $this->methods[$name] = \Closure::bind($method, $this, $this);

        return $this;
    }
public function addMethod ( $ name , callable $ method ) { $ this -> methods [ $ name ] = \ Closure :: bind ( $ method , $ this , $ this ) ; return $ this ; }
Add a method identified by the given name.

@param  string   $name
@param  callable $method the body of the method
@return $this
Add a method identified by the given name .