PHP 클래스 PMA\libraries\URL

파일 보기 프로젝트 열기: phpmyadmin/phpmyadmin 1 사용 예제들

공개 메소드들

메소드 설명
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.

메소드 상세

getArgSeparator() 공개 정적인 메소드

extracted from arg_separator.input as set in php.ini we do not use arg_separator.output to avoid problems with & and &
public static getArgSeparator ( string $encode = 'none' ) : string
$encode string whether to encode separator or not, currently 'none' or 'html'
리턴 string character used for separating url parts usually ; or &

getCommon() 공개 정적인 메소드

$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
public static getCommon ( mixed $params = [], string $divider = '?' ) : string
$params mixed optional, Contains an associative array with url params
$divider string optional character to use instead of '?'
리턴 string string with URL parameters

getCommonRaw() 공개 정적인 메소드

$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
public static getCommonRaw ( mixed $params = [], string $divider = '?' ) : string
$params mixed optional, Contains an associative array with url params
$divider string optional character to use instead of '?'
리턴 string string with URL parameters

getHiddenFields() 공개 정적인 메소드

$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 getHiddenFields ( array $values, string $pre = '' ) : string
$values array hidden values
$pre string prefix
리턴 string form fields of type hidden

getHiddenInputs() 공개 정적인 메소드

Generates text with hidden inputs.
또한 보기: URL::getCommon()
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)
리턴 string string with input fields