Menu

## ActionScheduler_Store
in package

ActionScheduler_Store.php : 7

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

#### STATUS_CANCELED

ActionScheduler_Store.php : 12
`public mixed STATUS_CANCELED = 'canceled'`

#### STATUS_COMPLETE

ActionScheduler_Store.php : 8
`public mixed STATUS_COMPLETE = 'complete'`

#### STATUS_FAILED

ActionScheduler_Store.php : 11
`public mixed STATUS_FAILED = 'failed'`

#### STATUS_PENDING

ActionScheduler_Store.php : 9
`public mixed STATUS_PENDING = 'pending'`

#### STATUS_RUNNING

ActionScheduler_Store.php : 10
`public mixed STATUS_RUNNING = 'in-progress'`

### Properties

#### $store

ActionScheduler_Store.php : 15
`private static ActionScheduler_Store $store = NULL`

### Methods

#### action_counts()

ActionScheduler_Store.php : 52

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()

ActionScheduler_Store.php : 57
`public abstract cancel_action(string $action_id) : mixed`

##### Parameters

$action_id : string

##### Return values

mixed —

#### delete_action()

ActionScheduler_Store.php : 62
`public abstract delete_action(string $action_id) : mixed`

##### Parameters

$action_id : string

##### Return values

mixed —

#### fetch_action()

ActionScheduler_Store.php : 32
`public abstract fetch_action(string $action_id) : ActionScheduler_Action`

##### Parameters

$action_id : string

##### Return values

ActionScheduler_Action —

#### find_action()

ActionScheduler_Store.php : 39
`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()

ActionScheduler_Store.php : 129
`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_count()

ActionScheduler_Store.php : 85
`public abstract get_claim_count() : int`

##### Return values

int —

#### get_claim_id()

ActionScheduler_Store.php : 123
`public abstract get_claim_id(string $action_id) : mixed`

##### Parameters

$action_id : string

##### Return values

mixed —

#### get_date()

ActionScheduler_Store.php : 69
`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()

ActionScheduler_Store.php : 117
`public abstract get_status(string $action_id) : string`

##### Parameters

$action_id : string

##### Return values

string —

#### get_status_labels()

ActionScheduler_Store.php : 179
`public get_status_labels() : array<string|int, mixed>`

##### Return values

array<string|int, mixed> —

#### init()

ActionScheduler_Store.php : 189
`public init() : mixed`

##### Return values

mixed —

#### instance()

ActionScheduler_Store.php : 194
`public static instance() : ActionScheduler_Store`

##### Return values

ActionScheduler_Store —

#### log_execution()

ActionScheduler_Store.php : 105
`public abstract log_execution(string $action_id) : mixed`

##### Parameters

$action_id : string

##### Return values

mixed —

#### mark_complete()

ActionScheduler_Store.php : 110
`public abstract mark_complete(string $action_id) : mixed`

##### Parameters

$action_id : string

##### Return values

mixed —

#### mark_failure()

ActionScheduler_Store.php : 100
`public abstract mark_failure(string $action_id) : mixed`

##### Parameters

$action_id : string

##### Return values

mixed —

#### query_actions()

ActionScheduler_Store.php : 45
`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

#### release_claim()

ActionScheduler_Store.php : 90
`public abstract release_claim(ActionScheduler_ActionClaim $claim) : mixed`

##### Parameters

$claim : ActionScheduler_ActionClaim

##### Return values

mixed —

#### save_action()

ActionScheduler_Store.php : 25
`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()

ActionScheduler_Store.php : 80
`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()

ActionScheduler_Store.php : 95
`public abstract unclaim_action(string $action_id) : mixed`

##### Parameters

$action_id : string

##### Return values

mixed —

#### get_local_timezone()

ActionScheduler_Store.php : 208

Get the site's local time.

`protected get_local_timezone() : DateTimeZone`

##### Tags

deprecated
  2.1.0

##### Return values

DateTimeZone —

#### get_scheduled_date_string()

ActionScheduler_Store.php : 149

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()

ActionScheduler_Store.php : 166

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()

ActionScheduler_Store.php : 135
`protected validate_sql_comparator(string $comparison_operator) : string`

##### Parameters

$comparison_operator : string

##### Return values

string —

## Search results