|
3 | 3 | #include <limits.h> |
4 | 4 |
|
5 | 5 | #include "php_tarantool.h" |
| 6 | +#include "tarantool_internal.h" |
6 | 7 |
|
7 | 8 | #include "tarantool_tp.h" |
8 | 9 | #include "tarantool_proto.h" |
@@ -98,9 +99,15 @@ zend_module_entry tarantool_module_entry = { |
98 | 99 | }; |
99 | 100 |
|
100 | 101 | PHP_INI_BEGIN() |
101 | | - STD_PHP_INI_ENTRY("tarantool.persistent", "0", PHP_INI_ALL, |
102 | | - OnUpdateBool, persistent, zend_tarantool_globals, |
103 | | - tarantool_globals) |
| 102 | + STD_PHP_INI_BOOLEAN("tarantool.persistent", "0", PHP_INI_ALL, |
| 103 | + OnUpdateBool, persistent, zend_tarantool_globals, |
| 104 | + tarantool_globals) |
| 105 | + STD_PHP_INI_BOOLEAN("tarantool.use_namespace", "0", PHP_INI_SYSTEM, |
| 106 | + OnUpdateBool, use_namespace, |
| 107 | + zend_tarantool_globals, tarantool_globals) |
| 108 | + STD_PHP_INI_BOOLEAN("tarantool.connection_alias", "0", PHP_INI_SYSTEM, |
| 109 | + OnUpdateBool, connection_alias, |
| 110 | + zend_tarantool_globals, tarantool_globals) |
104 | 111 | STD_PHP_INI_ENTRY("tarantool.timeout", "10.0", PHP_INI_ALL, |
105 | 112 | OnUpdateReal, timeout, zend_tarantool_globals, |
106 | 113 | tarantool_globals) |
@@ -938,7 +945,7 @@ static void php_tarantool_init_globals(zend_tarantool_globals *tarantool_globals |
938 | 945 | tarantool_globals->sync_counter = 0; |
939 | 946 | tarantool_globals->retry_count = 1; |
940 | 947 | tarantool_globals->retry_sleep = 0.1; |
941 | | - tarantool_globals->timeout = 10.0; |
| 948 | + tarantool_globals->timeout = 1.0; |
942 | 949 | tarantool_globals->request_timeout = 10.0; |
943 | 950 | } |
944 | 951 |
|
@@ -982,7 +989,15 @@ PHP_MINIT_FUNCTION(tarantool) { |
982 | 989 | zend_class_entry tarantool_class; |
983 | 990 |
|
984 | 991 | /* Initialize class entry */ |
985 | | - INIT_CLASS_ENTRY(tarantool_class, "Tarantool", Tarantool_methods); |
| 992 | + if (TARANTOOL_G(connection_alias)) { |
| 993 | + TNT_INIT_CLASS_ENTRY(tarantool_class, "Tarantool16", |
| 994 | + "Tarantool\\Connection16", |
| 995 | + Tarantool_methods); |
| 996 | + } else { |
| 997 | + TNT_INIT_CLASS_ENTRY(tarantool_class, "Tarantool", |
| 998 | + "Tarantool\\Connection", |
| 999 | + Tarantool_methods); |
| 1000 | + } |
986 | 1001 | tarantool_class.create_object = tarantool_create; |
987 | 1002 | Tarantool_ptr = zend_register_internal_class(&tarantool_class); |
988 | 1003 | /* Initialize object handlers */ |
|
0 commit comments