Layer: Handler · Source: lib/handler/DownloadHandler.php:18 (lines 18–70)
class DownloadHandler implements FrontRequestHandler
Renders the download page or handles file download requests.
When the URI contains a “/file” suffix the handler delegates to the DownloadController to stream the file. Otherwise it renders the download information page via the theme renderer.
| Relation | Type | Meaning |
|---|---|---|
| implements | ''FrontRequestHandler'' | contract |
None.
| Visibility | Type | Name | Default | Line |
|---|---|---|---|---|
private | ''ThemeRendererInterface'' | $renderer | 25 | |
private | ''?DownloadController'' | $downloadController | 32 |
| Visibility | Method | Summary | Line |
|---|---|---|---|
| public | __construct() | Construct a new DownloadHandler. | 40 |
| public | handle() | Handle an incoming front-end request. | 51 |
public function __construct(ThemeRendererInterface $renderer, ?DownloadController $downloadController = null)
lines 40–46 (7)
Construct a new DownloadHandler.
| Parameter | Type | Default | Description |
|---|---|---|---|
$renderer | ''ThemeRendererInterface'' | required | The theme renderer instance. |
$downloadController | ''?DownloadController'' | null | Optional controller for file downloads. |
public function handle(array $params): void
lines 51–69 (19)
Documentation inherited from ''Scriptlog\Handler\FrontRequestHandler''.
Handle an incoming front-end request.
Implementations should validate the parameters, check that the requested content exists (if applicable), and render the appropriate theme template via the ThemeRendererInterface instance.
| Parameter | Type | Default | Description |
|---|---|---|---|
$params | array | required | Parsed route parameters (e.g. ['value' ⇒ '…']). |
Returns: void — void
| Alias | Fully-qualified name |
|---|---|
DownloadController | ''Scriptlog\Controller\DownloadController'' |
ThemeRendererInterface | ''Scriptlog\Core\ThemeRendererInterface'' |
This page is generated from source by 'tools/gendoc'. Edits will be overwritten.