PHP Class ScriptFUSION\Porter\Net\Http\HttpOptions

Inheritance: extends ScriptFUSION\Porter\Options\EncapsulatedOptions
Show file Open project: ScriptFUSION/Porter Class Usage Examples

Public Methods

Method Description
__construct ( )
addHeader ( string $header )
extractHttpContextOptions ( ) : array Extracts a list of HTTP context options only.
findHeader ( string $name ) : string | null Find the first header matching the specified name.
findHeaders ( string $name ) : array Find all headers matching the specified name.
getContent ( ) : string
getFollowLocation ( ) : boolean
getHeaders ( ) : array
getIgnoreErrors ( ) : boolean
getMaxRedirects ( ) : integer
getMethod ( ) : string
getProtocolVersion ( ) : float
getProxy ( ) : string
getQueryParameters ( ) : array
getRequestFullUri ( ) : boolean
getTimeout ( ) : float
getUserAgent ( ) : string
removeHeaders ( $name )
replaceHeaders ( $name, $header )
setContent ( string $content )
setFollowLocation ( boolean $followLocation )
setIgnoreErrors ( boolean $ignoreErrors )
setMaxRedirects ( integer $maxRedirects )
setMethod ( string $method )
setProtocolVersion ( float $protocolVersion )
setProxy ( string $proxy )
setQueryParameters ( array $queryParameters )
setRequestFullUri ( boolean $requestFullUri )
setTimeout ( float $timeout )
setUserAgent ( string $userAgent )

Method Details

__construct() public method

public __construct ( )

addHeader() public method

public addHeader ( string $header )
$header string

extractHttpContextOptions() public method

Extracts a list of HTTP context options only.
See also: http://php.net/manual/en/context.http.php
public extractHttpContextOptions ( ) : array
return array HTTP context options.

findHeader() public method

Find the first header matching the specified name.
public findHeader ( string $name ) : string | null
$name string Header name.
return string | null Header if found, otherwise null.

findHeaders() public method

Find all headers matching the specified name.
public findHeaders ( string $name ) : array
$name string Header name.
return array Headers.

getContent() public method

public getContent ( ) : string
return string

getFollowLocation() public method

public getFollowLocation ( ) : boolean
return boolean

getHeaders() public method

public getHeaders ( ) : array
return array

getIgnoreErrors() public method

public getIgnoreErrors ( ) : boolean
return boolean

getMaxRedirects() public method

public getMaxRedirects ( ) : integer
return integer

getMethod() public method

public getMethod ( ) : string
return string

getProtocolVersion() public method

public getProtocolVersion ( ) : float
return float

getProxy() public method

public getProxy ( ) : string
return string

getQueryParameters() public method

public getQueryParameters ( ) : array
return array

getRequestFullUri() public method

public getRequestFullUri ( ) : boolean
return boolean

getTimeout() public method

public getTimeout ( ) : float
return float

getUserAgent() public method

public getUserAgent ( ) : string
return string

removeHeaders() public method

public removeHeaders ( $name )

replaceHeaders() public method

public replaceHeaders ( $name, $header )

setContent() public method

public setContent ( string $content )
$content string

setFollowLocation() public method

public setFollowLocation ( boolean $followLocation )
$followLocation boolean

setIgnoreErrors() public method

public setIgnoreErrors ( boolean $ignoreErrors )
$ignoreErrors boolean

setMaxRedirects() public method

public setMaxRedirects ( integer $maxRedirects )
$maxRedirects integer

setMethod() public method

public setMethod ( string $method )
$method string

setProtocolVersion() public method

public setProtocolVersion ( float $protocolVersion )
$protocolVersion float

setProxy() public method

public setProxy ( string $proxy )
$proxy string

setQueryParameters() public method

public setQueryParameters ( array $queryParameters )
$queryParameters array

setRequestFullUri() public method

public setRequestFullUri ( boolean $requestFullUri )
$requestFullUri boolean

setTimeout() public method

public setTimeout ( float $timeout )
$timeout float

setUserAgent() public method

public setUserAgent ( string $userAgent )
$userAgent string