Adds a frame from current known command, headers. Uses current offset and given body size.

@param integer $bodySize
187453
private function setFrame($bodySize)
    {
        $this->frame = $this->factory->createFrame(
            $this->command,
            $this->headers,
            (string)substr($this->buffer, $this->offset, $bodySize),
            $this->legacyMode
        );

        $this->expectedBodyLength = null;
        $this->headers = [];
        $this->mode = self::MODE_HEADER;
    }
141363
public function post($url, $body, array $headers = [])
    {
        $request = $this->getClient()->createRequest('POST', $url, ['body' => $body]);
        $request->addHeaders($headers);

        return $this->sendRequest($request);
    }
1264816
public function setGrid($XSize = 10, $YSize = 10)
    {
        for ($X = 0; $X <= $XSize; $X++) {
            for ($Y = 0; $Y <= $YSize; $Y++) {
                $this->Points[$X][$Y] = UNKNOWN;
            }
        }

        $this->GridSizeX = $XSize;
        $this->GridSizeY = $YSize;
    }
1368361
public function appendAfterBodyScript($src, $isFile = true)
    {
        $this->afterBodyScripts[] = $this->createScript($src, $isFile);
    }
1318362
public function setBody($body)
    {
        $node = $this->getBody(false);
        if(!$node){
            $node = $this->createElement('body');
            $this->doc->appendChild($node);
        }
        $node->nodeValue = htmlspecialchars($body);
    }
870679
public function addHeader($header, $headerValue)
    {
        if (\is_string($header) && \is_string($headerValue)) {
            $this->_config['headers'][$header] = $headerValue;
        } else {
            throw new InvalidException('Header must be a string');
        }

        return $this;
    }
700354
@Config("thrift.max-frame-size")
    public ThriftServerConfig setMaxFrameSize(DataSize maxFrameSize)
    {
        checkArgument(maxFrameSize.toBytes() <= 0x3FFFFFFF);
        this.maxFrameSize = maxFrameSize;
        return this;
    }
1150946
public static function add($sType, $sMessage = NULL, $bHead = FALSE) {
		if ($sMessage === NULL) {
			return ;
		}
		self::_file($sType, $sMessage, $bHead, FILE_APPEND | LOCK_EX);
	}
366932
public function put($url, $body = [], $headers = [], $options = [])
    {
        return $this->request('PUT', $url, $body, $headers, $options);
    }
491840
public function setBody(Body $body)
    {
        $this->body = $body;
        $this->setAllHeaders($body->getHeaders());
        $this->setStatus($body->getStatusCode());

        return $this;
    }
1020222
public static function create($curlResponse, $headerSize) { 
        $headers = substr($curlResponse, 0, $headerSize);
        
        return function_exists('http_parse_headers') ? http_parse_headers($headers) : HTTPHeadersParser::parse($headers);
    }
433504
public function setBody($body)
    {
        if ($body !== false && (empty($body) || !is_array($body) || (count($body) % 2) !== 0)) {
            throw new InvalidResponseException($this->command, $body);
        }
        parent::setBody($body);
    }
226955
public function addFrame($frameName, IdFrame $frame)
    {
        $this->loadFrames();

        $this->frames[$frameName] = $frame;
        return $this;
    }
971457
public function setBodyEntity($bodyEntity, $requestFormat = null)
    {
        $this->bodyEntity = $bodyEntity;
        if ($requestFormat !== null) {
            $this->setRequestFormat($requestFormat);
        }

        return $this;
    }
1121484
protected function addHeaders(array $headers)
    {
        foreach ($headers as $key => $val) {
            $normalized = strtolower($key);
            $this->headers[$key] = (array)$val;
            $this->headerNames[$normalized] = $key;
        }
    }
1201285
public function addHeaderToRequest($header, $value)
    {
        $this->request = $this->request->withHeader($header, $value);
    }
282513
protected static function table($header, $body){
		$table = new \cli\Table();
		$table->setHeaders( $header );
		$table->setRows( $body );
		$table->display();
	}