diff options
author | Andrey Hristov <andrey@php.net> | 2015-10-12 14:57:48 +0200 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2015-11-12 16:19:16 +0100 |
commit | cfd868651a321fbfd84ed98e33669c5f94a7098a (patch) | |
tree | 5ba7809e4adcf207b94d64964ee98358a53f9e8b /ext/mysqlnd/mysqlnd_ext_plugin.c | |
parent | 75dc67c6ae620f1262d8233594dae2f7ed77a19a (diff) | |
download | php-git-cfd868651a321fbfd84ed98e33669c5f94a7098a.tar.gz |
MDNR:
- removed init() method from mysqlnd_conn_data and moved the initialization
to the object factory->get_connection(). Now it is unified as with the prepared
statement which doesn't have any init() method
- the protocol decoder factory now takes connection as parameter at creation and
thus there is no need to pass the connection as parameter when calling the read
or the write method of a packet.
- saved the protocol payload decoder factory as pointer in every packet (read/write)
so the connection doesn't need to be passed on every call of read/write (dependency
has been already injected at creation). This will alow to move protocol specific
code from MYSQLND_NET (send_ex()) to make MYSQLND_NET leaner and free from protocol
stuff.
Diffstat (limited to 'ext/mysqlnd/mysqlnd_ext_plugin.c')
-rw-r--r-- | ext/mysqlnd/mysqlnd_ext_plugin.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/mysqlnd/mysqlnd_ext_plugin.c b/ext/mysqlnd/mysqlnd_ext_plugin.c index 44ded51cf7..1ba0b85f48 100644 --- a/ext/mysqlnd/mysqlnd_ext_plugin.c +++ b/ext/mysqlnd/mysqlnd_ext_plugin.c @@ -148,6 +148,21 @@ PHPAPI void ** _mysqlnd_plugin_get_plugin_net_data(const MYSQLND_NET * net, unsi /* }}} */ +/* {{{ mysqlnd_conn_get_methods */ +PHPAPI struct st_mysqlnd_object_factory_methods * +mysqlnd_object_factory_get_methods() +{ + return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory); +} +/* }}} */ + +/* {{{ mysqlnd_conn_set_methods */ +PHPAPI void mysqlnd_object_factory_set_methods(struct st_mysqlnd_object_factory_methods *methods) +{ + MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory) = *methods; +} +/* }}} */ + /* {{{ mysqlnd_conn_get_methods */ PHPAPI struct st_mysqlnd_conn_methods * |