1 | <?php |
||
7 | class DaysOfWeekStrategy extends AbstractStrategy |
||
8 | { |
||
9 | |||
10 | protected $days = [ |
||
11 | 1 => ['mon', 'monday'], |
||
12 | 2 => ['tue', 'tuesday'], |
||
13 | 3 => ['wed', 'wednesday'], |
||
14 | 4 => ['thu', 'thursday'], |
||
15 | 5 => ['fri', 'friday'], |
||
16 | 6 => ['sat', 'saturday'], |
||
17 | 7 => ['sun', 'sunday'] |
||
18 | ]; |
||
19 | |||
20 | |||
21 | /** |
||
22 | * {@inheritdoc} |
||
23 | */ |
||
24 | public function handle($args = []) |
||
39 | |||
40 | |||
41 | /** |
||
42 | * Get day name |
||
43 | * |
||
44 | * @return array |
||
45 | */ |
||
46 | protected function getDayNames() |
||
50 | |||
51 | |||
52 | /** |
||
53 | * @param array $todayNames |
||
54 | * @param string $matchDay |
||
55 | * |
||
56 | * @return bool |
||
57 | */ |
||
58 | protected function daysMatch($todayNames, $matchDay) |
||
62 | } |
||
63 |