Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250711) (9addea9f0ac)
|
Public Member Functions | ||||||||||
__construct (ResponseFactoryInterface $responseFactory, CallableResolverInterface $callableResolver, ?ContainerInterface $container=null, ?RouteCollectorInterface $routeCollector=null, string $groupPattern='') | ||||||||||
any (string $pattern, $callable) | ||||||||||
{Add route for any HTTP method.
| ||||||||||
delete (string $pattern, $callable) | ||||||||||
{Add DELETE route.
| ||||||||||
get (string $pattern, $callable) | ||||||||||
{Add GET route.
| ||||||||||
getBasePath () | ||||||||||
{Get the RouteCollectorProxy's base path.} | ||||||||||
getCallableResolver () | ||||||||||
{} | ||||||||||
getContainer () | ||||||||||
{} | ||||||||||
getResponseFactory () | ||||||||||
{} | ||||||||||
getRouteCollector () | ||||||||||
{} | ||||||||||
group (string $pattern, $callable) | ||||||||||
{Route Groups.This method accepts a route pattern and a callback. All route declarations in the callback will be prepended by the group(s) that it is in.
| ||||||||||
map (array $methods, string $pattern, $callable) | ||||||||||
{Add route with multiple methods.
| ||||||||||
options (string $pattern, $callable) | ||||||||||
{Add OPTIONS route.
| ||||||||||
patch (string $pattern, $callable) | ||||||||||
{Add PATCH route.
| ||||||||||
post (string $pattern, $callable) | ||||||||||
{Add POST route.
| ||||||||||
put (string $pattern, $callable) | ||||||||||
{Add PUT route.
| ||||||||||
redirect (string $from, $to, int $status=302) | ||||||||||
{Add a route that sends an HTTP redirect.
| ||||||||||
setBasePath (string $basePath) | ||||||||||
{Set the RouteCollectorProxy's base path.} | ||||||||||
Protected Attributes | |
CallableResolverInterface | $callableResolver |
ContainerInterface | $container = null |
string | $groupPattern |
ResponseFactoryInterface | $responseFactory |
RouteCollectorInterface | $routeCollector |
Slim\Routing\RouteCollectorProxy::any | ( | string | $pattern, |
$callable ) |
{Add route for any HTTP method.
string | $pattern | The route URI pattern |
callable | string | $callable | The route callback routine |
Implements Slim\Interfaces\RouteCollectorProxyInterface.
Slim\Routing\RouteCollectorProxy::delete | ( | string | $pattern, |
$callable ) |
{Add DELETE route.
string | $pattern | The route URI pattern |
callable | string | $callable | The route callback routine |
Implements Slim\Interfaces\RouteCollectorProxyInterface.
Slim\Routing\RouteCollectorProxy::get | ( | string | $pattern, |
$callable ) |
{Add GET route.
string | $pattern | The route URI pattern |
callable | string | $callable | The route callback routine |
Implements Slim\Interfaces\RouteCollectorProxyInterface.
Slim\Routing\RouteCollectorProxy::getBasePath | ( | ) |
{Get the RouteCollectorProxy's base path.}
Implements Slim\Interfaces\RouteCollectorProxyInterface.
Slim\Routing\RouteCollectorProxy::getCallableResolver | ( | ) |
{}
Implements Slim\Interfaces\RouteCollectorProxyInterface.
Slim\Routing\RouteCollectorProxy::getContainer | ( | ) |
{}
Implements Slim\Interfaces\RouteCollectorProxyInterface.
Slim\Routing\RouteCollectorProxy::getResponseFactory | ( | ) |
{}
Implements Slim\Interfaces\RouteCollectorProxyInterface.
Slim\Routing\RouteCollectorProxy::getRouteCollector | ( | ) |
{}
Implements Slim\Interfaces\RouteCollectorProxyInterface.
Slim\Routing\RouteCollectorProxy::group | ( | string | $pattern, |
$callable ) |
{Route Groups.This method accepts a route pattern and a callback. All route declarations in the callback will be prepended by the group(s) that it is in.
string | callable | $callable |
Implements Slim\Interfaces\RouteCollectorProxyInterface.
Slim\Routing\RouteCollectorProxy::map | ( | array | $methods, |
string | $pattern, | ||
$callable ) |
{Add route with multiple methods.
string[] | $methods | Numeric array of HTTP method names |
string | $pattern | The route URI pattern |
callable | string | $callable | The route callback routine |
Implements Slim\Interfaces\RouteCollectorProxyInterface.
Slim\Routing\RouteCollectorProxy::options | ( | string | $pattern, |
$callable ) |
{Add OPTIONS route.
string | $pattern | The route URI pattern |
callable | string | $callable | The route callback routine |
Implements Slim\Interfaces\RouteCollectorProxyInterface.
Slim\Routing\RouteCollectorProxy::patch | ( | string | $pattern, |
$callable ) |
{Add PATCH route.
string | $pattern | The route URI pattern |
callable | string | $callable | The route callback routine |
Implements Slim\Interfaces\RouteCollectorProxyInterface.
Slim\Routing\RouteCollectorProxy::post | ( | string | $pattern, |
$callable ) |
{Add POST route.
string | $pattern | The route URI pattern |
callable | string | $callable | The route callback routine |
Implements Slim\Interfaces\RouteCollectorProxyInterface.
Slim\Routing\RouteCollectorProxy::put | ( | string | $pattern, |
$callable ) |
{Add PUT route.
string | $pattern | The route URI pattern |
callable | string | $callable | The route callback routine |
Implements Slim\Interfaces\RouteCollectorProxyInterface.
Slim\Routing\RouteCollectorProxy::redirect | ( | string | $from, |
$to, | |||
int | $status = 302 ) |
{Add a route that sends an HTTP redirect.
string | UriInterface | $to |
Implements Slim\Interfaces\RouteCollectorProxyInterface.
Slim\Routing\RouteCollectorProxy::setBasePath | ( | string | $basePath | ) |
{Set the RouteCollectorProxy's base path.}
Implements Slim\Interfaces\RouteCollectorProxyInterface.