| 1 | <?php |
||
| 15 | class FileStream extends 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() |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Shows the file on the browser or download it after checking access. |
||
| 40 | * |
||
| 41 | * @param mixed $id the identifier value. |
||
| 42 | * @param string $ext the requested file extension. |
||
| 43 | */ |
||
| 44 | public function run($id, string $ext) |
||
| 61 | } |
||
| 62 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@returnannotation as described here.