PHP Class PHPDaemon\HTTPRequest\Input

Author: Vasily Zorin ([email protected])
Inheritance: extends EventBuffer, use trait PHPDaemon\Traits\ClassWatchdog, use trait PHPDaemon\Traits\StaticObjectWatchdog
Afficher le fichier Open project: kakserpom/phpdaemon Class Usage Examples

Méthodes publiques

Свойство Type Description
$curPart Current Part

Protected Properties

Свойство Type Description
$EOF EOF
$boundary Boundary
$curChunkSize Size of current upload chunk
$curPartDisp Content dispostion of current Part
$frozen Frozen
$maxFileSize Maximum file size from multi-part query
$readed Readed
$req Related Request
$state (self::STATE_*) State of multi-part processor

Méthodes publiques

Méthode Description
freeze ( boolean $at_front = false ) : void Freeze input
getChunkString ( ) : string Get current upload chunk as string
isEof ( ) : boolean Is EOF?
isFrozen ( ) : boolean Is frozen?
log ( string $msg ) : void Log
look ( integer $n, integer $o ) : string Read from buffer without draining
parseMultipart ( ) : void Parses multipart
readFromBuffer ( EventBuffer $buf ) : integer Moves $n bytes from input buffer to arbitrary buffer
readFromString ( string $chunk, boolean $final = true ) : void Append string to input buffer
sendEOF ( ) : void Send EOF
setBoundary ( string $boundary ) : void Set boundary
setRequest ( Generic $req ) : void Set request
unfreeze ( boolean $at_front = false ) : void Unfreeze input
writeChunkToFd ( mixed $fd, callable $cb = null ) : boolean Write current upload chunk to file descriptor

Méthodes protégées

Méthode Description
onEOF ( ) : void onEOF
onRead ( ) : void onRead

Method Details

freeze() public méthode

Freeze input
public freeze ( boolean $at_front = false ) : void
$at_front boolean At front. Default is true. If the front of a buffer is frozen, operations that drain data from the front of the buffer, or that prepend data to the buffer, will fail until it is unfrozen. If the back a buffer is frozen, operations that append data from the buffer will fail until it is unfrozen
Résultat void

getChunkString() public méthode

Get current upload chunk as string
public getChunkString ( ) : string
Résultat string Chunk body

isEof() public méthode

Is EOF?
public isEof ( ) : boolean
Résultat boolean

isFrozen() public méthode

Is frozen?
public isFrozen ( ) : boolean
Résultat boolean

log() public méthode

Log
public log ( string $msg ) : void
$msg string Message
Résultat void

look() public méthode

Read from buffer without draining
public look ( integer $n, integer $o ) : string
$n integer Number of bytes to read
$o integer Offset
Résultat string

onEOF() protected méthode

onEOF
protected onEOF ( ) : void
Résultat void

onRead() protected méthode

onRead
protected onRead ( ) : void
Résultat void

parseMultipart() public méthode

Parses multipart
public parseMultipart ( ) : void
Résultat void

readFromBuffer() public méthode

Moves $n bytes from input buffer to arbitrary buffer
public readFromBuffer ( EventBuffer $buf ) : integer
$buf EventBuffer Source nuffer
Résultat integer

readFromString() public méthode

Append string to input buffer
public readFromString ( string $chunk, boolean $final = true ) : void
$chunk string Piece of request input
$final boolean Final call is THIS SEQUENCE of calls (not mandatory final in request)?
Résultat void

sendEOF() public méthode

Send EOF
public sendEOF ( ) : void
Résultat void

setBoundary() public méthode

Set boundary
public setBoundary ( string $boundary ) : void
$boundary string Boundary
Résultat void

setRequest() public méthode

Set request
public setRequest ( Generic $req ) : void
$req Generic Request
Résultat void

unfreeze() public méthode

Unfreeze input
public unfreeze ( boolean $at_front = false ) : void
$at_front boolean At front. Default is true. If the front of a buffer is frozen, operations that drain data from the front of the buffer, or that prepend data to the buffer, will fail until it is unfrozen. If the back a buffer is frozen, operations that append data from the buffer will fail until it is unfrozen
Résultat void

writeChunkToFd() public méthode

Write current upload chunk to file descriptor
public writeChunkToFd ( mixed $fd, callable $cb = null ) : boolean
$fd mixed File destriptor
$cb callable Callback
Résultat boolean Success

Property Details

$EOF protected_oe property

EOF
protected $EOF

$boundary protected_oe property

Boundary
protected $boundary

$curChunkSize protected_oe property

Size of current upload chunk
protected $curChunkSize

$curPart public_oe property

Current Part
public $curPart

$curPartDisp protected_oe property

Content dispostion of current Part
protected $curPartDisp

$frozen protected_oe property

Frozen
protected $frozen

$maxFileSize protected_oe property

Maximum file size from multi-part query
protected $maxFileSize

$readed protected_oe property

Readed
protected $readed

$req protected_oe property

Related Request
protected $req

$state protected_oe property

(self::STATE_*) State of multi-part processor
protected $state