SampleURIGenerator
in package
FinalYes
Generate a sample URI path from route key regex.
Tags
Table of Contents
Properties
- $routes : RouteCollection
- $samples : array<string, string>
- Sample URI path for placeholder.
Methods
- __construct() : mixed
- get() : string
Properties
$routes read-only
private
RouteCollection
$routes
$samples
Sample URI path for placeholder.
private
array<string, string>
$samples
= ['any' => '123/abc', 'segment' => 'abc_123', 'alphanum' => 'abc123', 'num' => '123', 'alpha' => 'abc', 'hash' => 'abc_123']
Methods
__construct()
public
__construct([RouteCollection|null $routes = null ]) : mixed
Parameters
- $routes : RouteCollection|null = null
get()
public
get(string $routeKey) : string
Parameters
- $routeKey : string
-
route key regex
Return values
string —sample URI path