Property | Type | Description | |
---|---|---|---|
$env | string | For example: sh li3 route --env=production li3 route show /foo --env=test |
Method | Description | |
---|---|---|
__construct ( array $config = [] ) | Constructor. Load the routes file and set the environment. | |
all ( $scope = true ) : void | Lists all connected routes to the router. This is a convenience alias for the show() method. | |
run ( ) : void | Lists all connected routes to the router. See the all() method for details and examples. | |
show ( ) : void | Returns the corresponding params for a given URL and an optional request method. |
Method | Description | |
---|---|---|
_init ( ) |
public __construct ( array $config = [] ) | ||
$config | array | The default configuration, wherein the absolute path to the routes file to load may be specified, using the `'routes'` key. |
public string $env | ||
return | string |