PHP Class Zend\Diactoros\Uri

Provides a value object representing a URI for HTTP requests. Instances of this class are considered immutable; all methods that might change state are implemented such that they retain the internal state of the current instance and return a new instance that contains the changed state.
Inheritance: implements Psr\Http\Message\UriInterface
ファイルを表示 Open project: zendframework/zend-diactoros Class Usage Examples

Protected Properties

Property Type Description
$allowedSchemes Array indexed by valid scheme names to their corresponding ports.

Public Methods

Method Description
__clone ( ) Operations to perform on clone.
__construct ( string $uri = '' )
__toString ( )
getAuthority ( )
getFragment ( )
getHost ( )
getPath ( )
getPort ( )
getQuery ( )
getScheme ( )
getUserInfo ( )
withFragment ( $fragment )
withHost ( $host )
withPath ( $path )
withPort ( $port )
withQuery ( $query )
withScheme ( $scheme )
withUserInfo ( $user, $password = null )

Private Methods

Method Description
createUriString ( string $scheme, string $authority, string $path, string $query, string $fragment ) : string Create a URI string from its various parts
filterFragment ( null | string $fragment ) : string Filter a fragment value to ensure it is properly encoded.
filterPath ( string $path ) : string Filters the path of a URI to ensure it is properly encoded.
filterQuery ( string $query ) : string Filter a query string to ensure it is propertly encoded.
filterQueryOrFragment ( string $value ) : string Filter a query string key or value, or a fragment.
filterScheme ( string $scheme ) : string Filters the scheme to ensure it is a valid scheme.
isNonStandardPort ( string $scheme, string $host, integer $port ) : boolean Is a given port non-standard for the current scheme?
parseUri ( string $uri ) Parse a URI into its parts, and set the properties
splitQueryValue ( string $value ) : array Split a query value into a key/value tuple.
urlEncodeChar ( array $matches ) : string URL encode a character returned by a regex.

Method Details

__clone() public method

Since cloning usually is for purposes of mutation, we reset the $uriString property so it will be re-calculated.
public __clone ( )

__construct() public method

public __construct ( string $uri = '' )
$uri string

__toString() public method

public __toString ( )

getAuthority() public method

public getAuthority ( )

getFragment() public method

public getFragment ( )

getHost() public method

public getHost ( )

getPath() public method

public getPath ( )

getPort() public method

public getPort ( )

getQuery() public method

public getQuery ( )

getScheme() public method

public getScheme ( )

getUserInfo() public method

public getUserInfo ( )

withFragment() public method

public withFragment ( $fragment )

withHost() public method

public withHost ( $host )

withPath() public method

public withPath ( $path )

withPort() public method

public withPort ( $port )

withQuery() public method

public withQuery ( $query )

withScheme() public method

public withScheme ( $scheme )

withUserInfo() public method

public withUserInfo ( $user, $password = null )

Property Details

$allowedSchemes protected_oe property

Array indexed by valid scheme names to their corresponding ports.
protected $allowedSchemes