AfterbuyCronjobTask
extends AbstractCronjobTask
in package
Class AbstractCronjobTask
Table of Contents
- MAX_ORDERS_PER_RUN = 20
- $dependencies : AbstractCronjobDependencies
- $logger : AbstractCronjobLogger
- $name : string
- $schedule : string
- $sortOrder : int
- __construct() : mixed
- AbstractCronjob constructor.
- create() : AbstractCronjobTask
- Named constructor of AbstractCronjob
- getCallback() : Closure
- Returns the cronjob callback.
- getName() : string
- Returns the cronjob name.
- getSchedule() : string
- Returns the cronjob schedule.
- getSortOrder() : int
- Returns the cronjob sort order.
- run() : mixed
- Runs the cronjob callback.
- sendOrdersBackup() : void
- createMessage() : string
- logError() : void
- logInfo() : void
- logNotice() : void
- moduleIsInstalledAndActive() : bool
- syncTrackingLinks() : void
- getOrders() : array<string|int, mixed>
- logSummary() : void
- sendOrders() : void
Constants
MAX_ORDERS_PER_RUN
protected
mixed
MAX_ORDERS_PER_RUN
= 20
Properties
$dependencies
protected
AbstractCronjobDependencies
$dependencies
$logger
protected
AbstractCronjobLogger
$logger
$name
protected
string
$name
$schedule
protected
string
$schedule
$sortOrder
protected
int
$sortOrder
Methods
__construct()
AbstractCronjob constructor.
public
__construct(StringType $schedule, IntType $sortOrder, AbstractCronjobLogger $logger, AbstractCronjobDependencies $dependencies) : mixed
Parameters
- $schedule : StringType
-
Cronjob schedule, can be a cron expression string.
- $sortOrder : IntType
-
Sort order of cronjob execution.
- $logger : AbstractCronjobLogger
-
Logger instance for the cronjob callback.
- $dependencies : AbstractCronjobDependencies
-
Dependencies of cronjob's service.
Return values
mixed —create()
Named constructor of AbstractCronjob
public
static create(string $schedule, int $sortOrder) : AbstractCronjobTask
Parameters
- $schedule : string
-
Cronjob schedule, can be a cron expression string.
- $sortOrder : int
-
Sort order of cronjob execution.
Return values
AbstractCronjobTask —New instance.
getCallback()
Returns the cronjob callback.
public
getCallback(float $cronjobStartAsMicrotime) : Closure
Parameters
- $cronjobStartAsMicrotime : float
Return values
Closure —getName()
Returns the cronjob name.
public
getName() : string
Return values
string —getSchedule()
Returns the cronjob schedule.
public
getSchedule() : string
Return values
string —getSortOrder()
Returns the cronjob sort order.
public
getSortOrder() : int
Return values
int —run()
Runs the cronjob callback.
public
run( $cronjobStartAsMicrotime) : mixed
Parameters
Return values
mixed —sendOrdersBackup()
public
sendOrdersBackup() : void
Return values
void —createMessage()
protected
createMessage(string $message, Throwable $t) : string
Parameters
- $message : string
- $t : Throwable
Return values
string —logError()
protected
logError(string $message) : void
Parameters
- $message : string
Return values
void —logInfo()
protected
logInfo(string $message) : void
Parameters
- $message : string
Return values
void —logNotice()
protected
logNotice(string $message) : void
Parameters
- $message : string
Return values
void —moduleIsInstalledAndActive()
protected
moduleIsInstalledAndActive() : bool
Return values
bool —syncTrackingLinks()
protected
syncTrackingLinks(AfterbuyOrderTrackingLinkService $syncService, string $lastTrackingSyncTime) : void
Parameters
- $syncService : AfterbuyOrderTrackingLinkService
- $lastTrackingSyncTime : string
Return values
void —getOrders()
private
getOrders(GambioAfterbuyConfigurationStorage $configurationStorage, Connection $connection, AfterbuyOrderExportService $orderExportService) : array<string|int, mixed>
Parameters
- $configurationStorage : GambioAfterbuyConfigurationStorage
- $connection : Connection
- $orderExportService : AfterbuyOrderExportService
Return values
array<string|int, mixed> —logSummary()
private
logSummary(array<string|int, mixed> $updatedPaidOrderIds, array<string|int, mixed> $transmittedPaidOrderIds, array<string|int, mixed> $unpaidOrderIds, array<string|int, mixed> $unprocessedOrderIds, array<string|int, mixed> $errors) : void
Parameters
- $updatedPaidOrderIds : array<string|int, mixed>
- $transmittedPaidOrderIds : array<string|int, mixed>
- $unpaidOrderIds : array<string|int, mixed>
- $unprocessedOrderIds : array<string|int, mixed>
- $errors : array<string|int, mixed>
Return values
void —sendOrders()
private
sendOrders() : void