Lines Matching defs:data

127      * Input data
131 protected $data = '';
134 * Input data length (to avoid calling strlen() everytime this is needed)
162 * Create an instance of the class with the input data
164 * @param string $data Input data
166 public function __construct($data)
168 $this->data = $data;
169 $this->data_length = strlen($this->data);
173 * Parse the input data
183 $this->data = '';
197 * Check whether there is data beyond the pointer
199 * @return bool true if there is further data, false if not
213 return (bool) ($this->data[$this->position] === "\x09"
214 || $this->data[$this->position] === "\x20"
215 || ($this->data[$this->position] === "\x0A"
216 && isset($this->data[$this->position + 1])
217 && ($this->data[$this->position + 1] === "\x09" || $this->data[$this->position + 1] === "\x20")));
225 if (strpos($this->data, "\x0A") !== false && strtoupper(substr($this->data, 0, 5)) === 'HTTP/') {
226 $len = strspn($this->data, '0123456789.', 5);
227 $this->http_version = substr($this->data, 5, $len);
231 $this->position += strspn($this->data, "\x09\x20", $this->position);
246 if ($len = strspn($this->data, '0123456789', $this->position)) {
247 $this->status_code = (int) substr($this->data, $this->position, $len);
260 $len = strcspn($this->data, "\x0A", $this->position);
261 $this->reason = trim(substr($this->data, $this->position, $len), "\x09\x0D\x20");
267 * Deal with a new line, shifting data around as needed
283 if (substr($this->data[$this->position], 0, 2) === "\x0D\x0A") {
286 } elseif ($this->data[$this->position] === "\x0A") {
299 $len = strcspn($this->data, "\x0A:", $this->position);
300 if (isset($this->data[$this->position + $len])) {
301 if ($this->data[$this->position + $len] === "\x0A") {
305 $this->name = substr($this->data, $this->position, $len);
320 if (substr($this->data, $this->position, 2) === "\x0D\x0A") {
322 } elseif ($this->data[$this->position] === "\x0A") {
325 $this->position += strspn($this->data, "\x09\x20", $this->position);
338 switch ($this->data[$this->position]) {
369 $len = strcspn($this->data, "\x09\x20\x0A\"", $this->position);
370 $this->value .= substr($this->data, $this->position, $len);
383 switch ($this->data[$this->position]) {
411 $len = strcspn($this->data, "\x09\x20\x0A\"\\", $this->position);
412 $this->value .= substr($this->data, $this->position, $len);
422 $this->value .= $this->data[$this->position];
432 $this->body = substr($this->data, $this->position);
495 $data = explode("\r\n\r\n", $headers, $count);
496 $data = array_pop($data);
497 if (false !== stripos($data, "HTTP/1.0 200 Connection established\r\n")) {
498 $exploded = explode("\r\n\r\n", $data, 2);
499 $data = end($exploded);
501 if (false !== stripos($data, "HTTP/1.1 200 Connection established\r\n")) {
502 $exploded = explode("\r\n\r\n", $data, 2);
503 $data = end($exploded);
505 return $data;