Method | Description | |
---|---|---|
getArgSeparator ( string $encode = 'none' ) : string | Returns url separator | |
getCommon ( mixed $params = [], string $divider = '?' ) : string | Generates text with URL parameters. | |
getCommonRaw ( mixed $params = [], string $divider = '?' ) : string | Generates text with URL parameters. | |
getHiddenFields ( array $values, string $pre = '' ) : string | create hidden form fields from array with name => value | |
getHiddenInputs ( string | array $db = '', string $table = '', integer $indent, string | array $skip = [] ) : string | Generates text with hidden inputs. |
public static getArgSeparator ( string $encode = 'none' ) : string | ||
$encode | string | whether to encode separator or not, currently 'none' or 'html' |
return | string | character used for separating url parts usually ; or & |
$params['myparam'] = 'myvalue';
$params['db'] = 'mysql';
$params['table'] = 'rights';
note the missing ?
echo 'script.php' . URL::getCommon($params);
produces with cookies enabled:
script.php?myparam=myvalue&db=mysql&table=rights
with cookies disabled:
script.php?server=1&lang=en&myparam=myvalue&db=mysql
&table=rights
note the missing ?
echo 'script.php' . URL::getCommon();
produces with cookies enabled:
script.php
with cookies disabled:
script.php?server=1&lang=en
$params['myparam'] = 'myvalue';
$params['db'] = 'mysql';
$params['table'] = 'rights';
note the missing ?
echo 'script.php' . URL::getCommon($params);
produces with cookies enabled:
script.php?myparam=myvalue&db=mysql&table=rights
with cookies disabled:
script.php?server=1&lang=en&myparam=myvalue&db=mysql
&table=rights
note the missing ?
echo 'script.php' . URL::getCommon();
produces with cookies enabled:
script.php
with cookies disabled:
script.php?server=1&lang=en
$values = array(
'aaa' => aaa,
'bbb' => array(
'bbb_0',
'bbb_1',
),
'ccc' => array(
'a' => 'ccc_a',
'b' => 'ccc_b',
),
);
echo URL::getHiddenFields($values);
produces:
public static getHiddenInputs ( string | array $db = '', string $table = '', integer $indent, string | array $skip = [] ) : string | ||
$db | string | array | optional database name (can also be an array of parameters) |
$table | string | optional table name |
$indent | integer | indenting level |
$skip | string | array | do not generate a hidden field for this parameter (can be an array of strings) |
return | string | string with input fields |