src/Charcoal/Source/Filter.php
public function setData(array $data)
    {
        parent::setData($data);

        /** @deprecated */
        if (isset($data['string'])) {
            trigger_error(
                sprintf(
                    'Filter expression option "string" is deprecated in favour of "condition": %s',
                    $data['string']
                ),
                E_USER_DEPRECATED
            );
            $this->setCondition($data['string']);
        }

        /** @deprecated */
        if (isset($data['table_name'])) {
            trigger_error(
                sprintf(
                    'Filter expression option "table_name" is deprecated in favour of "table": %s',
                    $data['table_name']
                ),
                E_USER_DEPRECATED
            );
            $this->setTable($data['table_name']);
        }

        /** @deprecated */
        if (isset($data['val'])) {
            trigger_error(
                sprintf(
                    'Filter expression option "val" is deprecated in favour of "value": %s',
                    $data['val']
                ),
                E_USER_DEPRECATED
            );
            $this->setValue($data['val']);
        }

        /** @deprecated */
        if (isset($data['operand'])) {
            trigger_error(
                sprintf(
                    'Query expression option "operand" is deprecated in favour of "conjunction": %s',
                    $data['operand']
                ),
                E_USER_DEPRECATED
            );
            $this->setConjunction($data['operand']);
        }

        if (isset($data['table'])) {
            $this->setTable($data['table']);
        }

        if (isset($data['property'])) {
            $this->setProperty($data['property']);
        }

        if (isset($data['value'])) {
            $this->setValue($data['value']);
        }

        if (isset($data['function'])) {
            $this->setFunc($data['function']);
        }

        if (isset($data['func'])) {
            $this->setFunc($data['func']);
        }

        if (isset($data['operator'])) {
            $this->setOperator($data['operator']);
        }

        if (isset($data['conjunction'])) {
            $this->setConjunction($data['conjunction']);
        }

        if (isset($data['conditions'])) {
            $this->addFilters($data['conditions']);
        }

        if (isset($data['filters'])) {
            $this->addFilters($data['filters']);
        }

        return $this;
    }
public function setData(array $data)
    {
        parent::setData($data);

        /** @deprecated */
        if (isset($data['string'])) {
            trigger_error(
                sprintf(
                    'Filter expression option "string" is deprecated in favour of "condition": %s',
                    $data['string']
                ),
                E_USER_DEPRECATED
            );
            $this->setCondition($data['string']);
        }

        /** @deprecated */
        if (isset($data['table_name'])) {
            trigger_error(
                sprintf(
                    'Filter expression option "table_name" is deprecated in favour of "table": %s',
                    $data['table_name']
                ),
                E_USER_DEPRECATED
            );
            $this->setTable($data['table_name']);
        }

        /** @deprecated */
        if (isset($data['val'])) {
            trigger_error(
                sprintf(
                    'Filter expression option "val" is deprecated in favour of "value": %s',
                    $data['val']
                ),
                E_USER_DEPRECATED
            );
            $this->setValue($data['val']);
        }

        /** @deprecated */
        if (isset($data['operand'])) {
            trigger_error(
                sprintf(
                    'Query expression option "operand" is deprecated in favour of "conjunction": %s',
                    $data['operand']
                ),
                E_USER_DEPRECATED
            );
            $this->setConjunction($data['operand']);
        }

        if (isset($data['table'])) {
            $this->setTable($data['table']);
        }

        if (isset($data['property'])) {
            $this->setProperty($data['property']);
        }

        if (isset($data['value'])) {
            $this->setValue($data['value']);
        }

        if (isset($data['function'])) {
            $this->setFunc($data['function']);
        }

        if (isset($data['func'])) {
            $this->setFunc($data['func']);
        }

        if (isset($data['operator'])) {
            $this->setOperator($data['operator']);
        }

        if (isset($data['conjunction'])) {
            $this->setConjunction($data['conjunction']);
        }

        if (isset($data['conditions'])) {
            $this->addFilters($data['conditions']);
        }

        if (isset($data['filters'])) {
            $this->addFilters($data['filters']);
        }

        return $this;
    }
public function setData ( array $ data ) { parent :: setData ( $ data ) ; /** @deprecated */ if ( isset ( $ data [ 'string' ] ) ) { trigger_error ( sprintf ( 'Filter expression option "string" is deprecated in favour of "condition": %s' , $ data [ 'string' ] ) , E_USER_DEPRECATED ) ; $ this -> setCondition ( $ data [ 'string' ] ) ; } /** @deprecated */ if ( isset ( $ data [ 'table_name' ] ) ) { trigger_error ( sprintf ( 'Filter expression option "table_name" is deprecated in favour of "table": %s' , $ data [ 'table_name' ] ) , E_USER_DEPRECATED ) ; $ this -> setTable ( $ data [ 'table_name' ] ) ; } /** @deprecated */ if ( isset ( $ data [ 'val' ] ) ) { trigger_error ( sprintf ( 'Filter expression option "val" is deprecated in favour of "value": %s' , $ data [ 'val' ] ) , E_USER_DEPRECATED ) ; $ this -> setValue ( $ data [ 'val' ] ) ; } /** @deprecated */ if ( isset ( $ data [ 'operand' ] ) ) { trigger_error ( sprintf ( 'Query expression option "operand" is deprecated in favour of "conjunction": %s' , $ data [ 'operand' ] ) , E_USER_DEPRECATED ) ; $ this -> setConjunction ( $ data [ 'operand' ] ) ; } if ( isset ( $ data [ 'table' ] ) ) { $ this -> setTable ( $ data [ 'table' ] ) ; } if ( isset ( $ data [ 'property' ] ) ) { $ this -> setProperty ( $ data [ 'property' ] ) ; } if ( isset ( $ data [ 'value' ] ) ) { $ this -> setValue ( $ data [ 'value' ] ) ; } if ( isset ( $ data [ 'function' ] ) ) { $ this -> setFunc ( $ data [ 'function' ] ) ; } if ( isset ( $ data [ 'func' ] ) ) { $ this -> setFunc ( $ data [ 'func' ] ) ; } if ( isset ( $ data [ 'operator' ] ) ) { $ this -> setOperator ( $ data [ 'operator' ] ) ; } if ( isset ( $ data [ 'conjunction' ] ) ) { $ this -> setConjunction ( $ data [ 'conjunction' ] ) ; } if ( isset ( $ data [ 'conditions' ] ) ) { $ this -> addFilters ( $ data [ 'conditions' ] ) ; } if ( isset ( $ data [ 'filters' ] ) ) { $ this -> addFilters ( $ data [ 'filters' ] ) ; } return $ this ; }
Set the filter clause data.

@param  array<string,mixed> $data The expression data;
as an associative array.
@return self
Set the filter clause data .