cvs: peardoc /en/package/networking net-ldap.xml /en/package/networking/net-ldap connect.xml search.xml

From: Date: Fri, 22 Jun 2007 11:28:26 +0000
Subject: cvs: peardoc /en/package/networking net-ldap.xml /en/package/networking/net-ldap connect.xml search.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-9803@lists.php.net to get a copy of this message
beni Fri Jun 22 11:28:26 2007 UTC Modified files: /peardoc/en/package/networking net-ldap.xml /peardoc/en/package/networking/net-ldap connect.xml search.xml Log: * Removed tabs

http://cvs.php.net/viewvc.cgi/peardoc/en/package/networking/net-ldap.xml?r1=1.2&r2=1.3&diff_format=u Index: peardoc/en/package/networking/net-ldap.xml diff -u peardoc/en/package/networking/net-ldap.xml:1.2 peardoc/en/package/networking/net-ldap.xml:1.3 --- peardoc/en/package/networking/net-ldap.xml:1.2 Fri Jun 22 11:16:02 2007 +++ peardoc/en/package/networking/net-ldap.xml Fri Jun 22 11:28:26 2007 @@ -1,20 +1,20 @@ <?xml version="1.0" encoding="utf-8" ?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <sect1 id="package.networking.net-ldap"> - <title>Net_LDAP</title> - - <para> - Net_LDAP allows you to query and manipulate the data stored in directory - servers using PHP in an object-oriented way. - </para> - <para> - Detailed usage examples are available at: <literal>/your/pear/path/docs/Net_LDAP/examples/</literal> - </para> - - &package.networking.net-ldap.introduction; - &package.networking.net-ldap.errorhandling; - &package.networking.net-ldap.connect; - &package.networking.net-ldap.search; + <title>Net_LDAP</title> + + <para> + Net_LDAP allows you to query and manipulate the data stored in directory + servers using PHP in an object-oriented way. + </para> + <para> + Detailed usage examples are available at: <literal>/your/pear/path/docs/Net_LDAP/examples/</literal> + </para> + + &package.networking.net-ldap.introduction; + &package.networking.net-ldap.errorhandling; + &package.networking.net-ldap.connect; + &package.networking.net-ldap.search; </sect1> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/peardoc/en/package/networking/net-ldap/connect.xml?r1=1.3&r2=1.4&diff_format=u Index: peardoc/en/package/networking/net-ldap/connect.xml diff -u peardoc/en/package/networking/net-ldap/connect.xml:1.3 peardoc/en/package/networking/net-ldap/connect.xml:1.4 --- peardoc/en/package/networking/net-ldap/connect.xml:1.3 Fri Jun 22 11:19:38 2007 +++ peardoc/en/package/networking/net-ldap/connect.xml Fri Jun 22 11:28:26 2007 @@ -1,116 +1,116 @@ <?xml version="1.0" encoding="utf-8" ?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="package.networking.net-ldap.connecting"> - <refnamediv> - <refname>Configuration and connecting</refname> - <refpurpose>How to configure Net_LDAP and connect to an LDAP server</refpurpose> - </refnamediv> + <refnamediv> + <refname>Configuration and connecting</refname> + <refpurpose>How to configure Net_LDAP and connect to an LDAP server</refpurpose> + </refnamediv> - <refsect1> - <title>Connecting to an LDAP server</title> - - <para> - To connect to an LDAP server, you should use - <classname>Net_LDAP</classname>'s static <function>connect</function> method. - It takes one parameter, an array full of configuration options, - and either returns - a <classname>Net_LDAP</classname> object if connecting works, or a - <classname>PEAR_Error</classname> object in case of a failure. - </para> - - <para> - The following table lists all configuration options. If the default - value for an option fits your needs, you don't need add it to your - configuration array. - - <table> - <title>Possible configuration options</title> - <tgroup cols="3"> - <thead> - <row> - <entry>Name</entry> - <entry>Description</entry> - <entry>Default</entry> - </row> - </thead> - <tbody> - <row> - <entry><literal>host</literal></entry> - <entry>LDAP server name to connect to</entry> - <entry><literal>localhost</literal></entry> - </row> - - <row> - <entry><literal>port</literal></entry> - <entry>Port on the server</entry> - <entry>389</entry> - </row> - - <row> - <entry><literal>version</literal></entry> - <entry>LDAP version</entry> - <entry><literal>3</literal></entry> - </row> - - <row> - <entry><literal>starttls</literal></entry> - <entry>TLS is started after connecting</entry> - <entry><literal>false</literal></entry> - </row> - - <row> - <entry><literal>binddn</literal></entry> - <entry>The distinguished name to bind as (username)</entry> - <entry>(none)</entry> - </row> - - <row> - <entry><literal>bindpw</literal></entry> - <entry>Password for the <literal>binddn</literal></entry> - <entry>(none)</entry> - </row> - - <row> - <entry><literal>basedn</literal></entry> - <entry>LDAP base name (root directory)</entry> - <entry>(none)</entry> - </row> - - <row> - <entry><literal>options</literal></entry> - <entry>Array of additional ldap options as key-value pairs</entry> - <entry><literal>array()</literal></entry> - </row> - - <row> - <entry><literal>filter</literal></entry> - <entry>Default search filter</entry> - <entry><literal>(objectClass=*)</literal></entry> - </row> - - <row> - <entry><literal>scope</literal></entry> - <entry>Default search scope, see <function>search</function></entry> - <entry><literal>sub</literal></entry> - </row> - - </tbody> - </tgroup> - </table> - </para> - - <example> - <title>Connecting to an LDAP server</title> - <programlisting role="php"><![CDATA[ + <refsect1> + <title>Connecting to an LDAP server</title> + + <para> + To connect to an LDAP server, you should use + <classname>Net_LDAP</classname>'s static <function>connect</function> method. + It takes one parameter, an array full of configuration options, + and either returns + a <classname>Net_LDAP</classname> object if connecting works, or a + <classname>PEAR_Error</classname> object in case of a failure. + </para> + + <para> + The following table lists all configuration options. If the default + value for an option fits your needs, you don't need add it to your + configuration array. + + <table> + <title>Possible configuration options</title> + <tgroup cols="3"> + <thead> + <row> + <entry>Name</entry> + <entry>Description</entry> + <entry>Default</entry> + </row> + </thead> + <tbody> + <row> + <entry><literal>host</literal></entry> + <entry>LDAP server name to connect to</entry> + <entry><literal>localhost</literal></entry> + </row> + + <row> + <entry><literal>port</literal></entry> + <entry>Port on the server</entry> + <entry>389</entry> + </row> + + <row> + <entry><literal>version</literal></entry> + <entry>LDAP version</entry> + <entry><literal>3</literal></entry> + </row> + + <row> + <entry><literal>starttls</literal></entry> + <entry>TLS is started after connecting</entry> + <entry><literal>false</literal></entry> + </row> + + <row> + <entry><literal>binddn</literal></entry> + <entry>The distinguished name to bind as (username)</entry> + <entry>(none)</entry> + </row> + + <row> + <entry><literal>bindpw</literal></entry> + <entry>Password for the <literal>binddn</literal></entry> + <entry>(none)</entry> + </row> + + <row> + <entry><literal>basedn</literal></entry> + <entry>LDAP base name (root directory)</entry> + <entry>(none)</entry> + </row> + + <row> + <entry><literal>options</literal></entry> + <entry>Array of additional ldap options as key-value pairs</entry> + <entry><literal>array()</literal></entry> + </row> + + <row> + <entry><literal>filter</literal></entry> + <entry>Default search filter</entry> + <entry><literal>(objectClass=*)</literal></entry> + </row> + + <row> + <entry><literal>scope</literal></entry> + <entry>Default search scope, see <function>search</function></entry> + <entry><literal>sub</literal></entry> + </row> + + </tbody> + </tgroup> + </table> + </para> + + <example> + <title>Connecting to an LDAP server</title> + <programlisting role="php"><![CDATA[ // Inclusion of the Net_LDAP package: require_once 'Net/LDAP.php'; // The configuration array: $config = array ( - 'binddn' => 'cn=admin,ou=users,dc=example,dc=org', - 'bindpw' => 'password', - 'basedn' => 'ou=addressbook,dc=example,dc=org', - 'host' => 'ldap.example.org' + 'binddn' => 'cn=admin,ou=users,dc=example,dc=org', + 'bindpw' => 'password', + 'basedn' => 'ou=addressbook,dc=example,dc=org', + 'host' => 'ldap.example.org' ); // Connecting using the configuration: @@ -118,12 +118,12 @@ // testing for connection error if (PEAR::isError($ldap)) { - die('Could not connect to LDAP-server: '.$ldap->getMessage()); + die('Could not connect to LDAP-server: '.$ldap->getMessage()); } ]]></programlisting> - </example> + </example> - </refsect1> + </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/peardoc/en/package/networking/net-ldap/search.xml?r1=1.2&r2=1.3&diff_format=u Index: peardoc/en/package/networking/net-ldap/search.xml diff -u peardoc/en/package/networking/net-ldap/search.xml:1.2 peardoc/en/package/networking/net-ldap/search.xml:1.3 --- peardoc/en/package/networking/net-ldap/search.xml:1.2 Fri Jun 22 11:19:38 2007 +++ peardoc/en/package/networking/net-ldap/search.xml Fri Jun 22 11:28:26 2007 @@ -1,132 +1,132 @@ <?xml version="1.0" encoding="utf-8" ?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="package.networking.net-ldap.search"> - <refnamediv> - <refname>Search</refname> - <refpurpose>How to search entries</refpurpose> - </refnamediv> + <refnamediv> + <refname>Search</refname> + <refpurpose>How to search entries</refpurpose> + </refnamediv> - <refsect1> - <title>Searching some entries</title> - - <para> - After connecting to the server, you can use <classname>Net_LDAP</classname>'s - <function>search</function> method to search the directory. The method takes - three parameters: - <itemizedlist> - <listitem> - <para> - <literal>$base</literal> is the base search DN. If kept - <literal>null</literal>, the default search DN configured when connecting - is used. - </para> - </listitem> - - <listitem> - <para> - <literal>$filter</literal> is the query filter that determines which - results are returned. It is either a string or better a <classname>Net_LDAP_Filter</classname>-object. - </para> - </listitem> - - <listitem> - <para> - <literal>$params</literal> is an array of configuration options for - the current query. - <table> - <title>Possible configuration parameters</title> - <tgroup cols="3"> - <thead> - <row> - <entry>Name</entry> - <entry>Description</entry> - <entry>Default</entry> - </row> - </thead> - <tbody> - <row> - <entry><literal>scope</literal></entry> - <entry> - The scope used for searching: - <itemizedlist> - <listitem> - <para> - <literal>base</literal> - Just one entry - </para> - </listitem> - - <listitem> - <para> - <literal>sub</literal> - The whole tree - </para> - </listitem> - - <listitem> - <para> - <literal>one</literal> - Immediately below - <literal>$base</literal> - </para> - </listitem> - - </itemizedlist> - </entry> - <entry><literal>sub</literal></entry> - </row> - - <row> - <entry><literal>sizelimit</literal></entry> - <entry>Number of entries returned at maximum</entry> - <entry><literal>0</literal> (no limit)</entry> - </row> - - <row> - <entry><literal>timelimit</literal></entry> - <entry>Seconds to spent for searching</entry> - <entry><literal>0</literal> (no limit)</entry> - </row> - - <row> - <entry><literal>attrsonly</literal></entry> - <entry>If <literal>true</literal>, only attribute names are returned</entry> - <entry><literal>false</literal></entry> - </row> - - <row> - <entry><literal>attributes</literal></entry> - <entry> - Array of attribute names, which the entry should contain. - It is good practice to limit this to just the ones you need. - </entry> - <entry><literal>array()</literal> (all attributes)</entry> - </row> - - </tbody> - </tgroup> - </table> - </para> - </listitem> - - </itemizedlist> - </para> - - <example> - <title>Making a search query</title> - <programlisting role="php"><![CDATA[ + <refsect1> + <title>Searching some entries</title> + + <para> + After connecting to the server, you can use <classname>Net_LDAP</classname>'s + <function>search</function> method to search the directory. The method takes + three parameters: + <itemizedlist> + <listitem> + <para> + <literal>$base</literal> is the base search DN. If kept + <literal>null</literal>, the default search DN configured when connecting + is used. + </para> + </listitem> + + <listitem> + <para> + <literal>$filter</literal> is the query filter that determines which + results are returned. It is either a string or better a <classname>Net_LDAP_Filter</classname>-object. + </para> + </listitem> + + <listitem> + <para> + <literal>$params</literal> is an array of configuration options for + the current query. + <table> + <title>Possible configuration parameters</title> + <tgroup cols="3"> + <thead> + <row> + <entry>Name</entry> + <entry>Description</entry> + <entry>Default</entry> + </row> + </thead> + <tbody> + <row> + <entry><literal>scope</literal></entry> + <entry> + The scope used for searching: + <itemizedlist> + <listitem> + <para> + <literal>base</literal> - Just one entry + </para> + </listitem> + + <listitem> + <para> + <literal>sub</literal> - The whole tree + </para> + </listitem> + + <listitem> + <para> + <literal>one</literal> - Immediately below + <literal>$base</literal> + </para> + </listitem> + + </itemizedlist> + </entry> + <entry><literal>sub</literal></entry> + </row> + + <row> + <entry><literal>sizelimit</literal></entry> + <entry>Number of entries returned at maximum</entry> + <entry><literal>0</literal> (no limit)</entry> + </row> + + <row> + <entry><literal>timelimit</literal></entry> + <entry>Seconds to spent for searching</entry> + <entry><literal>0</literal> (no limit)</entry> + </row> + + <row> + <entry><literal>attrsonly</literal></entry> + <entry>If <literal>true</literal>, only attribute names are returned</entry> + <entry><literal>false</literal></entry> + </row> + + <row> + <entry><literal>attributes</literal></entry> + <entry> + Array of attribute names, which the entry should contain. + It is good practice to limit this to just the ones you need. + </entry> + <entry><literal>array()</literal> (all attributes)</entry> + </row> + + </tbody> + </tgroup> + </table> + </para> + </listitem> + + </itemizedlist> + </para> + + <example> + <title>Making a search query</title> + <programlisting role="php"><![CDATA[ $filter = 'sn=Joe*'; $searchbase = 'ou=addressbook,dc=example,dc=org'; $options = array( - 'scope' => 'sub', - 'attributes' => array('sn') + 'scope' => 'sub', + 'attributes' => array('sn') ); $result = $ldap->search($searchbase, $filter, $options); if (PEAR::isError($result)) { - die($result->getMessage() . "\n"); + die($result->getMessage() . "\n"); } ]]></programlisting> - </example> - - </refsect1> + </example> + + </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables:
« previous php.pear.doc (#9803) next »