svn: /pear/peardoc/trunk/en/package/networking/ net-ldap/filter.xml net-ldap2/filter.xml

From: Date: Mon, 09 Dec 2013 09:25:34 +0000
Subject: svn: /pear/peardoc/trunk/en/package/networking/ net-ldap/filter.xml net-ldap2/filter.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-12220@lists.php.net to get a copy of this message
beni Mon, 09 Dec 2013 09:25:34 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=332311 Log: * Moved client side filtering docs to net-ldap2 where it belongs. Sorry. * Adjusted supported version Changed paths: U pear/peardoc/trunk/en/package/networking/net-ldap/filter.xml U pear/peardoc/trunk/en/package/networking/net-ldap2/filter.xml Modified: pear/peardoc/trunk/en/package/networking/net-ldap/filter.xml =================================================================== --- pear/peardoc/trunk/en/package/networking/net-ldap/filter.xml 2013-12-09 09:18:35 UTC (rev 332310) +++ pear/peardoc/trunk/en/package/networking/net-ldap/filter.xml 2013-12-09 09:25:34 UTC (rev 332311) @@ -235,58 +235,6 @@ </para> </refsection> - <refsection><info><title>Client side filtering</title></info> - - <para> - Since version 2.0.13 the filter class can filter entries client side. Just pass an entry - or an array of entries to the filter objects <function>matches</function>. With this you can - check that an given entry matches some LDAP filter as well as select matching entries out of - an array containing many of them. - <table><title>supported features</title> - - <tgroup cols="2"> - <thead> - <row> - <entry>Feature</entry> - <entry>Description</entry> - <entry>Since</entry> - </row> - </thead> - <tbody> - <row><entry>Matching Operators: <literal>equals</literal>, <literal>begins</literal>, <literal>ends</literal>, <literal>contains</literal>, <literal>present|any</literal></entry><entry>Matching of the basic "=" filter argument with wildcards in value</entry><entry>2.0.13</entry></row> - <row><entry>Matching Operators: <literal>greater</literal>, <literal>greaterOrEqual</literal>, <literal>less</literal>, <literal>lessOrEqual</literal>, <literal>approx</literal></entry><entry>Comparisons and approximate literal matching</entry><entry>unsupported</entry></row> - <row><entry>Matching rules of attribute syntax</entry><entry>Using of the matching rule of the schema attribute syntax</entry><entry>unsupported</entry> - <row><entry>Logical Operators: <literal>AND</literal>, <literal>OR</literal>, <literal>NOT</literal></entry><entry>Combining filters for more advanced expressions.</entry><entry>2.0.13</entry></row> - - </tbody> - </tgroup> - </table> - - <example><info><title>Client side filter matching</title></info> - - <programlisting role="php"><![CDATA[ -// Create a simple test filter (may be arbitary complex and combined) -$filter = Net_LDAP_Filter::create('givenName', 'equals', 'Benedikt'); - -// see if the filter matches a given Entry -// (note that you should check for Net_LDAP2_Error) -$matches_count = $filter->matches($singleEntry); -// $matches_count contains the number of matched entries, here 0 or 1. - -// see, if the filter matches some entries of a given array of entries -$matches_count = $filter->matches($arrayOfEntries); -// $matches_count contains again the number of matched entries, here 0 or n. - -// what entries do match exactly? -$filteredEntries = array(); -$matches_count = $filter->matches($arrayOfEntries $filteredEntries); -// $filteredEntries array contains now all matched entries, eg a filtered result. - -]]></programlisting> - </example> - </para> - </refsection> - <refsection><info><title>Advanced features</title></info> <para> Modified: pear/peardoc/trunk/en/package/networking/net-ldap2/filter.xml =================================================================== --- pear/peardoc/trunk/en/package/networking/net-ldap2/filter.xml 2013-12-09 09:18:35 UTC (rev 332310) +++ pear/peardoc/trunk/en/package/networking/net-ldap2/filter.xml 2013-12-09 09:25:34 UTC (rev 332311) @@ -242,6 +242,59 @@ </example> </para> </refsection> + + <refsection><info><title>Client side filtering</title></info> + + <para> + Since version 2.1.0 the filter class can filter entries client side. Just pass an entry + or an array of entries to the filter objects <function>matches</function>. With this you can + check that an given entry matches some LDAP filter as well as select matching entries out of + an array containing many of them. + <table><title>supported features</title> + + <tgroup cols="2"> + <thead> + <row> + <entry>Feature</entry> + <entry>Description</entry> + <entry>Since</entry> + </row> + </thead> + <tbody> + <row><entry>Matching Operators: <literal>equals</literal>, <literal>begins</literal>, <literal>ends</literal>, <literal>contains</literal>, <literal>present|any</literal></entry><entry>Matching of the basic "=" filter argument with wildcards in value</entry><entry>2.1.0</entry></row> + <row><entry>Matching Operators: <literal>greater</literal>, <literal>greaterOrEqual</literal>, <literal>less</literal>, <literal>lessOrEqual</literal>, <literal>approx</literal></entry><entry>Comparisons and approximate literal matching</entry><entry>unsupported</entry></row> + <row><entry>Matching rules of attribute syntax</entry><entry>Using of the matching rule of the schema attribute syntax (eg. date/time comparisons, case sensitiveness, etc)</entry><entry>unsupported</entry> + <row><entry>Logical Operators: <literal>AND</literal>, <literal>OR</literal>, <literal>NOT</literal></entry><entry>Combining filters for more advanced expressions.</entry><entry>2.1.0</entry></row> + + </tbody> + </tgroup> + </table> + + <example><info><title>Client side filter matching</title></info> + + <programlisting role="php"><![CDATA[ +// Create a simple test filter (may be arbitary complex and combined) +$filter = Net_LDAP_Filter::create('givenName', 'equals', 'Benedikt'); + +// see if the filter matches a given Entry +// (note that you should check for Net_LDAP2_Error) +$matches_count = $filter->matches($singleEntry); +// $matches_count contains the number of matched entries, here 0 or 1. + +// see, if the filter matches some entries of a given array of entries +$matches_count = $filter->matches($arrayOfEntries); +// $matches_count contains again the number of matched entries, here 0 or n. + +// what entries do match exactly? +$filteredEntries = array(); +$matches_count = $filter->matches($arrayOfEntries $filteredEntries); +// $filteredEntries array contains now all matched entries, eg a filtered result. + +]]></programlisting> + </example> + </para> + </refsection> + <refsection><info><title>Advanced features</title></info> <para>

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