PHP Class HTTPConnection

Inheritance: extends CURLConnection
Afficher le fichier Open project: imastersdev/correios Class Usage Examples

Protected Properties

Свойство Type Description
$connectionTimeout integer
$cookieManager CookieManager
$hostname string
$httpAuthenticator HTTPAuthenticator
$initialized boolean
$port integer
$requestBody string
$requestHeader array
$requestParameter array
$secure boolean
$timeout integer
$userAgent string

Méthodes publiques

Méthode Description
__construct ( )
addHeader ( string $name, string $value, boolean $override = true )
close ( )
execute ( string $path = '/', string $method = HTTPRequestMethod::GET ) : HTTPResponse
getConnectionTimeout ( ) : integer
getCookieManager ( ) : CookieManager
getHost ( ) : string
getHostName ( ) : string
getPort ( ) : integer
getTimeout ( ) : integer
getURI ( ) : string
initialize ( string $hostname, boolean $secure = false, integer $port = HTTPConnection::HTTP_PORT, integer $connectionTimeout, integer $timeout )
isSecure ( ) : boolean
newRequest ( ) : HTTPRequest
setAuthenticator ( HTTPAuthenticator $httpAuthenticator )
setConnectionTimeout ( integer $connectionTimeout )
setCookieManager ( CookieManager $cookieManager )
setParam ( string $name, string $value = null )
setRequestBody ( string $requestBody )
setTimeout ( integer $timeout )

Method Details

__construct() public méthode

public __construct ( )

addHeader() public méthode

public addHeader ( string $name, string $value, boolean $override = true )
$name string Nome do campo de cabeçalho.
$value string Valor do campo de cabeçalho.
$override boolean Indica se o campo deverá ser sobrescrito caso já tenha sido definido.

close() public méthode

public close ( )

execute() public méthode

public execute ( string $path = '/', string $method = HTTPRequestMethod::GET ) : HTTPResponse
$path string Caminho da requisição.
$method string Método da requisição.
Résultat HTTPResponse Resposta HTTP.

getConnectionTimeout() public méthode

public getConnectionTimeout ( ) : integer
Résultat integer

getCookieManager() public méthode

public getCookieManager ( ) : CookieManager
Résultat CookieManager

getHost() public méthode

public getHost ( ) : string
Résultat string

getHostName() public méthode

public getHostName ( ) : string
Résultat string

getPort() public méthode

public getPort ( ) : integer
Résultat integer

getTimeout() public méthode

public getTimeout ( ) : integer
Résultat integer

getURI() public méthode

public getURI ( ) : string
Résultat string

initialize() public méthode

public initialize ( string $hostname, boolean $secure = false, integer $port = HTTPConnection::HTTP_PORT, integer $connectionTimeout, integer $timeout )
$hostname string Servidor que receberá a requisição.
$secure boolean Indica se a conexão será segura (https).
$port integer Porta da requisição.
$connectionTimeout integer Timeout de conexão em segundos.
$timeout integer Timeout de espera em segundos.

isSecure() public méthode

public isSecure ( ) : boolean
Résultat boolean

newRequest() public méthode

public newRequest ( ) : HTTPRequest
Résultat HTTPRequest

setAuthenticator() public méthode

public setAuthenticator ( HTTPAuthenticator $httpAuthenticator )
$httpAuthenticator HTTPAuthenticator

setConnectionTimeout() public méthode

public setConnectionTimeout ( integer $connectionTimeout )
$connectionTimeout integer

setCookieManager() public méthode

public setCookieManager ( CookieManager $cookieManager )
$cookieManager CookieManager

setParam() public méthode

public setParam ( string $name, string $value = null )
$name string Nome do parâmetro.
$value string Valor do parâmetro.

setRequestBody() public méthode

public setRequestBody ( string $requestBody )
$requestBody string

setTimeout() public méthode

public setTimeout ( integer $timeout )
$timeout integer

Property Details

$connectionTimeout protected_oe property

protected int $connectionTimeout
Résultat integer

$cookieManager protected_oe property

protected CookieManager $cookieManager
Résultat CookieManager

$hostname protected_oe property

protected string $hostname
Résultat string

$httpAuthenticator protected_oe property

protected HTTPAuthenticator $httpAuthenticator
Résultat HTTPAuthenticator

$initialized protected_oe property

protected bool $initialized
Résultat boolean

$port protected_oe property

protected int $port
Résultat integer

$requestBody protected_oe property

protected string $requestBody
Résultat string

$requestHeader protected_oe property

protected array $requestHeader
Résultat array

$requestParameter protected_oe property

protected array $requestParameter
Résultat array

$secure protected_oe property

protected bool $secure
Résultat boolean

$timeout protected_oe property

protected int $timeout
Résultat integer

$userAgent protected_oe static_oe property

protected static string $userAgent
Résultat string