Files
server/shared/lib/Resource/Provider/ResourceServiceBaseInterface.php
2026-02-10 17:47:48 -05:00

99 lines
2.2 KiB
PHP

<?php
declare(strict_types=1);
namespace KTXF\Resource\Provider;
use KTXF\Json\JsonSerializable;
interface ResourceServiceBaseInterface extends JsonSerializable {
// JSON Constants
public const JSON_TYPE = 'resource.service';
public const JSON_PROPERTY_TYPE = '@type';
public const JSON_PROPERTY_PROVIDER = 'provider';
public const JSON_PROPERTY_IDENTIFIER = 'identifier';
public const JSON_PROPERTY_LABEL = 'label';
public const JSON_PROPERTY_ENABLED = 'enabled';
public const JSON_PROPERTY_CAPABILITIES = 'capabilities';
public const JSON_PROPERTY_LOCATION = 'location';
public const JSON_PROPERTY_IDENTITY = 'identity';
public const JSON_PROPERTY_AUXILIARY = 'auxiliary';
/**
* Confirms if specific capability is supported
*
* @since 2025.11.01
*
* @param string $value required ability e.g. 'EntityList'
*
* @return bool
*/
public function capable(string $value): bool;
/**
* Lists all supported capabilities
*
* @since 2025.11.01
*
* @return array<string,bool>
*/
public function capabilities(): array;
/**
* Unique identifier of the provider this service belongs to
*
* @since 2025.11.01
*/
public function provider(): string;
/**
* Unique arbitrary text string identifying this service (e.g. 1 or service1 or anything else)
*
* @since 2025.11.01
*/
public function identifier(): string|int;
/**
* Gets the localized human friendly name of this service (e.g. ACME Company File Service)
*
* @since 2025.11.01
*/
public function getLabel(): string|null;
/**
* Gets the active status of this service
*
* @since 2025.11.01
*/
public function getEnabled(): bool;
/**
* Gets the location information of this service
*
* @since 2025.05.01
*
* @return ResourceServiceLocationInterface
*/
public function getLocation(): ResourceServiceLocationInterface;
/**
* Gets the identity information of this service
*
* @since 2025.05.01
*
* @return ResourceServiceIdentityInterface
*/
public function getIdentity(): ResourceServiceIdentityInterface;
/**
* Gets the auxiliary information of this service
*
* @since 2025.05.01
*
* @return array
*/
public function getAuxiliary(): array;
}