PHP 클래스 HTTPConnection

상속: extends CURLConnection
파일 보기 프로젝트 열기: imastersdev/correios 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$connectionTimeout integer
$cookieManager CookieManager
$hostname string
$httpAuthenticator HTTPAuthenticator
$initialized boolean
$port integer
$requestBody string
$requestHeader array
$requestParameter array
$secure boolean
$timeout integer
$userAgent string

공개 메소드들

메소드 설명
__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 )

메소드 상세

__construct() 공개 메소드

public __construct ( )

addHeader() 공개 메소드

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 close ( )

execute() 공개 메소드

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

getConnectionTimeout() 공개 메소드

public getConnectionTimeout ( ) : integer
리턴 integer

getCookieManager() 공개 메소드

public getCookieManager ( ) : CookieManager
리턴 CookieManager

getHost() 공개 메소드

public getHost ( ) : string
리턴 string

getHostName() 공개 메소드

public getHostName ( ) : string
리턴 string

getPort() 공개 메소드

public getPort ( ) : integer
리턴 integer

getTimeout() 공개 메소드

public getTimeout ( ) : integer
리턴 integer

getURI() 공개 메소드

public getURI ( ) : string
리턴 string

initialize() 공개 메소드

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 isSecure ( ) : boolean
리턴 boolean

newRequest() 공개 메소드

public newRequest ( ) : HTTPRequest
리턴 HTTPRequest

setAuthenticator() 공개 메소드

public setAuthenticator ( HTTPAuthenticator $httpAuthenticator )
$httpAuthenticator HTTPAuthenticator

setConnectionTimeout() 공개 메소드

public setConnectionTimeout ( integer $connectionTimeout )
$connectionTimeout integer

setCookieManager() 공개 메소드

public setCookieManager ( CookieManager $cookieManager )
$cookieManager CookieManager

setParam() 공개 메소드

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

setRequestBody() 공개 메소드

public setRequestBody ( string $requestBody )
$requestBody string

setTimeout() 공개 메소드

public setTimeout ( integer $timeout )
$timeout integer

프로퍼티 상세

$connectionTimeout 보호되어 있는 프로퍼티

protected int $connectionTimeout
리턴 integer

$cookieManager 보호되어 있는 프로퍼티

protected CookieManager $cookieManager
리턴 CookieManager

$hostname 보호되어 있는 프로퍼티

protected string $hostname
리턴 string

$httpAuthenticator 보호되어 있는 프로퍼티

protected HTTPAuthenticator $httpAuthenticator
리턴 HTTPAuthenticator

$initialized 보호되어 있는 프로퍼티

protected bool $initialized
리턴 boolean

$port 보호되어 있는 프로퍼티

protected int $port
리턴 integer

$requestBody 보호되어 있는 프로퍼티

protected string $requestBody
리턴 string

$requestHeader 보호되어 있는 프로퍼티

protected array $requestHeader
리턴 array

$requestParameter 보호되어 있는 프로퍼티

protected array $requestParameter
리턴 array

$secure 보호되어 있는 프로퍼티

protected bool $secure
리턴 boolean

$timeout 보호되어 있는 프로퍼티

protected int $timeout
리턴 integer

$userAgent 보호되어 있는 정적으로 프로퍼티

protected static string $userAgent
리턴 string