diff options
| author | Andrey Hristov <andrey@php.net> | 2015-10-19 18:20:28 +0200 |
|---|---|---|
| committer | Andrey Hristov <andrey@php.net> | 2015-11-12 16:19:16 +0100 |
| commit | 10d4fb8a9428d2b84ac6093bb3987ef667916fd4 (patch) | |
| tree | 47689094460b0b0cc008d839e67d43a32ef187d6 /ext/mysqlnd/mysqlnd_ext_plugin.c | |
| parent | e24dc94f325476e8921d8447970a27b9305d93c6 (diff) | |
| download | php-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.c | 25 |
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, }, }; |
