f7cloud_client/apps/groupfolders/lib/ACL/UserMapping/UserMapping.php
root 8b6a0139db f7cloud_client
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-17 22:59:26 +00:00

41 lines
813 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2019 F7cloud GmbH and F7cloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\GroupFolders\ACL\UserMapping;
class UserMapping implements IUserMapping {
private readonly string $displayName;
/**
* @param 'user'|'group'|'dummy'|'circle' $type
*/
public function __construct(
private readonly string $type,
private readonly string $id,
?string $displayName = null,
) {
$this->displayName = $displayName ?? $id;
}
public function getType(): string {
return $this->type;
}
public function getId(): string {
return $this->id;
}
public function getDisplayName(): string {
return $this->displayName;
}
public function getKey(): string {
return $this->getType() . ':' . $this->getId();
}
}