← All changes
|
vendor/woocommerce/action-scheduler/classes/ActionScheduler_ActionClaim.php
+24
-2
1.2.0
→
trunk
View file →
| @@ -3,21 +3,43 @@ | ||
| 3 | 3 | /** |
| 4 | 4 | * Class ActionScheduler_ActionClaim |
| 5 | 5 | */ |
| 6 | 6 | class ActionScheduler_ActionClaim { |
| 7 | + /** | |
| 8 | + * Claim ID. | |
| 9 | + * | |
| 10 | + * @var string | |
| 11 | + */ | |
| 7 | 12 | private $id = ''; |
| 13 | + | |
| 14 | + /** | |
| 15 | + * Claimed action IDs. | |
| 16 | + * | |
| 17 | + * @var int[] | |
| 18 | + */ | |
| 8 | 19 | private $action_ids = array(); |
| 9 | 20 | |
| 21 | + /** | |
| 22 | + * Construct. | |
| 23 | + * | |
| 24 | + * @param string $id Claim ID. | |
| 25 | + * @param int[] $action_ids Action IDs. | |
| 26 | + */ | |
| 10 | 27 | public function __construct( $id, array $action_ids ) { |
| 11 | - $this->id = $id; | |
| 28 | + $this->id = $id; | |
| 12 | 29 | $this->action_ids = $action_ids; |
| 13 | 30 | } |
| 14 | 31 | |
| 32 | + /** | |
| 33 | + * Get claim ID. | |
| 34 | + */ | |
| 15 | 35 | public function get_id() { |
| 16 | 36 | return $this->id; |
| 17 | 37 | } |
| 18 | 38 | |
| 39 | + /** | |
| 40 | + * Get IDs of claimed actions. | |
| 41 | + */ | |
| 19 | 42 | public function get_actions() { |
| 20 | 43 | return $this->action_ids; |
| 21 | 44 | } |
| 22 | 45 | } |
| 23 | - | |