Skip to content

Commit

Permalink
ServiceTrait:getRevProxy(): use PredicateTemplate
Browse files Browse the repository at this point in the history
  • Loading branch information
zozlak committed Feb 13, 2024
1 parent 647a3ad commit d4f84e4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/acdhOeaw/arche/lib/disserv/dissemination/ServiceTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public function getLocation(): string {
*/
public function getRevProxy(): bool {
$meta = $this->getMetadata();
$value = $meta->getObject($this->getRepo()->getSchema()->dissService->revProxy)?->getValue() ?? false;
$value = $meta->getObject(new PT($this->getRepo()->getSchema()->dissService->revProxy))?->getValue() ?? false;
return (bool) $value;
}

Expand Down Expand Up @@ -381,9 +381,9 @@ private function loadParameters(): void {
private function getResNmspId(RepoResourceInterface $res, string $namespace,
bool $force): string {
$namespaces = $res->getRepo()->getSchema()->namespaces;
$nmsp = $namespaces->$namespace ?? throw new RepoLibException("namespace '$namespace' is not defined in the config");
$ids = $res->getIds();
$match = null;
$nmsp = $namespaces->$namespace ?? throw new RepoLibException("namespace '$namespace' is not defined in the config");
$ids = $res->getIds();
$match = null;
foreach ($ids as $i) {
if (str_starts_with($i, $nmsp)) {
$otherNmsp = false;
Expand Down

0 comments on commit d4f84e4

Please sign in to comment.