src/LdapTools/Query/Operator/BaseOperator.php
public function toLdapFilter($alias = null)
    {
        if ($this->skipFilterForAlias($alias)) {
            return '';
        }
        if ($this->getValueForQuery($alias) instanceof BaseOperator) {
            return $this->getValueForQuery($alias)->toLdapFilter($alias);
        }

        return self::SEPARATOR_START
            .$this->getAttributeToQuery($alias)
            .$this->operatorSymbol
            .LdapUtilities::escapeValue($this->getValueForQuery($alias), null, LDAP_ESCAPE_FILTER)
            .self::SEPARATOR_END;
    }
public function toLdapFilter($alias = null)
    {
        if ($this->skipFilterForAlias($alias)) {
            return '';
        }
        if ($this->getValueForQuery($alias) instanceof BaseOperator) {
            return $this->getValueForQuery($alias)->toLdapFilter($alias);
        }

        return self::SEPARATOR_START
            .$this->getAttributeToQuery($alias)
            .$this->operatorSymbol
            .LdapUtilities::escapeValue($this->getValueForQuery($alias), null, LDAP_ESCAPE_FILTER)
            .self::SEPARATOR_END;
    }
public function toLdapFilter ( $ alias = null ) { if ( $ this -> skipFilterForAlias ( $ alias ) ) { return '' ; } if ( $ this -> getValueForQuery ( $ alias ) instanceof BaseOperator ) { return $ this -> getValueForQuery ( $ alias ) -> toLdapFilter ( $ alias ) ; } return self :: SEPARATOR_START . $ this -> getAttributeToQuery ( $ alias ) . $ this -> operatorSymbol . LdapUtilities :: escapeValue ( $ this -> getValueForQuery ( $ alias ) , null , LDAP_ESCAPE_FILTER ) . self :: SEPARATOR_END ; }
Returns the operator translated to its LDAP filter string value.

@param string|null $alias
@return string
Returns the operator translated to its LDAP filter string value .