PHP Class Aerys\BodyParser

Inheritance: implements Amp\Promise
Show file Open project: amphp/aerys

Public Methods

Method Description
__construct ( aerys\Request $req, array $options = [] )
stream ( string $name, integer $size ) : FieldBody
watch ( callable $cb, $cbData = null )
when ( callable $cb, $cbData = null )

Private Methods

Method Description
end ( $data )
fail ( $e = null )
initField ( $field, $metadata = [] )
initIncremental ( ) this should be inside an immediate (not direct resolve) to give user a chance to install watch() handlers
updateFieldSize ( $field, $data )

Method Details

__construct() public method

public __construct ( aerys\Request $req, array $options = [] )
$req aerys\Request
$options array available options are: - size (default: 131072) - input_vars (default: 200) - field_len (default: 16384)

stream() public method

public stream ( string $name, integer $size ) : FieldBody
$name string field name
$size integer <= 0: use last size, if none present, count toward total size, else separate size just respecting value size
return FieldBody

watch() public method

public watch ( callable $cb, $cbData = null )
$cb callable

when() public method

public when ( callable $cb, $cbData = null )
$cb callable