| @@ 456-467 (lines=12) @@ | ||
| 453 | * |
|
| 454 | * @return array výsledek |
|
| 455 | */ |
|
| 456 | public function saveToFlexiBee($data = null) |
|
| 457 | { |
|
| 458 | if (is_null($data)) { |
|
| 459 | $data = $this->getData(); |
|
| 460 | } |
|
| 461 | ||
| 462 | $jsonizedData = $this->jsonizeData($data); |
|
| 463 | ||
| 464 | curl_setopt($this->curl, CURLOPT_POSTFIELDS, $jsonizedData); |
|
| 465 | ||
| 466 | return $this->performRequest($this->evidence.'.'.$this->format, 'PUT'); |
|
| 467 | } |
|
| 468 | ||
| 469 | /** |
|
| 470 | * Převede data do Json formátu pro FlexiBee. |
|
| @@ 495-504 (lines=10) @@ | ||
| 492 | * |
|
| 493 | * @return array odpověď |
|
| 494 | */ |
|
| 495 | public function insertToFlexiBee($data = null) |
|
| 496 | { |
|
| 497 | if (is_null($data)) { |
|
| 498 | $data = $this->getData(); |
|
| 499 | } |
|
| 500 | $jsonizedData = $this->jsonizeData($data); |
|
| 501 | curl_setopt($this->curl, CURLOPT_POSTFIELDS, $jsonizedData); |
|
| 502 | ||
| 503 | return $this->performRequest($this->evidence.'.'.$this->format, 'PUT'); |
|
| 504 | } |
|
| 505 | ||
| 506 | /** |
|
| 507 | * Test if given record ID exists in FlexiBee. |
|