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

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

Retrieves the file with given _id.
public get ( mixed $id ) : Download | null
$id mixed _id of the file to find.
Результат Download | null found file, or null if file does not exist
    public function get($id)
    {
        $document = $this->getFileCollection()->findOne(['_id' => $id]);
        if (empty($document)) {
            return null;
        }
        return $this->createDownload($document);
    }