LdapTools\Query\Builder\FilterBuilder::eq PHP Method

eq() public method

An equal-to comparison.
public eq ( $attribute, $value ) : Comparison
$attribute
$value
return LdapTools\Query\Operator\Comparison
    public function eq($attribute, $value)
    {
        return new Comparison($attribute, Comparison::EQ, $value);
    }

Usage Example

 /**
  * @param bool $value
  * @return \LdapTools\Query\Operator\BaseOperator
  */
 protected function getQueryOperator($value)
 {
     $fb = new FilterBuilder();
     if ($value) {
         $operator = $fb->bAnd($fb->gte('accountExpires', '1'), $fb->lte('accountExpires', '9223372036854775806'));
     } else {
         $operator = $fb->bOr($fb->eq('accountExpires', '0'), $fb->eq('accountExpires', self::NEVER_EXPIRES));
     }
     return $operator;
 }
All Usage Examples Of LdapTools\Query\Builder\FilterBuilder::eq