====== DownloadController ======
**Layer:** ''Controller'' · **Source:** ''lib/controller/DownloadController.php:25'' (lines 25–244)
----
class DownloadController extends BaseApp
Handle frontend download requests
======= Docblock Metadata =======
^ Tag ^ Value ^
| ''@category'' | Controller Class |
| ''@author'' | M.Noermoehammad |
| ''@license'' | MIT |
| ''@version'' | 1.0 |
| ''@since'' | Since Release 1.0 |
======= Inheritance =======
^ Relation ^ Type ^ Meaning ^
| extends | [[scriptlog:lib:core:baseapp|''BaseApp'']] | parent class/interface |
======= Constants (0) =======
//None.//
======= Properties (2) =======
^ Visibility ^ Type ^ Name ^ Default ^ Line ^
| ''private'' | ''(untyped)'' | ''$downloadService'' | | 27 |
| ''private'' | ''(untyped)'' | ''$view'' | | 30 |
======= Methods (9) =======
^ Visibility ^ Method ^ Summary ^ Line ^
| public | ''__construct()'' | (undocumented) | 32 |
| protected | ''listItems()'' | List items - not used for downloads | 40 |
| protected | ''insert()'' | Insert - not used for downloads | 48 |
| protected | ''update()'' | Update - not used for downloads | 56 |
| protected | ''remove()'' | Remove - not used for downloads | 64 |
| public | ''download()'' | Handle download request | 74 |
| public | ''getDownloadPage()'' | Get download info page | 147 |
| private | ''getFilePath()'' | Get file path based on media type | 195 |
| private | ''getFileSize()'' | Get formatted file size | 219 |
======== __construct() ========
public function __construct(DownloadService $downloadService)
//lines 32–35 (4)//
^ Parameter ^ Type ^ Default ^ Description ^
| ''$downloadService'' | [[scriptlog:lib:service:downloadservice|''DownloadService'']] | //required// | //none// |
======== listItems() ========
protected function listItems()
//lines 40–43 (4)//
List items - not used for downloads
//Takes no parameters.//
**Returns:** ''(none declared)''
======== insert() ========
protected function insert()
//lines 48–51 (4)//
Insert - not used for downloads
//Takes no parameters.//
**Returns:** ''(none declared)''
======== update() ========
protected function update($id)
//lines 56–59 (4)//
Update - not used for downloads
^ Parameter ^ Type ^ Default ^ Description ^
| ''$id'' | ''(untyped)'' | //required// | //none// |
**Returns:** ''(none declared)''
======== remove() ========
protected function remove($id)
//lines 64–67 (4)//
Remove - not used for downloads
^ Parameter ^ Type ^ Default ^ Description ^
| ''$id'' | ''(untyped)'' | //required// | //none// |
**Returns:** ''(none declared)''
======== download() ========
public function download($identifier)
//lines 74–140 (67)//
Handle download request
^ Parameter ^ Type ^ Default ^ Description ^
| ''$identifier'' | ''(untyped)'' | //required// | //none// |
**Returns:** ''(none declared)''
======== getDownloadPage() ========
public function getDownloadPage($identifier)
//lines 147–187 (41)//
Get download info page
^ Parameter ^ Type ^ Default ^ Description ^
| ''$identifier'' | ''(untyped)'' | //required// | //none// |
**Returns:** ''(none declared)''
======== getFilePath() ========
private function getFilePath($media)
//lines 195–211 (17)//
Get file path based on media type
^ Parameter ^ Type ^ Default ^ Description ^
| ''$media'' | ''(untyped)'' | //required// | //none// |
**Returns:** ''(none declared)'' — string
======== getFileSize() ========
private function getFileSize($media)
//lines 219–243 (25)//
Get formatted file size
^ Parameter ^ Type ^ Default ^ Description ^
| ''$media'' | ''(untyped)'' | //required// | //none// |
**Returns:** ''(none declared)'' — string
======= Imports =======
^ Alias ^ Fully-qualified name ^
| ''BaseApp'' | [[scriptlog:lib:core:baseapp|''Scriptlog\Core\BaseApp'']] |
| ''DownloadService'' | [[scriptlog:lib:service:downloadservice|''Scriptlog\Service\DownloadService'']] |
----
//This page is generated from source by 'tools/gendoc'. Edits will be overwritten.//