@@ 124-143 (lines=20) @@ | ||
121 | * |
|
122 | * @return array|null |
|
123 | */ |
|
124 | public function getTemplateList() |
|
125 | { |
|
126 | $ret = null; |
|
127 | ||
128 | $propertyMap = new TemplateListPropertyMap(); |
|
129 | ||
130 | $records = $this->get('/templates/list'); |
|
131 | ||
132 | if (is_array($records) && count($records) > 0) { |
|
133 | $ret = $this->buildPropertyMapArray($records, $propertyMap); |
|
134 | array_walk($ret, function (&$record) { |
|
135 | $key = 'modified'; |
|
136 | if (isset($record[$key])) { |
|
137 | $record[$key] = StaticFilter::execute($record[$key], 'DateTimeToTimestamp'); |
|
138 | } |
|
139 | }); |
|
140 | } |
|
141 | ||
142 | return $ret; |
|
143 | } |
|
144 | ||
145 | /** |
|
146 | * Return the number of pages in a template in template storage |
|
@@ 208-225 (lines=18) @@ | ||
205 | * |
|
206 | * @return array|null |
|
207 | */ |
|
208 | public function getAccountSettings() |
|
209 | { |
|
210 | $ret = null; |
|
211 | ||
212 | $propertyMap = new AccountSettingsPropertyMap(); |
|
213 | ||
214 | $records = $this->get('/account/settings'); |
|
215 | ||
216 | if (is_array($records) && count($records) > 0) { |
|
217 | $ret = $this->buildPropertyMapArray($records, $propertyMap); |
|
218 | $key = 'valid_until'; |
|
219 | if ($ret[$key]) { |
|
220 | $ret[$key] = StaticFilter::execute($ret[$key], 'DateTimeToTimestamp'); |
|
221 | } |
|
222 | } |
|
223 | ||
224 | return $ret; |
|
225 | } |
|
226 | ||
227 | /** |
|
228 | * Download the binary data of a template from template storage |