Files
server/shared/lib/Resource/Identifier/CollectionIdentifier.php
Sebastian Krupinski dfba1d43be
All checks were successful
JS Unit Tests / test (pull_request) Successful in 20s
Build Test / build (pull_request) Successful in 23s
PHP Unit Tests / test (pull_request) Successful in 48s
feat: entity move
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
2026-03-27 20:37:26 -04:00

40 lines
799 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace KTXF\Resource\Identifier;
/**
* Collection-level resource identifier (depth 3)
*
* Format: {provider}:{service}:{collection}
*/
class CollectionIdentifier extends ServiceIdentifier implements CollectionIdentifierInterface {
public function __construct(
string $provider,
string $service,
private readonly string $_collection,
) {
parent::__construct($provider, $service);
}
public function collection(): string {
return $this->_collection;
}
public function depth(): int {
return 3;
}
public function __toString(): string {
return parent::__toString() . self::SEPARATOR . $this->_collection;
}
}