public function buildMatch($match, &$params)
    {
        if (empty($match)) {
            return '';
        }

        if ($match instanceof Expression) {
            return $this->buildMatchValue($match, $params);
        }

        if (!is_array($match)) {
            return $match;
        }

        if (isset($match[0])) {
            // operator format: operator, operand 1, operand 2, ...
            $operator = strtoupper($match[0]);
            if (isset($this->matchBuilders[$operator])) {
                $method = $this->matchBuilders[$operator];
            } else {
                $method = 'buildSimpleMatch';
            }
            array_shift($match);
            return $this->$method($operator, $match, $params);
        }

        // hash format: 'column1' => 'value1', 'column2' => 'value2', ...
        return $this->buildHashMatch($match, $params);
    }
public function buildMatch($match, &$params)
    {
        if (empty($match)) {
            return '';
        }

        if ($match instanceof Expression) {
            return $this->buildMatchValue($match, $params);
        }

        if (!is_array($match)) {
            return $match;
        }

        if (isset($match[0])) {
            // operator format: operator, operand 1, operand 2, ...
            $operator = strtoupper($match[0]);
            if (isset($this->matchBuilders[$operator])) {
                $method = $this->matchBuilders[$operator];
            } else {
                $method = 'buildSimpleMatch';
            }
            array_shift($match);
            return $this->$method($operator, $match, $params);
        }

        // hash format: 'column1' => 'value1', 'column2' => 'value2', ...
        return $this->buildHashMatch($match, $params);
    }
public function buildMatch ( $ match , & $ params ) { if ( empty ( $ match ) ) { return '' ; } if ( $ match instanceof Expression ) { return $ this -> buildMatchValue ( $ match , $ params ) ; } if ( ! is_array ( $ match ) ) { return $ match ; } if ( isset ( $ match [ 0 ] ) ) { // operator format: operator, operand 1, operand 2, ... $ operator = strtoupper ( $ match [ 0 ] ) ; if ( isset ( $ this -> matchBuilders [ $ operator ] ) ) { $ method = $ this -> matchBuilders [ $ operator ] ; } else { $ method = 'buildSimpleMatch' ; } array_shift ( $ match ) ; return $ this -> $ method ( $ operator , $ match , $ params ) ; } // hash format: 'column1' => 'value1', 'column2' => 'value2', ... return $ this -> buildHashMatch ( $ match , $ params ) ; }
Create MATCH expression.
@param string|array $match MATCH specification.
@param array $params the expression parameters to be populated
@return string the MATCH expression
Create MATCH expression .