[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/joomla/router/src/ -> Route.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: 455 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Route:: (20 methods):
  __construct()
  buildRegexAndVarList()
  getController()
  getDefaults()
  getMethods()
  getPattern()
  getRegex()
  getRouteVariables()
  getRules()
  setController()
  setDefaults()
  setMethods()
  setPattern()
  setRegex()
  setRouteVariables()
  setRules()
  serialize()
  __serialize()
  unserialize()
  __unserialize()


Class: Route  - X-Ref

An object representing a route definition.

__construct(array $methods, string $pattern, $controller, array $rules = [], array $defaults = [])   X-Ref
Constructor.

param: array   $methods     The HTTP methods this route supports
param: string  $pattern     The route pattern to use for matching
param: mixed   $controller  The controller which handles this route
param: array   $rules       An array of regex rules keyed using the route variables
param: array   $defaults    The default variables defined by the route

buildRegexAndVarList()   X-Ref
Parse the route's pattern to extract the named variables and build a proper regular expression for use when parsing the routes.

return: void

getController()   X-Ref
Retrieve the controller which handles this route

return: mixed

getDefaults()   X-Ref
Retrieve the default variables defined by the route

return: array

getMethods()   X-Ref
Retrieve the HTTP methods this route supports

return: string[]

getPattern()   X-Ref
Retrieve the route pattern to use for matching

return: string

getRegex()   X-Ref
Retrieve the path regex this route processes

return: string

getRouteVariables()   X-Ref
Retrieve the variables defined by the route

return: array

getRules()   X-Ref
Retrieve the regex rules keyed using the route variables

return: array

setController($controller)   X-Ref
Set the controller which handles this route

param: mixed  $controller  The controller which handles this route
return: $this

setDefaults(array $defaults)   X-Ref
Set the default variables defined by the route

param: array  $defaults  The default variables defined by the route
return: $this

setMethods(array $methods)   X-Ref
Set the HTTP methods this route supports

param: array  $methods  The HTTP methods this route supports
return: $this

setPattern(string $pattern)   X-Ref
Set the route pattern to use for matching

param: string  $pattern  The route pattern to use for matching
return: $this

setRegex(string $regex)   X-Ref
Set the path regex this route processes

param: string  $regex  The path regex this route processes
return: $this

setRouteVariables(array $routeVariables)   X-Ref
Set the variables defined by the route

param: array  $routeVariables  The variables defined by the route
return: $this

setRules(array $rules)   X-Ref
Set the regex rules keyed using the route variables

param: array  $rules  The rules defined by the route
return: $this

serialize()   X-Ref
Serialize the route.

return: string  The serialized route.

__serialize()   X-Ref
Serialize the route.

return: array  The data to be serialized

unserialize($serialized)   X-Ref
Unserialize the route.

param: string  $serialized  The serialized route.
return: void

__unserialize(array $data)   X-Ref
Unserialize the route.

param: array  $data  The serialized route.
return: void



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