RouteResource
- Full name:
\Qubus\Routing\Route\RouteResource
Properties
methodActionDefaults
The default actions/methods for a resourceful controller.
methodActionNames
- This property is static.
parameters
The parameters set for this resource instance.
parameterMap
The global parameter mapping.
- This property is static.
router
Methods
__construct
public __construct(\Qubus\Routing\Interfaces\Mappable|\Qubus\Routing\Interfaces\Routable $router): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$router | \Qubus\Routing\Interfaces\Mappable|\Qubus\Routing\Interfaces\Routable |
register
Route a resource to a controller.
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string | |
$controller | string | |
$options | array |
prefixedResource
Build a set of prefixed resource routes.
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string | |
$controller | string | |
$options | array |
getResourcePrefix
Extract the resource and prefix from a resource name.
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string |
getResourceMethods
Get the applicable resource methods.
Parameters:
Parameter | Type | Description |
---|---|---|
$defaults | array | |
$options | array |
getResourceUri
Get the base resource URI for a given resource.
Parameters:
Parameter | Type | Description |
---|---|---|
$resource | string |
getNestedResourceUri
Get the URI for a nested resource segment array.
Parameters:
Parameter | Type | Description |
---|---|---|
$segments | array |
getResourceParameter
Format a resource parameter for usage.
Parameters:
Parameter | Type | Description |
---|---|---|
$value | string |
getResourceAction
Get the action array for a resource route.
protected getResourceAction(string $resource, string $controller, string $method, array $options): array
Parameters:
Parameter | Type | Description |
---|---|---|
$resource | string | |
$controller | string | |
$method | string | |
$options | array |
getResourceRouteName
Get the name for a given resource.
Parameters:
Parameter | Type | Description |
---|---|---|
$resource | string | |
$method | string | |
$options | array |
addResourceIndex
Add the index method for a resourceful route.
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string | |
$base | string | |
$controller | string | |
$options | array |
addResourceCreate
Add the create method for a resourceful route.
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string | |
$base | string | |
$controller | string | |
$options | array |
addResourceStore
Add the store method for a resourceful route.
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string | |
$base | string | |
$controller | string | |
$options | array |
addResourceShow
Add the show method for a resourceful route.
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string | |
$base | string | |
$controller | string | |
$options | array |
addResourceEdit
Add the edit method for a resourceful route.
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string | |
$base | string | |
$controller | string | |
$options | array |
addResourceUpdate
Add the update method for a resourceful route.
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string | |
$base | string | |
$controller | string | |
$options | array |
addResourceDestroy
Add the destroy method for a resourceful route.
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string | |
$base | string | |
$controller | string | |
$options | array |
getShallowName
Get the name for a given resource with shallowness applied when applicable.
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string | |
$options | array |
getParameters
Get the global parameter map.
- This method is static.
setParameters
Set the global parameter mapping.
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$parameters | array |
setMethodActionNames
Define custom method/action name for resource controller.
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$names | array |
getMethodActionNames
Get method/action names.
methodActionNames
Get or set the action verbs used in the resource URIs.
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$methodActionNames | array |
Automatically generated on 2025-10-13