PluginProbe
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell / 2.8.16
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell v2.8.16
3.13.3 3.13.2 3.13.1 3.13.0 3.12.13 3.12.12 3.12.11 3.12.10 3.12.9 3.12.8 3.12.7 3.12.6 3.12.5 3.12.4 3.12.3 3.12.1 3.12.2 3.12.0 3.11.1 3.11.0 3.10.9 3.10.8 3.10.7 3.10.6 2.8.16 All 261 releases
wpfunnels / packages / action-scheduler / classes / actions / ActionScheduler_Action.php

ActionScheduler_Action.php in WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell 2.8.16, at packages/action-scheduler/classes/actions/ActionScheduler_Action.php

78 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Class ActionScheduler_Action
5 */
6 class ActionScheduler_Action {
7 protected $hook = '';
8 protected $args = array();
9 /**
10 * @var ActionScheduler_Schedule
11 */
12 protected $schedule = NULL;
13 protected $group = '';
14
15 public function __construct( $hook, array $args = array(), ActionScheduler_Schedule $schedule = NULL, $group = '' ) {
16 $schedule = empty( $schedule ) ? new ActionScheduler_NullSchedule() : $schedule;
17 $this->set_hook($hook);
18 $this->set_schedule($schedule);
19 $this->set_args($args);
20 $this->set_group($group);
21 }
22
23 public function execute() {
24 return do_action_ref_array( $this->get_hook(), array_values( $this->get_args() ) );
25 }
26
27 /**
28 * @param string $hook
29 */
30 protected function set_hook( $hook ) {
31 $this->hook = $hook;
32 }
33
34 public function get_hook() {
35 return $this->hook;
36 }
37
38 protected function set_schedule( ActionScheduler_Schedule $schedule ) {
39 $this->schedule = $schedule;
40 }
41
42 /**
43 * @return ActionScheduler_Schedule
44 */
45 public function get_schedule() {
46 return $this->schedule;
47 }
48
49 protected function set_args( array $args ) {
50 $this->args = $args;
51 }
52
53 public function get_args() {
54 return $this->args;
55 }
56
57 /**
58 * @param string $group
59 */
60 protected function set_group( $group ) {
61 $this->group = $group;
62 }
63
64 /**
65 * @return string
66 */
67 public function get_group() {
68 return $this->group;
69 }
70
71 /**
72 * @return bool If the action has been finished
73 */
74 public function is_finished() {
75 return FALSE;
76 }
77 }
78