Zend\Ldap\Filter.

 Methods

Creates a new Zend\Ldap\Filter.

__construct(string $attr, string $value, string $filtertype, string $prepend, string $append) 

Parameters

$attr

string

$value

string

$filtertype

string

$prepend

string

$append

string

Returns a string representation of the filter.

__toString() : string
Inherited

see \Zend\Ldap\Filter\toString()
inherited_from \Zend\Ldap\Filter\AbstractFilter::__toString()
inherited_from \Zend\Ldap\Filter\StringFilter::__toString()

Returns

string

Creates an 'and' filter.

addAnd($filter) : \Zend\Ldap\Filter\AndFilter
Inherited

inherited_from \Zend\Ldap\Filter\AbstractFilter::addAnd()
inherited_from \Zend\Ldap\Filter\StringFilter::addAnd()

Parameters

$filter

Returns

Creates an 'or' filter.

addOr($filter) : \Zend\Ldap\Filter\OrFilter
Inherited

inherited_from \Zend\Ldap\Filter\AbstractFilter::addOr()
inherited_from \Zend\Ldap\Filter\StringFilter::addOr()

Parameters

$filter

Returns

Creates an 'and' filter.

andFilter($filter) : \Zend\Ldap\Filter\AndFilter

Parameters

$filter

Returns

Creates an 'any' filter.

any(string $attr) : \Zend\Ldap\Filter

(attr=*)

Parameters

$attr

string

Returns

Creates an 'approx' filter.

approx(string $attr, string $value) : \Zend\Ldap\Filter

(attr~=value)

Parameters

$attr

string

$value

string

Returns

Creates a 'begins with' filter.

begins(string $attr, string $value) : \Zend\Ldap\Filter

(attr=value*)

Parameters

$attr

string

$value

string

Returns

Creates a 'contains' filter.

contains(string $attr, string $value) : \Zend\Ldap\Filter

(attr=value)

Parameters

$attr

string

$value

string

Returns

Creates an 'ends with' filter.

ends(string $attr, string $value) : \Zend\Ldap\Filter

(attr=*value)

Parameters

$attr

string

$value

string

Returns

Creates an 'equals' filter.

equals(string $attr, string $value) : \Zend\Ldap\Filter

(attr=value)

Parameters

$attr

string

$value

string

Returns

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

escapeValue(string | array $values) : array
Inherited

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.

see \Zend\Ldap\Filter\Net_LDAP2_Util::escape_filter_value()
link http://pear.php.net/package/Net_LDAP2
author Benedikt Hallinger
inherited_from \Zend\Ldap\Filter\AbstractFilter::escapeValue()
inherited_from \Zend\Ldap\Filter\StringFilter::escapeValue()

Parameters

$values

stringarray

Array of values to escape

Returns

arrayArray $values, but escaped

Creates a 'greater' filter.

greater(string $attr, string $value) : \Zend\Ldap\Filter

(attr>value)

Parameters

$attr

string

$value

string

Returns

Creates a 'greater or equal' filter.

greaterOrEqual(string $attr, string $value) : \Zend\Ldap\Filter

(attr>=value)

Parameters

$attr

string

$value

string

Returns

Creates a 'less' filter.

less(string $attr, string $value) : \Zend\Ldap\Filter

(attr<value)

Parameters

$attr

string

$value

string

Returns

Creates an 'less or equal' filter.

lessOrEqual(string $attr, string $value) : \Zend\Ldap\Filter

(attr<=value)

Parameters

$attr

string

$value

string

Returns

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

mask(string $mask, string $value) : \Zend\Ldap\Filter\MaskFilter

Parameters

$mask

string

$value

string

Returns

Negates the filter.

negate() : \Zend\Ldap\Filter\AbstractFilter
Inherited

inherited_from \Zend\Ldap\Filter\AbstractFilter::negate()
inherited_from \Zend\Ldap\Filter\StringFilter::negate()

Returns

Creates an 'or' filter.

orFilter($filter) : \Zend\Ldap\Filter\OrFilter

Parameters

$filter

Returns

Creates a simple custom string filter.

string(string $filter) : \Zend\Ldap\Filter\StringFilter

Parameters

$filter

string

Returns

Returns a string representation of the filter.

toString() : string
Inherited

inherited_from \Zend\Ldap\Filter\StringFilter::toString()

Returns

string

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

unescapeValue(string | array $values) : array
Inherited

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

see \Zend\Ldap\Filter\Net_LDAP2_Util::escape_filter_value()
link http://pear.php.net/package/Net_LDAP2
author Benedikt Hallinger
inherited_from \Zend\Ldap\Filter\AbstractFilter::unescapeValue()
inherited_from \Zend\Ldap\Filter\StringFilter::unescapeValue()

Parameters

$values

stringarray

Array of values to escape

Returns

arrayArray $values, but unescaped

Create a filter string.

createFilterString(string $attr, string $value, string $filtertype, string $prepend, string $append) : string

Parameters

$attr

string

$value

string

$filtertype

string

$prepend

string

$append

string

Returns

string

 Properties

 

The filter.

$filter : string
Inherited

inherited_from \Zend\Ldap\Filter\StringFilter::$$filter

 Constants

 

TYPE_APPROX

TYPE_APPROX 

 

TYPE_EQUALS

TYPE_EQUALS 

 

TYPE_GREATER

TYPE_GREATER 

 

TYPE_GREATEROREQUAL

TYPE_GREATEROREQUAL 

 

TYPE_LESS

TYPE_LESS 

 

TYPE_LESSOREQUAL

TYPE_LESSOREQUAL