API Documentation

Ldap/Filter.php

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

category
Zend  
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Ldap  
subpackage
Filter  
version
$Id: Filter.php 23775 2011-03-01 17:25:24Z ralph $  

\Zend_Ldap_Filter

Zend_Ldap_Filter.

Extends from
\Zend_Ldap_Filter_String
category
Zend  
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Ldap  
subpackage
Filter  

Constants

Constant  TYPE_EQUALS = '='
Constant  TYPE_GREATER = '>'
Constant  TYPE_GREATEROREQUAL = '>='
Constant  TYPE_LESS = '<'
Constant  TYPE_LESSOREQUAL = '<='
Constant  TYPE_APPROX = '~='

Methods

methodpublic__construct( string $attr, string $value, string $filtertype, string $prepend = null, string $append = null ) : void

Creates a new Zend_Ldap_Filter.

Parameters
Name Type Description
$attr string
$value string
$filtertype string
$prepend string
$append string
methodpublic__toString( ) : string

Returns a string representation of the filter.

Inherited from: \Zend_Ldap_Filter_Abstract::__toString()
Returns
Type Description
string
Details
see
\toString()  
methodprivate_createFilterString( string $attr, string $value, string $filtertype, string $prepend = null, string $append = null ) : string
static

Create a filter string.

Parameters
Name Type Description
$attr string
$value string
$filtertype string
$prepend string
$append string
Returns
Type Description
string
methodpublicaddAnd(  $filter ) : \Zend_Ldap_Filter_And

Creates an 'and' filter.

Inherited from: \Zend_Ldap_Filter_Abstract::addAnd()
Parameters
Name Type Description
$filter
Returns
Type Description
\Zend_Ldap_Filter_And
methodpublicaddOr(  $filter ) : \Zend_Ldap_Filter_Or

Creates an 'or' filter.

Inherited from: \Zend_Ldap_Filter_Abstract::addOr()
Parameters
Name Type Description
$filter
Returns
Type Description
\Zend_Ldap_Filter_Or
methodpublicandFilter(  $filter ) : \Zend_Ldap_Filter_And
static

Creates an 'and' filter.

Parameters
Name Type Description
$filter
Returns
Type Description
\Zend_Ldap_Filter_And
methodpublicany( string $attr ) : \Zend_Ldap_Filter
static

Creates an 'any' filter.

(attr=*)

Parameters
Name Type Description
$attr string
Returns
Type Description
\Zend_Ldap_Filter
methodpublicapprox( string $attr, string $value ) : \Zend_Ldap_Filter
static

Creates an 'approx' filter.

(attr~=value)

Parameters
Name Type Description
$attr string
$value string
Returns
Type Description
\Zend_Ldap_Filter
methodpublicbegins( string $attr, string $value ) : \Zend_Ldap_Filter
static

Creates a 'begins with' filter.

(attr=value*)

Parameters
Name Type Description
$attr string
$value string
Returns
Type Description
\Zend_Ldap_Filter
methodpubliccontains( string $attr, string $value ) : \Zend_Ldap_Filter
static

Creates a 'contains' filter.

(attr=value)

Parameters
Name Type Description
$attr string
$value string
Returns
Type Description
\Zend_Ldap_Filter
methodpublicends( string $attr, string $value ) : \Zend_Ldap_Filter
static

Creates an 'ends with' filter.

(attr=*value)

Parameters
Name Type Description
$attr string
$value string
Returns
Type Description
\Zend_Ldap_Filter
methodpublicequals( string $attr, string $value ) : \Zend_Ldap_Filter
static

Creates an 'equals' filter.

(attr=value)

Parameters
Name Type Description
$attr string
$value string
Returns
Type Description
\Zend_Ldap_Filter
methodpublicescapeValue( string|array $values = array ) : array
static

Escapes the given VALUES according to RFC 2254 so that they can be safely used in LDAP filters.

Inherited from: \Zend_Ldap_Filter_Abstract::escapeValue()

Any control characters with an ACII code < 32 as well as the characters with special meaning in LDAP filters "*", "(", ")", and "\" (the backslash) are converted into the representation of a backslash followed by two hex digits representing the hexadecimal value of the character.

Parameters
Name Type Description
$values string|array Array of values to escape
Returns
Type Description
array Array $values, but escaped
Details
author
Benedikt Hallinger  
link
http://pear.php.net/package/Net_LDAP2  
see
\Net_LDAP2_Util::escape_filter_value()  
methodpublicgreater( string $attr, string $value ) : \Zend_Ldap_Filter
static

Creates a 'greater' filter.

(attr>value)

Parameters
Name Type Description
$attr string
$value string
Returns
Type Description
\Zend_Ldap_Filter
methodpublicgreaterOrEqual( string $attr, string $value ) : \Zend_Ldap_Filter
static

Creates a 'greater or equal' filter.

(attr>=value)

Parameters
Name Type Description
$attr string
$value string
Returns
Type Description
\Zend_Ldap_Filter
methodpublicless( string $attr, string $value ) : \Zend_Ldap_Filter
static

Creates a 'less' filter.

(attr<value)

Parameters
Name Type Description
$attr string
$value string
Returns
Type Description
\Zend_Ldap_Filter
methodpubliclessOrEqual( string $attr, string $value ) : \Zend_Ldap_Filter
static

Creates an 'less or equal' filter.

(attr<=value)

Parameters
Name Type Description
$attr string
$value string
Returns
Type Description
\Zend_Ldap_Filter
methodpublicmask( string $mask, string $value ) : \Zend_Ldap_Filter_Mask
static

Creates a simple string filter to be used with a mask.

Parameters
Name Type Description
$mask string
$value string
Returns
Type Description
\Zend_Ldap_Filter_Mask
methodpublicnegate( ) : \Zend_Ldap_Filter_Abstract

Negates the filter.

Inherited from: \Zend_Ldap_Filter_Abstract::negate()
Returns
Type Description
\Zend_Ldap_Filter_Abstract
methodpublicorFilter(  $filter ) : \Zend_Ldap_Filter_Or
static

Creates an 'or' filter.

Parameters
Name Type Description
$filter
Returns
Type Description
\Zend_Ldap_Filter_Or
methodpublicstring( string $filter ) : \Zend_Ldap_Filter_String
static

Creates a simple custom string filter.

Parameters
Name Type Description
$filter string
Returns
Type Description
\Zend_Ldap_Filter_String
methodpublictoString( ) : string

Returns a string representation of the filter.

Inherited from: \Zend_Ldap_Filter_String::toString()
Returns
Type Description
string
methodpublicunescapeValue( string|array $values = array ) : array
static

Undoes the conversion done by {@link escapeValue()}.

Inherited from: \Zend_Ldap_Filter_Abstract::unescapeValue()

Converts any sequences of a backslash followed by two hex digits into the corresponding character.

Parameters
Name Type Description
$values string|array Array of values to escape
Returns
Type Description
array Array $values, but unescaped
Details
author
Benedikt Hallinger  
link
http://pear.php.net/package/Net_LDAP2  
see
\Net_LDAP2_Util::escape_filter_value()  
Documentation was generated by DocBlox 0.13.3.