mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-20 19:08:54 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@172416 c90b9560-bf6c-de11-be94-00142212c4b1
76 lines
2.4 KiB
XML
76 lines
2.4 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.6 $ -->
|
|
<!-- splitted from ./en/functions/ldap.xml, last change in rev 1.17 -->
|
|
<refentry id="function.ldap-get-option">
|
|
<refnamediv>
|
|
<refname>ldap_get_option</refname>
|
|
<refpurpose>Get the current value for given option</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>ldap_get_option</methodname>
|
|
<methodparam><type>resource</type><parameter>link_identifier</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>option</parameter></methodparam>
|
|
<methodparam><type>mixed</type><parameter role="reference">retval</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Sets <parameter>retval</parameter> to the value of the specified option.
|
|
&return.success;
|
|
</para>
|
|
<para>
|
|
The parameter <parameter>option</parameter> can be one of:
|
|
LDAP_OPT_DEREF, LDAP_OPT_SIZELIMIT, LDAP_OPT_TIMELIMIT,
|
|
LDAP_OPT_PROTOCOL_VERSION, LDAP_OPT_ERROR_NUMBER, LDAP_OPT_REFERRALS,
|
|
LDAP_OPT_RESTART, LDAP_OPT_HOST_NAME, LDAP_OPT_ERROR_STRING,
|
|
LDAP_OPT_MATCHED_DN. These are described in
|
|
<ulink url="&url.ldap.openldap-c-api;">draft-ietf-ldapext-ldap-c-api-xx.txt</ulink>
|
|
</para>
|
|
<note>
|
|
<para>This function is only available when using OpenLDAP 2.x.x OR
|
|
Netscape Directory SDK x.x, and was added in PHP 4.0.4
|
|
</para>
|
|
</note>
|
|
<para>
|
|
<example>
|
|
<title>Check protocol version</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
// $ds is a valid link identifier for a directory server
|
|
if (ldap_get_option($ds, LDAP_OPT_PROTOCOL_VERSION, $version)) {
|
|
echo "Using protocol version $version\n";
|
|
} else {
|
|
echo "Unable to determine protocol version\n";
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
See also <function>ldap_set_option</function>.
|
|
</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:"../../../../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
|
|
-->
|