[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Router/ -> ApiRouter.php (summary)

Joomla! Content Management System

Copyright: (C) 2019 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
File Size: 210 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

ApiRouter:: (6 methods):
  __construct()
  createCRUDRoutes()
  parseApiRoute()
  getRoutePath()
  removeIndexPhpFromPath()
  getMatchingRoutes()


Class: ApiRouter  - X-Ref

Joomla! API Router class

__construct(CMSApplicationInterface $app, array $maps = [])   X-Ref
Constructor.

param: CMSApplicationInterface  $app   The application object
param: array                    $maps  An optional array of route maps

createCRUDRoutes($baseName, $controller, $defaults = [], $publicGets = false)   X-Ref
Creates routes map for CRUD

param: string  $baseName    The base name of the component.
param: string  $controller  The name of the controller that contains CRUD functions.
param: array   $defaults    An array of default values that are used when the URL is matched.
param: bool    $publicGets  Allow the public to make GET requests.
return: void

parseApiRoute($method = 'GET')   X-Ref
Parse the given route and return the name of a controller mapped to the given route.

param: string  $method  Request method to match. One of GET, POST, PUT, DELETE, HEAD, OPTIONS, TRACE or PATCH
return: array   An array containing the controller and the matched variables.

getRoutePath()   X-Ref
Get the path from the route and remove and leading or trailing slash.

return: string

removeIndexPhpFromPath(string $path)   X-Ref
Removes the index.php from the route's path.

param: string  $path  The path
return: string

getMatchingRoutes()   X-Ref
Extract routes matching current route from all known routes.

return: \Joomla\Router\Route[]



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