| @@ 278-294 (lines=17) @@ | ||
| 275 | * @param array $options |
|
| 276 | * @return Type |
|
| 277 | */ |
|
| 278 | public function createItems($items, $options = array()) |
|
| 279 | { |
|
| 280 | if (!is_array($items)) { |
|
| 281 | $items = array($items); |
|
| 282 | } |
|
| 283 | ||
| 284 | $request = array( |
|
| 285 | 'Items' => $items |
|
| 286 | ); |
|
| 287 | ||
| 288 | $request = array_replace_recursive($request, $options); |
|
| 289 | $request = Type::buildFromArray($request); |
|
| 290 | ||
| 291 | $response = $this->getClient()->CreateItem($request); |
|
| 292 | ||
| 293 | return $response; |
|
| 294 | } |
|
| 295 | ||
| 296 | public function updateItems($items, $options = array()) |
|
| 297 | { |
|
| @@ 645-663 (lines=19) @@ | ||
| 642 | return $response; |
|
| 643 | } |
|
| 644 | ||
| 645 | public function getServerTimezones($timezoneIDs = array(), $fullTimezoneData = false) |
|
| 646 | { |
|
| 647 | $request = GetServerTimeZonesType::buildFromArray(array( |
|
| 648 | 'returnFullTimeZoneData' => $fullTimezoneData |
|
| 649 | )); |
|
| 650 | ||
| 651 | if (!empty($timezoneIDs)) { |
|
| 652 | $request->setIds($timezoneIDs); |
|
| 653 | } |
|
| 654 | ||
| 655 | $timezones = $this->getClient()->GetServerTimeZones($request); |
|
| 656 | $timezones = $timezones->TimeZoneDefinition; |
|
| 657 | ||
| 658 | if (!is_array($timezones)) { |
|
| 659 | $timezones = array($timezones); |
|
| 660 | } |
|
| 661 | ||
| 662 | return $timezones; |
|
| 663 | } |
|
| 664 | ||
| 665 | /** |
|
| 666 | * @param Type\ItemIdType $itemId |
|