DoctrineOrmFactory.php
public function createConditionGenerator($query, SearchCondition $searchCondition)
    {
        if ($query instanceof NativeQuery) {
            return new NativeQueryConditionGenerator($query, $searchCondition);
        }

        if ($query instanceof Query || $query instanceof QueryBuilder) {
            return new DqlConditionGenerator($query, $searchCondition);
        }

        throw new \InvalidArgumentException(
            sprintf('Query "%s" is not supported by the DoctrineOrmFactory.', \get_class($query))
        );
    }
public function createConditionGenerator($query, SearchCondition $searchCondition)
    {
        if ($query instanceof NativeQuery) {
            return new NativeQueryConditionGenerator($query, $searchCondition);
        }

        if ($query instanceof Query || $query instanceof QueryBuilder) {
            return new DqlConditionGenerator($query, $searchCondition);
        }

        throw new \InvalidArgumentException(
            sprintf('Query "%s" is not supported by the DoctrineOrmFactory.', \get_class($query))
        );
    }
public function createConditionGenerator ( $ query , SearchCondition $ searchCondition ) { if ( $ query instanceof NativeQuery ) { return new NativeQueryConditionGenerator ( $ query , $ searchCondition ) ; } if ( $ query instanceof Query || $ query instanceof QueryBuilder ) { return new DqlConditionGenerator ( $ query , $ searchCondition ) ; } throw new \ InvalidArgumentException ( sprintf ( 'Query "%s" is not supported by the DoctrineOrmFactory.' , \ get_class ( $ query ) ) ) ; }
Creates a new ConditionGenerator for the SearchCondition.

Conversions are applied using the 'doctrine_dbal_conversion' option (when present).

@param NativeQuery|Query|QueryBuilder $query           Doctrine ORM (Native)Query object
@param SearchCondition                $searchCondition SearchCondition object

@return NativeQueryConditionGenerator|DqlConditionGenerator
Creates a new ConditionGenerator for the SearchCondition .