| @@ 213-229 (lines=17) @@ | ||
| 210 | * @param array $options |
|
| 211 | * @return API\CreateItemResponseType |
|
| 212 | */ |
|
| 213 | public function createItems($items, $options = array()) |
|
| 214 | { |
|
| 215 | if (!is_array($items)) { |
|
| 216 | $items = array($items); |
|
| 217 | } |
|
| 218 | ||
| 219 | $request = array( |
|
| 220 | 'Items' => $items |
|
| 221 | ); |
|
| 222 | ||
| 223 | $request = array_replace_recursive($request, $options); |
|
| 224 | $request = Type::buildFromArray($request); |
|
| 225 | ||
| 226 | $response = $this->getClient()->CreateItem($request); |
|
| 227 | ||
| 228 | return $response; |
|
| 229 | } |
|
| 230 | ||
| 231 | public function updateItems($items, $options = array()) |
|
| 232 | { |
|
| @@ 492-510 (lines=19) @@ | ||
| 489 | return $response; |
|
| 490 | } |
|
| 491 | ||
| 492 | public function getServerTimezones($timezoneIDs = array(), $fullTimezoneData = false) |
|
| 493 | { |
|
| 494 | $request = GetServerTimeZonesType::buildFromArray(array( |
|
| 495 | 'returnFullTimeZoneData' => $fullTimezoneData |
|
| 496 | )); |
|
| 497 | ||
| 498 | if (!empty($timezoneIDs)) { |
|
| 499 | $request->setIds($timezoneIDs); |
|
| 500 | } |
|
| 501 | ||
| 502 | $timezones = $this->getClient()->GetServerTimeZones($request); |
|
| 503 | $timezones = $timezones->TimeZoneDefinition; |
|
| 504 | ||
| 505 | if (!is_array($timezones)) { |
|
| 506 | $timezones = array($timezones); |
|
| 507 | } |
|
| 508 | ||
| 509 | return $timezones; |
|
| 510 | } |
|
| 511 | } |
|
| 512 | ||