summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_ext_plugin.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2015-10-19 18:20:28 +0200
committerAndrey Hristov <andrey@php.net>2015-11-12 16:19:16 +0100
commit10d4fb8a9428d2b84ac6093bb3987ef667916fd4 (patch)
tree47689094460b0b0cc008d839e67d43a32ef187d6 /ext/mysqlnd/mysqlnd_ext_plugin.c
parente24dc94f325476e8921d8447970a27b9305d93c6 (diff)
downloadphp-git-10d4fb8a9428d2b84ac6093bb3987ef667916fd4.tar.gz
MDNR:
- Refactor the command factory. Let the factory be exchangeable.
Diffstat (limited to 'ext/mysqlnd/mysqlnd_ext_plugin.c')
-rw-r--r--ext/mysqlnd/mysqlnd_ext_plugin.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/ext/mysqlnd/mysqlnd_ext_plugin.c b/ext/mysqlnd/mysqlnd_ext_plugin.c
index b8909d4126..52ca9055b8 100644
--- a/ext/mysqlnd/mysqlnd_ext_plugin.c
+++ b/ext/mysqlnd/mysqlnd_ext_plugin.c
@@ -327,6 +327,25 @@ _mysqlnd_net_set_methods(struct st_mysqlnd_net_methods * methods)
/* }}} */
+/* {{{ mysqlnd_command_factory_get */
+static func_mysqlnd__command_factory
+_mysqlnd_command_factory_get()
+{
+ return mysqlnd_command_factory;
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_command_factory_set */
+static void
+_mysqlnd_command_factory_set(func_mysqlnd__command_factory factory)
+{
+ mysqlnd_command_factory = factory;
+}
+/* }}} */
+
+
+
struct st_mysqlnd_plugin_methods_xetters mysqlnd_plugin_methods_xetters =
{
{
@@ -363,7 +382,11 @@ struct st_mysqlnd_plugin_methods_xetters mysqlnd_plugin_methods_xetters =
},
{
_mysqlnd_net_get_methods,
- _mysqlnd_net_set_methods
+ _mysqlnd_net_set_methods,
+ },
+ {
+ _mysqlnd_command_factory_get,
+ _mysqlnd_command_factory_set,
},
};