yii\mongodb\file\StreamWrapper::prepareUpload PHP Метод

prepareUpload() приватный Метод

Prepares Upload instance for the write operations.
private prepareUpload ( ) : boolean
Результат boolean success.
    private function prepareUpload()
    {
        $contextOptions = $this->getContextOptions();
        if (isset($contextOptions[$this->protocol]['upload'])) {
            $upload = $contextOptions[$this->protocol]['upload'];
            if (!$upload instanceof Upload) {
                throw new InvalidConfigException('"upload" context option should be an instance of "' . Upload::className() . '"');
            }
            $this->upload = $upload;
            return true;
        }
        $collection = $this->fetchCollection();
        $this->upload = $collection->createUpload(['document' => $this->queryParams]);
        return true;
    }