Sha256: bf3257a16ea386c4dc3ed419c008ece1d0f829b1b877cf4545a6ffad9f728c16

Contents?: true

Size: 491 Bytes

Versions: 7

Compression:

Stored size: 491 Bytes

Contents

<?php

namespace Predis\Commands;

use Predis\Iterators\MultiBulkResponseTuple;

class HashGetAll extends Command {
    public function getId() {
        return 'HGETALL';
    }

    public function parseResponse($data) {
        if ($data instanceof \Iterator) {
            return new MultiBulkResponseTuple($data);
        }
        $result = array();
        for ($i = 0; $i < count($data); $i++) {
            $result[$data[$i]] = $data[++$i];
        }
        return $result;
    }
}

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
appstats-0.25.1 doc/benchmarks/Predis/Commands/HashGetAll.php
appstats-0.25.0 doc/benchmarks/Predis/Commands/HashGetAll.php
appstats-0.24.0 doc/benchmarks/Predis/Commands/HashGetAll.php
appstats-0.23.5 doc/benchmarks/Predis/Commands/HashGetAll.php
appstats-0.23.4 doc/benchmarks/Predis/Commands/HashGetAll.php
appstats-0.23.3 doc/benchmarks/Predis/Commands/HashGetAll.php
appstats-0.23.2 doc/benchmarks/Predis/Commands/HashGetAll.php