src/Storage/Segment.php
public function read($uid) {
        if (!is_int($uid) && !is_numeric($uid)) {
            throw new Exception\RuntimeException('Segment type key must integer or numeric.');
        }
        if ($uid * $this->blocSize >= $this->segmentSize) {
            throw new Exception\RuntimeException('Invalid access bloc. Only ' . floor($this->segmentSize / $this->blocSize) . ' blocs are allowed.');
        }
        $this->alloc();
        $str = shmop_read($this->memory, $uid * $this->blocSize, $this->blocSize);
        $str = trim($str);
        if (!$str) {
            return false;
        }
        return $str;
    }
public function read($uid) {
        if (!is_int($uid) && !is_numeric($uid)) {
            throw new Exception\RuntimeException('Segment type key must integer or numeric.');
        }
        if ($uid * $this->blocSize >= $this->segmentSize) {
            throw new Exception\RuntimeException('Invalid access bloc. Only ' . floor($this->segmentSize / $this->blocSize) . ' blocs are allowed.');
        }
        $this->alloc();
        $str = shmop_read($this->memory, $uid * $this->blocSize, $this->blocSize);
        $str = trim($str);
        if (!$str) {
            return false;
        }
        return $str;
    }
Read datas with $uid key
@param mixed $uid
@return mixed