for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is automatically generated.
*/
namespace ButterAMQP\Framing\Method;
use ButterAMQP\Framing\Frame;
use ButterAMQP\Value;
/**
* Specify quality of service.
*
* @codeCoverageIgnore
class BasicQos extends Frame
{
* @var int
private $prefetchSize;
private $prefetchCount;
* @var bool
private $global;
* @param int $channel
* @param int $prefetchSize
* @param int $prefetchCount
* @param bool $global
public function __construct($channel, $prefetchSize, $prefetchCount, $global)
$this->prefetchSize = $prefetchSize;
$this->prefetchCount = $prefetchCount;
$this->global = $global;
parent::__construct($channel);
}
* Prefetch window in octets.
* @return int
public function getPrefetchSize()
return $this->prefetchSize;
* Prefetch window in messages.
public function getPrefetchCount()
return $this->prefetchCount;
* Apply to entire connection.
* @return bool
public function isGlobal()
return $this->global;
* @return string
public function encode()
$data = "\x00\x3C\x00\x0A".
Value\LongValue::encode($this->prefetchSize).
Value\ShortValue::encode($this->prefetchCount).
Value\BooleanValue::encode($this->global);
return "\x01".pack('nN', $this->channel, strlen($data)).$data."\xCE";