PHP Class PHPDaemon\Clients\HTTP\Connection

Author: Vasily Zorin ([email protected])
Inheritance: extends PHPDaemon\Network\ClientConnection
Afficher le fichier Open project: kakserpom/phpdaemon

Méthodes publiques

Свойство Type Description
$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

Protected Properties

Свойство Type Description
$EOL End of line
$curChunk string
$curChunkSize Size of current chunk
$requests SplStack

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
customRequestHeaders ( array $headers )
init ( ) Constructor
requestFinished ( ) Called when request is finished
sendRequestHeaders ( $type, $url, &$params ) : void Send request headers

Method Details

customRequestHeaders() protected méthode

protected customRequestHeaders ( array $headers )
$headers array

get() public méthode

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

getBody() public méthode

Get body
public getBody ( ) : string
Résultat string

getHeader() public méthode

Get header
public getHeader ( string $name ) : string
$name string Header name
Résultat string

getHeaders() public méthode

Get headers
public getHeaders ( ) : array
Résultat array

head() public méthode

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

init() protected méthode

Constructor
protected init ( )

onFinish() public méthode

Called when connection finishes
public onFinish ( )

onRead() public méthode

Called when new data received
public onRead ( )

post() public méthode

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

requestFinished() protected méthode

Called when request is finished
protected requestFinished ( )

sendRequestHeaders() protected méthode

Send request headers
protected sendRequestHeaders ( $type, $url, &$params ) : void
$type
$url
Résultat void

Property Details

$EOL protected_oe property

End of line
protected $EOL

$body public_oe property

Contains response body
public $body

$charset public_oe property

public $charset

$chunkcb public_oe property

public callback $chunkcb
Résultat callback

$chunked public_oe property

public bool $chunked
Résultat boolean

$contentLength public_oe property

Content length
public $contentLength

$contentType public_oe property

public $contentType

$curChunk protected_oe property

protected string $curChunk
Résultat string

$curChunkSize protected_oe property

Size of current chunk
protected $curChunkSize

$eofTerminated public_oe property

public $eofTerminated

$headers public_oe property

Associative array of headers
public $headers

$lastURL public_oe property

Last requested URL
public $lastURL

$protocolError public_oe property

public int $protocolError
Résultat integer

$rawHeaders public_oe property

Raw headers array
public $rawHeaders

$reqType public_oe property

public string $reqType
Résultat string

$requests protected_oe property

protected SplStack $requests
Résultat SplStack

$responseCode public_oe property

public int $responseCode
Résultat integer