|
| __construct () |
|
| register (string $name, string $url, array $params=[]) |
|
| registercopy (string $name, string $orig, array $params=[], string $newurl='') |
|
| get (string $name, array $params=[], string $separator='&', bool $parametric=false) |
|
| redirect (string $name, array $params=[], string $suffix='') |
|
| getBase (string $name) |
|
| getHiddenFormFields (string $name, array $params=[]) |
|
| hiddenFormFields (string $name, array $params=[]) |
|
| decode (string $name, array $params=[], string $separator='&') |
|
| dumpUrls () |
|
◆ __construct()
Constructs a new instance.
◆ register()
register |
( |
string |
$name, |
|
|
string |
$url, |
|
|
array |
$params = [] |
|
) |
| |
Registers a new url
- Parameters
-
string | $name | the url name |
string | $url | url value |
array | $params | query string params (optional) |
◆ registercopy()
registercopy |
( |
string |
$name, |
|
|
string |
$orig, |
|
|
array |
$params = [] , |
|
|
string |
$newurl = '' |
|
) |
| |
Registers a new url as a copy of an existing one
- Parameters
-
string | $name | url name |
string | $orig | url to copy information from |
array | $params | extra parameters to add |
string | $newurl | new url if different from the original |
◆ get()
get |
( |
string |
$name, |
|
|
array |
$params = [] , |
|
|
string |
$separator = '&' , |
|
|
bool |
$parametric = false |
|
) |
| |
retrieves a URL given its name, and optional parameters
- Parameters
-
string | $name | The URL name |
array | $params | The query string parameters (associative array) |
string | $separator | The separator (used between query string parameters) |
bool | $parametric | Set to true if url will be used as (s)printf() format |
- Exceptions
-
- Returns
- string The forged URL
◆ redirect()
redirect |
( |
string |
$name, |
|
|
array |
$params = [] , |
|
|
string |
$suffix = '' |
|
) |
| |
Redirect to an URL given its name, and optional parameters
- Parameters
-
string | $name | The name |
array | $params | The parameters |
string | $suffix | The suffix |
- Exceptions
-
References http\redirect().
◆ getBase()
Gets the URL base.
Retrieves a PHP page given its name, and optional parameters acts like get, but without the query string, should be used within forms actions
- Parameters
-
- Exceptions
-
- Returns
- string The URL base.
◆ getHiddenFormFields()
getHiddenFormFields |
( |
string |
$name, |
|
|
array |
$params = [] |
|
) |
| |
Gets the hidden form fields.
Forges form hidden fields to pass to a generated <form>. Should be used in combination with form action retrieved from getBase()
- Parameters
-
string | $name | The name |
array | $params | The parameters |
- Exceptions
-
- Returns
- string The hidden form fields.
◆ hiddenFormFields()
hiddenFormFields |
( |
string |
$name, |
|
|
array |
$params = [] |
|
) |
| |
Gets the hidden form fields as an array of formHidden object.
Forges form hidden fields to pass to a generated <form>. Should be used in combination with form action retrieved from getBase()
- Parameters
-
string | $name | The name |
array | $params | The parameters |
- Exceptions
-
- Returns
- array The hidden form fields.
◆ decode()
decode |
( |
string |
$name, |
|
|
array |
$params = [] , |
|
|
string |
$separator = '&' |
|
) |
| |
Retrieves a URL (decoded — useful for echoing) given its name, and optional parameters
- Deprecated:
- should be used carefully, parameters are no more escaped
- Parameters
-
string | $name | URL Name |
array | $params | query string parameters, given as an associative array |
string | $separator | separator to use between QS parameters |
- Returns
- string the forged decoded url
◆ dumpUrls()
Returns $urls property content.
- Returns
- ArrayObject
References $urls.
◆ $urls
The documentation for this class was generated from the following file: