mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
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.
This commit is contained in:
parent
75dc67c6ae
commit
cfd868651a
7 changed files with 123 additions and 59 deletions
|
@ -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 *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue