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

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

@return $this
357468
public function delete($url, $callable, $name = null, $templatePath = null)
    {
        $this->multiple([\Parable\Http\Request::METHOD_DELETE], $url, $callable, $name, $templatePath);
        return $this;
    }
827432
public function get($url, $callable, $name = null, $templatePath = null)
    {
        $this->multiple([\Parable\Http\Request::METHOD_GET], $url, $callable, $name, $templatePath);
        return $this;
    }
1250151
def add_delete(self, path: str, handler: _WebHandler,
                   **kwargs: Any) -> AbstractRoute:
        
        return self.add_route(hdrs.METH_DELETE, path, handler, **kwargs)
774085
public function addBaselineCallable($name, $callable)
    {
        if (isset($this->callables[$name])) {
            throw new \InvalidArgumentException(sprintf(
                'Baseline callable "%s" has already been registered.',
                $name
            ));
        }

        if (!is_callable($callable)) {
            throw new \InvalidArgumentException(sprintf(
                'Given baseline "%s" callable "%s" is not callable.',
                $name, is_string($callable) ? $callable : gettype($callable)
            ));
        }

        $this->callables[$name] = $callable;
    }
914804
public function group(string $pattern, $callable) : RouteGroupInterface
    {
        $router = $this->getRouter();
        $group  = $router->pushGroup($pattern, $callable);
        if (method_exists($group, 'setCallbackResolver')) {
            $callbackResolver = $this->getCallbackResolver();
            if ($callbackResolver instanceof CallbackResolverInterface) {
                $group->setCallbackResolver($callbackResolver);
            }
        }

        $group($this);
        $router->popGroup();
        return $group;
    }
1158178
public function register($name, callable $callable, bool $default = false)
    {
        $this->connections[$name] = $callable;

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

        return $this;
    }
808422
public function post($path, $callable, $name = null) {
		return $this->add($path, $callable, $name, self::HTTP_METHOD_POST);
	}
325209
public function option($path, callable $handler): RouterInterface
    {
        $ruler = $this->createRuler('OPTION', $path);
        return $this->addRuler($ruler, $handler);
    }
762743
private function _method($name, callable $callable)
    {
        $lastPattern = array_pop($this->_patterns);
        if ($lastPattern) {
            $methods = $lastPattern[6];//路由方法
            $methods[$name] = $callable;
            $lastPattern[6] = $methods;
            $this->_patterns[] = $lastPattern;
        }
        return $this;
    }
885564
public function delete(string $name, string $path, $target, array $matchers = []) : self
    {
        $route = $this->createRoute([RequestMethodInterface::METHOD_DELETE], $name, $path, $target, $matchers);
        $this->addRoute($route);
        return $this;
    }
276780
public function deletePushUrl($name, $url)
    {
        $this->arguments[] = 'set-url';
        $this->arguments[] = '--delete';
        $this->arguments[] = '--push';
        $this->arguments[] = $name;
        $this->arguments[] = $url;
        return $this;
    }
205653
public function callFunction($name, Template $template = null, $arguments = [])
    {
        $callable = $this->getFunction($name);

        if (\is_array($callable) &&
            isset($callable[0]) &&
            $callable[0] instanceof ExtensionInterface
        ) {
            $callable[0]->template = $template;
        }

        return $callable(...$arguments);
    }
70968
public function removeTemplate($name)
    {
        if (isset($this->templates[$name])) {
            unset($this->templates[$name]);
        }

        return $this;
    }
1003768
protected function createRoute($methods, $pattern, $callable)
	{
		$route = new Route($methods, $pattern, $callable, $this->routeGroups, $this->routeCounter);
		
		return $route;
	}
687198
public function delete($path, $callable, $name = null) {
		return $this->add($path, $callable, $name, self::HTTP_METHOD_DELETE);
	}
389424
public function addResolver($name, $callable) {
        $resolver = new RouteResolver($name, $callable);
        $this->getRoutesMatcher()->getParameterResolver()
            ->addResolver($resolver);

        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;
    }