yii\mongodb\file\Collection::createDownload PHP Method

createDownload() public method

Creates download command.
Since: 2.1
public createDownload ( array | MongoDB\BSON\ObjectID $document ) : Download
$document array | MongoDB\BSON\ObjectID file document ot be downloaded.
return Download file download instance.
    public function createDownload($document)
    {
        $config = ['collection' => $this, 'document' => $document];
        return new Download($config);
    }