PHP 클래스 PHPDaemon\Clients\HTTP\Connection

저자: Vasily Zorin ([email protected])
상속: extends PHPDaemon\Network\ClientConnection
파일 보기 프로젝트 열기: kakserpom/phpdaemon

공개 프로퍼티들

프로퍼티 타입 설명
$body Contains response body
$charset
$chunkcb callback
$chunked boolean
$contentLength Content length
$contentType
$cookie Associative array of Cookies
$eofTerminated
$headers Associative array of headers
$lastURL Last requested URL
$protocolError integer
$rawHeaders Raw headers array
$reqType string
$responseCode integer

보호된 프로퍼티들

프로퍼티 타입 설명
$EOL End of line
$curChunk string
$curChunkSize Size of current chunk
$requests SplStack

공개 메소드들

메소드 설명
get ( string $url, array $params = null ) Perform a GET request
getBody ( ) : string Get body
getHeader ( string $name ) : string Get header
getHeaders ( ) : array Get headers
head ( string $url, array $params = null ) Perform a HEAD request
onFinish ( ) Called when connection finishes
onRead ( ) Called when new data received
post ( string $url, array $data = [], array $params = null ) Perform a POST request

보호된 메소드들

메소드 설명
customRequestHeaders ( array $headers )
init ( ) Constructor
requestFinished ( ) Called when request is finished
sendRequestHeaders ( $type, $url, &$params ) : void Send request headers

메소드 상세

customRequestHeaders() 보호된 메소드

protected customRequestHeaders ( array $headers )
$headers array

get() 공개 메소드

Perform a GET request
public get ( string $url, array $params = null )
$url string
$params array

getBody() 공개 메소드

Get body
public getBody ( ) : string
리턴 string

getHeader() 공개 메소드

Get header
public getHeader ( string $name ) : string
$name string Header name
리턴 string

getHeaders() 공개 메소드

Get headers
public getHeaders ( ) : array
리턴 array

head() 공개 메소드

Perform a HEAD request
public head ( string $url, array $params = null )
$url string
$params array

init() 보호된 메소드

Constructor
protected init ( )

onFinish() 공개 메소드

Called when connection finishes
public onFinish ( )

onRead() 공개 메소드

Called when new data received
public onRead ( )

post() 공개 메소드

Perform a POST request
public post ( string $url, array $data = [], array $params = null )
$url string
$data array
$params array

requestFinished() 보호된 메소드

Called when request is finished
protected requestFinished ( )

sendRequestHeaders() 보호된 메소드

Send request headers
protected sendRequestHeaders ( $type, $url, &$params ) : void
$type
$url
리턴 void

프로퍼티 상세

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

End of line
protected $EOL

$body 공개적으로 프로퍼티

Contains response body
public $body

$charset 공개적으로 프로퍼티

public $charset

$chunkcb 공개적으로 프로퍼티

public callback $chunkcb
리턴 callback

$chunked 공개적으로 프로퍼티

public bool $chunked
리턴 boolean

$contentLength 공개적으로 프로퍼티

Content length
public $contentLength

$contentType 공개적으로 프로퍼티

public $contentType

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

protected string $curChunk
리턴 string

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

Size of current chunk
protected $curChunkSize

$eofTerminated 공개적으로 프로퍼티

public $eofTerminated

$headers 공개적으로 프로퍼티

Associative array of headers
public $headers

$lastURL 공개적으로 프로퍼티

Last requested URL
public $lastURL

$protocolError 공개적으로 프로퍼티

public int $protocolError
리턴 integer

$rawHeaders 공개적으로 프로퍼티

Raw headers array
public $rawHeaders

$reqType 공개적으로 프로퍼티

public string $reqType
리턴 string

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

protected SplStack $requests
리턴 SplStack

$responseCode 공개적으로 프로퍼티

public int $responseCode
리턴 integer