1 | <?php |
||
11 | abstract class AbstractStore extends Base |
||
12 | { |
||
13 | /** |
||
14 | * @var array The values of the primary key of the last inserted data. |
||
15 | */ |
||
16 | protected $insertedIds = []; |
||
17 | |||
18 | |||
19 | /** |
||
20 | * Get the primary keys of the records inserted in the last call to store. |
||
21 | * |
||
22 | * @return array The primary keys. |
||
23 | */ |
||
24 | public function insertedRecords() |
||
28 | |||
29 | |||
30 | /** |
||
31 | * Convert a date from a specific format into ISO date format of YYYY-MM-DD. |
||
32 | * |
||
33 | * @static |
||
34 | * |
||
35 | * @param string $format The format to convert from. |
||
36 | * @param string $dateToConvert The date to convert. |
||
37 | * |
||
38 | * @return string The formatted date. |
||
39 | * |
||
40 | * @throws \Exception is the date couldn't be reformatted. |
||
41 | */ |
||
42 | 9 | public static function isoDateFromFormat($format, $dateToConvert) |
|
50 | |||
51 | |||
52 | /** |
||
53 | * Convert a value from being something that passes the FILTER_VALIDATE_BOOLEAN filter to be an actual boolean. |
||
54 | * |
||
55 | * @static |
||
56 | * |
||
57 | * @param mixed $value The value to convert to a boolean. |
||
58 | * |
||
59 | * @return boolean|null The converted value. |
||
60 | */ |
||
61 | 21 | public static function booleanFromFilterBooleans($value) |
|
80 | } |
||
81 |