| @@ 98-119 (lines=22) @@ | ||
| 95 | * @throws CmisObjectNotFoundException |
|
| 96 | * @return Url |
|
| 97 | */ |
|
| 98 | protected function getObjectUrl($repositoryId, $objectId, $selector = null) |
|
| 99 | { |
|
| 100 | $result = $this->getRepositoryUrlCache()->getObjectUrl($repositoryId, $objectId, $selector); |
|
| 101 | ||
| 102 | if ($result === null) { |
|
| 103 | $this->getRepositoriesInternal($repositoryId); |
|
| 104 | $result = $this->getRepositoryUrlCache()->getObjectUrl($repositoryId, $objectId, $selector); |
|
| 105 | } |
|
| 106 | ||
| 107 | if ($result === null) { |
|
| 108 | throw new CmisObjectNotFoundException( |
|
| 109 | sprintf( |
|
| 110 | 'Unknown Object! Repository: "%s" | Object: "%s" | Selector: "%s"', |
|
| 111 | $repositoryId, |
|
| 112 | $objectId, |
|
| 113 | $selector |
|
| 114 | ) |
|
| 115 | ); |
|
| 116 | } |
|
| 117 | ||
| 118 | return $result; |
|
| 119 | } |
|
| 120 | ||
| 121 | /** |
|
| 122 | * Returns the repository URL cache or creates a new cache if it doesn't |
|
| @@ 372-393 (lines=22) @@ | ||
| 369 | * @throws CmisObjectNotFoundException |
|
| 370 | * @return Url |
|
| 371 | */ |
|
| 372 | protected function getPathUrl($repositoryId, $path, $selector = null) |
|
| 373 | { |
|
| 374 | $result = $this->getRepositoryUrlCache()->getPathUrl($repositoryId, $path, $selector); |
|
| 375 | ||
| 376 | if ($result === null) { |
|
| 377 | $this->getRepositoriesInternal($repositoryId); |
|
| 378 | $result = $this->getRepositoryUrlCache()->getPathUrl($repositoryId, $path, $selector); |
|
| 379 | } |
|
| 380 | ||
| 381 | if ($result === null) { |
|
| 382 | throw new CmisObjectNotFoundException( |
|
| 383 | sprintf( |
|
| 384 | 'Unknown path! Repository: "%s" | Path: "%s" | Selector: "%s"', |
|
| 385 | $repositoryId, |
|
| 386 | $path, |
|
| 387 | $selector |
|
| 388 | ) |
|
| 389 | ); |
|
| 390 | } |
|
| 391 | ||
| 392 | return $result; |
|
| 393 | } |
|
| 394 | ||
| 395 | // ---- URL ---- |
|
| 396 | ||
| @@ 482-502 (lines=21) @@ | ||
| 479 | * @throws CmisObjectNotFoundException |
|
| 480 | * @return Url |
|
| 481 | */ |
|
| 482 | protected function getRepositoryUrl($repositoryId, $selector = null) |
|
| 483 | { |
|
| 484 | $result = $this->getRepositoryUrlCache()->getRepositoryUrl($repositoryId, $selector); |
|
| 485 | ||
| 486 | if ($result === null) { |
|
| 487 | $this->getRepositoriesInternal($repositoryId); |
|
| 488 | $result = $this->getRepositoryUrlCache()->getRepositoryUrl($repositoryId, $selector); |
|
| 489 | } |
|
| 490 | ||
| 491 | if ($result === null) { |
|
| 492 | throw new CmisObjectNotFoundException( |
|
| 493 | sprintf( |
|
| 494 | 'Unknown repository! Repository: "%s" | Selector: "%s"', |
|
| 495 | $repositoryId, |
|
| 496 | $selector |
|
| 497 | ) |
|
| 498 | ); |
|
| 499 | } |
|
| 500 | ||
| 501 | return $result; |
|
| 502 | } |
|
| 503 | ||
| 504 | /** |
|
| 505 | * Converts a Properties list into an array that can be used for the CMIS request. |
|