[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/joomla/router/src/ -> RouterInterface.php (summary)

Part of the Joomla Framework Router Package

Copyright: Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved.
License: GNU General Public License version 2 or later; see LICENSE
File Size: 189 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

RouterInterface:: (13 methods):
  addRoute()
  addRoutes()
  getRoutes()
  parseRoute()
  get()
  post()
  put()
  delete()
  head()
  options()
  trace()
  patch()
  all()


Interface: RouterInterface  - X-Ref

Interface defining a HTTP path router.

addRoute(Route $route)   X-Ref
Add a route to the router.

param: Route  $route  The route definition
return: $this

addRoutes(array $routes)   X-Ref
Add an array of route maps or objects to the router.

param: Route[]|array[]  $routes  A list of route maps or Route objects to add to the router.
return: $this

getRoutes()   X-Ref
Get the routes registered with this router.

return: Route[]

parseRoute($route, $method = 'GET')   X-Ref
Parse the given route and return the information about the route, including the controller assigned to the route.

param: string  $route   The route string for which to find and execute a controller.
param: string  $method  Request method to match, should be a valid HTTP request method.
return: ResolvedRoute

get(string $pattern, $controller, array $rules = [], array $defaults = [])   X-Ref
Add a GET route to the router.

param: string  $pattern     The route pattern to use for matching.
param: mixed   $controller  The controller to map to the given pattern.
param: array   $rules       An array of regex rules keyed using the route variables.
param: array   $defaults    An array of default values that are used when the URL is matched.
return: $this

post(string $pattern, $controller, array $rules = [], array $defaults = [])   X-Ref
Add a POST route to the router.

param: string  $pattern     The route pattern to use for matching.
param: mixed   $controller  The controller to map to the given pattern.
param: array   $rules       An array of regex rules keyed using the route variables.
param: array   $defaults    An array of default values that are used when the URL is matched.
return: $this

put(string $pattern, $controller, array $rules = [], array $defaults = [])   X-Ref
Add a PUT route to the router.

param: string  $pattern     The route pattern to use for matching.
param: mixed   $controller  The controller to map to the given pattern.
param: array   $rules       An array of regex rules keyed using the route variables.
param: array   $defaults    An array of default values that are used when the URL is matched.
return: $this

delete(string $pattern, $controller, array $rules = [], array $defaults = [])   X-Ref
Add a DELETE route to the router.

param: string  $pattern     The route pattern to use for matching.
param: mixed   $controller  The controller to map to the given pattern.
param: array   $rules       An array of regex rules keyed using the route variables.
param: array   $defaults    An array of default values that are used when the URL is matched.
return: $this

head(string $pattern, $controller, array $rules = [], array $defaults = [])   X-Ref
Add a HEAD route to the router.

param: string  $pattern     The route pattern to use for matching.
param: mixed   $controller  The controller to map to the given pattern.
param: array   $rules       An array of regex rules keyed using the route variables.
param: array   $defaults    An array of default values that are used when the URL is matched.
return: $this

options(string $pattern, $controller, array $rules = [], array $defaults = [])   X-Ref
Add a OPTIONS route to the router.

param: string  $pattern     The route pattern to use for matching.
param: mixed   $controller  The controller to map to the given pattern.
param: array   $rules       An array of regex rules keyed using the route variables.
param: array   $defaults    An array of default values that are used when the URL is matched.
return: $this

trace(string $pattern, $controller, array $rules = [], array $defaults = [])   X-Ref
Add a TRACE route to the router.

param: string  $pattern     The route pattern to use for matching.
param: mixed   $controller  The controller to map to the given pattern.
param: array   $rules       An array of regex rules keyed using the route variables.
param: array   $defaults    An array of default values that are used when the URL is matched.
return: $this

patch(string $pattern, $controller, array $rules = [], array $defaults = [])   X-Ref
Add a PATCH route to the router.

param: string  $pattern     The route pattern to use for matching.
param: mixed   $controller  The controller to map to the given pattern.
param: array   $rules       An array of regex rules keyed using the route variables.
param: array   $defaults    An array of default values that are used when the URL is matched.
return: $this

all(string $pattern, $controller, array $rules = [], array $defaults = [])   X-Ref
Add a route to the router that accepts all request methods.

param: string  $pattern     The route pattern to use for matching.
param: mixed   $controller  The controller to map to the given pattern.
param: array   $rules       An array of regex rules keyed using the route variables.
param: array   $defaults    An array of default values that are used when the URL is matched.
return: $this



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer