protected
array
|
#
urlByRouteSections( MvcCore\IRoute $route, array & $params = [], string $urlParamRouteName = NULL )
Complete semi-finished result URL as two section strings and system
params array. First section as base section with scheme, domain and base
path, second section as application requested path and query string and
third section as system params like localization .
Those params could be inserted between first two sections as system
params in result URL by localized router behaviour and default values.
Example:
Input (\MvcCore\Route::$reverse ):
[
"en" => "/products-list/<name>/<color>" ,
"de" => "/produkt-liste//",
]
Input ($params):
array(
"name" => "cool-product-name",
"color" => "red",
"variant" => ["L", "XL"],
"localization" => "en-US",
);
Output:
[
"/application/base/bath",
"/products-list/cool-product-name/blue?variant[]=L&variant[]=XL",
["localization" => "en-US"]
]
Complete semi-finished result URL as two section strings and system
params array. First section as base section with scheme, domain and base
path, second section as application requested path and query string and
third section as system params like localization .
Those params could be inserted between first two sections as system
params in result URL by localized router behaviour and default values.
Example:
Input (\MvcCore\Route::$reverse ):
[ "en" => "/products-list/<name>/<color>" , "de" => "/produkt-liste//",
]
Input ($params): array( "name" => "cool-product-name", "color" => "red", "variant" => ["L", "XL"], "localization" => "en-US", );
Output: [ "/application/base/bath", "/products-list/cool-product-name/blue?variant[]=L&variant[]=XL", ["localization" => "en-US"] ]
Parameters
- $route
- $params
- $urlParamRouteName
Returns
array
string $urlBaseSection, string $urlPathWithQuerySection, array $systemParams
|