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