Documentation

ActionScheduler_Store
in package

Class ActionScheduler_Store

Tags
codeCoverageIgnore

Table of Contents

STATUS_CANCELED  = 'canceled'
STATUS_COMPLETE  = 'complete'
STATUS_FAILED  = 'failed'
STATUS_PENDING  = 'pending'
STATUS_RUNNING  = 'in-progress'
$store  : ActionScheduler_Store
action_counts()  : array<string|int, mixed>
Get a count of all actions in the store, grouped by status
cancel_action()  : mixed
delete_action()  : mixed
fetch_action()  : ActionScheduler_Action
find_action()  : string
find_actions_by_claim_id()  : array<string|int, mixed>
get_claim_count()  : int
get_claim_id()  : mixed
get_date()  : DateTime
get_status()  : string
get_status_labels()  : array<string|int, mixed>
init()  : mixed
instance()  : ActionScheduler_Store
log_execution()  : mixed
mark_complete()  : mixed
mark_failure()  : mixed
query_actions()  : array<string|int, mixed>
release_claim()  : mixed
save_action()  : string
stake_claim()  : ActionScheduler_ActionClaim
unclaim_action()  : mixed
get_local_timezone()  : DateTimeZone
Get the site's local time.
get_scheduled_date_string()  : string
Get the time MySQL formated date/time string for an action's (next) scheduled date.
get_scheduled_date_string_local()  : string
Get the time MySQL formated date/time string for an action's (next) scheduled date.
validate_sql_comparator()  : string

Constants

Properties

Methods

action_counts()

Get a count of all actions in the store, grouped by status

public abstract action_counts() : array<string|int, mixed>
Return values
array<string|int, mixed>

cancel_action()

public abstract cancel_action(string $action_id) : mixed
Parameters
$action_id : string
Return values
mixed

delete_action()

public abstract delete_action(string $action_id) : mixed
Parameters
$action_id : string
Return values
mixed

find_action()

public abstract find_action(string $hook[, array<string|int, mixed> $params = array() ]) : string
Parameters
$hook : string
$params : array<string|int, mixed> = array()
Return values
string

ID of the next action matching the criteria

find_actions_by_claim_id()

public abstract find_actions_by_claim_id(string $claim_id) : array<string|int, mixed>
Parameters
$claim_id : string
Return values
array<string|int, mixed>

get_claim_id()

public abstract get_claim_id(string $action_id) : mixed
Parameters
$action_id : string
Return values
mixed

get_date()

public abstract get_date(string $action_id) : DateTime
Parameters
$action_id : string
Return values
DateTime

The date the action is schedule to run, or the date that it ran.

get_status()

public abstract get_status(string $action_id) : string
Parameters
$action_id : string
Return values
string

get_status_labels()

public get_status_labels() : array<string|int, mixed>
Return values
array<string|int, mixed>

log_execution()

public abstract log_execution(string $action_id) : mixed
Parameters
$action_id : string
Return values
mixed

mark_complete()

public abstract mark_complete(string $action_id) : mixed
Parameters
$action_id : string
Return values
mixed

mark_failure()

public abstract mark_failure(string $action_id) : mixed
Parameters
$action_id : string
Return values
mixed

query_actions()

public abstract query_actions([array<string|int, mixed> $query = array() ]) : array<string|int, mixed>
Parameters
$query : array<string|int, mixed> = array()
Return values
array<string|int, mixed>

The IDs of actions matching the query

save_action()

public abstract save_action(ActionScheduler_Action $action[, DateTime $scheduled_date = NULL ]) : string
Parameters
$action : ActionScheduler_Action
$scheduled_date : DateTime = NULL

Optional Date of the first instance to store. Otherwise uses the first date of the action's schedule.

Return values
string

The action ID

stake_claim()

public abstract stake_claim([int $max_actions = 10 ][, DateTime $before_date = null ][, array<string|int, mixed> $hooks = array() ][, string $group = '' ]) : ActionScheduler_ActionClaim
Parameters
$max_actions : int = 10
$before_date : DateTime = null

Claim only actions schedule before the given date. Defaults to now.

$hooks : array<string|int, mixed> = array()

Claim only actions with a hook or hooks.

$group : string = ''

Claim only actions in the given group.

Return values
ActionScheduler_ActionClaim

unclaim_action()

public abstract unclaim_action(string $action_id) : mixed
Parameters
$action_id : string
Return values
mixed

get_local_timezone()

Get the site's local time.

protected get_local_timezone() : DateTimeZone
Tags
deprecated
2.1.0
Return values
DateTimeZone

get_scheduled_date_string()

Get the time MySQL formated date/time string for an action's (next) scheduled date.

protected get_scheduled_date_string(ActionScheduler_Action $action[, DateTime $scheduled_date = NULL ]) : string
Parameters
$action : ActionScheduler_Action
$scheduled_date : DateTime = NULL

(optional)

Return values
string

get_scheduled_date_string_local()

Get the time MySQL formated date/time string for an action's (next) scheduled date.

protected get_scheduled_date_string_local(ActionScheduler_Action $action[, DateTime $scheduled_date = NULL ]) : string
Parameters
$action : ActionScheduler_Action
$scheduled_date : DateTime = NULL

(optional)

Return values
string

validate_sql_comparator()

protected validate_sql_comparator(string $comparison_operator) : string
Parameters
$comparison_operator : string
Return values
string

Search results