yii\mongodb\Connection::createCommand PHP Method

createCommand() public method

Creates MongoDB command.
Since: 2.1
public createCommand ( array $document = [], string | null $databaseName = null ) : Command
$document array command document contents.
$databaseName string | null database name, if not set [[defaultDatabaseName]] will be used.
return Command command instance.
    public function createCommand($document = [], $databaseName = null)
    {
        return new Command(['db' => $this, 'databaseName' => $databaseName, 'document' => $document]);
    }