src/LdapTools/Query/Builder/FilterBuilder.php
public static function getInstance(LdapConnectionInterface $connection = null)
    {
        if ($connection && $connection->getConfig()->getLdapType() == LdapConnection::TYPE_AD) {
            $filterBuilder = new ADFilterBuilder();
        } else {
            $filterBuilder = new self();
        }
        
        return $filterBuilder;
    }
public static function getInstance(LdapConnectionInterface $connection = null)
    {
        if ($connection && $connection->getConfig()->getLdapType() == LdapConnection::TYPE_AD) {
            $filterBuilder = new ADFilterBuilder();
        } else {
            $filterBuilder = new self();
        }
        
        return $filterBuilder;
    }
public static function getInstance ( LdapConnectionInterface $ connection = null ) { if ( $ connection && $ connection -> getConfig ( ) -> getLdapType ( ) == LdapConnection :: TYPE_AD ) { $ filterBuilder = new ADFilterBuilder ( ) ; } else { $ filterBuilder = new self ( ) ; } return $ filterBuilder ; }
Get a FilterBuilder instance based on the connection.

@param LdapConnectionInterface|null $connection
@return ADFilterBuilder|FilterBuilder
Get a FilterBuilder instance based on the connection .