__construct (Constructor) [line 141]
Net_URL2 __construct(
string
$url, [array
$options = null])
|
|
Constructor.
Parameters:
getAuthority [line 353]
string|bool getAuthority(
)
|
|
Returns the authority part, i.e. [ userinfo "@" ] host [ ":" port ], or false if there is no authority.
getCanonical [line 846]
Returns a Net_URL2 instance representing the canonical URL of the currently executing PHP script.
getFragment [line 454]
string|bool getFragment(
)
|
|
Returns the fragment name, or false if "#" is not present in the URL.
getHost [line 305]
Returns the host part, or false if there is no authority part, e.g.
relative URLs.
getNormalizedURL [line 641]
string getNormalizedURL(
)
|
|
Returns a normalized string representation of this URL. This is useful for comparison of URLs.
getOption [line 923]
mixed getOption(
string
$optionName)
|
|
Returns the value of the specified option.
Parameters:
getPassword [line 264]
string|bool getPassword(
)
|
|
Returns the password part of the userinfo part (the part after the first ":"), or false if there is no userinfo part (i.e. the URL does not contain "@" in front of the hostname) or the userinfo part does not contain ":".
getPath [line 406]
Returns the path part (possibly an empty string).
getPort [line 329]
Returns the port number, or false if there is no port number specified, i.e. if the default port is to be used.
getQuery [line 430]
Returns the query string (excluding the leading "?"), or false if "?" is not present in the URL.
getQueryVariables [line 479]
array getQueryVariables(
)
|
|
Returns the query string like an array as the variables would appear in $_GET in a PHP script. If the URL does not contain a "?", an empty array is returned.
getRequested [line 882]
Returns a Net_URL2 instance representing the URL used to retrieve the current request.
getRequestedURL [line 871]
string getRequestedURL(
)
|
|
Returns the URL used to retrieve the current request.
getScheme [line 222]
Returns the scheme, e.g. "http" or "urn", or false if there is no scheme specified, i.e. if this is a relative URL.
getURL [line 598]
Returns a string representation of this URL.
getUser [line 249]
Returns the user part of the userinfo part (the part preceding the first ":"), or false if there is no userinfo part.
getUserinfo [line 277]
string|bool getUserinfo(
)
|
|
Returns the userinfo part, or false if there is none, i.e. if the authority part does not contain "@".
isAbsolute [line 698]
Returns whether this instance represents an absolute URL.
normalize [line 653]
Returns a normalized Net_URL2 instance.
removeDotSegments [line 782]
string removeDotSegments(
string
$path)
|
|
Removes dots as described in RFC 3986, section 5.2.4, e.g.
"/foo/../bar/baz" => "/bar/baz"
Parameters:
resolve [line 711]
Returns an Net_URL2 instance representing an absolute URL relative to this URL.
Parameters:
setAuthority [line 384]
void setAuthority(
string|false
$authority)
|
|
Sets the authority part, i.e. [ userinfo "@" ] host [ ":" port ]. Specify false if there is no authority.
Parameters:
setFragment [line 467]
void setFragment(
string|bool
$fragment)
|
|
Sets the fragment name. Specify false if "#" is not present in the URL.
Parameters:
setHost [line 318]
void setHost(
string|bool
$host)
|
|
Sets the host part. Specify false if there is no authority part, e.g.
relative URLs.
Parameters:
setOption [line 908]
void setOption(
string
$optionName, mixed
$value)
|
|
Sets the specified option.
Parameters:
setPath [line 418]
void setPath(
string
$path)
|
|
Sets the path part (possibly an empty string).
Parameters:
setPort [line 342]
void setPort(
int|bool
$port)
|
|
Sets the port number. Specify false if there is no port number specified, i.e. if the default port is to be used.
Parameters:
setQuery [line 444]
void setQuery(
string|bool
$query)
|
|
Sets the query string (excluding the leading "?"). Specify false if "?" is not present in the URL.
Parameters:
setQueryVariable [line 572]
array setQueryVariable(
string
$name, mixed
$value)
|
|
Sets the specified variable in the query string.
Parameters:
setQueryVariables [line 537]
void setQueryVariables(
array
$array)
|
|
Sets the query string to the specified variable in the query string.
Parameters:
setScheme [line 238]
void setScheme(
string|bool
$scheme)
|
|
Sets the scheme, e.g. "http" or "urn". Specify false if there is no scheme specified, i.e. if this is a relative URL.
Parameters:
setUserinfo [line 291]
void setUserinfo(
string|bool
$userinfo, [string|bool
$password = false])
|
|
Sets the userinfo part. If two arguments are passed, they are combined in the userinfo part as username ":" password.
Parameters:
unsetQueryVariable [line 586]
void unsetQueryVariable(
string
$name)
|
|
Removes the specifed variable from the query string.
Parameters:
urlencode [line 832]
string urlencode(
$raw
$string)
|
|
Percent-encodes all non-alphanumeric characters except these: _ . - ~ Similar to PHP's rawurlencode(), except that it also encodes ~ in PHP 5.2.x and earlier.
Parameters:
__get [line 206]
mixed __get(
string
$var)
|
|
Magic Getter.
This is the magic get method to retrieve the private variable that was set by either __set() or it's setter...
Parameters:
__set [line 187]
void __set(
string
$var, mixed
$arg)
|
|
Magic Setter.
This method will magically set the value of a private variable ($var) with the value passed as the args
Parameters:
__toString [line 630]
Returns a string representation of this URL.