@@ 35-44 (lines=10) @@ | ||
32 | * @throws ReflectionException |
|
33 | * @since $VID:$ |
|
34 | */ |
|
35 | public function convertAndEncodeArrayOf(array $datetimes) |
|
36 | { |
|
37 | $jsonDates = []; |
|
38 | foreach ($datetimes as $datetime) { |
|
39 | if ($datetime instanceof EE_Datetime) { |
|
40 | $jsonDates[ $datetime->ID() ] = $this->convertAndEncode($datetime); |
|
41 | } |
|
42 | } |
|
43 | return $jsonDates; |
|
44 | } |
|
45 | ||
46 | ||
47 | /** |
|
@@ 125-134 (lines=10) @@ | ||
122 | * @throws ReflectionException |
|
123 | * @since $VID:$ |
|
124 | */ |
|
125 | public function encodeArrayOf(array $datetimes) |
|
126 | { |
|
127 | $jsonDates = []; |
|
128 | foreach ($datetimes as $datetime) { |
|
129 | if ($datetime instanceof EE_Datetime) { |
|
130 | $jsonDates[ $datetime->ID() ] = $this->encode($datetime); |
|
131 | } |
|
132 | } |
|
133 | return $jsonDates; |
|
134 | } |
|
135 | ||
136 | ||
137 | /** |