src/DataDefinition/ModelRelationship/FilterBuilder.php
public static function getBuilderFromArray($filter, $builder)
    {
        switch ($filter['operation']) {
            case 'AND':
                return AndFilterBuilder::fromArray($filter, $builder);
            case 'OR':
                return OrFilterBuilder::fromArray($filter, $builder);
            case '=':
                return PropertyEqualsFilterBuilder::fromArray($filter);
            case '>':
                return PropertyGreaterThanFilterBuilder::fromArray($filter);
            case '<':
                return PropertyLessThanFilterBuilder::fromArray($filter);
            case 'IN':
                return PropertyValueInFilterBuilder::fromArray($filter);
            case 'LIKE':
                return PropertyValueLikeFilterBuilder::fromArray($filter);
            default:
        }

        throw new DcGeneralInvalidArgumentException(
            'Invalid operation ' . $filter['operation'] . ' it must be one of: AND, OR, =, >, <, IN, LIKE'
        );
    }
public static function getBuilderFromArray($filter, $builder)
    {
        switch ($filter['operation']) {
            case 'AND':
                return AndFilterBuilder::fromArray($filter, $builder);
            case 'OR':
                return OrFilterBuilder::fromArray($filter, $builder);
            case '=':
                return PropertyEqualsFilterBuilder::fromArray($filter);
            case '>':
                return PropertyGreaterThanFilterBuilder::fromArray($filter);
            case '<':
                return PropertyLessThanFilterBuilder::fromArray($filter);
            case 'IN':
                return PropertyValueInFilterBuilder::fromArray($filter);
            case 'LIKE':
                return PropertyValueLikeFilterBuilder::fromArray($filter);
            default:
        }

        throw new DcGeneralInvalidArgumentException(
            'Invalid operation ' . $filter['operation'] . ' it must be one of: AND, OR, =, >, <, IN, LIKE'
        );
    }
public static function getBuilderFromArray ( $ filter , $ builder ) { switch ( $ filter [ 'operation' ] ) { case 'AND' : return AndFilterBuilder :: fromArray ( $ filter , $ builder ) ; case 'OR' : return OrFilterBuilder :: fromArray ( $ filter , $ builder ) ; case '=' : return PropertyEqualsFilterBuilder :: fromArray ( $ filter ) ; case '>' : return PropertyGreaterThanFilterBuilder :: fromArray ( $ filter ) ; case '<' : return PropertyLessThanFilterBuilder :: fromArray ( $ filter ) ; case 'IN' : return PropertyValueInFilterBuilder :: fromArray ( $ filter ) ; case 'LIKE' : return PropertyValueLikeFilterBuilder :: fromArray ( $ filter ) ; default : } throw new DcGeneralInvalidArgumentException ( 'Invalid operation ' . $ filter [ 'operation' ] . ' it must be one of: AND, OR, =, >, <, IN, LIKE' ) ; }
Instantiate the correct builder class from a given filter array.

@param array         $filter  The filter.
@param FilterBuilder $builder The builder instance.

@return BaseFilterBuilder

@throws DcGeneralInvalidArgumentException When an invalid operation is encountered.
Instantiate the correct builder class from a given filter array .