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

From: Date: Thu, 05 Jun 2008 05:50:27 +0000
Subject: cvs: peardoc /en/package/networking/net-ldap filter.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-10820@lists.php.net to get a copy of this message
beni Thu Jun 5 05:50:27 2008 UTC Modified files: /peardoc/en/package/networking/net-ldap filter.xml Log: * Some better structure http://cvs.php.net/viewvc.cgi/peardoc/en/package/networking/net-ldap/filter.xml?r1=1.2&r2=1.3&diff_format=u Index: peardoc/en/package/networking/net-ldap/filter.xml diff -u peardoc/en/package/networking/net-ldap/filter.xml:1.2 peardoc/en/package/networking/net-ldap/filter.xml:1.3 --- peardoc/en/package/networking/net-ldap/filter.xml:1.2 Thu Jun 5 05:42:32 2008 +++ peardoc/en/package/networking/net-ldap/filter.xml Thu Jun 5 05:50:27 2008 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" ?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="package.networking.net-ldap.filter"> <refnamediv> <refname>LDAP filters</refname> @@ -57,41 +57,44 @@ <thead> <row> <entry>Name</entry> - <entry>Value</entry> + <entry>Filter</entry> <entry>Description</entry> </row> </thead> <tbody> - <row><entry>present</entry><entry>*</entry><entry>Also refered to as "any". Finds any entry containing any (unless empty) value for the named attribute.</entry></row> - <row><entry>begins</entry><entry>value*</entry><entry>value starts with some fixed string</entry></row> - <row><entry>ends</entry><entry>*value</entry><entry>value ends with some fixed string</entry></row> - <row><entry>contains</entry><entry>*value*</entry><entry>value contains some fixed string</entry></row> + <row><entry>present</entry><entry>(attr=*)</entry><entry>Also refered to as "any". Finds any entry containing any (unless empty) value for the named attribute.</entry></row> + <row><entry>begins</entry><entry>(attr=value*)</entry><entry>value starts with some fixed string</entry></row> + <row><entry>ends</entry><entry>(attr=*value)</entry><entry>value ends with some fixed string</entry></row> + <row><entry>contains</entry><entry>(attr=*value*)</entry><entry>value contains some fixed string</entry></row> </tbody> </tgroup> </table> </para> - <para> - Basic filters can be combined using the three logical operators <![CDATA["&"]]> (and), - <![CDATA["|"]]> (or) and <![CDATA["!"]]> (not). Note, that the smallest filter component, - the basic filter enclosed in round brackets, remains isolated: instead of just adding another - "[attribute][operator][value]" pair into the brackets, a new bracket level is introduced that - contains all filter components that should be combined. Note also, that the logical operator - does stand in front of all filter components, not between them as common in programming languages. - </para> - <example> - <title>Combining string filters</title> - <programlisting role="php"><![CDATA[ -// Search all 'Benedikt's with phone number 1234567890 -$filter = '(&(givenName=Benedikt)(telephoneNumber=1234567890))'; - -// Search the same, but exclude person "Benedikt Foobar" -// Note that the "not" is a logical operator and thus needs its own -// surrounding bracket. This explains nicely, that each bracket level -// is evaluated independently from surrounding brackets. -$filter = '(&(givenName=Benedikt)(telephoneNumber=1234567890)(!(sureName=Foobar)))'; -]]></programlisting> - </example> + <refsect2> + <title>Combining string filters</title> + <para> + Basic filters can be combined using the three logical operators <![CDATA["&"]]> (and), + <![CDATA["|"]]> (or) and <![CDATA["!"]]> (not). Note, that the smallest filter component, + the basic filter enclosed in round brackets, remains isolated: instead of just adding another + "[attribute][operator][value]" pair into the brackets, a new bracket level is introduced that + contains all filter components that should be combined. Note also, that the logical operator + does stand in front of all filter components, not between them as common in programming languages. + </para> + <example> + <title>Combining string filters</title> + <programlisting role="php"><![CDATA[ + // Search all 'Benedikt's with phone number 1234567890 + $filter = '(&(givenName=Benedikt)(telephoneNumber=1234567890))'; + + // Search the same, but exclude person "Benedikt Foobar" + // Note that the "not" is a logical operator and thus needs its own + // surrounding bracket. This explains nicely, that each bracket level + // is evaluated independently from surrounding brackets. + $filter = '(&(givenName=Benedikt)(telephoneNumber=1234567890)(!(sureName=Foobar)))'; + ]]></programlisting> + </example> + </refsect2> </refsect1> <refsect1>

« previous php.pear.doc (#10820) next »