Add a default route which will be applied for any path and any
request method.

@param string|callable $handler a callback handler for the route.
@param string          $info    description of the route

@return void
327615
public function always($handler, $info = null)
    {
        $this->addRoute(null, null, null, $handler, $info);
    }
1341026
public function addHandler($name, $handler)
    {
        $tmp        = $this->relationHandlers->getValue($this->entity);
        $tmp[$name] = $handler;
        $this->relationHandlers->setValue($this->entity, $tmp);
    }
1014341
public function post($route, $handler)
    {
        return $this->addRoute(new Route($this->router, ['POST'], $route, $handler, $this->name));
    }
402045
public function addRoute(array $methods, string $path, string $handler)
  {
    $this->routeCollector->addRoute(
      $methods,
      $this->getPrefix().$path,
      $handler
    );

    return $this;
  }
365342
public function request(string $path, int $methods, $handler)
	{
		$path = $this->currentContext->getPrefixedPath(
			trim($path, "\n\r\t/ ")
		);

		return $this->route(new Route($path, $methods), $handler);
	}
1143196
public function addHead(string $uri, string $handler, string $name = null)
    {
        $this->addRoute("HEAD", $uri, $handler, $name);
    }
393286
public function handle( $handler = '' ) {
		if ( ! empty( $handler ) ) {
			$this->attribute( 'handler', $handler );
		}

		$this->router->addRoute( $this->router->route( $this->getAttributes() ) );
	}
951034
public function delete($route, $handler)
    {
        return $this->addRoute(new Route($this->router, ['DELETE'], $route, $handler, $this->name));
    }
91122
public function delete($path, $handler, $info = null)
    {
        $this->addRoute(["DELETE"], null, $path, $handler, $info);
    }
798118
public function use_default_handler( HandlerInterface $handler = NULL ) {

		static $done = FALSE;
		if ( $done ) {
			return $this;
		}

		$done = TRUE;

		add_action(
			HandlersRegistry::ACTION_REGISTER,
			function ( HandlersRegistry $registry ) use ( $handler ) {

				$handler = DefaultHandlerFactory::with_default_handler( $handler )
					->create_default_handler();

				$registry->add_handler( $handler, HandlersRegistry::DEFAULT_NAME );
			},
			1
		);

		return $this;
	}
1082955
public function setRequestHandler($handler)
    {
        $this->requestHandler = $handler;

        $this->requestHandler->setUri($this->url)
            ->setMethod($this->method);

        $this->requestHandler->getUri()->setPort($this->port);

        return $this;
    }
1305479
private function handle($handler, $parameters)
    {
        if ($handler instanceof \Closure) {
            $this->app->execute($handler, $parameters);
        } else {
            list($controller, $action) = explode('@', $handler);

            $class = $this->app->construct($controller);
            $this->app->execute([$class, $action], $parameters);
        }
    }
313888
public function addRecoverableErrorHandler($handler) {
        if ( ! $handler instanceof INativeErrorHandler && ! is_callable($handler)) {
            throw new InvalidHandlerType(
                s('Recoverable error handler must be a callable or an instance of %s.',
                    INativeErrorHandler::class)
            );
        }

        if (is_callable($handler)) {
            $handler = $this->createNativeErrorHandler($handler);
        }

        $this->recoverableErrorHandlers[] = $handler;
    }
557529
public function add(string $signal, callable $handler): self
    {
        $this->handlers[$signal] = $handler;

        return $this;
    }
673898
public function addPost(
        /*# string */ $pathPattern,
        $handler = null,
        array $defaultValues = []
    ) {
        $this->getCollectors()[0]->addPost(
            $pathPattern,
            $handler,
            $defaultValues
        );
        return $this;
    }
532344
public function put(string $path, $handler)
  {
    return $this->request($path, Request::HTTP_PUT, $handler);
  }
106852
public function override(string $name, $handler): void
	{
		$this->clear($name);

		$this->register($name, $handler);
	}