Свойство | Тип | Описание | |
---|---|---|---|
$_filter | string | If this is a leaf filter, the filter representation is store here. | |
$_filters | array | This variable holds a array of filter objects that should be combined by this filter object. | |
$_operator | string | Operator for sub-filters. |
Метод | Описание | |
---|---|---|
__toString ( ) : string | Returns the string representation of this filter. | |
build ( array $params, string $operator = 'and' ) : Horde_Ldap_Filter | Builds a filter (commonly for objectClass attributes) from different configuration options. | |
combine ( string $operator, array | Horde_Ldap_Filter | string $filters ) : Horde_Ldap_Filter | Combines two or more filter objects using a logical operator. | |
create ( string $attribute, string $match, string $value = '', boolean $escape = true ) : Horde_Ldap_Filter | Creates a new part of an LDAP filter. | |
parse ( string $filter ) : Horde_Ldap_Filter | Parses a string into a Horde_Ldap_Filter object. |
Метод | Описание | |
---|---|---|
__construct ( array $params ) | Constructor. | |
_parseCombination ( string $filter ) : Horde_Ldap_Filter | Parses combined subfilter strings. | |
_parseLeaf ( string $filter ) : Horde_Ldap_Filter | Parses a single leaf component. |
protected __construct ( array $params ) | ||
$params | array | List of object parameters |
public __toString ( ) : string | ||
Результат | string |
protected static _parseCombination ( string $filter ) : Horde_Ldap_Filter | ||
$filter | string | An LDAP filter string. |
Результат | Horde_Ldap_Filter |
protected static _parseLeaf ( string $filter ) : Horde_Ldap_Filter | ||
$filter | string | An LDAP filter string. |
Результат | Horde_Ldap_Filter |
public static build ( array $params, string $operator = 'and' ) : Horde_Ldap_Filter | ||
$params | array | Hash with configuration options that build the search filter. Possible hash keys: - 'filter': An LDAP filter string. - 'objectclass' (string): An objectClass name. - 'objectclass' (array): A list of objectClass names. |
$operator | string | How to combine mutliple 'objectclass' entries. 'and' or 'or'. |
Результат | Horde_Ldap_Filter | A filter matching the specified criteria. |
$filter = Horde_Ldap_Filter::combine('or', array($filter1, $filter2));
If the array contains filter strings instead of filter objects, they
will be parsed. public static combine ( string $operator, array | Horde_Ldap_Filter | string $filters ) : Horde_Ldap_Filter | ||
$operator | string | The logical operator, either "and", "or", "not" or the logical equivalents "&", "|", "!". |
$filters | array | Horde_Ldap_Filter | string | Array with Horde_Ldap_Filter objects and/or strings or a single filter when using the "not" operator. |
Результат | Horde_Ldap_Filter |
This will find entries that contain an attribute "sn" that ends with
"foobar":
$filter = Horde_Ldap_Filter::create('sn', 'ends', 'foobar');
This will find entries that contain an attribute "sn" that has any
value set:
$filter = Horde_Ldap_Filter::create('sn', 'any');
public static create ( string $attribute, string $match, string $value = '', boolean $escape = true ) : Horde_Ldap_Filter | ||
$attribute | string | Name of the attribute the filter should apply to. |
$match | string | Matching rule (equals, begins, ends, contains, greater, less, greaterOrEqual, lessOrEqual, approx, any). |
$value | string | If given, then this is used as a filter value. |
$escape | boolean | Should $value be escaped? |
Результат | Horde_Ldap_Filter |
protected string $_filter | ||
Результат | string |
protected array $_filters | ||
Результат | array |
protected string $_operator | ||
Результат | string |