PHP Class LdapTools\Query\Builder\FilterBuilder

Author: Chad Sikorra ([email protected])
显示文件 Open project: ldaptools/ldaptools Class Usage Examples

Public Methods

Method Description
aeq ( $attribute, $value ) : Comparison An approximately-equal-to comparison.
bAnd ( $op ) : bAnd A logical AND operator.
bNot ( BaseOperator $op ) : bNot A logical NOT operator.
bOr ( $op ) : bOr A logical OR operator.
bitwiseAnd ( string $attribute, integer $value ) : MatchingRule Perform a bitwise AND operation against an attribute.
bitwiseOr ( string $attribute, integer $value ) : MatchingRule Perform a bitwise OR operation against an attribute.
contains ( $attribute, $value ) : Wildcard Encapsulates the search term with a wildcard on each end.
endsWith ( $attribute, $value ) : Wildcard Places a wildcard at the beginning of the search term.
eq ( $attribute, $value ) : Comparison An equal-to comparison.
getInstance ( LdapTools\Connection\LdapConnectionInterface $connection = null ) : ADFilterBuilder | FilterBuilder Get a FilterBuilder instance based on the connection.
gt ( string $attribute, mixed $value ) : bAnd A greater-than comparison. Since an actual '>' operator does not exist in LDAP, this is a combination of a less-than-or-equal-to operator along with a check if the attribute is set/present. This is encapsulated within a logical 'AND' operator.
gte ( $attribute, $value ) : Comparison A greater-than-or-equal-to comparison.
like ( $attribute, $value ) : Wildcard Do not escape wildcard characters in the value, but will escape all other characters. This allows for searches That may need several arbitrarily placed wildcards (ie. sn=Th*m*s)
lt ( string $attribute, mixed $value ) : bAnd A less-than comparison. Since an actual '<' operator does not exist in LDAP, this is a combination of a greater-than-or-equal-to operator along with a check if the attribute is set/present. This is encapsulated within a logical 'AND' operator.
lte ( $attribute, $value ) : Comparison A less-than-or-equal-to comparison.
neq ( $attribute, $value ) : bNot A convenience method for a not-equal-to comparison.
notPresent ( $attribute ) : bNot Convenience method to check for the non-existence of an attribute.
present ( $attribute ) : Wildcard Checks for the existence of an attribute.
startsWith ( $attribute, $value ) : Wildcard Places a wildcard at the end of the search term.

Method Details

aeq() public method

An approximately-equal-to comparison.
public aeq ( $attribute, $value ) : Comparison
$attribute
$value
return LdapTools\Query\Operator\Comparison

bAnd() public method

A logical AND operator.
public bAnd ( $op ) : bAnd
return LdapTools\Query\Operator\bAnd

bNot() public method

A logical NOT operator.
public bNot ( BaseOperator $op ) : bNot
$op LdapTools\Query\Operator\BaseOperator
return LdapTools\Query\Operator\bNot

bOr() public method

A logical OR operator.
public bOr ( $op ) : bOr
return LdapTools\Query\Operator\bOr

bitwiseAnd() public method

Perform a bitwise AND operation against an attribute.
public bitwiseAnd ( string $attribute, integer $value ) : MatchingRule
$attribute string
$value integer
return LdapTools\Query\Operator\MatchingRule

bitwiseOr() public method

Perform a bitwise OR operation against an attribute.
public bitwiseOr ( string $attribute, integer $value ) : MatchingRule
$attribute string
$value integer
return LdapTools\Query\Operator\MatchingRule

contains() public method

Encapsulates the search term with a wildcard on each end.
public contains ( $attribute, $value ) : Wildcard
$attribute
$value
return LdapTools\Query\Operator\Wildcard

endsWith() public method

Places a wildcard at the beginning of the search term.
public endsWith ( $attribute, $value ) : Wildcard
$attribute
$value
return LdapTools\Query\Operator\Wildcard

eq() public method

An equal-to comparison.
public eq ( $attribute, $value ) : Comparison
$attribute
$value
return LdapTools\Query\Operator\Comparison

getInstance() public static method

Get a FilterBuilder instance based on the connection.
public static getInstance ( LdapTools\Connection\LdapConnectionInterface $connection = null ) : ADFilterBuilder | FilterBuilder
$connection LdapTools\Connection\LdapConnectionInterface
return ADFilterBuilder | FilterBuilder

gt() public method

A greater-than comparison. Since an actual '>' operator does not exist in LDAP, this is a combination of a less-than-or-equal-to operator along with a check if the attribute is set/present. This is encapsulated within a logical 'AND' operator.
public gt ( string $attribute, mixed $value ) : bAnd
$attribute string
$value mixed
return LdapTools\Query\Operator\bAnd

gte() public method

A greater-than-or-equal-to comparison.
public gte ( $attribute, $value ) : Comparison
$attribute
$value
return LdapTools\Query\Operator\Comparison

like() public method

Do not escape wildcard characters in the value, but will escape all other characters. This allows for searches That may need several arbitrarily placed wildcards (ie. sn=Th*m*s)
public like ( $attribute, $value ) : Wildcard
$attribute
$value
return LdapTools\Query\Operator\Wildcard

lt() public method

A less-than comparison. Since an actual '<' operator does not exist in LDAP, this is a combination of a greater-than-or-equal-to operator along with a check if the attribute is set/present. This is encapsulated within a logical 'AND' operator.
public lt ( string $attribute, mixed $value ) : bAnd
$attribute string
$value mixed
return LdapTools\Query\Operator\bAnd

lte() public method

A less-than-or-equal-to comparison.
public lte ( $attribute, $value ) : Comparison
$attribute
$value
return LdapTools\Query\Operator\Comparison

neq() public method

A convenience method for a not-equal-to comparison.
public neq ( $attribute, $value ) : bNot
$attribute
$value
return LdapTools\Query\Operator\bNot

notPresent() public method

Convenience method to check for the non-existence of an attribute.
public notPresent ( $attribute ) : bNot
$attribute
return LdapTools\Query\Operator\bNot

present() public method

Checks for the existence of an attribute.
public present ( $attribute ) : Wildcard
$attribute
return LdapTools\Query\Operator\Wildcard

startsWith() public method

Places a wildcard at the end of the search term.
public startsWith ( $attribute, $value ) : Wildcard
$attribute
$value
return LdapTools\Query\Operator\Wildcard