Function __global->call_user_func_array__long_task
Definitions
sources/tasks.php
- Execute a long task, via the task queue.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: object
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $plain_title | string | No | No | required parameter | N/A | N/A | Title to use for completion notification subject lines |
| $title | ?Tempcode | No | No | required parameter | N/A | N/A | Title to use if there is no queueing or a queue message (null: don't return a full screen) |
| $hook | ID_TEXT | No | No | required parameter | N/A | N/A | The task hook |
| $args | array | No | No | [] | N/A | N/A | Arguments for the task |
| $run_at_end_of_script | boolean | No | No | False | N/A | N/A | Whether to run the task at the end of the script (if it's not going to be put into the task queue) |
| $force_immediate | boolean | No | No | False | N/A | N/A | Whether to forcibly bypass the task queue (because we've determined somehow it will be a quick task) |
| $send_notification | boolean | No | No | True | N/A | N/A | Whether to send a notification upon task completion (unless immediate and headers were not yet sent) |
Returns
- UI (function may not return if the task is immediate and doesn't have a text/html result)
- Type: Tempcode
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Execute a long task, via the task queue.
*
* @param string $plain_title Title to use for completion notification subject lines
* @param ?Tempcode $title Title to use if there is no queueing or a queue message (null: don't return a full screen)
* @param ID_TEXT $hook The task hook
* @param array $args Arguments for the task
* @param boolean $run_at_end_of_script Whether to run the task at the end of the script (if it's not going to be put into the task queue)
* @param boolean $force_immediate Whether to forcibly bypass the task queue (because we've determined somehow it will be a quick task)
* @param boolean $send_notification Whether to send a notification upon task completion (unless immediate and headers were not yet sent)
* @return Tempcode UI (function may not return if the task is immediate and doesn't have a text/html result)
*/
function call_user_func_array__long_task(string $plain_title, ?object $title, string $hook, array $args = [], bool $run_at_end_of_script = false, bool $force_immediate = false, bool $send_notification = true) : object
* Execute a long task, via the task queue.
*
* @param string $plain_title Title to use for completion notification subject lines
* @param ?Tempcode $title Title to use if there is no queueing or a queue message (null: don't return a full screen)
* @param ID_TEXT $hook The task hook
* @param array $args Arguments for the task
* @param boolean $run_at_end_of_script Whether to run the task at the end of the script (if it's not going to be put into the task queue)
* @param boolean $force_immediate Whether to forcibly bypass the task queue (because we've determined somehow it will be a quick task)
* @param boolean $send_notification Whether to send a notification upon task completion (unless immediate and headers were not yet sent)
* @return Tempcode UI (function may not return if the task is immediate and doesn't have a text/html result)
*/
function call_user_func_array__long_task(string $plain_title, ?object $title, string $hook, array $args = [], bool $run_at_end_of_script = false, bool $force_immediate = false, bool $send_notification = true) : object

