Class: Net_URL2
Source Location: /Net_URL2-2.2.0/Net/URL2.php
Represents a URL as per RFC 3986.
Author(s):
Version:
Copyright:
- 2007-2009 Peytz & Co. A/S
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Method Detail
__construct (Constructor) [line 148]
Net_URL2 __construct(
string
$url, [array
$options = array()])
|
|
Constructor.
Parameters:
buildQuery [line 1128]
string buildQuery(
array
$data, string
$separator, [string
$key = null])
|
|
A simple version of http_build_query in userland. The encoded string is percentage encoded according to RFC 3986.
Parameters:
getAuthority [line 346]
string|bool getAuthority(
)
|
|
Returns the authority part, i.e. [ userinfo "@" ] host [ ":" port ], or false if there is no authority.
getCanonical [line 1052]
Returns a Net_URL2 instance representing the canonical URL of the currently executing PHP script.
getFragment [line 459]
string|bool getFragment(
)
|
|
Returns the fragment name, or false if "#" is not present in the URL.
getHost [line 296]
Returns the host part, or false if there is no authority part, e.g. relative URLs.
getNormalizedURL [line 763]
string getNormalizedURL(
)
|
|
Returns a normalized string representation of this URL. This is useful for comparison of URLs.
getOption [line 1111]
mixed getOption(
string
$optionName)
|
|
Returns the value of the specified option.
Parameters:
getPassword [line 249]
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 409]
Returns the path part (possibly an empty string).
getPort [line 321]
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 434]
Returns the query string (excluding the leading "?"), or false if "?" is not present in the URL.
getQueryVariables [line 485]
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 1089]
Returns a Net_URL2 instance representing the URL used to retrieve the current request.
getRequestedURL [line 1077]
string getRequestedURL(
)
|
|
Returns the URL used to retrieve the current request.
getScheme [line 206]
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 699]
Returns a string representation of this URL.
getUser [line 234]
Returns the user part of the userinfo part (the part preceding the first ":"), or false if there is no userinfo part.
getUserinfo [line 262]
string|bool getUserinfo(
)
|
|
Returns the userinfo part, or false if there is none, i.e. if the authority part does not contain "@".
isAbsolute [line 868]
Returns whether this instance represents an absolute URL.
normalize [line 779]
Normalizes the URL See RFC 3986, Section 6. Normalization and Comparison
parseUrl [line 1166]
void parseUrl(
string
$url)
|
|
This method uses a regex to parse the url into the designated parts.
Parameters:
removeDotSegments [line 976]
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 882]
$this resolve(
Net_URL2|string
$reference)
|
|
Returns an Net_URL2 instance representing an absolute URL relative to this URL.
Parameters:
setAuthority [line 377]
$this setAuthority(
string|bool
$authority)
|
|
Sets the authority part, i.e. [ userinfo "@" ] host [ ":" port ]. Specify false if there is no authority.
Parameters:
setFragment [line 472]
$this setFragment(
string|bool
$fragment)
|
|
Sets the fragment name. Specify false if "#" is not present in the URL.
Parameters:
setHost [line 309]
$this setHost(
string|bool
$host)
|
|
Sets the host part. Specify false if there is no authority part, e.g. relative URLs.
Parameters:
setPath [line 421]
$this setPath(
string
$path)
|
|
Sets the path part (possibly an empty string).
Parameters:
setPort [line 334]
$this setPort(
string|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 448]
$this setQuery(
string|bool
$query)
|
|
Sets the query string (excluding the leading "?"). Specify false if "?" is not present in the URL.
Parameters:
setQueryVariable [line 672]
$this setQueryVariable(
string
$name, mixed
$value)
|
|
Sets the specified variable in the query string.
Parameters:
setQueryVariables [line 651]
$this setQueryVariables(
array
$array)
|
|
Sets the query string to the specified variable in the query string.
Parameters:
setScheme [line 222]
$this 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 276]
$this 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 687]
void unsetQueryVariable(
string
$name)
|
|
Removes the specified variable from the query string.
Parameters:
urlencode [line 1036]
string urlencode(
string
$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 190]
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 170]
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 752]
Returns a string representation of this URL.
Documentation generated on Mon, 11 Mar 2019 16:01:49 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|