PHP 클래스 Horde_Url, horde

저자: Jan Schneider ([email protected])
저자: Michael Slusarz ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$anchor string The anchor string (a/k/a fragment).
$parameters array The keys are paramter names, the values parameter values. Array values will be added to the URL using name[]=value notation.
$pathInfo string Any PATH_INFO to be added to the URL.
$raw boolean Whether to output the URL in the raw URL format or HTML-encoded.
$toStringCallback callback A callback function to use when converting to a string.
$url string The basic URL, without query parameters.

보호된 프로퍼티들

프로퍼티 타입 설명
$_cache array Cached parameter list for use in toString().

공개 메소드들

메소드 설명
__construct ( string | Horde_Url $url = '', boolean $raw = null ) Constructor.
__toString ( ) : string Creates the full URL string.
add ( mixed $parameters, string $value = null ) : Horde_Url Adds one or more query parameters.
copy ( ) : Horde_Url Returns a clone of this object. Useful for chaining.
link ( array $attributes = [] ) : string Generates a HTML link tag out of this URL.
redirect ( ) Sends a redirect request to the browser to the URL in this object.
remove ( $parameters ) : Horde_Url Removes one ore more parameters.
setAnchor ( string $anchor ) : Horde_Url Sets the URL anchor.
setRaw ( boolean $raw ) : Horde_Url Sets the $raw value. This call can be chained.
setScheme ( string $scheme = 'http', boolean $replace = false ) : Horde_Url Sets the URL scheme.
toString ( boolean $raw = false, boolean $full = true ) : string Creates the full URL string.
unique ( ) : Horde_Url Add a unique parameter to the URL to aid in cache-busting.
uriB64Decode ( string $string ) : string Decode URL-safe base64 data, dealing with missing '='.
uriB64Encode ( string $string ) : string URL-safe base64 encoding, with trimmed '='.

보호된 메소드들

메소드 설명
_getParameters ( ) : array Return a formatted list of URL parameters.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( string | Horde_Url $url = '', boolean $raw = null )
$url string | Horde_Url The basic URL, with or without query parameters.
$raw boolean Whether to output the URL in the raw URL format or HTML-encoded.

__toString() 공개 메소드

Creates the full URL string.
public __toString ( ) : string
리턴 string The string representation of this object.

_getParameters() 보호된 메소드

Return a formatted list of URL parameters.
protected _getParameters ( ) : array
리턴 array Parameter list.

add() 공개 메소드

Adds one or more query parameters.
public add ( mixed $parameters, string $value = null ) : Horde_Url
$parameters mixed Either the name value or an array of name/value pairs.
$value string If specified, the value part ($parameters is then assumed to just be the parameter name).
리턴 Horde_Url This (modified) object, to allow chaining.

copy() 공개 메소드

Returns a clone of this object. Useful for chaining.
public copy ( ) : Horde_Url
리턴 Horde_Url A clone of this object.

redirect() 공개 메소드

Sends a redirect request to the browser to the URL in this object.
public redirect ( )

remove() 공개 메소드

Removes one ore more parameters.
public remove ( $parameters ) : Horde_Url
리턴 Horde_Url This (modified) object, to allow chaining.

setAnchor() 공개 메소드

Sets the URL anchor.
public setAnchor ( string $anchor ) : Horde_Url
$anchor string An anchor to add.
리턴 Horde_Url This (modified) object, to allow chaining.

setRaw() 공개 메소드

Sets the $raw value. This call can be chained.
public setRaw ( boolean $raw ) : Horde_Url
$raw boolean Whether to output the URL in the raw URL format or HTML-encoded.
리턴 Horde_Url This object, to allow chaining.

setScheme() 공개 메소드

Sets the URL scheme.
public setScheme ( string $scheme = 'http', boolean $replace = false ) : Horde_Url
$scheme string The URL scheme.
$replace boolean Force using $scheme, even if it already exists?
리턴 Horde_Url This object, to allow chaining.

toString() 공개 메소드

Creates the full URL string.
public toString ( boolean $raw = false, boolean $full = true ) : string
$raw boolean Whether to output the URL in the raw URL format or HTML-encoded.
$full boolean Output the full URL?
리턴 string The string representation of this object.

unique() 공개 메소드

Add a unique parameter to the URL to aid in cache-busting.
public unique ( ) : Horde_Url
리턴 Horde_Url This (modified) object, to allow chaining.

uriB64Decode() 공개 정적인 메소드

Decode URL-safe base64 data, dealing with missing '='.
public static uriB64Decode ( string $string ) : string
$string string Encoded data.
리턴 string Decoded data.

uriB64Encode() 공개 정적인 메소드

URL-safe base64 encoding, with trimmed '='.
public static uriB64Encode ( string $string ) : string
$string string String to encode.
리턴 string URL-safe, base64 encoded data.

프로퍼티 상세

$_cache 보호되어 있는 프로퍼티

Cached parameter list for use in toString().
protected array $_cache
리턴 array

$anchor 공개적으로 프로퍼티

The anchor string (a/k/a fragment).
public string $anchor
리턴 string

$parameters 공개적으로 프로퍼티

The keys are paramter names, the values parameter values. Array values will be added to the URL using name[]=value notation.
public array $parameters
리턴 array

$pathInfo 공개적으로 프로퍼티

Any PATH_INFO to be added to the URL.
public string $pathInfo
리턴 string

$raw 공개적으로 프로퍼티

Whether to output the URL in the raw URL format or HTML-encoded.
public bool $raw
리턴 boolean

$toStringCallback 공개적으로 프로퍼티

A callback function to use when converting to a string.
public callback $toStringCallback
리턴 callback

$url 공개적으로 프로퍼티

The basic URL, without query parameters.
public string $url
리턴 string