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