src/apis/StorageController.php
public function actionFile($id)
    {
        $model = StorageFile::find()->where(['id' => $id])->one();

        if (!$model) {
            throw new NotFoundHttpException("Unable to find the given storage file.");
        }

        return $model;
    }
public function actionFile($id)
    {
        $model = StorageFile::find()->where(['id' => $id])->one();

        if (!$model) {
            throw new NotFoundHttpException("Unable to find the given storage file.");
        }

        return $model;
    }
public function actionFile ( $ id ) { $ model = StorageFile :: find ( ) -> where ( [ 'id' => $ id ] ) -> one ( ) ; if ( ! $ model ) { throw new NotFoundHttpException ( "Unable to find the given storage file." ) ; } return $ model ; }
Get file model.

This is mainly used for external api access.

@param integer $id
@return StorageFile
@since 1.2.3
Get file model .