Class Zend_Uri_Http

Description
  • copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /Uri/Http.php (line 37)

Zend_Uri
   |
   --Zend_Uri_Http
Variable Summary
 mixed $_fragment
 mixed $_host
 mixed $_password
 mixed $_path
 mixed $_port
 mixed $_query
 mixed $_regex
 mixed $_username
Method Summary
 void __construct (string $scheme, [string $schemeSpecific = ''])
 string|false getFragment ()
 string getHost ()
 string getPassword ()
 string getPath ()
 string getPort ()
 string getQuery ()
 string getUri ()
 string getUsername ()
 string setFragment (string $fragment)
 string setHost (string $host)
 string setPassword (string $password)
 string setPath (string $path)
 string setPort (string $port)
 string setQuery (string|array $query)
 string setUsername (string $username)
 boolean valid ()
 boolean validateFragment ([string $fragment = null])
 boolean validateHost ([string $host = null])
 boolean validatePassword ([string $password = null])
 boolean validatePath ([string $path = null])
 boolean validatePort ([string $port = null])
 boolean validateQuery ([string $query = null])
 boolean validateUsername ([string $username = null])
 string _parseQuery (string|array $query)
 void _parseUri (string $schemeSpecific)
Variables
mixed $_fragment = '' (line 48)
  • access: protected
mixed $_host = '' (line 44)
  • access: protected
mixed $_password = '' (line 43)
  • access: protected
mixed $_path = '' (line 46)
  • access: protected
mixed $_port = '' (line 45)
  • access: protected
mixed $_query = '' (line 47)
  • access: protected
mixed $_regex = array() (line 53)

Regular expression grammar rules for validation; values added by constructor

  • access: protected
mixed $_username = '' (line 42)

URI parts are divided among these instance variables

  • access: protected

Inherited Variables

Inherited from Zend_Uri

Zend_Uri::$_scheme
Methods
Constructor __construct (line 64)

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)

  • throws: Zend_Uri_Exception
  • access: protected
void __construct (string $scheme, [string $schemeSpecific = ''])
  • string $scheme
  • string $schemeSpecific

Redefinition of:
Zend_Uri::__construct()
Zend_Uri and its subclasses cannot be instantiated directly.
getFragment (line 567)

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

  • access: public
string|false getFragment ()
getHost (line 311)

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

  • access: public
string getHost ()
getPassword (line 247)

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

  • access: public
string getPassword ()
getPath (line 415)

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

  • access: public
string getPath ()
getPort (line 366)

Returns the TCP port, or FALSE if none.

  • access: public
string getPort ()
getQuery (line 472)

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

  • access: public
string getQuery ()
getUri (line 150)

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.

  • throws: Zend_Uri_Exception
  • access: public
string getUri ()

Redefinition of:
Zend_Uri::getUri()
Return a string representation of this URI.
getUsername (line 188)

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

  • access: public
string getUsername ()
setFragment (line 612)

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

  • throws: Zend_Uri_Exception
  • access: public
string setFragment (string $fragment)
  • string $fragment
setHost (line 351)

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

  • throws: Zend_Uri_Exception
  • access: public
string setHost (string $host)
  • string $host
setPassword (line 296)

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

  • throws: Zend_Uri_Exception
  • access: public
string setPassword (string $password)
  • string $password
setPath (line 457)

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

  • throws: Zend_Uri_Exception
  • access: public
string setPath (string $path)
  • string $path
setPort (line 400)

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

  • throws: Zend_Uri_Exception
  • access: public
string setPort (string $port)
  • string $port
setQuery (line 517)

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

  • return: Old query string
  • access: public
string setQuery (string|array $query)
  • string|array $query: The query string or array
setUsername (line 232)

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

  • throws: Zend_Uri_Exception
  • access: public
string setUsername (string $username)
  • string $username
valid (line 169)

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

  • access: public
boolean valid ()

Redefinition of:
Zend_Uri::valid()
Returns TRUE if this URI is valid, or FALSE otherwise.
validateFragment (line 580)

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.

  • throws: Zend_Uri_Exception
  • access: public
boolean validateFragment ([string $fragment = null])
  • string $fragment
validateHost (line 324)

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.

boolean validateHost ([string $host = null])
  • string $host
validatePassword (line 260)

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.

  • throws: Zend_Uri_Exception
  • access: public
boolean validatePassword ([string $password = null])
  • string $password
validatePath (line 428)

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.

  • throws: Zend_Uri_Exception
  • access: public
boolean validatePath ([string $path = null])
  • string $path
validatePort (line 378)

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.

  • access: public
boolean validatePort ([string $port = null])
  • string $port
validateQuery (line 485)

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.

  • throws: Zend_Uri_Exception
  • access: public
boolean validateQuery ([string $query = null])
  • string $query
validateUsername (line 201)

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.

  • throws: Zend_Uri_Exception
  • access: public
boolean validateUsername ([string $username = null])
  • string $username
_parseQuery (line 530)

Parse a query string or array, validate it and return it as a query string

  • access: protected
string _parseQuery (string|array $query)
  • string|array $query
_parseUri (line 103)

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

  • throws: Zend_Uri_Exception
  • access: protected
void _parseUri (string $schemeSpecific)
  • string $schemeSpecific

Inherited Methods

Inherited From Zend_Uri

 Zend_Uri::__construct()
 Zend_Uri::check()
 Zend_Uri::factory()
 Zend_Uri::getScheme()
 Zend_Uri::getUri()
 Zend_Uri::valid()
 Zend_Uri::__toString()

Documentation generated on Sun, 27 May 2007 23:24:41 -0700 by phpDocumentor 1.3.2