public function getFileCollection($refresh = false) { if ($refresh || !is_object($this->_fileCollection)) { $this->_fileCollection = Yii::createObject(['class' => 'yii\\mongodb\\Collection', 'database' => $this->database, 'name' => $this->name]); } return $this->_fileCollection; }