| @@ 447-458 (lines=12) @@ | ||
| 444 | * |
|
| 445 | * @return array výsledek |
|
| 446 | */ |
|
| 447 | public function saveToFlexiBee($data = null) |
|
| 448 | { |
|
| 449 | if (is_null($data)) { |
|
| 450 | $data = $this->getData(); |
|
| 451 | } |
|
| 452 | ||
| 453 | $jsonizedData = $this->jsonizeData($data); |
|
| 454 | ||
| 455 | curl_setopt($this->curl, CURLOPT_POSTFIELDS, $jsonizedData); |
|
| 456 | ||
| 457 | return $this->performRequest($this->evidence.'.'.$this->format, 'PUT'); |
|
| 458 | } |
|
| 459 | ||
| 460 | /** |
|
| 461 | * Převede data do Json formátu pro FlexiBee. |
|
| @@ 486-495 (lines=10) @@ | ||
| 483 | * |
|
| 484 | * @return array odpověď |
|
| 485 | */ |
|
| 486 | public function insertToFlexiBee($data = null) |
|
| 487 | { |
|
| 488 | if (is_null($data)) { |
|
| 489 | $data = $this->getData(); |
|
| 490 | } |
|
| 491 | $jsonizedData = $this->jsonizeData($data); |
|
| 492 | curl_setopt($this->curl, CURLOPT_POSTFIELDS, $jsonizedData); |
|
| 493 | ||
| 494 | return $this->performRequest($this->evidence.'.'.$this->format, 'PUT'); |
|
| 495 | } |
|
| 496 | ||
| 497 | /** |
|
| 498 | * Test if given record ID exists in FlexiBee. |
|