Dotclear 2.24
Loading...
Searching...
No Matches
dcAdminURL Class Reference

Public Member Functions

 __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 ()
 

Protected Attributes

 $urls
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Constructs a new instance.

Member Function Documentation

◆ register()

register ( string  $name,
string  $url,
array  $params = [] 
)

Registers a new url

Parameters
string$namethe url name
string$urlurl value
array$paramsquery 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$nameurl name
string$origurl to copy information from
array$paramsextra parameters to add
string$newurlnew 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$nameThe URL name
array$paramsThe query string parameters (associative array)
string$separatorThe separator (used between query string parameters)
bool$parametricSet to true if url will be used as (s)printf() format
Exceptions
exceptionIf unknown URL
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$nameThe name
array$paramsThe parameters
string$suffixThe suffix
Exceptions
exceptionIf unknown URL

References http\redirect().

◆ getBase()

getBase ( string  $name)

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
string$nameThe name
Exceptions
exceptionIf unknown URL
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$nameThe name
array$paramsThe parameters
Exceptions
exceptionIf unknown URL
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$nameThe name
array$paramsThe parameters
Exceptions
exceptionIf unknown URL
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$nameURL Name
array$paramsquery string parameters, given as an associative array
string$separatorseparator to use between QS parameters
Returns
string the forged decoded url

◆ dumpUrls()

dumpUrls ( )

Returns $urls property content.

Returns
ArrayObject

References $urls.

Field Documentation

◆ $urls

$urls
protected

Referenced by dumpUrls().


The documentation for this class was generated from the following file: