Skip to main content Link Menu Expand (external link) Document Search Copy Copied

This is automatic generated document for things in Swow\Http\Parser class

Class Parser

Constants

public EVENTS_ALL = 536870430 public EVENTS_NONE = 0 public EVENT_BODY = 524292 public EVENT_CHUNK_COMPLETE = 4194312 public EVENT_CHUNK_HEADER = 2097152 public EVENT_FLAG_DATA = 4 public EVENT_FLAG_LINE = 2 public EVENT_FLAG_NONE = 0 public EVENT_HEADERS_COMPLETE = 262152 public EVENT_HEADER_FIELD = 16388 public EVENT_HEADER_FIELD_COMPLETE = 65544 public EVENT_HEADER_VALUE = 32772 public EVENT_HEADER_VALUE_COMPLETE = 131080 public EVENT_MESSAGE_BEGIN = 512 public EVENT_MESSAGE_COMPLETE = 1048584 public EVENT_MULTIPART_BODY = 134217748 public EVENT_MULTIPART_DATA_BEGIN = 8388624 public EVENT_MULTIPART_DATA_END = 268435480 public EVENT_MULTIPART_HEADERS_COMPLETE = 67108888 public EVENT_MULTIPART_HEADER_FIELD = 16777236 public EVENT_MULTIPART_HEADER_VALUE = 33554452 public EVENT_NONE = 0 public EVENT_STATUS = 4102 public EVENT_STATUS_COMPLETE = 8200 public EVENT_URL = 1030 public EVENT_URL_COMPLETE = 2056 public TYPE_BOTH = 0 public TYPE_REQUEST = 1 public TYPE_RESPONSE = 2

Methods

Static method getEventNameFor

public static function getEventNameFor ( int $event ) : string

Method execute

public function execute ( \Stringable|string $data , int $start , int $length ) : int

Returns int the length of the data which was parsed, same with $this->getParsedLength()

Method finish

public function finish ( ) : static

Method getContentLength

public function getContentLength ( ) : int

Method getCurrentChunkLength

public function getCurrentChunkLength ( ) : int

Method getDataLength

public function getDataLength ( ) : int

Method getDataOffset

public function getDataOffset ( ) : int

Method getEvent

public function getEvent ( ) : int

Method getEventName

public function getEventName ( ) : string

Method getEvents

public function getEvents ( ) : int

Method getMajorVersion

public function getMajorVersion ( ) : int

Method getMethod

public function getMethod ( ) : string

Method getMinorVersion

public function getMinorVersion ( ) : int

Method getParsedLength

public function getParsedLength ( ) : int

Method getPreviousEvent

public function getPreviousEvent ( ) : int

Method getPreviousEventName

public function getPreviousEventName ( ) : string

Method getProtocolVersion

public function getProtocolVersion ( ) : string

Method getReasonPhrase

public function getReasonPhrase ( ) : string

Method getStatusCode

public function getStatusCode ( ) : int

Method getType

public function getType ( ) : int

Method isChunked

public function isChunked ( ) : bool

Method isCompleted

public function isCompleted ( ) : bool

Method isMultipart

public function isMultipart ( ) : bool

Method isUpgrade

public function isUpgrade ( ) : bool

Method reset

public function reset ( ) : static

Method setEvents

public function setEvents ( int $events ) : static

Method setType

public function setType ( int $type ) : static

Method shouldKeepAlive

public function shouldKeepAlive ( ) : bool

Copyright 2022 the Swow contributors