Add a PATCH route with a callable and optionally a templatePath.

@param string      $url
@param callable    $callable
@param string|null $name
@param string|null $templatePath

@return $this
5410
public function patch($url, $callable, $name = null, $templatePath = null)
    {
        $this->multiple([\Parable\Http\Request::METHOD_PATCH], $url, $callable, $name, $templatePath);
        return $this;
    }
1104930
public function addFilter($name, callable $callback)
	{
		$filter = new Filter($name, $callback);

		$this->filters->add($filter);

		return $filter;
	}
719709
public function extend($name, callable $callable)
    {
        if ($this->parent) {
            $this->parent->extend($name, $callable);
        }

        if ($callable instanceof Closure) {
            $callable = $callable->bindTo($this);
        }

        $this->callables[$name] = $callable;

        return $this;
    }
292716
public static function setPlaceholderFormatterDefinition(string $name, callable $callable): void
    {
        if (!self::$formatters) {
            self::$formatters = self::initPlaceholderFormatters();
        }

        self::$formatters[$name] = $callable;
    }
801689
public function setActiveFromCallable(callable $callable)
    {
        $this->applyToAll(function (Menu $menu) use ($callable) {
            $menu->setActiveFromCallable($callable);
        });

        $type = Reflection::firstParameterType($callable);

        $this->applyToAll(function (Activatable $item) use ($callable, $type) {
            if (! Reflection::itemMatchesType($item, $type)) {
                return;
            }

            if ($callable($item)) {
                $item->setActive();
                $item->setExactActive();
            }
        });

        return $this;
    }
30576
public function put($path, callable $handler): RouterInterface
    {
        $ruler = $this->createRuler('PUT', $path);
        return $this->addRuler($ruler, $handler);
    }
357468
public function delete($url, $callable, $name = null, $templatePath = null)
    {
        $this->multiple([\Parable\Http\Request::METHOD_DELETE], $url, $callable, $name, $templatePath);
        return $this;
    }
968357
public function options($url, $callable, $name = null, $templatePath = null)
    {
        $this->multiple([\Parable\Http\Request::METHOD_OPTIONS], $url, $callable, $name, $templatePath);
        return $this;
    }
24053
public function setUrl($name, $url, $oldUrl = null)
    {
        $this->arguments[] = 'set-url';
        $this->arguments[] = $name;
        $this->arguments[] = $url;
        if ($oldUrl) {
            $this->arguments[] = $oldUrl;
        }
        return $this;
    }
1158178
public function register($name, callable $callable, bool $default = false)
    {
        $this->connections[$name] = $callable;

        if ($default) {
            $this->setDefaultConnectionName($name);
        }

        return $this;
    }
1359840
public function hook($name, $callable, $priority = 10)
    {
        if (!isset($this->hooks[$name])) {
            $this->hooks[$name] = array(array());
        }
        if (is_callable($callable)) {
            $this->hooks[$name][(int) $priority][] = $callable;
        }
    }
449816
protected function validateExtensionBlock($name, $callable, $type)
    {
        if (!is_string($name)) {
            throw new InvalidArgumentException(
                sprintf(
                    "Name argument for %s must be a string",
                    $type
                )
            );
        } elseif (!is_callable($callable)) {
            throw new InvalidArgumentException(
                sprintf(
                    "Callable %s argument named '%s' is not callable",
                    $type,
                    $name
                )
            );
        }
    }
334431
public function set($name, $callable)
    {
        $name = ltrim($name, '\\');
        $this->callables[$name] = $callable;
        unset($this->instances[$name]);
    }
1082519
public function patch( $path, callable $callback ) {
        $route = new Route( 'PATCH', $path, $callback );
        $this->_routes[] = $route;
        return $route;
    }
730379
public function addHandler(callable $handler, $name = null)
    {
        if ($name) {
            $this->handlers[$name] = $handler;
        } else {
            $this->handlers[] = $handler;
        }

        return $this;
    }
489929
public function add(string $name, callable $callback): self
    {
        call_user_func($this->addCallback, $name, $callback);
        return $this;
    }
1098887
public function extend($name, callable $callable)
    {
        $name = $name == '*' ? '*.*.*' : $name;
        $this->checkSegmentCount($name);
        $this->_extensions[$name] = $callable;

        return $this;
    }