Moodle  2.2.1
http://www.collinsharper.com
Zend_Uri_Http Class Reference
Inheritance diagram for Zend_Uri_Http:
Collaboration diagram for Zend_Uri_Http:

Public Member Functions

 getUri ()
 valid ()
 getUsername ()
 validateUsername ($username=null)
 setUsername ($username)
 getPassword ()
 validatePassword ($password=null)
 setPassword ($password)
 getHost ()
 validateHost ($host=null)
 setHost ($host)
 getPort ()
 validatePort ($port=null)
 setPort ($port)
 getPath ()
 validatePath ($path=null)
 setPath ($path)
 getQuery ()
 getQueryAsArray ()
 validateQuery ($query=null)
 addReplaceQueryParameters (array $queryParams)
 removeQueryParameters (array $queryParamKeys)
 setQuery ($query)
 getFragment ()
 validateFragment ($fragment=null)
 setFragment ($fragment)

Static Public Member Functions

static fromString ($uri)

Data Fields

const CHAR_ALNUM = 'A-Za-z0-9'
const CHAR_MARK = '-_.!~*\'()\[\]'
const CHAR_RESERVED = ';\/?:@&=+$,'
const CHAR_SEGMENT = ':@&=+$,;'
const CHAR_UNWISE = '{}|\\\\^`'

Protected Member Functions

 __construct ($scheme, $schemeSpecific= '')
 _parseUri ($schemeSpecific)

Protected Attributes

 $_username = ''
 $_password = ''
 $_host = ''
 $_port = ''
 $_path = ''
 $_query = ''
 $_fragment = ''
 $_regex = array()

Detailed Description

Definition at line 41 of file Http.php.


Constructor & Destructor Documentation

__construct ( scheme,
schemeSpecific = '' 
) [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)

Parameters:
string$schemeThe scheme of the URI
string$schemeSpecificThe scheme-specific part of the URI
Exceptions:
Zend_Uri_ExceptionWhen the URI is not valid

Reimplemented from Zend_Uri.

Definition at line 116 of file Http.php.

Here is the call graph for this function:


Member Function Documentation

_parseUri ( schemeSpecific) [protected]

Parse the scheme-specific portion of the URI and place its parts into instance variables.

Parameters:
string$schemeSpecificThe scheme-specific portion to parse
Exceptions:
Zend_Uri_ExceptionWhen scheme-specific decoposition fails
Zend_Uri_ExceptionWhen authority decomposition fails
Returns:
void

Definition at line 198 of file Http.php.

Here is the caller graph for this function:

addReplaceQueryParameters ( array queryParams)

Add or replace params in the query string for the current URI, and return the old query.

Parameters:
array$queryParams
Returns:
string Old query string

Definition at line 649 of file Http.php.

Here is the call graph for this function:

static fromString ( uri) [static]

Creates a Zend_Uri_Http from the given string

Parameters:
string$uriString to create URI from, must start with 'http://' or 'https://'
Exceptions:
InvalidArgumentExceptionWhen the given $uri is not a string or does not start with http:// or https://
Zend_Uri_ExceptionWhen the given $uri is invalid
Returns:
Zend_Uri_Http

Definition at line 170 of file Http.php.

