Zend Framework
1.12
|
Public Member Functions | |
getUri () | |
Returns a URI based on current values of the instance variables. | |
valid () | |
Validate the current URI from the instance variables. | |
getUsername () | |
Returns the username portion of the URL, or FALSE if none. | |
validateUsername ($username=null) | |
Returns true if and only if the username passes validation. | |
setUsername ($username) | |
Sets the username for the current URI, and returns the old username. | |
getPassword () | |
Returns the password portion of the URL, or FALSE if none. | |
validatePassword ($password=null) | |
Returns true if and only if the password passes validation. | |
setPassword ($password) | |
Sets the password for the current URI, and returns the old password. | |
getHost () | |
Returns the domain or host IP portion of the URL, or FALSE if none. | |
validateHost ($host=null) | |
Returns true if and only if the host string passes validation. | |
setHost ($host) | |
Sets the host for the current URI, and returns the old host. | |
getPort () | |
Returns the TCP port, or FALSE if none. | |
validatePort ($port=null) | |
Returns true if and only if the TCP port string passes validation. | |
setPort ($port) | |
Sets the port for the current URI, and returns the old port. | |
getPath () | |
Returns the path and filename portion of the URL. | |
validatePath ($path=null) | |
Returns true if and only if the path string passes validation. | |
setPath ($path) | |
Sets the path for the current URI, and returns the old path. | |
getQuery () | |
Returns the query portion of the URL (after ?), or FALSE if none. | |
getQueryAsArray () | |
Returns the query portion of the URL (after ?) as a key-value-array. | |
validateQuery ($query=null) | |
Returns true if and only if the query string passes validation. | |
addReplaceQueryParameters (array $queryParams) | |
Add or replace params in the query string for the current URI, and return the old query. | |
removeQueryParameters (array $queryParamKeys) | |
Remove params in the query string for the current URI, and return the old query. | |
setQuery ($query) | |
Set the query string for the current URI, and return the old query string This method accepts both strings and arrays. | |
getFragment () | |
Returns the fragment portion of the URL (after #), or FALSE if none. | |
validateFragment ($fragment=null) | |
Returns true if and only if the fragment passes validation. | |
setFragment ($fragment) | |
Sets the fragment for the current URI, and returns the old fragment. | |
![]() | |
__toString () | |
Return a string representation of this URI. | |
getScheme () | |
Get the URI's scheme. | |
getUri () | |
Return a string representation of this URI. | |
valid () | |
Returns TRUE if this URI is valid, or FALSE otherwise. | |
Static Public Member Functions | |
static | fromString ($uri) |
Creates a Zend_Uri_Http from the given string. | |
![]() | |
static | check ($uri) |
Convenience function, checks that a $uri string is well-formed by validating it but not returning an object. | |
static | factory ($uri= 'http', $className=null) |
Create a new Zend_Uri object for a URI. | |
static | setConfig ($config) |
Set global configuration options. | |
Public Attributes | |
const | CHAR_ALNUM = 'A-Za-z0-9' |
Character classes for validation regular expressions. | |
const | CHAR_MARK = '-_.!~*\'()\[\]' |
const | CHAR_RESERVED = ';\/?:@&=+$,' |
const | CHAR_SEGMENT = ':@&=+$,;' |
const | CHAR_UNWISE = '{}|\\\\^`' |
Protected Member Functions | |
__construct ($scheme, $schemeSpecific= '') | |
Constructor accepts a string $scheme (e.g., http, https) and a scheme-specific part of the URI (e.g., example.com/path/to/resource?query=param::fragment) | |
_parseUri ($schemeSpecific) | |
Parse the scheme-specific portion of the URI and place its parts into instance variables. | |
![]() | |
__construct ($scheme, $schemeSpecific= '') | |
Zend_Uri and its subclasses cannot be instantiated directly. | |
Protected Attributes | |
$_username = '' | |
$_password = '' | |
$_host = '' | |
$_port = '' | |
$_path = '' | |
$_query = '' | |
$_fragment = '' | |
$_regex = array() | |
![]() | |
$_scheme = '' | |
Additional Inherited Members | |
![]() | |
static | $_config |
|
protected |
Constructor accepts a string $scheme (e.g., http, https) and a scheme-specific part of the URI (e.g., example.com/path/to/resource?query=param::fragment)
string | $scheme | The scheme of the URI |
string | $schemeSpecific | The scheme-specific part of the URI |
Zend_Uri_Exception | When the URI is not valid |
|
protected |
Parse the scheme-specific portion of the URI and place its parts into instance variables.
string | $schemeSpecific | The scheme-specific portion to parse |
Zend_Uri_Exception | When scheme-specific decoposition fails |
Zend_Uri_Exception | When authority decomposition fails |
addReplaceQueryParameters | ( | array | $queryParams | ) |
Add or replace params in the query string for the current URI, and return the old query.
array | $queryParams |
|
static |
Creates a Zend_Uri_Http from the given string.
InvalidArgumentException | When the given $uri is not a string or does not start with http:// or https:// |
Zend_Uri_Exception | When the given $uri is invalid |
getFragment | ( | ) |
Returns the fragment portion of the URL (after #), or FALSE if none.
getHost | ( | ) |
Returns the domain or host IP portion of the URL, or FALSE if none.
getPassword | ( | ) |
Returns the password portion of the URL, or FALSE if none.
getPath | ( | ) |
Returns the path and filename portion of the URL.
getPort | ( | ) |
Returns the TCP port, or FALSE if none.
getQuery | ( | ) |
Returns the query portion of the URL (after ?), or FALSE if none.
getQueryAsArray | ( | ) |
Returns the query portion of the URL (after ?) as a key-value-array.
If the query is empty an empty array is returned
getUri | ( | ) |
Returns a URI based on current values of the instance variables.
If any part of the URI does not pass validation, then an exception is thrown.
Zend_Uri_Exception | When one or more parts of the URI are invalid |
getUsername | ( | ) |
Returns the username portion of the URL, or FALSE if none.
removeQueryParameters | ( | array | $queryParamKeys | ) |
Remove params in the query string for the current URI, and return the old query.
array | $queryParamKeys |
setFragment | ( | $fragment | ) |
Sets the fragment for the current URI, and returns the old fragment.
string | $fragment | Fragment of the current URI |
Zend_Uri_Exception | When $fragment is not a valid HTTP fragment |
setHost | ( | $host | ) |
Sets the host for the current URI, and returns the old host.
string | $host | The HTTP host |
Zend_Uri_Exception | When $host is nota valid HTTP host |
setPassword | ( | $password | ) |
Sets the password for the current URI, and returns the old password.
string | $password | The HTTP password |
Zend_Uri_Exception | When $password is not a valid HTTP password |
setPath | ( | $path | ) |
Sets the path for the current URI, and returns the old path.
string | $path | The HTTP path |
Zend_Uri_Exception | When $path is not a valid HTTP path |
setPort | ( | $port | ) |
Sets the port for the current URI, and returns the old port.
string | $port | The HTTP port |
Zend_Uri_Exception | When $port is not a valid HTTP port |
setQuery | ( | $query | ) |
Set the query string for the current URI, and return the old query string This method accepts both strings and arrays.
string | array | $query | The query string or array |
Zend_Uri_Exception | When $query is not a valid query string |
setUsername | ( | $username | ) |
Sets the username for the current URI, and returns the old username.
string | $username | The HTTP username |
Zend_Uri_Exception | When $username is not a valid HTTP username |
valid | ( | ) |
Validate the current URI from the instance variables.
Returns true if and only if all parts pass validation.
validateFragment | ( | $fragment = null | ) |
Returns true if and only if the fragment passes validation.
If no fragment is passed, then the fragment contained in the instance variable is used.
string | $fragment | Fragment of an URI |
Zend_Uri_Exception | When fragment validation fails |
validateHost | ( | $host = null | ) |
Returns true if and only if the host string passes validation.
If no host is passed, then the host contained in the instance variable is used.
string | $host | The HTTP host |
validatePassword | ( | $password = null | ) |
Returns true if and only if the password passes validation.
If no password is passed, then the password contained in the instance variable is used.
string | $password | The HTTP password |
Zend_Uri_Exception | When password validation fails |
validatePath | ( | $path = null | ) |
Returns true if and only if the path string passes validation.
If no path is passed, then the path contained in the instance variable is used.
string | $path | The HTTP path |
Zend_Uri_Exception | When path validation fails |
validatePort | ( | $port = null | ) |
Returns true if and only if the TCP port string passes validation.
If no port is passed, then the port contained in the instance variable is used.
string | $port | The HTTP port |
validateQuery | ( | $query = null | ) |
Returns true if and only if the query string passes validation.
If no query is passed, then the query string contained in the instance variable is used.
string | $query | The query to validate |
Zend_Uri_Exception | When query validation fails |
validateUsername | ( | $username = null | ) |
Returns true if and only if the username passes validation.
If no username is passed, then the username contained in the instance variable is used.
string | $username | The HTTP username |
Zend_Uri_Exception | When username validation fails |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
const CHAR_ALNUM = 'A-Za-z0-9' |
Character classes for validation regular expressions.
const CHAR_MARK = '-_.!~*\'()\[\]' |
const CHAR_RESERVED = ';\/?:@&=+$,' |
const CHAR_SEGMENT = ':@&=+$,;' |
const CHAR_UNWISE = '{}|\\\\^`' |