Uri/Http.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Uri
- Version
- $Id$
Package: Zend_UriHTTP(S) URI handler
- Parent(s)
- \Zend_Uri
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Uses
-
Constants
Properties



array $_regex = array()Regular expression grammar rules for validation; values added by constructor
Default valuearray()Details- Type
- array
Methods



__construct(string $scheme, string $schemeSpecific = '') : voidConstructor 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| Name | Type | Description |
|---|
| $scheme | string | The scheme of the URI |
|---|
| $schemeSpecific | string | The scheme-specific part of the URI |
|---|
Throws 


_parseUri(string $schemeSpecific) : voidParse the scheme-specific portion of the URI and place its parts into instance variables.
Parameters| Name | Type | Description |
|---|
| $schemeSpecific | string | The scheme-specific portion to parse |
|---|
Throws 


addReplaceQueryParameters(array $queryParams) : stringAdd or replace params in the query string for the current URI, and
return the old query.
Parameters| Name | Type | Description |
|---|
| $queryParams | array | |
|---|
Returns| Type | Description |
|---|
| string | Old query string |



fromString(string $uri) : \Zend_Uri_HttpstaticCreates a Zend_Uri_Http from the given string
Parameters| Name | Type | Description |
|---|
| $uri | string | String to create URI from, must start with
'http://' or 'https://'
|
|---|
ReturnsThrows 


getFragment() : string | falseReturns the fragment portion of the URL (after #), or FALSE if none.
Returns| Type | Description |
|---|
| string | false | |



removeQueryParameters(array $queryParamKeys) : stringRemove params in the query string for the current URI, and
return the old query.
Parameters| Name | Type | Description |
|---|
| $queryParamKeys | array | |
|---|
Returns| Type | Description |
|---|
| string | Old query string |



setFragment(string $fragment) : stringSets the fragment for the current URI, and returns the old fragment
Parameters| Name | Type | Description |
|---|
| $fragment | string | Fragment of the current URI |
|---|
ReturnsThrows 


setHost(string $host) : stringSets the host for the current URI, and returns the old host
Parameters| Name | Type | Description |
|---|
| $host | string | The HTTP host |
|---|
ReturnsThrows 


setPassword(string $password) : stringSets the password for the current URI, and returns the old password
Parameters| Name | Type | Description |
|---|
| $password | string | The HTTP password |
|---|
ReturnsThrows 


setPath(string $path) : stringSets the path for the current URI, and returns the old path
Parameters| Name | Type | Description |
|---|
| $path | string | The HTTP path |
|---|
ReturnsThrows 


setPort(string $port) : stringSets the port for the current URI, and returns the old port
Parameters| Name | Type | Description |
|---|
| $port | string | The HTTP port |
|---|
ReturnsThrows 


setQuery(string | array $query) : stringSet the query string for the current URI, and return the old query
string This method accepts both strings and arrays.
Parameters| Name | Type | Description |
|---|
| $query | string | array | The query string or array |
|---|
Returns| Type | Description |
|---|
| string | Old query string |
Throws 


setUsername(string $username) : stringSets the username for the current URI, and returns the old username
Parameters| Name | Type | Description |
|---|
| $username | string | The HTTP username |
|---|
ReturnsThrows 


validateHost(string $host = null) : booleanReturns 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| Name | Type | Description |
|---|
| $host | string | The HTTP host |
|---|
ReturnsDetails- Uses
-



validatePath(string $path = null) : booleanReturns 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| Name | Type | Description |
|---|
| $path | string | The HTTP path |
|---|
ReturnsThrows 


validatePort(string $port = null) : booleanReturns 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| Name | Type | Description |
|---|
| $port | string | The HTTP port |
|---|
Returns