Documentation

WorkerFilesBackendMigrate extends WorkerBase
in package

Base class for worker jobs, which are run via CLI in a separate process

Table of Contents

Properties

$job_name  : mixed
Specify a custom job name by overwriting this
$metric_names  : mixed
Specify up to three metrics
$_new_backend  : FilesBackend
$_new_backend_type  : string
$_old_backend  : FilesBackend
$_old_backend_type  : string
$_options  : array<string|int, mixed>

Methods

__construct()  : mixed
Constructor
getMetricNames()  : array<int, string>
Gets the metric names.
getName()  : string
Gets the job name
run()  : mixed
Do stuff
copyFile()  : mixed
getTransformName()  : int|string|null
Extract a transform name from a filename string, if one exists
prepareFileCopy()  : mixed
updateDatabaseRecords()  : void
Big sweeping change to move all migrated data into active cols

Properties

$job_name

Specify a custom job name by overwriting this

protected mixed $job_name = 'Files Backend Migration'

$metric_names

Specify up to three metrics

protected mixed $metric_names = array(1 => '', 2 => '', 3 => '')

Methods

__construct()

Constructor

public final __construct() : mixed

Manually checks if the method 'run' exists, because it's a varags, so can't use the normal abstract function approach

getMetricNames()

Gets the metric names.

public getMetricNames() : array<int, string>
Tags
inheritdoc
Return values
array<int, string>

getName()

Gets the job name

public getName() : string
Tags
inheritdoc
Return values
string

run()

Do stuff

public run(array<string|int, mixed> $options) : mixed
Parameters
$options : array<string|int, mixed>

getTransformName()

Extract a transform name from a filename string, if one exists

private getTransformName(string $filename) : int|string|null
Parameters
$filename : string
Return values
int|string|null

updateDatabaseRecords()

Big sweeping change to move all migrated data into active cols

private updateDatabaseRecords() : void
On this page

Search results