Function Hook_task_index_download->run
Definitions
sources/hooks/systems/tasks/index_download.php
- Run the task hook.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $id | AUTO_LINK | No | No | required parameter | N/A | N/A | The download ID |
| $url | URLPATH | No | No | required parameter | N/A | N/A | The download file URL |
| $original_filename | ID_TEXT | No | No | required parameter | N/A | N/A | The download filename |
Returns
- A tuple of at least 2: Return mime-type, content (either Tempcode, or a string, or a filename and file-path pair to a temporary file), map of HTTP headers if transferring immediately, map of ini_set commands if transferring immediately (null: show standard success message)
- Type: ?array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Run the task hook.
*
* @param AUTO_LINK $id The download ID
* @param URLPATH $url The download file URL
* @param ID_TEXT $original_filename The download filename
* @return ?array A tuple of at least 2: Return mime-type, content (either Tempcode, or a string, or a filename and file-path pair to a temporary file), map of HTTP headers if transferring immediately, map of ini_set commands if transferring immediately (null: show standard success message)
*/
public function run(int $id, string $url, string $original_filename) : ?array
* Run the task hook.
*
* @param AUTO_LINK $id The download ID
* @param URLPATH $url The download file URL
* @param ID_TEXT $original_filename The download filename
* @return ?array A tuple of at least 2: Return mime-type, content (either Tempcode, or a string, or a filename and file-path pair to a temporary file), map of HTTP headers if transferring immediately, map of ini_set commands if transferring immediately (null: show standard success message)
*/
public function run(int $id, string $url, string $original_filename) : ?array

