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