Initial Version

This commit is contained in:
root
2025-12-21 10:09:54 -05:00
commit 4ae6befc7b
422 changed files with 47225 additions and 0 deletions

View File

@@ -0,0 +1,81 @@
<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace KTXF\Chrono\Service;
use KTXF\Chrono\Entity\IEntityMutable;
interface IServiceEntityMutable extends IServiceBase {
public const CAPABILITY_ENTITY_CREATE = 'EntityCreate';
public const CAPABILITY_ENTITY_MODIFY = 'EntityModify';
public const CAPABILITY_ENTITY_DESTROY = 'EntityDestroy';
public const CAPABILITY_ENTITY_COPY = 'EntityCopy';
public const CAPABILITY_ENTITY_MOVE = 'EntityMove';
/**
* Creates a fresh entity of the specified type
*
* @since 2025.05.01
*
* @return IEntityMutable
*/
public function entityFresh(): IEntityMutable;
/**
* Creates a new entity in the specified collection
*
* @since 2025.05.01
*
* @param string $collection The collection to create this entity in
* @param IEntityMutable $entity The entity to create
* @param array $options Additional options for the entity creation
*
* @return IEntityMutable
*
* @throws \KTXF\Resource\Exceptions\InvalidArgumentException
* @throws \KTXF\Resource\Exceptions\UnsupportedException
* @throws \KTXF\Resource\Exceptions\UnauthorizedException
*/
public function entityCreate(string|int $collection, IEntityMutable $entity, array $options): IEntityMutable;
/**
* Modifies an existing entity in the specified collection
*
* @since 2025.05.01
*
* @param string $collection The collection containing the entity to modify
* @param string $identifier The ID of the entity to modify
* @param IEntityMutable $entity The entity with modifications
*
* @return IEntityMutable
*
* @throws \KTXF\Resource\Exceptions\InvalidArgumentException
* @throws \KTXF\Resource\Exceptions\UnsupportedException
* @throws \KTXF\Resource\Exceptions\UnauthorizedException
*/
public function entityModify(string|int $collection, string|int $identifier, IEntityMutable $entity): IEntityMutable;
/**
* Destroys an existing entity in the specified collection
*
* @since 2025.05.01
*
* @param string $collection The collection containing the entity to destroy
* @param string $identifier The ID of the entity to destroy
*
* @return IEntityMutable
*
* @throws \KTXF\Resource\Exceptions\InvalidArgumentException
* @throws \KTXF\Resource\Exceptions\UnsupportedException
* @throws \KTXF\Resource\Exceptions\UnauthorizedException
*/
public function entityDestroy(string|int $collection, string|int $identifier): IEntityMutable;
}