mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-13 03:36:28 +09:00
797bc2fd98
git-subtree-dir: includes/lib/action-scheduler git-subtree-split: c828347715e6c3318c8ab8b4fea2d87b31d51aac
36 lines
778 B
PHP
36 lines
778 B
PHP
<?php
|
|
/**
|
|
* ActionScheduler_Mocker
|
|
*/
|
|
|
|
defined( 'ABSPATH' ) || exit;
|
|
|
|
/**
|
|
* ActionScheduler_Mocker class.
|
|
*/
|
|
class ActionScheduler_Mocker {
|
|
|
|
/**
|
|
* Do not run queues via async requests.
|
|
*
|
|
* @param ActionScheduler_Store $store
|
|
*/
|
|
public static function get_queue_runner( ActionScheduler_Store $store = null ) {
|
|
|
|
if ( ! $store ) {
|
|
$store = ActionScheduler_Store::instance();
|
|
}
|
|
|
|
return new ActionScheduler_QueueRunner( $store, null, null, self::get_async_request_queue_runner( $store ) );
|
|
}
|
|
|
|
/**
|
|
* Get an instance of the mock queue runner
|
|
*
|
|
* @param ActionScheduler_Store $store
|
|
*/
|
|
protected static function get_async_request_queue_runner( ActionScheduler_Store $store ) {
|
|
return new ActionScheduler_Mock_AsyncRequest_QueueRunner( $store );
|
|
}
|
|
}
|