UrlActionMapper
in package
an url engine to parse,analyse and create significant url it needs an urls.xml file in the app/system directory (see documentation).
Tags
Table of Contents
- ESCAPE_LANG = 4
- ESCAPE_LOCALE = 8
- ESCAPE_NON_ASCII = 2
- ESCAPE_SLASH = 1
- ESCAPE_URLENCODE = 0
- $config : mixed
- $dataCreateUrl : array<string|int, mixed>
- data to create significant url.
- $dataParseUrl : array<string|int, mixed>
- data to parse and anaylise significant url, and to determine action, module etc.
- $entryPointTypeHavingActionInBody : mixed
- $xmlfileSelector : mixed
- __clone() : mixed
- __construct() : mixed
- create() : jUrl
- Create a jurl object with the given action data.
- getConfig() : MapperConfig
- parse() : jUrlAction
- Parse some url components.
- parseFromRequest() : jUrlAction
- Parse a url from the request.
- _parse() : jUrlAction
- buildForDedicatedModule() : mixed
- for the patterns "module~@request".
- buildForWholeController() : mixed
- for the patterns "module~ctrl:*@request".
- buildWithHandler() : mixed
- buildWithSpecificPathinfo() : mixed
- getUrlBuilderInfo() : array<string|int, mixed>
- search informations allowing to build the url corresponding to the given module/action.
- parseBasicPathinfo() : mixed
- parseGetParams() : jUrlAction
- extract parameters for the action from the path info.
- parseWithHandler() : jUrlAction
- call an handler to parse the url.
- simplifyDefaultAction() : mixed
Constants
ESCAPE_LANG
public
mixed
ESCAPE_LANG
= 4
Tags
ESCAPE_LOCALE
public
mixed
ESCAPE_LOCALE
= 8
Tags
ESCAPE_NON_ASCII
public
mixed
ESCAPE_NON_ASCII
= 2
Tags
ESCAPE_SLASH
public
mixed
ESCAPE_SLASH
= 1
Tags
ESCAPE_URLENCODE
public
mixed
ESCAPE_URLENCODE
= 0
Tags
Properties
$config
protected
mixed
$config
Tags
$dataCreateUrl
data to create significant url.
protected
array<string|int, mixed>
$dataCreateUrl
Tags
$dataParseUrl
data to parse and anaylise significant url, and to determine action, module etc.
protected
array<string|int, mixed>
$dataParseUrl
.
Tags
$entryPointTypeHavingActionInBody
protected
mixed
$entryPointTypeHavingActionInBody
= array('xmlrpc', 'jsonrpc', 'soap')
Tags
$xmlfileSelector
protected
mixed
$xmlfileSelector
Tags
Methods
__clone()
public
__clone() : mixed
Tags
Return values
mixed —__construct()
public
__construct(MapperConfig $config) : mixed
Parameters
- $config : MapperConfig
Tags
Return values
mixed —create()
Create a jurl object with the given action data.
public
create(jUrlAction $urlact) : jUrl
Parameters
- $urlact : jUrlAction
Tags
Return values
jUrl —the url correspondant to the action
getConfig()
public
getConfig() : MapperConfig
Tags
Return values
MapperConfig —parse()
Parse some url components.
public
parse(string $scriptNamePath, string $pathinfo, array<string|int, mixed> $params) : jUrlAction
Parameters
- $scriptNamePath : string
-
/path/index.php
- $pathinfo : string
-
the path info part of the url (part between script name and query)
- $params : array<string|int, mixed>
-
url parameters (query part e.g. $_REQUEST)
Tags
Return values
jUrlAction —parseFromRequest()
Parse a url from the request.
public
parseFromRequest(jRequest $request, array<string|int, mixed> $params) : jUrlAction
Parameters
- $request : jRequest
- $params : array<string|int, mixed>
-
url parameters
Tags
Return values
jUrlAction —_parse()
protected
_parse(string $scriptNamePath, string $pathinfo, array<string|int, mixed> $params, bool $isHttps) : jUrlAction
Parameters
- $scriptNamePath : string
-
/path/index.php
- $pathinfo : string
-
the path info part of the url (part between script name and query)
- $params : array<string|int, mixed>
-
url parameters (query part e.g. $_REQUEST)
- $isHttps : bool
-
says if the given url is asked with https or not
Tags
Return values
jUrlAction —buildForDedicatedModule()
for the patterns "module~@request".
protected
buildForDedicatedModule(jUrlAction $urlact, jUrl $url, array<string|int, mixed> $urlinfo) : mixed
Parameters
- $urlact : jUrlAction
- $url : jUrl
- $urlinfo : array<string|int, mixed>
-
array(3, 'entrypoint', boolean https true/false, boolean defaultmodule true/false, 'pathinfobase'),
Tags
Return values
mixed —buildForWholeController()
for the patterns "module~ctrl:*@request".
protected
buildForWholeController(jUrlAction $urlact, jUrl $url, array<string|int, mixed> $urlinfo) : mixed
Parameters
- $urlact : jUrlAction
- $url : jUrl
- $urlinfo : array<string|int, mixed>
-
array(5, 'entrypoint', boolean https true/false, 'pathinfobase'),
Tags
Return values
mixed —buildWithHandler()
protected
buildWithHandler(jUrlAction $urlact, jUrl $url, array<string|int, mixed> $urlinfo) : mixed
Parameters
- $urlact : jUrlAction
- $url : jUrl
- $urlinfo : array<string|int, mixed>
-
array(0, 'entrypoint', boolean https true/false, 'handler selector', 'basepathinfo')
Tags
Return values
mixed —buildWithSpecificPathinfo()
protected
buildWithSpecificPathinfo(jUrlAction $urlact, jUrl $url, array<string|int, mixed> $urlinfo) : mixed
Parameters
- $urlact : jUrlAction
- $url : jUrl
- $urlinfo : array<string|int, mixed>
-
array(1,'entrypoint', https true/false, array('year','month',), // list of dynamic values included in the url array(true, false..), // list of integers which indicates for each // dynamic value: 0: urlencode, 1:urlencode except '/', 2:escape "/news/%1/%2/", // the url true/false, // false : this is a secondary action array('bla'=>'whatIWant' ) // list of static values )
Tags
Return values
mixed —getUrlBuilderInfo()
search informations allowing to build the url corresponding to the given module/action.
protected
getUrlBuilderInfo(jUrlAction $urlact, jUrl $url) : array<string|int, mixed>
Parameters
- $urlact : jUrlAction
- $url : jUrl
Tags
Return values
array<string|int, mixed> —the informations. It may be:
- array(0,'entrypoint', https true/false, 'handler selector', 'basepathinfo')
- array(1,'entrypoint', https true/false, array('year','month',), // list of dynamic values included in the url array(true, false..), // list of integers which indicates for each // dynamic value: 0: urlencode, 1:urlencode except '/', 2:escape "/news/%1/%2/", // the url true/false, // false : this is a secondary action array('bla'=>'whatIWant' ) // list of static values )
- array(2,'entrypoint', https true/false), // for the patterns "@request"
- array(3,'entrypoint', https true/false, $defaultmodule true/false, 'pathinfobase'), // for the patterns "module~@request"
- array(4, array(1,...), array(1,...)...)
- array(5, 'entrypoint', https true/false,)
parseBasicPathinfo()
protected
parseBasicPathinfo(mixed $infoparsing, jUrl $url) : mixed
Parameters
- $infoparsing : mixed
- $url : jUrl
Tags
Return values
mixed —parseGetParams()
extract parameters for the action from the path info.
protected
parseGetParams(mixed $infoparsing, jUrl $url, mixed $matches) : jUrlAction
Parameters
- $infoparsing : mixed
- $url : jUrl
- $matches : mixed
Tags
Return values
jUrlAction —or null if the handler does not accept the url
parseWithHandler()
call an handler to parse the url.
protected
parseWithHandler(mixed $infoparsing, jUrl $url) : jUrlAction
Parameters
- $infoparsing : mixed
- $url : jUrl
Tags
Return values
jUrlAction —or null if the handler does not accept the url
simplifyDefaultAction()
protected
simplifyDefaultAction(mixed $pathInfo, mixed $action) : mixed
Parameters
- $pathInfo : mixed
- $action : mixed