Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

class name "Memcached" -> "Libmemcached"

  • Loading branch information...
commit a6856d59b9231647fca8f56c41e7fb404a3b6677 1 parent 1a97096
Daisuke Kajiwara authored
4 libmemcached.c
View
@@ -85,7 +85,7 @@ zend_function_entry libmemcached_functions[] = {
/* }}} */
/* {{{ memcached_functions[] */
static zend_function_entry memcached_functions[] = {
- PHP_FALIAS(memcached, memcached_ctor, NULL)
+ PHP_FALIAS(libmemcached, memcached_ctor, NULL)
PHP_FALIAS(addserver, memcached_server_add, NULL)
PHP_FALIAS(add, memcached_add, NULL)
PHP_FALIAS(add_by_key, memcached_add_by_key, NULL)
@@ -186,7 +186,7 @@ PHP_MINIT_FUNCTION(libmemcached)
REGISTER_LONG_CONSTANT("MEMCACHED_COMPRESSED", MEMCACHED_COMPRESSED, CONST_CS | CONST_PERSISTENT);
zend_class_entry memcached_entry;
- INIT_CLASS_ENTRY(memcached_entry, "memcached", memcached_functions);
+ INIT_CLASS_ENTRY(memcached_entry, "libmemcached", memcached_functions);
memcached_entry_ptr = zend_register_internal_class(&memcached_entry TSRMLS_CC);
return SUCCESS;
}
4 tests/002.phpt
View
@@ -4,7 +4,7 @@ Check for libmemcached version
<?php if (!extension_loaded("libmemcached")) print "skip"; ?>
--FILE--
<?php
-$a = new Memcached();
+$a = new Libmemcached();
var_dump($a);
/*
you can add regression tests for your extension here
@@ -19,7 +19,7 @@ var_dump($a);
*/
?>
--EXPECT--
-object(memcached)#1 (1) {
+object(libmemcached)#1 (1) {
["memc"]=>
resource(4) of type (memcached_st)
}
2  tests/004.phpt
View
@@ -4,7 +4,7 @@ Check for addServer()
<?php if (!extension_loaded("libmemcached")) print "skip"; ?>
--FILE--
<?php
-$memcached = new Memcached();
+$memcached = new Libmemcached();
$ret = $memcached->addserver('localhost', 11211);
var_dump($ret);
?>
2  tests/005.phpt
View
@@ -4,7 +4,7 @@ Check for set array value
<?php if (!extension_loaded("libmemcached")) print "skip"; ?>
--FILE--
<?php
-$memcached = new Memcached();
+$memcached = new Libmemcached();
$ret = $memcached->addserver('localhost', 11211);
$ret = $memcached->set('key1', 'val1', 0);
var_dump($ret);
2  tests/append_prepend.phpt
View
@@ -35,7 +35,7 @@ function test_memcached_prepend($memcached, $key, $value, $append) {
var_dump($ret);
}
-$memcached = new Memcached();
+$memcached = new Libmemcached();
$ret = $memcached->addserver('localhost', 11211);
$master_key = 'master_key1';
2  tests/behavior_get_set.phpt
View
@@ -4,7 +4,7 @@ Check for behavior_get(), behavior_set()
<?php if (!extension_loaded("libmemcached")) print "skip"; ?>
--FILE--
<?php
-$memcached = new Memcached();
+$memcached = new Libmemcached();
$ret = $memcached->behavior_get(MEMCACHED_BEHAVIOR_NO_BLOCK);
var_dump($ret);
$memcached->behavior_set(MEMCACHED_BEHAVIOR_NO_BLOCK, 1);
11 tests/decrement.phpt
View
@@ -4,8 +4,13 @@ Check for decrement() method
<?php if (!extension_loaded("libmemcached")) print "skip"; ?>
--FILE--
<?php
-$memcached = new Memcached();
-$ret = $memcached->addserver('localhost', 11211);
+$memcached = new Libmemcached();
+// $memcached->behavior_set(MEMCACHED_BEHAVIOR_NO_BLOCK, 1);
+// $memcached->behavior_set(MEMCACHED_BEHAVIOR_SND_TIMEOUT, 10);
+// $memcached->behavior_set(MEMCACHED_BEHAVIOR_RCV_TIMEOUT, 10);
+$ret = $memcached->addserver('10.0.26.1', 11211);
+// $ret = $memcached->addserver('12.3.4.6', 11211);
+// $ret = $memcached->addserver('12.3.5.6', 11211);
$ret = $memcached->delete('key1');
var_dump($ret);
@@ -27,9 +32,7 @@ var_dump($ret);
bool(true)
bool(false)
bool(true)
-2
string(2) "10"
int(9)
int(8)
-2
string(1) "8"
2  tests/delete.phpt
View
@@ -4,7 +4,7 @@ Check for delete() method
<?php if (!extension_loaded("libmemcached")) print "skip"; ?>
--FILE--
<?php
-$memcached = new Memcached();
+$memcached = new Libmemcached();
$ret = $memcached->addserver('localhost', 11211);
$memcached->server_push();
2  tests/gets_cas_test.phpt
View
@@ -4,7 +4,7 @@ Check for gets(), cas() method
<?php if (!extension_loaded("libmemcached")) print "skip"; ?>
--FILE--
<?php
-$memcached = new Memcached();
+$memcached = new Libmemcached();
$ret = $memcached->addserver('localhost', 11211);
$memcached->delete('key1');
2  tests/increment.phpt
View
@@ -4,7 +4,7 @@ Check for increment() method
<?php if (!extension_loaded("libmemcached")) print "skip"; ?>
--FILE--
<?php
-$memcached = new Memcached();
+$memcached = new Libmemcached();
// $memcached->behavior_set(MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT, 1);
$memcached->behavior_set(MEMCACHED_BEHAVIOR_SND_TIMEOUT, 10);
// $memcached->behavior_set(MEMCACHED_BEHAVIOR_RCV_TIMEOUT, 10);
2  tests/libmemcached_array_set.phpt
View
@@ -4,7 +4,7 @@ Check for set(), get() method
<?php if (!extension_loaded("libmemcached")) print "skip"; ?>
--FILE--
<?php
-$memcached = new Memcached();
+$memcached = new Libmemcached();
$ret = $memcached->addserver('localhost', 11211);
$memcached->delete('key1');
2  tests/libmemcached_bool_set.phpt
View
@@ -4,7 +4,7 @@ Check for set(), get() method
<?php if (!extension_loaded("libmemcached")) print "skip"; ?>
--FILE--
<?php
-$memcached = new Memcached();
+$memcached = new Libmemcached();
$ret = $memcached->addserver('localhost', 11211);
$memcached->delete('key1');
2  tests/libmemcached_long_set.phpt
View
@@ -4,7 +4,7 @@ Check for set(), get() method
<?php if (!extension_loaded("libmemcached")) print "skip"; ?>
--FILE--
<?php
-$memcached = new Memcached();
+$memcached = new Libmemcached();
$ret = $memcached->addserver('localhost', 11211);
$memcached->delete('key1');
2  tests/libmemcached_string_set.phpt
View
@@ -4,7 +4,7 @@ Check for set(), get() method
<?php if (!extension_loaded("libmemcached")) print "skip"; ?>
--FILE--
<?php
-$memcached = new Memcached();
+$memcached = new Libmemcached();
$ret = $memcached->addserver('localhost', 11211);
$memcached->delete('key1');
2  tests/mget_fetch.phpt
View
@@ -4,7 +4,7 @@ Check for mget(), fetch() method
<?php if (!extension_loaded("libmemcached")) print "skip"; ?>
--FILE--
<?php
-$memcached = new Memcached();
+$memcached = new Libmemcached();
$ret = $memcached->addserver('localhost', 11211);
$memcached->set('key1', array('val1'));
2  tests/mget_fetchall.phpt
View
@@ -4,7 +4,7 @@ Check for mget(), fetchall() method
<?php if (!extension_loaded("libmemcached")) print "skip"; ?>
--FILE--
<?php
-$memcached = new Memcached();
+$memcached = new Libmemcached();
$ret = $memcached->addserver('localhost', 11211);
$memcached->set('key1', array('val1'));
2  tests/replace.phpt
View
@@ -4,7 +4,7 @@ Check for replace() method
<?php if (!extension_loaded("libmemcached")) print "skip"; ?>
--FILE--
<?php
-$memcached = new Memcached();
+$memcached = new Libmemcached();
// $memcached->behavior_set(MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT, 1);
$memcached->behavior_set(MEMCACHED_BEHAVIOR_SND_TIMEOUT, 10);
// $memcached->behavior_set(MEMCACHED_BEHAVIOR_RCV_TIMEOUT, 10);
2  tests/replace_by_key.phpt
View
@@ -4,7 +4,7 @@ Check for replace_by_key() method
<?php if (!extension_loaded("libmemcached")) print "skip"; ?>
--FILE--
<?php
-$memcached = new Memcached();
+$memcached = new Libmemcached();
$ret = $memcached->addserver('localhost', 11211);
$ret = $memcached->delete_by_key('master1', 'key1');
2  tests/server_list.phpt
View
@@ -4,7 +4,7 @@ Check for server_list() method
<?php if (!extension_loaded("libmemcached")) print "skip"; ?>
--FILE--
<?php
-$memcached = new Memcached();
+$memcached = new Libmemcached();
$ret = $memcached->addserver('localhost', 11211);
$ret = $memcached->addserver('localhost', 11212);
$ret = $memcached->addserver('localhost', 11213);
2  tests/use_masterkey.phpt
View
@@ -21,7 +21,7 @@ function memcached_by_key($memcached, $master_key, $key, $value) {
var_dump($ret);
}
-$memcached = new Memcached();
+$memcached = new Libmemcached();
$ret = $memcached->addserver('localhost', 11211);
$master_key = 'master_key1';
Please sign in to comment.
Something went wrong with that request. Please try again.