forked from php-stubs/woocommerce-stubs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
woocommerce-packages-stubs.php
7254 lines (7253 loc) · 236 KB
/
woocommerce-packages-stubs.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
/**
* Generated stub declarations for WooCommerce.
* @see https://woocommerce.com
* @see https://github.com/tectalic/woocommerce-stubs
*/
namespace {
/**
* Class ActionScheduler_ActionClaim
*/
class ActionScheduler_ActionClaim
{
/** @var string */
private $id = '';
/** @var int[] */
private $action_ids = array();
/**
* Construct.
*
* @param string $id Claim ID.
* @param int[] $action_ids Action IDs.
*/
public function __construct($id, array $action_ids)
{
}
/**
* Get claim ID.
*/
public function get_id()
{
}
/**
* Get IDs of claimed actions.
*/
public function get_actions()
{
}
}
/**
* Class ActionScheduler_ActionFactory
*/
class ActionScheduler_ActionFactory
{
/**
* Return stored actions for given params.
*
* @param string $status The action's status in the data store.
* @param string $hook The hook to trigger when this action runs.
* @param array $args Args to pass to callbacks when the hook is triggered.
* @param ActionScheduler_Schedule $schedule The action's schedule.
* @param string $group A group to put the action in.
* phpcs:ignore Squiz.Commenting.FunctionComment.ExtraParamComment
* @param int $priority The action priority.
*
* @return ActionScheduler_Action An instance of the stored action.
*/
public function get_stored_action($status, $hook, array $args = array(), \ActionScheduler_Schedule $schedule = \null, $group = '')
{
}
/**
* Enqueue an action to run one time, as soon as possible (rather a specific scheduled time).
*
* This method creates a new action using the NullSchedule. In practice, this results in an action scheduled to
* execute "now". Therefore, it will generally run as soon as possible but is not prioritized ahead of other actions
* that are already past-due.
*
* @param string $hook The hook to trigger when this action runs.
* @param array $args Args to pass when the hook is triggered.
* @param string $group A group to put the action in.
*
* @return int The ID of the stored action.
*/
public function async($hook, $args = array(), $group = '')
{
}
/**
* Same as async, but also supports $unique param.
*
* @param string $hook The hook to trigger when this action runs.
* @param array $args Args to pass when the hook is triggered.
* @param string $group A group to put the action in.
* @param bool $unique Whether to ensure the action is unique.
*
* @return int The ID of the stored action.
*/
public function async_unique($hook, $args = array(), $group = '', $unique = \true)
{
}
/**
* Create single action.
*
* @param string $hook The hook to trigger when this action runs.
* @param array $args Args to pass when the hook is triggered.
* @param int $when Unix timestamp when the action will run.
* @param string $group A group to put the action in.
*
* @return int The ID of the stored action.
*/
public function single($hook, $args = array(), $when = \null, $group = '')
{
}
/**
* Create single action only if there is no pending or running action with same name and params.
*
* @param string $hook The hook to trigger when this action runs.
* @param array $args Args to pass when the hook is triggered.
* @param int $when Unix timestamp when the action will run.
* @param string $group A group to put the action in.
* @param bool $unique Whether action scheduled should be unique.
*
* @return int The ID of the stored action.
*/
public function single_unique($hook, $args = array(), $when = \null, $group = '', $unique = \true)
{
}
/**
* Create the first instance of an action recurring on a given interval.
*
* @param string $hook The hook to trigger when this action runs.
* @param array $args Args to pass when the hook is triggered.
* @param int $first Unix timestamp for the first run.
* @param int $interval Seconds between runs.
* @param string $group A group to put the action in.
*
* @return int The ID of the stored action.
*/
public function recurring($hook, $args = array(), $first = \null, $interval = \null, $group = '')
{
}
/**
* Create the first instance of an action recurring on a given interval only if there is no pending or running action with same name and params.
*
* @param string $hook The hook to trigger when this action runs.
* @param array $args Args to pass when the hook is triggered.
* @param int $first Unix timestamp for the first run.
* @param int $interval Seconds between runs.
* @param string $group A group to put the action in.
* @param bool $unique Whether action scheduled should be unique.
*
* @return int The ID of the stored action.
*/
public function recurring_unique($hook, $args = array(), $first = \null, $interval = \null, $group = '', $unique = \true)
{
}
/**
* Create the first instance of an action recurring on a Cron schedule.
*
* @param string $hook The hook to trigger when this action runs.
* @param array $args Args to pass when the hook is triggered.
* @param int $base_timestamp The first instance of the action will be scheduled
* to run at a time calculated after this timestamp matching the cron
* expression. This can be used to delay the first instance of the action.
* @param int $schedule A cron definition string.
* @param string $group A group to put the action in.
*
* @return int The ID of the stored action.
*/
public function cron($hook, $args = array(), $base_timestamp = \null, $schedule = \null, $group = '')
{
}
/**
* Create the first instance of an action recurring on a Cron schedule only if there is no pending or running action with same name and params.
*
* @param string $hook The hook to trigger when this action runs.
* @param array $args Args to pass when the hook is triggered.
* @param int $base_timestamp The first instance of the action will be scheduled
* to run at a time calculated after this timestamp matching the cron
* expression. This can be used to delay the first instance of the action.
* @param int $schedule A cron definition string.
* @param string $group A group to put the action in.
* @param bool $unique Whether action scheduled should be unique.
*
* @return int The ID of the stored action.
**/
public function cron_unique($hook, $args = array(), $base_timestamp = \null, $schedule = \null, $group = '', $unique = \true)
{
}
/**
* Create a successive instance of a recurring or cron action.
*
* Importantly, the action will be rescheduled to run based on the current date/time.
* That means when the action is scheduled to run in the past, the next scheduled date
* will be pushed forward. For example, if a recurring action set to run every hour
* was scheduled to run 5 seconds ago, it will be next scheduled for 1 hour in the
* future, which is 1 hour and 5 seconds from when it was last scheduled to run.
*
* Alternatively, if the action is scheduled to run in the future, and is run early,
* likely via manual intervention, then its schedule will change based on the time now.
* For example, if a recurring action set to run every day, and is run 12 hours early,
* it will run again in 24 hours, not 36 hours.
*
* This slippage is less of an issue with Cron actions, as the specific run time can
* be set for them to run, e.g. 1am each day. In those cases, and entire period would
* need to be missed before there was any change is scheduled, e.g. in the case of an
* action scheduled for 1am each day, the action would need to run an entire day late.
*
* @param ActionScheduler_Action $action The existing action.
*
* @return string The ID of the stored action
* @throws InvalidArgumentException If $action is not a recurring action.
*/
public function repeat($action)
{
}
/**
* Creates a scheduled action.
*
* This general purpose method can be used in place of specific methods such as async(),
* async_unique(), single() or single_unique(), etc.
*
* @internal Not intended for public use, should not be overridden by subclasses.
*
* @param array $options {
* Describes the action we wish to schedule.
*
* @type string $type Must be one of 'async', 'cron', 'recurring', or 'single'.
* @type string $hook The hook to be executed.
* @type array $arguments Arguments to be passed to the callback.
* @type string $group The action group.
* @type bool $unique If the action should be unique.
* @type int $when Timestamp. Indicates when the action, or first instance of the action in the case
* of recurring or cron actions, becomes due.
* @type int|string $pattern Recurrence pattern. This is either an interval in seconds for recurring actions
* or a cron expression for cron actions.
* @type int $priority Lower values means higher priority. Should be in the range 0-255.
* }
*
* @return int The action ID. Zero if there was an error scheduling the action.
*/
public function create(array $options = array())
{
}
/**
* Save action to database.
*
* @param ActionScheduler_Action $action Action object to save.
*
* @return int The ID of the stored action
*/
protected function store(\ActionScheduler_Action $action)
{
}
/**
* Store action if it's unique.
*
* @param ActionScheduler_Action $action Action object to store.
*
* @return int ID of the created action. Will be 0 if action was not created.
*/
protected function store_unique_action(\ActionScheduler_Action $action)
{
}
}
/**
* Class ActionScheduler_AdminView_Deprecated
*
* Store deprecated public functions previously found in the ActionScheduler_AdminView class.
* Keeps them out of the way of the main class.
*
* @codeCoverageIgnore
*/
class ActionScheduler_AdminView_Deprecated
{
public function action_scheduler_post_type_args($args)
{
}
/**
* Customise the post status related views displayed on the Scheduled Actions administration screen.
*
* @param array $views An associative array of views and view labels which can be used to filter the 'scheduled-action' posts displayed on the Scheduled Actions administration screen.
* @return array $views An associative array of views and view labels which can be used to filter the 'scheduled-action' posts displayed on the Scheduled Actions administration screen.
*/
public function list_table_views($views)
{
}
/**
* Do not include the "Edit" action for the Scheduled Actions administration screen.
*
* Hooked to the 'bulk_actions-edit-action-scheduler' filter.
*
* @param array $actions An associative array of actions which can be performed on the 'scheduled-action' post type.
* @return array $actions An associative array of actions which can be performed on the 'scheduled-action' post type.
*/
public function bulk_actions($actions)
{
}
/**
* Completely customer the columns displayed on the Scheduled Actions administration screen.
*
* Because we can't filter the content of the default title and date columns, we need to recreate our own
* custom columns for displaying those post fields. For the column content, @see self::list_table_column_content().
*
* @param array $columns An associative array of columns that are use for the table on the Scheduled Actions administration screen.
* @return array $columns An associative array of columns that are use for the table on the Scheduled Actions administration screen.
*/
public function list_table_columns($columns)
{
}
/**
* Make our custom title & date columns use defaulting title & date sorting.
*
* @param array $columns An associative array of columns that can be used to sort the table on the Scheduled Actions administration screen.
* @return array $columns An associative array of columns that can be used to sort the table on the Scheduled Actions administration screen.
*/
public static function list_table_sortable_columns($columns)
{
}
/**
* Print the content for our custom columns.
*
* @param string $column_name The key for the column for which we should output our content.
* @param int $post_id The ID of the 'scheduled-action' post for which this row relates.
*/
public static function list_table_column_content($column_name, $post_id)
{
}
/**
* Hide the inline "Edit" action for all 'scheduled-action' posts.
*
* Hooked to the 'post_row_actions' filter.
*
* @param array $actions An associative array of actions which can be performed on the 'scheduled-action' post type.
* @return array $actions An associative array of actions which can be performed on the 'scheduled-action' post type.
*/
public static function row_actions($actions, $post)
{
}
/**
* Run an action when triggered from the Action Scheduler administration screen.
*
* @codeCoverageIgnore
*/
public static function maybe_execute_action()
{
}
/**
* Convert an interval of seconds into a two part human friendly string.
*
* The WordPress human_time_diff() function only calculates the time difference to one degree, meaning
* even if an action is 1 day and 11 hours away, it will display "1 day". This function goes one step
* further to display two degrees of accuracy.
*
* Based on Crontrol::interval() function by Edward Dale: https://wordpress.org/plugins/wp-crontrol/
*
* @param int $interval A interval in seconds.
* @return string A human friendly string representation of the interval.
*/
public static function admin_notices()
{
}
/**
* Filter search queries to allow searching by Claim ID (i.e. post_password).
*
* @param string $orderby MySQL orderby string.
* @param WP_Query $query Instance of a WP_Query object
* @return string MySQL orderby string.
*/
public function custom_orderby($orderby, $query)
{
}
/**
* Filter search queries to allow searching by Claim ID (i.e. post_password).
*
* @param string $search MySQL search string.
* @param WP_Query $query Instance of a WP_Query object
* @return string MySQL search string.
*/
public function search_post_password($search, $query)
{
}
/**
* Change messages when a scheduled action is updated.
*
* @param array $messages
* @return array
*/
public function post_updated_messages($messages)
{
}
}
/**
* Class ActionScheduler_AdminView
* @codeCoverageIgnore
*/
class ActionScheduler_AdminView extends \ActionScheduler_AdminView_Deprecated
{
/** @var null|self */
private static $admin_view = \NULL;
/** @var string */
private static $screen_id = 'tools_page_action-scheduler';
/** @var ActionScheduler_ListTable */
protected $list_table;
/**
* @return ActionScheduler_AdminView
* @codeCoverageIgnore
*/
public static function instance()
{
}
/**
* Initialize.
*
* @codeCoverageIgnore
*/
public function init()
{
}
/**
* Print system status report.
*/
public function system_status_report()
{
}
/**
* Registers action-scheduler into WooCommerce > System status.
*
* @param array $tabs An associative array of tab key => label.
* @return array $tabs An associative array of tab key => label, including Action Scheduler's tabs
*/
public function register_system_status_tab(array $tabs)
{
}
/**
* Include Action Scheduler's administration under the Tools menu.
*
* A menu under the Tools menu is important for backward compatibility (as that's
* where it started), and also provides more convenient access than the WooCommerce
* System Status page, and for sites where WooCommerce isn't active.
*/
public function register_menu()
{
}
/**
* Triggers processing of any pending actions.
*/
public function process_admin_ui()
{
}
/**
* Renders the Admin UI
*/
public function render_admin_ui()
{
}
/**
* Get the admin UI object and process any requested actions.
*
* @return ActionScheduler_ListTable
*/
protected function get_list_table()
{
}
/**
* Action: admin_notices
*
* Maybe check past-due actions, and print notice.
*
* @uses $this->check_pastdue_actions()
*/
public function maybe_check_pastdue_actions()
{
}
/**
* Check past-due actions, and print notice.
*
* @todo update $link_url to "Past-due" filter when released (see issue #510, PR #511)
*/
protected function check_pastdue_actions()
{
}
/**
* Provide more information about the screen and its data in the help tab.
*/
public function add_help_tabs()
{
}
}
/**
* Abstract WP_Async_Request class.
*
* @abstract
*/
abstract class WP_Async_Request
{
/**
* Prefix
*
* (default value: 'wp')
*
* @var string
* @access protected
*/
protected $prefix = 'wp';
/**
* Action
*
* (default value: 'async_request')
*
* @var string
* @access protected
*/
protected $action = 'async_request';
/**
* Identifier
*
* @var mixed
* @access protected
*/
protected $identifier;
/**
* Data
*
* (default value: array())
*
* @var array
* @access protected
*/
protected $data = array();
/**
* Initiate new async request
*/
public function __construct()
{
}
/**
* Set data used during the request
*
* @param array $data Data.
*
* @return $this
*/
public function data($data)
{
}
/**
* Dispatch the async request
*
* @return array|WP_Error
*/
public function dispatch()
{
}
/**
* Get query args
*
* @return array
*/
protected function get_query_args()
{
}
/**
* Get query URL
*
* @return string
*/
protected function get_query_url()
{
}
/**
* Get post args
*
* @return array
*/
protected function get_post_args()
{
}
/**
* Maybe handle
*
* Check for correct nonce and pass to handler.
*/
public function maybe_handle()
{
}
/**
* Handle
*
* Override this method to perform any actions required
* during the async request.
*/
protected abstract function handle();
}
/**
* ActionScheduler_AsyncRequest_QueueRunner class.
*/
class ActionScheduler_AsyncRequest_QueueRunner extends \WP_Async_Request
{
/**
* Data store for querying actions
*
* @var ActionScheduler_Store
* @access protected
*/
protected $store;
/**
* Prefix for ajax hooks
*
* @var string
* @access protected
*/
protected $prefix = 'as';
/**
* Action for ajax hooks
*
* @var string
* @access protected
*/
protected $action = 'async_request_queue_runner';
/**
* Initiate new async request.
*
* @param ActionScheduler_Store $store Store object.
*/
public function __construct(\ActionScheduler_Store $store)
{
}
/**
* Handle async requests
*
* Run a queue, and maybe dispatch another async request to run another queue
* if there are still pending actions after completing a queue in this request.
*/
protected function handle()
{
}
/**
* If the async request runner is needed and allowed to run, dispatch a request.
*/
public function maybe_dispatch()
{
}
/**
* Only allow async requests when needed.
*
* Also allow 3rd party code to disable running actions via async requests.
*/
protected function allow()
{
}
/**
* Chaining async requests can crash MySQL. A brief sleep call in PHP prevents that.
*/
protected function get_sleep_seconds()
{
}
}
/**
* Class ActionScheduler_Compatibility
*/
class ActionScheduler_Compatibility
{
/**
* Converts a shorthand byte value to an integer byte value.
*
* Wrapper for wp_convert_hr_to_bytes(), moved to load.php in WordPress 4.6 from media.php
*
* @link https://secure.php.net/manual/en/function.ini-get.php
* @link https://secure.php.net/manual/en/faq.using.php#faq.using.shorthandbytes
*
* @param string $value A (PHP ini) byte value, either shorthand or ordinary.
* @return int An integer byte value.
*/
public static function convert_hr_to_bytes($value)
{
}
/**
* Attempts to raise the PHP memory limit for memory intensive processes.
*
* Only allows raising the existing limit and prevents lowering it.
*
* Wrapper for wp_raise_memory_limit(), added in WordPress v4.6.0
*
* @return bool|int|string The limit that was set or false on failure.
*/
public static function raise_memory_limit()
{
}
/**
* Attempts to raise the PHP timeout for time intensive processes.
*
* Only allows raising the existing limit and prevents lowering it. Wrapper for wc_set_time_limit(), when available.
*
* @param int $limit The time limit in seconds.
*/
public static function raise_time_limit($limit = 0)
{
}
}
/**
* Class ActionScheduler_DataController
*
* The main plugin/initialization class for the data stores.
*
* Responsible for hooking everything up with WordPress.
*
* @package Action_Scheduler
*
* @since 3.0.0
*/
class ActionScheduler_DataController
{
/** Action data store class name. */
const DATASTORE_CLASS = 'ActionScheduler_DBStore';
/** Logger data store class name. */
const LOGGER_CLASS = 'ActionScheduler_DBLogger';
/** Migration status option name. */
const STATUS_FLAG = 'action_scheduler_migration_status';
/** Migration status option value. */
const STATUS_COMPLETE = 'complete';
/** Migration minimum required PHP version. */
const MIN_PHP_VERSION = '5.5';
/** @var ActionScheduler_DataController */
private static $instance;
/** @var int */
private static $sleep_time = 0;
/** @var int */
private static $free_ticks = 50;
/**
* Get a flag indicating whether the migration environment dependencies are met.
*
* @return bool
*/
public static function dependencies_met()
{
}
/**
* Get a flag indicating whether the migration is complete.
*
* @return bool Whether the flag has been set marking the migration as complete
*/
public static function is_migration_complete()
{
}
/**
* Mark the migration as complete.
*/
public static function mark_migration_complete()
{
}
/**
* Unmark migration when a plugin is de-activated. Will not work in case of silent activation, for example in an update.
* We do this to mitigate the bug of lost actions which happens if there was an AS 2.x to AS 3.x migration in the past, but that plugin is now
* deactivated and the site was running on AS 2.x again.
*/
public static function mark_migration_incomplete()
{
}
/**
* Set the action store class name.
*
* @param string $class Classname of the store class.
*
* @return string
*/
public static function set_store_class($class)
{
}
/**
* Set the action logger class name.
*
* @param string $class Classname of the logger class.
*
* @return string
*/
public static function set_logger_class($class)
{
}
/**
* Set the sleep time in seconds.
*
* @param integer $sleep_time The number of seconds to pause before resuming operation.
*/
public static function set_sleep_time($sleep_time)
{
}
/**
* Set the tick count required for freeing memory.
*
* @param integer $free_ticks The number of ticks to free memory on.
*/
public static function set_free_ticks($free_ticks)
{
}
/**
* Free memory if conditions are met.
*
* @param int $ticks Current tick count.
*/
public static function maybe_free_memory($ticks)
{
}
/**
* Reduce memory footprint by clearing the database query and object caches.
*/
public static function free_memory()
{
}
/**
* Connect to table datastores if migration is complete.
* Otherwise, proceed with the migration if the dependencies have been met.
*/
public static function init()
{
}
/**
* Singleton factory.
*/
public static function instance()
{
}
}
/**
* ActionScheduler DateTime class.
*
* This is a custom extension to DateTime that
*/
class ActionScheduler_DateTime extends \DateTime
{
/**
* UTC offset.
*
* Only used when a timezone is not set. When a timezone string is
* used, this will be set to 0.
*
* @var int
*/
protected $utcOffset = 0;
/**
* Get the unix timestamp of the current object.
*
* Missing in PHP 5.2 so just here so it can be supported consistently.
*
* @return int
*/
#[\ReturnTypeWillChange]
public function getTimestamp()
{
}
/**
* Set the UTC offset.
*
* This represents a fixed offset instead of a timezone setting.
*
* @param string|int $offset UTC offset value.
*/
public function setUtcOffset($offset)
{
}
/**
* Returns the timezone offset.
*
* @return int
* @link http://php.net/manual/en/datetime.getoffset.php
*/
#[\ReturnTypeWillChange]
public function getOffset()
{
}
/**
* Set the TimeZone associated with the DateTime
*
* @param DateTimeZone $timezone Timezone object.
*
* @return static
* @link http://php.net/manual/en/datetime.settimezone.php
*/
#[\ReturnTypeWillChange]
public function setTimezone($timezone)
{
}
/**
* Get the timestamp with the WordPress timezone offset added or subtracted.
*
* @since 3.0.0
* @return int
*/
public function getOffsetTimestamp()
{
}
}
/**
* ActionScheduler Exception Interface.
*
* Facilitates catching Exceptions unique to Action Scheduler.
*
* @package ActionScheduler
* @since 2.1.0
*/
interface ActionScheduler_Exception
{
}
/**
* Class ActionScheduler_FatalErrorMonitor
*/
class ActionScheduler_FatalErrorMonitor
{
/** @var ActionScheduler_ActionClaim */
private $claim = \NULL;
/** @var ActionScheduler_Store */
private $store = \NULL;
/** @var int */
private $action_id = 0;
/**
* Construct.
*
* @param ActionScheduler_Store $store Action store.
*/
public function __construct(\ActionScheduler_Store $store)
{
}
/**
* Start monitoring.
*
* @param ActionScheduler_ActionClaim $claim Claimed actions.
*/
public function attach(\ActionScheduler_ActionClaim $claim)
{
}
/**
* Stop monitoring.
*/
public function detach()
{
}
/**
* Track specified action.
*
* @param int $action_id Action ID to track.
*/
public function track_current_action($action_id)
{
}
/**
* Un-track action.
*/
public function untrack_action()
{
}
/**
* Handle unexpected shutdown.
*/
public function handle_unexpected_shutdown()
{
}
}
/**
* InvalidAction Exception.
*
* Used for identifying actions that are invalid in some way.
*
* @package ActionScheduler
*/
class ActionScheduler_InvalidActionException extends \InvalidArgumentException implements \ActionScheduler_Exception
{
/**
* Create a new exception when the action's schedule cannot be fetched.
*
* @param string $action_id The action ID with bad args.
* @param mixed $schedule Passed schedule.
* @return static
*/
public static function from_schedule($action_id, $schedule)
{
}
/**
* Create a new exception when the action's args cannot be decoded to an array.
*
* @author Jeremy Pry
*
* @param string $action_id The action ID with bad args.
* @param mixed $args Passed arguments.
* @return static
*/
public static function from_decoding_args($action_id, $args = array())
{
}
}
/**
* Action Scheduler Abstract List Table class
*
* This abstract class enhances WP_List_Table making it ready to use.
*
* By extending this class we can focus on describing how our table looks like,
* which columns needs to be shown, filter, ordered by and more and forget about the details.
*
* This class supports:
* - Bulk actions
* - Search
* - Sortable columns
* - Automatic translations of the columns
*
* @codeCoverageIgnore
* @since 2.0.0
*/
abstract class ActionScheduler_Abstract_ListTable extends \WP_List_Table
{
/**
* The table name
*