HumHub Documentation (unofficial)

Filter extends StringFilter
in package

Laminas\Ldap\Filter.

Table of Contents

Constants

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

Properties

$filter  : string
The filter.

Methods

__construct()  : mixed
Creates a new Laminas\Ldap\Filter.
__toString()  : string
Returns a string representation of the filter.
addAnd()  : AndFilter
Creates an 'and' filter.
addOr()  : OrFilter
Creates an 'or' filter.
andFilter()  : AndFilter
Creates an 'and' filter.
any()  : Filter
Creates an 'any' filter.
approx()  : Filter
Creates an 'approx' filter.
begins()  : Filter
Creates a 'begins with' filter.
contains()  : Filter
Creates a 'contains' filter.
ends()  : Filter
Creates an 'ends with' filter.
equals()  : Filter
Creates an 'equals' filter.
escapeValue()  : mixed
Escapes the given VALUES according to RFC 2254 so that they can be safely used in LDAP filters.
greater()  : Filter
Creates a 'greater' filter.
greaterOrEqual()  : Filter
Creates a 'greater or equal' filter.
less()  : Filter
Creates a 'less' filter.
lessOrEqual()  : Filter
Creates an 'less or equal' filter.
mask()  : MaskFilter
Creates a simple string filter to be used with a mask.
negate()  : AbstractFilter
Negates the filter.
orFilter()  : OrFilter
Creates an 'or' filter.
string()  : StringFilter
Creates a simple custom string filter.
toString()  : string
Returns a string representation of the filter.
unescapeValue()  : mixed
Undoes the conversion done by {@link escapeValue()}.
createFilterString()  : string
Create a filter string.

Constants

TYPE_APPROX

public mixed TYPE_APPROX = '~='

TYPE_EQUALS

public mixed TYPE_EQUALS = '='

TYPE_GREATER

public mixed TYPE_GREATER = '>'

TYPE_GREATEROREQUAL

public mixed TYPE_GREATEROREQUAL = '>='

TYPE_LESS

public mixed TYPE_LESS = '<'

TYPE_LESSOREQUAL

public mixed TYPE_LESSOREQUAL = '<='

Properties

Methods

__construct()

Creates a new Laminas\Ldap\Filter.

public __construct(string $attr, string $value, string $filtertype[, string $prepend = null ][, string $append = null ]) : mixed
Parameters
$attr : string
$value : string
$filtertype : string
$prepend : string = null
$append : string = null

__toString()

Returns a string representation of the filter.

public __toString() : string
Tags
see
toString()
Return values
string

any()

Creates an 'any' filter.

public static any(string $attr) : Filter

(attr=*)

Parameters
$attr : string
Return values
Filter

approx()

Creates an 'approx' filter.

public static approx(string $attr, string $value) : Filter

(attr~=value)

Parameters
$attr : string
$value : string
Return values
Filter

begins()

Creates a 'begins with' filter.

public static begins(string $attr, string $value) : Filter

(attr=value*)

Parameters
$attr : string
$value : string
Return values
Filter

contains()

Creates a 'contains' filter.

public static contains(string $attr, string $value) : Filter

(attr=value)

Parameters
$attr : string
$value : string
Return values
Filter

ends()

Creates an 'ends with' filter.

public static ends(string $attr, string $value) : Filter

(attr=*value)

Parameters
$attr : string
$value : string
Return values
Filter

equals()

Creates an 'equals' filter.

public static equals(string $attr, string $value) : Filter

(attr=value)

Parameters
$attr : string
$value : string
Return values
Filter

escapeValue()

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

public static escapeValue([TInput $values = [] ]) : mixed

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
$values : TInput = []

Array of DN Values

Tags
link
http://pear.php.net/package/Net_LDAP2
see
Net_LDAP2_Util::escape_filter_value()

from Benedikt Hallinger beni@php.net

template

TInput of string|array

greater()

Creates a 'greater' filter.

public static greater(string $attr, string $value) : Filter

(attr>value)

Parameters
$attr : string
$value : string
Return values
Filter

greaterOrEqual()

Creates a 'greater or equal' filter.

public static greaterOrEqual(string $attr, string $value) : Filter

(attr>=value)

Parameters
$attr : string
$value : string
Return values
Filter

less()

Creates a 'less' filter.

public static less(string $attr, string $value) : Filter

(attr<value)

Parameters
$attr : string
$value : string
Return values
Filter

lessOrEqual()

Creates an 'less or equal' filter.

public static lessOrEqual(string $attr, string $value) : Filter

(attr<=value)

Parameters
$attr : string
$value : string
Return values
Filter

mask()

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

public static mask(string $mask, string $value) : MaskFilter
Parameters
$mask : string
$value : string
Return values
MaskFilter

string()

Creates a simple custom string filter.

public static string(string $filter) : StringFilter
Parameters
$filter : string
Return values
StringFilter

toString()

Returns a string representation of the filter.

public toString() : string
Return values
string

unescapeValue()

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

public static unescapeValue([TInput $values = [] ]) : mixed

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

Parameters
$values : TInput = []

Array of DN Values

Tags
link
http://pear.php.net/package/Net_LDAP2
see
Net_LDAP2_Util::escape_filter_value()

from Benedikt Hallinger beni@php.net

template

TInput of string|array

createFilterString()

Create a filter string.

private static createFilterString(string $attr, string $value, string $filtertype[, string $prepend = null ][, string $append = null ]) : string
Parameters
$attr : string
$value : string
$filtertype : string
$prepend : string = null
$append : string = null
Return values
string

        
On this page

Search results