Function Hook_task_make_backup->run

Definitions

sources/hooks/systems/tasks/make_backup.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
$file string No No required parameter N/A N/A The filename to backup to
$b_type string No No required parameter full incremental N/A The type of backup to do
$max_size integer No No required parameter N/A N/A The maximum size of a file to include in the backup

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  string $file The filename to backup to
 * @param  string $b_type The type of backup to do
 * @set full incremental
 * @param  integer $max_size The maximum size of a file to include in the backup
 * @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(string $file, string $b_type, int $max_size) : ?array