1 | <?php |
||
9 | abstract class AbstractApi implements IAhgoraApi |
||
10 | { |
||
11 | use Loggable; |
||
12 | |||
13 | protected $datetimeFormat = 'Y-m-d H:i:s'; |
||
14 | |||
15 | /** |
||
16 | * Validate if the given month is valid. |
||
17 | * |
||
18 | * @param int $month |
||
19 | * |
||
20 | * @return bool |
||
21 | */ |
||
22 | protected function isValidMonth($month) |
||
26 | |||
27 | /** |
||
28 | * Validate if the given year is "valid". |
||
29 | * |
||
30 | * @param int $year |
||
31 | * |
||
32 | * @return bool |
||
33 | */ |
||
34 | protected function isValidYear($year) |
||
38 | |||
39 | /** |
||
40 | * Validate if the given period is valid. |
||
41 | * |
||
42 | * @param int $month |
||
43 | * @param int $year |
||
44 | * |
||
45 | * @return bool |
||
46 | */ |
||
47 | protected function isValidPeriod($month, $year) |
||
54 | |||
55 | /** |
||
56 | * Set the Datetime parse format. Default 'Y-m-d H:i:s'. |
||
57 | * |
||
58 | * @param $format |
||
59 | * |
||
60 | * @return $this |
||
61 | */ |
||
62 | public function setDateTimeFormat($format) |
||
68 | } |
||
69 |