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
$filter
The filter.
protected
string
$filter
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
Return values
stringaddAnd()
Creates an 'and' filter.
public
addAnd(AbstractFilter $filter) : AndFilter
Parameters
- $filter : AbstractFilter
-
,...
Return values
AndFilteraddOr()
Creates an 'or' filter.
public
addOr(AbstractFilter $filter) : OrFilter
Parameters
- $filter : AbstractFilter
-
,...
Return values
OrFilterandFilter()
Creates an 'and' filter.
public
static andFilter(AbstractFilter $filter) : AndFilter
Parameters
- $filter : AbstractFilter
-
,...
Return values
AndFilterany()
Creates an 'any' filter.
public
static any(string $attr) : Filter
(attr=*)
Parameters
- $attr : string
Return values
Filterapprox()
Creates an 'approx' filter.
public
static approx(string $attr, string $value) : Filter
(attr~=value)
Parameters
- $attr : string
- $value : string
Return values
Filterbegins()
Creates a 'begins with' filter.
public
static begins(string $attr, string $value) : Filter
(attr=value*)
Parameters
- $attr : string
- $value : string
Return values
Filtercontains()
Creates a 'contains' filter.
public
static contains(string $attr, string $value) : Filter
(attr=value)
Parameters
- $attr : string
- $value : string
Return values
Filterends()
Creates an 'ends with' filter.
public
static ends(string $attr, string $value) : Filter
(attr=*value)
Parameters
- $attr : string
- $value : string
Return values
Filterequals()
Creates an 'equals' filter.
public
static equals(string $attr, string $value) : Filter
(attr=value)
Parameters
- $attr : string
- $value : string
Return values
FilterescapeValue()
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
greater()
Creates a 'greater' filter.
public
static greater(string $attr, string $value) : Filter
(attr>value)
Parameters
- $attr : string
- $value : string
Return values
FiltergreaterOrEqual()
Creates a 'greater or equal' filter.
public
static greaterOrEqual(string $attr, string $value) : Filter
(attr>=value)
Parameters
- $attr : string
- $value : string
Return values
Filterless()
Creates a 'less' filter.
public
static less(string $attr, string $value) : Filter
(attr<value)
Parameters
- $attr : string
- $value : string
Return values
FilterlessOrEqual()
Creates an 'less or equal' filter.
public
static lessOrEqual(string $attr, string $value) : Filter
(attr<=value)
Parameters
- $attr : string
- $value : string
Return values
Filtermask()
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
MaskFilternegate()
Negates the filter.
public
negate() : AbstractFilter
Return values
AbstractFilterorFilter()
Creates an 'or' filter.
public
static orFilter(AbstractFilter $filter) : OrFilter
Parameters
- $filter : AbstractFilter
-
,...
Return values
OrFilterstring()
Creates a simple custom string filter.
public
static string(string $filter) : StringFilter
Parameters
- $filter : string
Return values
StringFiltertoString()
Returns a string representation of the filter.
public
toString() : string
Return values
stringunescapeValue()
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
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