public function setCallback($callback)
    {
        if (!is_callable($callback)) {
            throw new InvalidArgumentException('Expected a callable. Got an uncallable '. gettype($callback));
        }

        $this->callback = $callback;

        return $this;
    }
public function setCallback($callback)
    {
        if (!is_callable($callback)) {
            throw new InvalidArgumentException('Expected a callable. Got an uncallable '. gettype($callback));
        }

        $this->callback = $callback;

        return $this;
    }
public function setCallback ( $ callback ) { if ( ! is_callable ( $ callback ) ) { throw new InvalidArgumentException ( 'Expected a callable. Got an uncallable ' . gettype ( $ callback ) ) ; } $ this -> callback = $ callback ; return $ this ; }
Set the callback

@param callable $callback
@throws InvalidArgumentException If the callback isn't a callable
@return Route
Set the callback