public function add($cmd, $keys = null, $argv = null)
    {
        if ($keys !== null) {
            if (is_scalar($keys)) {
                $keys = [(string)$keys];
            } elseif (!is_array($keys)) {
                throw new \Exception("Keys must be an array or scalar");
            }
        }
        if ($argv !== null) {
            if (is_scalar($argv)) {
                $argv = [(string)$argv];
            } elseif (!is_array($argv)) {
                throw new \Exception("Argv must be an array or scalar");
            }
        }

        $this->cachedParams = false;
        $this->stack[] = [$cmd, $keys, $argv];
    }
public function add($cmd, $keys = null, $argv = null)
    {
        if ($keys !== null) {
            if (is_scalar($keys)) {
                $keys = [(string)$keys];
            } elseif (!is_array($keys)) {
                throw new \Exception("Keys must be an array or scalar");
            }
        }
        if ($argv !== null) {
            if (is_scalar($argv)) {
                $argv = [(string)$argv];
            } elseif (!is_array($argv)) {
                throw new \Exception("Argv must be an array or scalar");
            }
        }

        $this->cachedParams = false;
        $this->stack[] = [$cmd, $keys, $argv];
    }
public function add ( $ cmd , $ keys = null , $ argv = null ) { if ( $ keys !== null ) { if ( is_scalar ( $ keys ) ) { $ keys = [ ( string ) $ keys ] ; } elseif ( ! is_array ( $ keys ) ) { throw new \ Exception ( "Keys must be an array or scalar" ) ; } } if ( $ argv !== null ) { if ( is_scalar ( $ argv ) ) { $ argv = [ ( string ) $ argv ] ; } elseif ( ! is_array ( $ argv ) ) { throw new \ Exception ( "Argv must be an array or scalar" ) ; } } $ this -> cachedParams = false ; $ this -> stack [ ] = [ $ cmd , $ keys , $ argv ] ; }
Adds eval command in stack
@param string $cmd Lua script
@param mixed $keys Keys
@param mixed $argv Arguments
Adds eval command in stack