Permalink
Browse files

adding increment & decrement methods

closes #13
  • Loading branch information...
1 parent 934cc41 commit 28ef6e7724e904beefb6419395f92e229db4403d @tomschlick committed Nov 29, 2013
Showing with 25 additions and 0 deletions.
  1. +25 −0 libraries/memcached_library.php
@@ -275,6 +275,31 @@ public function replace($key = NULL, $value = NULL, $expiration = NULL)
return $replace_status;
}
}
+
+ /*
+ +-------------------------------------+
+ Name: increment
+ Purpose: increments a value
+ @param return : none
+ +-------------------------------------+
+ */
+ public function increment($key = null, $by = 1)
+ {
+ return $this->m->increment($this->key_name($key), $by);
+ }
+
+
+ /*
+ +-------------------------------------+
+ Name: decrement
+ Purpose: decrements a value
+ @param return : none
+ +-------------------------------------+
+ */
+ public function decrement($key = null, $by = 1)
+ {
+ return $this->m->decrement($this->key_name($key), $by);
+ }
/*
+-------------------------------------+

0 comments on commit 28ef6e7

Please sign in to comment.