yii\mongodb\file\Collection::createDownload PHP Метод

createDownload() публичный Метод

Creates download command.
С версии: 2.1
public createDownload ( array | MongoDB\BSON\ObjectID $document ) : Download
$document array | MongoDB\BSON\ObjectID file document ot be downloaded.
Результат Download file download instance.
    public function createDownload($document)
    {
        $config = ['collection' => $this, 'document' => $document];
        return new Download($config);
    }