Merge "Make DBAccessBase use DBConnRef, rename $wiki, and hide getLoadBalancer()"
[lhc/web/wiklou.git] / includes / libs / objectcache / MemcachedPhpBagOStuff.php
index f8b91bc..fc6deef 100644 (file)
@@ -53,8 +53,9 @@ class MemcachedPhpBagOStuff extends MemcachedBagOStuff {
                $this->client->set_servers( $params['servers'] );
        }
 
-       public function setDebug( $debug ) {
-               $this->client->set_debug( $debug );
+       public function setDebug( $enabled ) {
+               parent::debug( $enabled );
+               $this->client->set_debug( $enabled );
        }
 
        protected function doGet( $key, $flags = 0, &$casToken = null ) {
@@ -75,7 +76,7 @@ class MemcachedPhpBagOStuff extends MemcachedBagOStuff {
                return $this->client->delete( $this->validateKeyEncoding( $key ) );
        }
 
-       public function add( $key, $value, $exptime = 0, $flags = 0 ) {
+       protected function doAdd( $key, $value, $exptime = 0, $flags = 0 ) {
                return $this->client->add(
                        $this->validateKeyEncoding( $key ),
                        $value,
@@ -83,7 +84,7 @@ class MemcachedPhpBagOStuff extends MemcachedBagOStuff {
                );
        }
 
-       protected function cas( $casToken, $key, $value, $exptime = 0, $flags = 0 ) {
+       protected function doCas( $casToken, $key, $value, $exptime = 0, $flags = 0 ) {
                return $this->client->cas(
                        $casToken,
                        $this->validateKeyEncoding( $key ),
@@ -92,13 +93,13 @@ class MemcachedPhpBagOStuff extends MemcachedBagOStuff {
                );
        }
 
-       public function incr( $key, $value = 1 ) {
+       public function incr( $key, $value = 1, $flags = 0 ) {
                $n = $this->client->incr( $this->validateKeyEncoding( $key ), $value );
 
                return ( $n !== false && $n !== null ) ? $n : false;
        }
 
-       public function decr( $key, $value = 1 ) {
+       public function decr( $key, $value = 1, $flags = 0 ) {
                $n = $this->client->decr( $this->validateKeyEncoding( $key ), $value );
 
                return ( $n !== false && $n !== null ) ? $n : false;