public function del($keys)
    {
        if (!is_array($keys)) {
            $keys = array($keys);
        }
        $funcs = array();

        // séparation en serveur
        foreach ($keys as $key) {
            $keyP = $this->getPatternKey().$key;
            $funcs[$key] = function ($redis) use ($keyP) {
                $start = microtime(true);
                $count = $redis->del($keyP);
                if ((is_int($count)) and ($count > 0)) {
                    $this->notifyEvent('del', array($keyP), microtime(true) - $start);
                }

                return $count;
            };
        }

        if (true === $this->multi) {
            //throw new Exception("not implemented yet");
            foreach ($funcs as $k => $func) {
                $this->addToExecList($k, $func);
            }

            return $this;
        } else {
            $ret = 0;
            foreach ($funcs as $k => $func) {
                $ret += $func($this->getRedis($k)); // execution
            }

            return $ret;
        }
    }
public function del($keys)
    {
        if (!is_array($keys)) {
            $keys = array($keys);
        }
        $funcs = array();

        // séparation en serveur
        foreach ($keys as $key) {
            $keyP = $this->getPatternKey().$key;
            $funcs[$key] = function ($redis) use ($keyP) {
                $start = microtime(true);
                $count = $redis->del($keyP);
                if ((is_int($count)) and ($count > 0)) {
                    $this->notifyEvent('del', array($keyP), microtime(true) - $start);
                }

                return $count;
            };
        }

        if (true === $this->multi) {
            //throw new Exception("not implemented yet");
            foreach ($funcs as $k => $func) {
                $this->addToExecList($k, $func);
            }

            return $this;
        } else {
            $ret = 0;
            foreach ($funcs as $k => $func) {
                $ret += $func($this->getRedis($k)); // execution
            }

            return $ret;
        }
    }
public function del ( $ keys ) { if ( ! is_array ( $ keys ) ) { $ keys = array ( $ keys ) ; } $ funcs = array ( ) ; // séparation en serveur foreach ( $ keys as $ key ) { $ keyP = $ this -> getPatternKey ( ) . $ key ; $ funcs [ $ key ] = function ( $ redis ) use ( $ keyP ) { $ start = microtime ( true ) ; $ count = $ redis -> del ( $ keyP ) ; if ( ( is_int ( $ count ) ) and ( $ count > 0 ) ) { $ this -> notifyEvent ( 'del' , array ( $ keyP ) , microtime ( true ) - $ start ) ; } return $ count ; } ; } if ( true === $ this -> multi ) { //throw new Exception("not implemented yet"); foreach ( $ funcs as $ k => $ func ) { $ this -> addToExecList ( $ k , $ func ) ; } return $ this ; } else { $ ret = 0 ; foreach ( $ funcs as $ k => $ func ) { $ ret += $ func ( $ this -> getRedis ( $ k ) ) ; // execution } return $ ret ; } }
delete a key

@param array $keys array of keys

@return integer
delete a key