Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP-8.4: LDAP changes #4066

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 78 additions & 66 deletions reference/ldap/functions/ldap-exop-sync.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,84 +16,96 @@
<methodparam choice="opt"><type>string</type><parameter role="reference">response_data</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter role="reference">response_oid</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>

</para>

&warn.undocumented.func;

<simpara>
Performs an extended operation on the specified <parameter>ldap</parameter> with
<parameter>request_oid</parameter> the OID of the operation and
<parameter>request_data</parameter> the data.
</simpara>
</refsect1>

<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>ldap</parameter></term>
<listitem>
<para>
&ldap.parameter.ldap;
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>request_oid</parameter></term>
<listitem>
<para>

</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>request_data</parameter></term>
<listitem>
<para>

</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>controls</parameter></term>
<listitem>
<para>

</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>response_data</parameter></term>
<listitem>
<para>

</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>response_oid</parameter></term>
<listitem>
<para>

</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<variablelist>
<varlistentry>
<term><parameter>ldap</parameter></term>
<listitem>
<para>
&ldap.parameter.ldap;
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>request_oid</parameter></term>
<listitem>
<para>
The extended operation request OID.
Can be one of the
<constant>LDAP_EXOP_<replaceable>*</replaceable></constant>
constants,
or a string with the OID of the operation.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>request_data</parameter></term>
<listitem>
<para>
The extended operation request data.
May be NULL for some operations like <constant>LDAP_EXOP_WHO_AM_I</constant>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
May be NULL for some operations like <constant>LDAP_EXOP_WHO_AM_I</constant>,
May be &null; for some operations like <constant>LDAP_EXOP_WHO_AM_I</constant>,

may also need to be BER encoded.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe

Suggested change
may also need to be BER encoded.
may also need to be <acronym>BER</acronym> encoded.

(means "Basic Encoding Rules" in this context; however, "Bit Error Rate" seems also pretty common, so there might be an acronym clash)

Copy link
Member Author

@Girgias Girgias Nov 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BER seems to be LDAP specific no? Actually it is a standard known as X.690

</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>controls</parameter></term>
<listitem>
<para>
Array of <link linkend="ldap.controls">LDAP Controls</link> to send with the request.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>response_data</parameter></term>
<listitem>
<para>
Will be filled with the extended operation response data if provided.
If not provided <function>ldap_parse_exop</function> may be used on the
result object later to get this data.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>response_oid</parameter></term>
<listitem>
<para>
Will be filled with the response OID if provided,
usually equal to the request OID.
Comment on lines +81 to +82
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe

Suggested change
Will be filled with the response OID if provided,
usually equal to the request OID.
Will be filled with the response <acronym>OID</acronym> if provided,
usually equal to the request <acronym>OID</acronym>.

(means "Object Identifier")

</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>

</para>
<simpara>
When used with <parameter>response_data</parameter>,
returns &true; on success or &false; on error.
When used without <parameter>response_data</parameter>,
returns a result identifier or &false; on error.
</simpara>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>ldap_exop</function></member>
</simplelist>
</para>
<simplelist>
<member><function>ldap_exop</function></member>
<member><function>ldap_exop_whoami</function></member>
<member><function>ldap_exop_refresh</function></member>
<member><function>ldap_exop_passwd</function></member>
<member><function>ldap_parse_result</function></member>
<member><function>ldap_parse_exop</function></member>
</simplelist>
</refsect1>

</refentry>
Expand Down
85 changes: 48 additions & 37 deletions reference/ldap/functions/ldap-exop.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<refentry xml:id="function.ldap-exop" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>ldap_exop</refname>
Expand All @@ -23,6 +22,12 @@
<parameter>request_oid</parameter> the OID of the operation and
<parameter>request_data</parameter> the data.
</para>
<warning>
<simpara>
Using more than 4 parameters has been deprecated,
use <function>ldap_exop_sync</function> instead.
</simpara>
</warning>
</refsect1>

<refsect1 role="parameters">
Expand All @@ -40,7 +45,11 @@
<term><parameter>request_oid</parameter></term>
<listitem>
<para>
The extended operation request OID. You may use one of <constant>LDAP_EXOP_START_TLS</constant>, <constant>LDAP_EXOP_MODIFY_PASSWD</constant>, <constant>LDAP_EXOP_REFRESH</constant>, <constant>LDAP_EXOP_WHO_AM_I</constant>, <constant>LDAP_EXOP_TURN</constant>, or a string with the OID of the operation you want to send.
The extended operation request OID.
Can be one of the
<constant>LDAP_EXOP_<replaceable>*</replaceable></constant>
constants,
or a string with the OID of the operation.
</para>
</listitem>
</varlistentry>
Expand All @@ -64,9 +73,9 @@
<term><parameter>response_data</parameter></term>
<listitem>
<para>
Will be filled with the extended operation response data if provided.
If not provided you may use ldap_parse_exop on the result object
later to get this data.
Will be filled with the extended operation response data if provided.
If not provided <function>ldap_parse_exop</function> may be used on the
result object later to get this data.
</para>
</listitem>
</varlistentry>
Expand All @@ -91,27 +100,32 @@

<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&ldap.changelog.ldap-object;
<row>
<entry>7.3.0</entry>
<entry>
Support for <parameter>controls</parameter> added
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
Using more than 4 parameters has been deprecated,
use <function>ldap_exop_sync</function> instead.
</entry>
</row>
&ldap.changelog.ldap-object;
<row>
<entry>7.3.0</entry>
<entry>
Support for <parameter>controls</parameter> added
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

<refsect1 role="examples">
Expand Down Expand Up @@ -159,20 +173,17 @@ if ($ds) {

<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>ldap_parse_result</function></member>
<member><function>ldap_parse_exop</function></member>
<member><function>ldap_exop_whoami</function></member>
<member><function>ldap_exop_refresh</function></member>
<member><function>ldap_exop_passwd</function></member>
</simplelist>
</para>
<simplelist>
<member><function>ldap_exop_sync</function></member>
<member><function>ldap_exop_whoami</function></member>
<member><function>ldap_exop_refresh</function></member>
<member><function>ldap_exop_passwd</function></member>
<member><function>ldap_parse_result</function></member>
<member><function>ldap_parse_exop</function></member>
</simplelist>
</refsect1>


</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down