Simple_Timer
final class Simple_Timer extends Timer
A Timer instance that bases it's run times off of even intervals from a specified start times. It can also return how many missed intervals a Timer may potentially have.
Properties
| protected Action[] | $Actions | from Timer | |
| protected array | $actions_data | from Timer | |
| string | $id | from Timer | |
| int | $last_run | from Timer | |
| array | $timer_created | from Timer | |
| array | $timer_type | from Timer | |
| int | $multiplier | ||
| string | $interval |
Methods
The inherited abstract function for printing the output for the Form Builder.
Return the \DateTime instance that represents the next time the Interval Timer is supposed to be run.
Get the Timer name.
Get the Timer type ID.
The inherited abstract for exporting the properties created by this class.
The inherited abstract for printing Timer info.
Construct the Interval Timer.
Check if the Timers next run time is past and fire the run function if it is.
Add an Action to the Timer instance, optionally update the Action and { $this->action_data } if it already exists.
Return an Action instance from this Timer, if it exists, else return NULL.
Check whether an action exists in { $this->action_data }.
A wrapper function for \WPPF\v1_2_2\Plugin\Action_Scheduler\Timer_Manager::update_timer().
Attempt to create a Timer super class instance using the 'timer_class' property associated with the Timer.
Get the interval types.
Get the value in seconds of the interval type of this Interval Timer.
Details
at line 108
final static
print_form(string $group)
The inherited abstract function for printing the output for the Form Builder.
at line 117
final DateTime
get_next_run()
Return the \DateTime instance that represents the next time the Interval Timer is supposed to be run.
at line 60
final static string
timer_label()
Get the Timer name.
at line 67
final static string
timer_type_id()
Get the Timer type ID.
at line 143
final protected array
export_array()
The inherited abstract for exporting the properties created by this class.
at line 162
final
print_info()
The inherited abstract for printing Timer info.
at line 75
__construct(string $timer_id, array $options)
Construct the Interval Timer.
in
Timer at line 174
final
maybe_run_timer()
Check if the Timers next run time is past and fire the run function if it is.
in
Timer at line 206
final bool
add_action(Action $Action, bool $update = false)
Add an Action to the Timer instance, optionally update the Action and { $this->action_data } if it already exists.
in
Timer at line 223
final null|Action
get_action(string $action_id)
Return an Action instance from this Timer, if it exists, else return NULL.
in
Timer at line 238
final bool
has_action(string $action_id)
Check whether an action exists in { $this->action_data }.
in
Timer at line 249
final bool
save(bool $merge = false)
A wrapper function for \WPPF\v1_2_2\Plugin\Action_Scheduler\Timer_Manager::update_timer().
in
Timer at line 268
final
merge_actions(Timer $Timer)
Merge Actions from another Timer instance into this instance.
in
Timer at line 279
final array
to_array()
Convert this object into an array for export/import.
in
Timer at line 303
final static null|Timer
instantiate_timer(string $timer_id, array $timer_options)
Attempt to create a Timer super class instance using the 'timer_class' property associated with the Timer.
at line 53
final static array
get_interval_types()
Get the interval types.
at line 134
final int
get_interval_value()
Get the value in seconds of the interval type of this Interval Timer.