yii\db\QueryTrait::emulateExecution PHP Method

emulateExecution() public method

After this mode is enabled, methods, returning query results like [[one()]], [[all()]], [[exists()]] and so on, will return empty or false values. You should use this method in case your program logic indicates query should not return any results, like in case you set false where condition like 0=1.
Since: 2.0.11
public emulateExecution ( boolean $value = true )
$value boolean whether to prevent query execution.
    public function emulateExecution($value = true)
    {
        $this->emulateExecution = $value;
        return $this;
    }