/var/www/html_uk/wp-content/plugins/automatewoo/includes/Entity/WorkflowTimingScheduled.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
<?php

namespace AutomateWoo\Entity;

/**
 * @class WorkflowTimingScheduled
 * @since 5.1.0
 */
class WorkflowTimingScheduled extends WorkflowTimingDelayed {

    const 
TYPE 'scheduled';

    
/**
     * @var string
     */
    
protected $scheduled_time;

    
/**
     * @var int[] ISO-8601 numeric representation of the day of the week. 1 (for Monday) through 7 (for Sunday).
     */
    
protected $scheduled_days;

    
/**
     * @param int[]  $scheduled_days
     * @param int    $scheduled_hour
     * @param int    $scheduled_minute
     * @param int    $delay_value
     * @param string $delay_unit
     */
    
public function __construct$scheduled_days$scheduled_hour$scheduled_minute$delay_value$delay_unit ) {
        
parent::__construct$delay_value$delay_unit );

        
$this->set_scheduled_time$scheduled_hour$scheduled_minute );
        
$this->set_scheduled_days$scheduled_days );
    }

    
/**
     * @return string
     */
    
public function get_scheduled_time() {
        return 
$this->scheduled_time;
    }

    
/**
     * @param int $hour
     * @param int $minute
     * @return $this
     */
    
public function set_scheduled_time$hour 0$minute ) {
        
$this->scheduled_time sprintf'%02d:%02d'min( (int) $hour23 ), min( (int) $minute59 ) );
        return 
$this;
    }

    
/**
     * @return int[]
     */
    
public function get_scheduled_days() {
        return 
$this->scheduled_days;
    }

    
/**
     * @param int[] $scheduled_days ISO-8601 numeric representation of the day of the week
     * @return $this
     */
    
public function set_scheduled_days$scheduled_days ) {
        
$this->scheduled_days $scheduled_days;
        return 
$this;
    }
}