Think/Model/MergeModel.php
protected function _options_filter(&$options)
    {
        if (!isset($options['join'])) {
            $models = $this->modelList;
            array_shift($models);
            foreach ($models as $model) {
                $options['join'][] = $this->joinType.' JOIN '.D($model)->getTableName(
                    ).' '.$model.' ON '.$this->masterModel.'.'.$this->pk.' = '.$model.'.'.$this->fk;
            }
        }
        $options['table'] = D($this->masterModel)->getTableName().' '.$this->masterModel;
        $options['field'] = $this->checkFields(isset($options['field']) ? $options['field'] : '');
        if (isset($options['group'])) {
            $options['group'] = $this->checkGroup($options['group']);
        }
        if (isset($options['where'])) {
            $options['where'] = $this->checkCondition($options['where']);
        }
        if (isset($options['order'])) {
            $options['order'] = $this->checkOrder($options['order']);
        }
    }
protected function _options_filter(&$options)
    {
        if (!isset($options['join'])) {
            $models = $this->modelList;
            array_shift($models);
            foreach ($models as $model) {
                $options['join'][] = $this->joinType.' JOIN '.D($model)->getTableName(
                    ).' '.$model.' ON '.$this->masterModel.'.'.$this->pk.' = '.$model.'.'.$this->fk;
            }
        }
        $options['table'] = D($this->masterModel)->getTableName().' '.$this->masterModel;
        $options['field'] = $this->checkFields(isset($options['field']) ? $options['field'] : '');
        if (isset($options['group'])) {
            $options['group'] = $this->checkGroup($options['group']);
        }
        if (isset($options['where'])) {
            $options['where'] = $this->checkCondition($options['where']);
        }
        if (isset($options['order'])) {
            $options['order'] = $this->checkOrder($options['order']);
        }
    }
表达式过滤方法


@param string $options 表达式

@return void