| @@ 254-270 (lines=17) @@ | ||
| 251 | * @param array $options |
|
| 252 | * @return API\CreateItemResponseType |
|
| 253 | */ |
|
| 254 | public function createItems($items, $options = array()) |
|
| 255 | { |
|
| 256 | if (!is_array($items)) { |
|
| 257 | $items = array($items); |
|
| 258 | } |
|
| 259 | ||
| 260 | $request = array( |
|
| 261 | 'Items' => $items |
|
| 262 | ); |
|
| 263 | ||
| 264 | $request = array_replace_recursive($request, $options); |
|
| 265 | $request = Type::buildFromArray($request); |
|
| 266 | ||
| 267 | $response = $this->getClient()->CreateItem($request); |
|
| 268 | ||
| 269 | return $response; |
|
| 270 | } |
|
| 271 | ||
| 272 | public function updateItems($items, $options = array()) |
|
| 273 | { |
|
| @@ 550-568 (lines=19) @@ | ||
| 547 | return $response; |
|
| 548 | } |
|
| 549 | ||
| 550 | public function getServerTimezones($timezoneIDs = array(), $fullTimezoneData = false) |
|
| 551 | { |
|
| 552 | $request = GetServerTimeZonesType::buildFromArray(array( |
|
| 553 | 'returnFullTimeZoneData' => $fullTimezoneData |
|
| 554 | )); |
|
| 555 | ||
| 556 | if (!empty($timezoneIDs)) { |
|
| 557 | $request->setIds($timezoneIDs); |
|
| 558 | } |
|
| 559 | ||
| 560 | $timezones = $this->getClient()->GetServerTimeZones($request); |
|
| 561 | $timezones = $timezones->TimeZoneDefinition; |
|
| 562 | ||
| 563 | if (!is_array($timezones)) { |
|
| 564 | $timezones = array($timezones); |
|
| 565 | } |
|
| 566 | ||
| 567 | return $timezones; |
|
| 568 | } |
|
| 569 | ||
| 570 | /** |
|
| 571 | * @param Type\ItemIdType $itemId |
|