class SymfonyRouter (View source)

Class SymfonyRouter

Symfony Router implementation for Poweradmin with module support. Uses modern routing patterns with clean URLs and proper REST endpoints. Loads routes from YAML configuration and enabled modules.

Methods

__construct()

No description

array
match()

Match the current request to a route and return controller information.

void
process()

Process the matched route by instantiating and running the controller.

string
generateUrl(string $routeName, array $parameters = [])

Generate URL for a named route.

array
getRouteParameters()

Get route parameters from the matched route.

string|null
getMatchedRoute()

Get the matched route name.

bool
isRouteFound()

Check if route was found.

Request
getRequest()

Get the current request object.

Details

__construct()

No description

array match()

Match the current request to a route and return controller information.

Return Value

array

Contains controller class, method, and parameters

Exceptions

Exception

void process()

Process the matched route by instantiating and running the controller.

Return Value

void

string generateUrl(string $routeName, array $parameters = [])

Generate URL for a named route.

Parameters

string $routeName
array $parameters

Return Value

string

array getRouteParameters()

Get route parameters from the matched route.

Return Value

array

string|null getMatchedRoute()

Get the matched route name.

Return Value

string|null

bool isRouteFound()

Check if route was found.

Return Value

bool

Request getRequest()

Get the current request object.

Return Value

Request