Total Complexity | 3 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | class ProfileFileStream extends \yii\rest\Action |
||
16 | { |
||
17 | /** |
||
18 | * @var string GET parameter to decide if force the download or show it on |
||
19 | * the browser. |
||
20 | */ |
||
21 | public $downloadParam = 'download'; |
||
22 | |||
23 | /** |
||
24 | * @inheritdoc |
||
25 | */ |
||
26 | public function init() |
||
27 | { |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * Shows the file on the browser or download it after checking access. |
||
32 | * |
||
33 | * @param mixed $id the identifier value. |
||
34 | * @param string $ext the requested file extension. |
||
35 | */ |
||
36 | public function run(string $ext) |
||
52 | ] |
||
53 | ); |
||
57 |