<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<refentry xml:id="function.mysqlnd-uh-set-statement-proxy" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <refnamediv>
  <refname>mysqlnd_uh_set_statement_proxy</refname>
  <refpurpose>Installs a proxy for mysqlnd statements</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>bool</type><methodname>mysqlnd_uh_set_statement_proxy</methodname>
   <methodparam><type>MysqlndUhStatement</type><parameter role="reference">statement_proxy</parameter></methodparam>
  </methodsynopsis>
  <para>
   Installs a proxy for mysqlnd statements.
   The proxy object will be used for all mysqlnd prepared
   statement objects, regardless which PHP MySQL extension
   (<link linkend="ref.mysqli">mysqli</link>,
   <link linkend="ref.mysql">mysql</link>,
   <link linkend="ref.pdo-mysql">PDO_MYSQL</link>)
   has created them as long as the extension is compiled
   to use the <link linkend="book.mysqlnd">mysqlnd</link>
   library.
  </para>
  <para>
   The function can be disabled with
   <literal><link linkend="ini.mysqlnd-uh.enable">mysqlnd_uh.enable</link></literal>.
   If <literal><link linkend="ini.mysqlnd-uh.enable">mysqlnd_uh.enable</link></literal>
   is set to &false; the function will not install the proxy and
   always return &true;. Additionally, an error of the
   type <literal>E_WARNING</literal> may be emitted. The error message may
   read like <literal>PHP Warning:  mysqlnd_uh_set_statement_proxy(): (Mysqlnd User Handler)
   The plugin has been disabled by setting the configuration parameter mysqlnd_uh.enable = false.
   The proxy has not been installed [...]</literal>.
  </para>

 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <variablelist>
   <varlistentry>
    <term><parameter>statement_proxy</parameter></term>
    <listitem>
     <para>
      The mysqlnd statement proxy object of type <literal>MysqlndUhStatement</literal>
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns &true; on success.
   Otherwise, returns &false;
  </para>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <para>
   <simplelist>
    <member>
     <function>mysqlnd_uh_set_connection_proxy</function>
    </member>
    <member>
     <literal><link linkend="ini.mysqlnd-uh.enable">mysqlnd_uh.enable</link></literal>
    </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
-->