File "ActionScheduler_Lock.php"
Full path: /home/kosmetik/public_html/wp-content/plugins/woocommerce/packages/action-scheduler/classes/abstracts/ActionScheduler_Lock.php
File
size: 778 B
MIME-type: text/x-php
Charset: utf-8
Download Open Edit Advanced Editor Back
<?php
abstract class ActionScheduler_Lock
{
private static $locker = NULL;
protected static $lock_duration = MINUTE_IN_SECONDS;
public function is_locked($lock_type)
{
return $this->get_expiration($lock_type) >= time();
}
public abstract function set($lock_type);
public abstract function get_expiration($lock_type);
protected function get_duration($lock_type)
{
return apply_filters('action_scheduler_lock_duration', self::$lock_duration, $lock_type);
}
public static function instance()
{
if (empty(self::$locker)) {
$class = apply_filters('action_scheduler_lock_class', 'ActionScheduler_OptionLock');
self::$locker = new $class();
}
return self::$locker;
}
}