SQL_Model::_dsql PHP Method

_dsql() public method

This will initialize $dsql property if it does not exist yet.
public _dsql ( ) : DB_dsql
return DB_dsql
    public function _dsql()
    {
        if (!$this->dsql) {
            $this->initQuery();
        }
        return $this->dsql;
    }

Usage Example

Example #1
0
File: Many.php Project: atk4/atk4
 public function restoreConditions()
 {
     if (!$this->model) {
         // adding new model
         if ($this->table_alias) {
             $this->model = $this->add($this->model_name, array('table_alias' => $this->table_alias));
         } else {
             $this->model = $this->add($this->model_name);
         }
         $this->saveConditions();
     }
     /** @type SQL_Model $this->model */
     $this->model->_dsql()->args['where'] = $this->orig_conditions;
     return $this;
 }
All Usage Examples Of SQL_Model::_dsql