Skip to content

Commit

Permalink
Merge pull request #932 from ovr/fix_memcached_prototype
Browse files Browse the repository at this point in the history
Prototype\Memcached - added methods: set, delete, flush, get
  • Loading branch information
ovr committed May 3, 2015
2 parents c11c117 + 4ca480d commit dbc08c3
Showing 1 changed file with 39 additions and 2 deletions.
41 changes: 39 additions & 2 deletions prototypes/memcached.php
Expand Up @@ -113,7 +113,7 @@ public function __construct($persistent_id)
}

/**
* @link http://ru2.php.net/manual/en/memcached.add.php
* @link http://php.net/manual/en/memcached.add.php
* @param $key
* @param $value
* @param int $expiration
Expand All @@ -123,6 +123,43 @@ public function add($key, $value, $expiration = 0)

}

/**
* @link http://php.net/manual/en//memcached.delete.php
* @param $key
* @param int $time
*/
public function delete($key, $time = 0)
{

}

/**
* Retrieve an item
* @link http://php.net/manual/en/memcached.get.php
* @param string $key
* @param callable $cache_cb
* @param float $cas_token
*/
public function get ($key, callable $cache_cb = null, &$cas_token = null) {}

/**
* @link http://php.net/manual/en/memcached.flush.php
* @param int $delay
* @return bool
*/
public function flush ($delay = 0) {}

/**
* @link http://ru2.php.net/manual/en/memcached.set.php
* @param $key
* @param $value
* @param int $expiration
*/
public function set($key, $value, $expiration = 0)
{

}

/**
* @link http://ru2.php.net/manual/en/memcached.addbykey.php
* @param $server_key
Expand Down Expand Up @@ -207,4 +244,4 @@ public function touchByKey($server_key, $key, $expiration)
}

class MemcachedException extends RuntimeException {
}
}

0 comments on commit dbc08c3

Please sign in to comment.