Neuron-PHP

MaintenanceJob
in package
implements IJob

AbstractYes

Base class for CMS maintenance jobs.

CMS maintenance jobs are scheduled via config/schedule.yaml and run by the Neuron scheduler. The scheduler instantiates jobs with no constructor arguments ( new $class() ), so jobs resolve their own dependencies from the Registry rather than via dependency injection.

Table of Contents

Interfaces

IJob
Job interface for the Neuron job scheduling system.

Methods

getBasePath()  : string|null
Resolve the application base path from the Registry.
getConnection()  : PDO|null
Build a PDO connection from the application database settings.
getSettings()  : SettingManager|null
Resolve the application SettingManager from the Registry.
intArg()  : int
Read an integer argument with a default fallback.

Methods

getBasePath()

Resolve the application base path from the Registry.

protected getBasePath() : string|null
Return values
string|null

getConnection()

Build a PDO connection from the application database settings.

protected getConnection() : PDO|null
Return values
PDO|null

Null when the connection cannot be established.

intArg()

Read an integer argument with a default fallback.

protected intArg(array<string|int, mixed> $argv, string $key, int $default) : int
Parameters
$argv : array<string|int, mixed>
$key : string
$default : int
Return values
int
On this page

Search results