Sha256: ad25cb3feb359f31e39b2ef73e6c149598b0dcea9cf2cfebc48e7f0239a51717

Contents?: true

Size: 644 Bytes

Versions: 7

Compression:

Stored size: 644 Bytes

Contents

<?php

namespace Predis\Commands;

abstract class ScriptedCommand extends ServerEval {
    public abstract function getScript();

    protected function keysCount() {
        // The default behaviour for the base class is to use all the arguments
        // passed to a scripted command to populate the KEYS table in Lua.
        return count($this->getArguments());
    }

    protected function filterArguments(Array $arguments) {
        return array_merge(array($this->getScript(), $this->keysCount()), $arguments);
    }

    protected function getKeys() {
        return array_slice($this->getArguments(), 2, $this->keysCount());
    }
}

Version data entries

7 entries across 7 versions & 1 rubygems

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