| @@ 230-249 (lines=20) @@ | ||
| 227 | * |
|
| 228 | * @return array|null |
|
| 229 | */ |
|
| 230 | public function getTemplateList() |
|
| 231 | { |
|
| 232 | $ret = null; |
|
| 233 | ||
| 234 | $propertyMap = new TemplateListPropertyMap(); |
|
| 235 | ||
| 236 | $records = $this->get('/templates/list'); |
|
| 237 | ||
| 238 | if (is_array($records) && count($records) > 0) { |
|
| 239 | $ret = $this->buildPropertyMapArray($records, $propertyMap); |
|
| 240 | array_walk($ret, function(&$record) { |
|
| 241 | $key = 'modified'; |
|
| 242 | if (isset($record[$key])) { |
|
| 243 | $record[$key] = StaticFilter::execute($record[$key], 'DateTimeToTimestamp'); |
|
| 244 | } |
|
| 245 | }); |
|
| 246 | } |
|
| 247 | ||
| 248 | return $ret; |
|
| 249 | } |
|
| 250 | ||
| 251 | /** |
|
| 252 | * Return the number of pages in a template in template storage |
|
| @@ 315-332 (lines=18) @@ | ||
| 312 | * @return null |
|
| 313 | * @throws \Zend\Filter\Exception\ExceptionInterface |
|
| 314 | */ |
|
| 315 | public function getAccountSettings() |
|
| 316 | { |
|
| 317 | $ret = null; |
|
| 318 | ||
| 319 | $propertyMap = new AccountSettingsPropertyMap(); |
|
| 320 | ||
| 321 | $records = $this->get('/account/settings'); |
|
| 322 | ||
| 323 | if (is_array($records) && count($records) > 0) { |
|
| 324 | $ret = $this->buildPropertyMapArray($records, $propertyMap); |
|
| 325 | $key = 'valid_until'; |
|
| 326 | if ($ret[$key]) { |
|
| 327 | $ret[$key] = StaticFilter::execute($ret[$key], 'DateTimeToTimestamp'); |
|
| 328 | } |
|
| 329 | } |
|
| 330 | ||
| 331 | return $ret; |
|
| 332 | } |
|
| 333 | ||
| 334 | /** |
|
| 335 | * Download the binary data of a template from template storage |
|