@@ 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 | 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 |
|
@@ 190-209 (lines=20) @@ | ||
187 | * |
|
188 | * @return array|null |
|
189 | */ |
|
190 | public function getAccountSettings() |
|
191 | { |
|
192 | $ret = null; |
|
193 | ||
194 | $propertyMap = new AccountSettingsPropertyMap(); |
|
195 | ||
196 | $records = $this->get('/account/settings'); |
|
197 | ||
198 | if (is_array($records) && count($records) > 0) { |
|
199 | $ret = $this->buildPropertyMapArray($records, $propertyMap); |
|
200 | array_walk($ret, function (&$record) { |
|
201 | $key = 'valid_until'; |
|
202 | if (isset($record[$key])) { |
|
203 | StaticFilter::execute($record[$key], 'DateTimeToTimestamp'); |
|
204 | } |
|
205 | }); |
|
206 | } |
|
207 | ||
208 | return $ret; |
|
209 | } |
|
210 | ||
211 | /** |
|
212 | * Download the binary data of a template from template storage |