mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
42 lines
768 B
PHP
42 lines
768 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Shlinkio\Shlink\Rest\Entity;
|
|
|
|
use Shlinkio\Shlink\Common\Entity\AbstractEntity;
|
|
use Shlinkio\Shlink\Rest\ApiKey\Role;
|
|
|
|
class ApiKeyRole extends AbstractEntity
|
|
{
|
|
public function __construct(private Role $roleName, private array $meta, private ApiKey $apiKey)
|
|
{
|
|
}
|
|
|
|
public function role(): Role
|
|
{
|
|
return $this->roleName;
|
|
}
|
|
|
|
/** @deprecated Use role() instead */
|
|
public function name(): Role
|
|
{
|
|
return $this->role();
|
|
}
|
|
|
|
public function meta(): array
|
|
{
|
|
return $this->meta;
|
|
}
|
|
|
|
public function updateMeta(array $newMeta): void
|
|
{
|
|
$this->meta = $newMeta;
|
|
}
|
|
|
|
public function apiKey(): ApiKey
|
|
{
|
|
return $this->apiKey;
|
|
}
|
|
}
|