Skip to content

Router

CLI router with PhalconKit diagnostic state export.

The class must extend Phalcon's native CLI router because Phalcon CLI applications and modules expect that concrete runtime behavior. It also implements PhalconKit's shared router interface for typed DI lookups.

Phalcon 5.16 aligns the native CLI router with Phalcon\Cli\RouterInterface, so this wrapper now satisfies both the native router interface inherited from the parent and PhalconKit's shared router interface.


See Also:

  • https://docs.phalcon.io/latest/application-cli/

Methods

toArray

Export the current CLI router match state for diagnostics.

public toArray(): array<string,mixed>

Return Value:

Current module, task, action, params, matches, and matched-route metadata.