Initial Version
This commit is contained in:
69
shared/lib/People/Provider/IProviderServiceMutate.php
Normal file
69
shared/lib/People/Provider/IProviderServiceMutate.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Provider;
|
||||
|
||||
use KTXF\Json\JsonDeserializable;
|
||||
use KTXF\People\Service\IServiceBase;
|
||||
|
||||
interface IProviderServiceMutate extends JsonDeserializable {
|
||||
|
||||
public const CAPABILITY_SERVICE_FRESH = 'ServiceFresh';
|
||||
public const CAPABILITY_SERVICE_CREATE = 'ServiceCreate';
|
||||
public const CAPABILITY_SERVICE_UPDATE = 'ServiceUpdate';
|
||||
public const CAPABILITY_SERVICE_DESTROY = 'ServiceDestroy';
|
||||
|
||||
/**
|
||||
* construct and new blank service instance
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @param string $userId user identifier
|
||||
*
|
||||
* @return IServiceBase
|
||||
*/
|
||||
public function serviceFresh(string $userId = ''): IServiceBase;
|
||||
|
||||
/**
|
||||
* create a service configuration for a specific user
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @param string $userId user identifier
|
||||
* @param IServiceBase $service service instance
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function serviceCreate(string $userId, IServiceBase $service): string;
|
||||
|
||||
/**
|
||||
* modify a service configuration for a specific user
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @param string $userId user identifier
|
||||
* @param IServiceBase $service service instance
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function serviceModify(string $userId, IServiceBase $service): string;
|
||||
|
||||
/**
|
||||
* delete a service configuration for a specific user
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @param string $userId user identifier
|
||||
* @param IServiceBase $service service instance
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function serviceDestroy(string $userId, IServiceBase $service): bool;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user