for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace evseevnn\Cassandra\Protocol;
class Frame {
/**
* @var int
*/
private $version;
private $opcode;
* @var string
private $body;
private $stream;
private $flags;
* @param int $version
* @param int $opcode
* @param string $body
* @param int $stream
* @param int $flags
public function __construct($version, $opcode, $body, $stream = 0, $flags = 0) {
$this->version = $version;
$this->opcode = $opcode;
$this->body = $body;
$this->stream = $stream;
$this->flags = $flags;
}
* @return string
public function __toString() {
return pack(
'CCcCN',
$this->version,
$this->flags,
$this->stream,
$this->opcode,
strlen($this->body)
) . $this->body;