Zend_Ldap_Filter.

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

 Methods

Creates a new Zend_Ldap_Filter.

__construct(string $attr, string $value, string $filtertype, string $prepend = null, string $append = null
inherited_from \Zend_Ldap_Filter_String::__construct()

Parameters

$attr

string

$value

string

$filtertype

string

$prepend

string

$append

string

Creates a Zend_Ldap_Filter_String.

__construct(string $filter) 
Inherited

Parameters

$filter

string

Returns a string representation of the filter.

__toString() : string
Inherited
see

Returns

string

Creates an 'and' filter.

addAnd($filter) : \Zend_Ldap_Filter_And
Inherited

Parameters

$filter

Returns

\Zend_Ldap_Filter_And

Creates an 'or' filter.

addOr($filter) : \Zend_Ldap_Filter_Or
Inherited

Parameters

$filter

Returns

\Zend_Ldap_Filter_Or

Creates an 'and' filter.

andFilter($filter) : \Zend_Ldap_Filter_And
Static

Parameters

$filter

Returns

\Zend_Ldap_Filter_And

Creates an 'any' filter.

any(string $attr) : \Zend_Ldap_Filter
Static

(attr=*)

Parameters

$attr

string

Returns

\Zend_Ldap_Filter

Creates an 'approx' filter.

approx(string $attr, string $value) : \Zend_Ldap_Filter
Static

(attr~=value)

Parameters

$attr

string

$value

string

Returns

\Zend_Ldap_Filter

Creates a 'begins with' filter.

begins(string $attr, string $value) : \Zend_Ldap_Filter
Static

(attr=value*)

Parameters

$attr

string

$value

string

Returns

\Zend_Ldap_Filter

Creates a 'contains' filter.

contains(string $attr, string $value) : \Zend_Ldap_Filter
Static

(attr=value)

Parameters

$attr

string

$value

string

Returns

\Zend_Ldap_Filter

Creates an 'ends with' filter.

ends(string $attr, string $value) : \Zend_Ldap_Filter
Static

(attr=*value)

Parameters

$attr

string

$value

string

Returns

\Zend_Ldap_Filter

Creates an 'equals' filter.

equals(string $attr, string $value) : \Zend_Ldap_Filter
Static

(attr=value)

Parameters

$attr

string

$value

string

Returns

\Zend_Ldap_Filter

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

escapeValue(string|array $values = array()) : array
InheritedStatic

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 from Benedikt Hallinger
link http://pear.php.net/package/Net_LDAP2
author Benedikt Hallinger

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
Static

(attr>value)

Parameters

$attr

string

$value

string

Returns

\Zend_Ldap_Filter

Creates a 'greater or equal' filter.

greaterOrEqual(string $attr, string $value) : \Zend_Ldap_Filter
Static

(attr>=value)

Parameters

$attr

string

$value

string

Returns

\Zend_Ldap_Filter

Creates a 'less' filter.

less(string $attr, string $value) : \Zend_Ldap_Filter
Static

(attr<value)

Parameters

$attr

string

$value

string

Returns

\Zend_Ldap_Filter

Creates an 'less or equal' filter.

lessOrEqual(string $attr, string $value) : \Zend_Ldap_Filter
Static

(attr<=value)

Parameters

$attr

string

$value

string

Returns

\Zend_Ldap_Filter

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

mask(string $mask, string $value) : \Zend_Ldap_Filter_Mask
Static

Parameters

$mask

string

$value

string

Returns

\Zend_Ldap_Filter_Mask

Negates the filter.

negate() : \Zend_Ldap_Filter_Abstract
Inherited

Returns

\Zend_Ldap_Filter_Abstract

Creates an 'or' filter.

orFilter($filter) : \Zend_Ldap_Filter_Or
Static

Parameters

$filter

Returns

\Zend_Ldap_Filter_Or

Creates a simple custom string filter.

string(string $filter) : \Zend_Ldap_Filter_String
Static

Parameters

$filter

string

Returns

\Zend_Ldap_Filter_String

Returns a string representation of the filter.

toString() : string
Inherited

Returns

string

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

unescapeValue(string|array $values = array()) : array
InheritedStatic

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

see from Benedikt Hallinger
link http://pear.php.net/package/Net_LDAP2
author Benedikt Hallinger

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 = null, string $append = null) : string
Static

Parameters

$attr

string

$value

string

$filtertype

string

$prepend

string

$append

string

Returns

string

 Properties

 

The filter.

$_filter : string

Default

 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 = '<='