cleanup
[xendri.git] / lib / type / ByteArray.php
blob04f480385a43fcb49f6a7b8a69e12168bee849f8
1 <?php
2 class ByteArray implements ArrayAccess, Countable {
3 protected $data = array();
5 protected function __construct(array $data) {
9 function offsetExists($offset) {
10 return isset($this->data[$offset]);
13 function offsetGet($offset) {
14 return $this->data[$offset];
17 function offsetSet($offset, $value) {
18 $this->data[$offset] = $value;
21 public function offsetUnset($offset) {
22 unset($this->data[$offset]);
23 $this->data = array_values($this->data);
26 public function count() {
27 return count($data);