for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SPSS\Sav\Record;
use SPSS\Buffer;
use SPSS\Sav\Record;
class Info extends Record implements \ArrayAccess
{
const TYPE = 7;
const SUBTYPE = 0;
/**
* @var array
*/
protected $data = [];
* @var int Size of each piece of data in the data part, in bytes
protected $dataSize = 1;
* @var int Number of pieces of data in the data part
protected $dataCount = 0;
* @param Buffer $buffer
public function read(Buffer $buffer)
$this->dataSize = $buffer->readInt();
$this->dataCount = $buffer->readInt();
}
public function write(Buffer $buffer)
$buffer->writeInt(self::TYPE);
$buffer->writeInt(static::SUBTYPE);
$buffer->writeInt($this->dataSize);
$buffer->writeInt($this->dataCount);
* @return array
public function toArray()
return (array) $this->data;
* @param mixed $offset
* @return bool
public function offsetExists($offset)
return isset($this->data[$offset]);
* @return mixed
public function offsetGet($offset)
return $this->data[$offset];
* @param mixed $value
public function offsetSet($offset, $value)
if (is_null($offset)) {
$this->data[] = $value;
} else {
$this->data[$offset] = $value;
public function offsetUnset($offset)
unset($this->data[$offset]);