<?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> <refentry xml:id="mysqlnduhconnection.getprotocolinformation" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> <refname>MysqlndUhConnection::getProtocolInformation</refname> <refpurpose>Returns the version of the MySQL protocol used</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <modifier>public</modifier> <type>string</type><methodname>MysqlndUhConnection::getProtocolInformation</methodname> <methodparam><type>mysqlnd_connection</type><parameter>connection</parameter></methodparam> </methodsynopsis> <para> Returns the version of the MySQL protocol used. </para> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; <variablelist> <varlistentry> <term><parameter>connection</parameter></term> <listitem> <para> Mysqlnd connection handle. Do not modify! </para> </listitem> </varlistentry> </variablelist> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> The protocol version. </para> </refsect1> <refsect1 role="examples"> &reftitle.examples; <para> <example> <title><function>MysqlndUhConnection::getProtocolInformation</function> example</title> <programlisting role="php"> <![CDATA[ <?php class proxy extends MysqlndUhConnection { public function getProtocolInformation($res) { printf("%s(%s)\n", __METHOD__, var_export(func_get_args(), true)); $ret = parent::getProtocolInformation($res); printf("%s returns %s\n", __METHOD__, var_export($ret, true)); return $ret; } } mysqlnd_uh_set_connection_proxy(new proxy()); $mysqli = new mysqli("localhost", "root", "", "test"); var_dump($mysqli->protocol_version); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ proxy::getProtocolInformation(array ( 0 => NULL, )) proxy::getProtocolInformation returns 10 int(10) ]]> </screen> </example> </para> </refsect1> <refsect1 role="seealso"> &reftitle.seealso; <para> <simplelist> <member> <function>mysqlnd_uh_set_connection_proxy</function> </member> <member> <function>mysqli_get_proto_info</function> </member> <member> <function>mysql_get_proto_info</function> </member> </simplelist> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"~/.phpdoc/manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->