Exemple #1
0
                if ($offset < strlen(static::$buffers[$this->name]) && $offset >= 0) {
                    $this->position = $offset;
                    return true;
                } else {
                    return false;
                }
                break;
            case SEEK_CUR:
                if ($offset >= 0) {
                    $this->position += $offset;
                    return true;
                } else {
                    return false;
                }
                break;
            case SEEK_END:
                if (strlen(static::$buffers[$this->name]) + $offset >= 0) {
                    $this->position = strlen(static::$buffers[$this->name]) + $offset;
                    return true;
                } else {
                    return false;
                }
                break;
            default:
                return false;
        }
    }
}
if (Buffer::canRegisterWrapper()) {
    stream_wrapper_register('fof', 'FOF30\\Utils\\Buffer');
}