API / Minn\Rest / RouteTable

RouteTable final class

Minn\Rest\RouteTable · public/minn/src/Minn/Rest/RouteTable.php · 38 lines

The registered endpoints in dispatch shape: one handler list per route, methods as a set, non-numeric keys lifted into the route's options.

Constants and properties

privateHANDLER_DEFAULTS = array ( 'methods' => array ( ), 'accept_json' => false, 'accept_raw' => false, 'show_in_index' => true, 'args' => array ( ), )

Public

staticnormalise(array $endpoints): array#

Registered endpoints as a route table with their options.

$endpointsarray<string, mixed>route => a handler or a list of handlers plus options
@return array{0: array<string, list<array<string, mixed>>>, 1: array<string, array<string, mixed>>} the routes, and the options found per route