Returns the fragment portion of the URL (after #), or FALSE if none.

Returns:
string|false

Definition at line 714 of file Http.php.

getHost ( )

Returns the domain or host IP portion of the URL, or FALSE if none.

Returns:
string

Definition at line 422 of file Http.php.

Returns the password portion of the URL, or FALSE if none.

Returns:
string

Definition at line 355 of file Http.php.

getPath ( )

Returns the path and filename portion of the URL, or FALSE if none.

Returns:
string

Definition at line 529 of file Http.php.

getPort ( )

Returns the TCP port, or FALSE if none.

Returns:
string

Definition at line 477 of file Http.php.

getQuery ( )

Returns the query portion of the URL (after ?), or FALSE if none.

Returns:
string

Definition at line 589 of file Http.php.

Here is the caller graph for this function:

Returns the query portion of the URL (after ?) as a key-value-array. If the query is empty an empty array is returned

Returns:
array

Definition at line 601 of file Http.php.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Exceptions:
Zend_Uri_ExceptionWhen one or more parts of the URI are invalid
Returns:
string

Reimplemented from Zend_Uri.

Definition at line 247 of file Http.php.

Here is the call graph for this function:

Returns the username portion of the URL, or FALSE if none.

Returns:
string

Definition at line 293 of file Http.php.

removeQueryParameters ( array queryParamKeys)

Remove params in the query string for the current URI, and return the old query.

Parameters:
array$queryParamKeys
Returns:
string Old query string

Definition at line 662 of file Http.php.

Here is the call graph for this function:

setFragment ( fragment)

Sets the fragment for the current URI, and returns the old fragment

Parameters:
string$fragmentFragment of the current URI
Exceptions:
Zend_Uri_ExceptionWhen $fragment is not a valid HTTP fragment
Returns:
string

Definition at line 757 of file Http.php.

Here is the call graph for this function:

setHost ( host)

Sets the host for the current URI, and returns the old host

Parameters:
string$hostThe HTTP host
Exceptions:
Zend_Uri_ExceptionWhen $host is nota valid HTTP host
Returns:
string

Definition at line 459 of file Http.php.

Here is the call graph for this function:

setPassword ( password)

Sets the password for the current URI, and returns the old password

Parameters:
string$passwordThe HTTP password
Exceptions:
Zend_Uri_ExceptionWhen $password is not a valid HTTP password
Returns:
string

Definition at line 404 of file Http.php.

Here is the call graph for this function:

setPath ( path)

Sets the path for the current URI, and returns the old path

Parameters:
string$pathThe HTTP path
Exceptions:
Zend_Uri_ExceptionWhen $path is not a valid HTTP path
Returns:
string

Definition at line 571 of file Http.php.

Here is the call graph for this function:

setPort ( port)

Sets the port for the current URI, and returns the old port

Parameters:
string$portThe HTTP port
Exceptions:
Zend_Uri_ExceptionWhen $port is not a valid HTTP port
Returns:
string

Definition at line 511 of file Http.php.

Here is the call graph for this function:

setQuery ( query)

Set the query string for the current URI, and return the old query string This method accepts both strings and arrays.

Parameters:
string | array$queryThe query string or array
Exceptions:
Zend_Uri_ExceptionWhen $query is not a valid query string
Returns:
string Old query string

Definition at line 676 of file Http.php.

Here is the call graph for this function:

Here is the caller graph for this function:

setUsername ( username)

Sets the username for the current URI, and returns the old username

Parameters:
string$usernameThe HTTP username
Exceptions:
Zend_Uri_ExceptionWhen $username is not a valid HTTP username
Returns:
string

Definition at line 337 of file Http.php.

Here is the call graph for this function:

valid ( )

Validate the current URI from the instance variables. Returns true if and only if all parts pass validation.

Returns:
boolean

Reimplemented from Zend_Uri.

Definition at line 276 of file Http.php.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters:
string$fragmentFragment of an URI
Exceptions:
Zend_Uri_ExceptionWhen fragment validation fails
Returns:
boolean http://www.faqs.org/rfcs/rfc2396.html

Definition at line 728 of file Http.php.

Here is the caller graph for this function:

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.

Parameters:
string$hostThe HTTP host
Returns:
boolean Zend_Filter

Definition at line 435 of file Http.php.

Here is the caller graph for this function:

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.

Parameters:
string$passwordThe HTTP password
Exceptions:
Zend_Uri_ExceptionWhen password validation fails
Returns:
boolean http://www.faqs.org/rfcs/rfc2396.html

Definition at line 369 of file Http.php.

Here is the caller graph for this function:

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.

Parameters:
string$pathThe HTTP path
Exceptions:
Zend_Uri_ExceptionWhen path validation fails
Returns:
boolean

Definition at line 542 of file Http.php.

Here is the caller graph for this function:

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.

Parameters:
string$portThe HTTP port
Returns:
boolean

Definition at line 489 of file Http.php.

Here is the caller graph for this function:

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.

Parameters:
string$queryThe query to validate
Exceptions:
Zend_Uri_ExceptionWhen query validation fails
Returns:
boolean http://www.faqs.org/rfcs/rfc2396.html

Definition at line 620 of file Http.php.

Here is the caller graph for this function:

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.

Parameters:
string$usernameThe HTTP username
Exceptions:
Zend_Uri_ExceptionWhen username validation fails
Returns:
boolean http://www.faqs.org/rfcs/rfc2396.html

Definition at line 307 of file Http.php.

Here is the caller graph for this function:


Field Documentation

$_fragment = '' [protected]

Definition at line 99 of file Http.php.

$_host = '' [protected]

Definition at line 71 of file Http.php.

$_password = '' [protected]

Definition at line 64 of file Http.php.

$_path = '' [protected]

Definition at line 85 of file Http.php.

$_port = '' [protected]

Definition at line 78 of file Http.php.

$_query = '' [protected]

Definition at line 92 of file Http.php.

$_regex = array() [protected]

Definition at line 106 of file Http.php.

$_username = '' [protected]

Definition at line 57 of file Http.php.

const CHAR_ALNUM = 'A-Za-z0-9'

Character classes for validation regular expressions

Definition at line 46 of file Http.php.

const CHAR_MARK = '-_.!~*\'()\[\]'

Definition at line 47 of file Http.php.

const CHAR_RESERVED = ';\/?:@&=+$,'

Definition at line 48 of file Http.php.

const CHAR_SEGMENT = ':@&=+$,;'

Definition at line 49 of file Http.php.

const CHAR_UNWISE = '{}|\\\\^`'

Definition at line 50 of file Http.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations