refactor: entity move and delete
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -11,6 +11,8 @@ namespace KTXF\Mail\Service;
|
||||
|
||||
use KTXF\Mail\Entity\EntityBaseInterface;
|
||||
use KTXF\Mail\Entity\EntityMutableInterface;
|
||||
use KTXF\Resource\Identifier\CollectionIdentifier;
|
||||
use KTXF\Resource\Identifier\EntityIdentifier;
|
||||
|
||||
/**
|
||||
* Mail Service Entity Mutable Interface
|
||||
@@ -70,7 +72,11 @@ interface ServiceEntityMutableInterface extends ServiceBaseInterface {
|
||||
*
|
||||
* @param EntityIdentifier ...$identifiers Source entities to delete
|
||||
*
|
||||
* @return array<string|int,bool|string> Results keyed by entity identifier (true on success, error string on failure)
|
||||
* @return array<string, array{
|
||||
* disposition: 'moved'|'deleted'|'error',
|
||||
* destination: ?CollectionIdentifier,
|
||||
* mutation: EntityIdentifier
|
||||
* }> Results keyed by source entity identifier
|
||||
*/
|
||||
public function entityDelete(EntityIdentifier ...$identifiers): array;
|
||||
|
||||
@@ -82,7 +88,11 @@ interface ServiceEntityMutableInterface extends ServiceBaseInterface {
|
||||
* @param CollectionIdentifier $target Target collection identifier
|
||||
* @param EntityIdentifier ...$identifiers Source entities to copy
|
||||
*
|
||||
* @return array<string|int,bool> List of copied entity identifiers
|
||||
* @return array<string, array{
|
||||
* disposition: 'copied'|'error',
|
||||
* destination: ?CollectionIdentifier,
|
||||
* mutation: EntityIdentifier
|
||||
* }> Results keyed by source entity identifier
|
||||
*/
|
||||
public function entityCopy(CollectionIdentifier $target, EntityIdentifier ...$identifiers): array;
|
||||
|
||||
@@ -94,7 +104,11 @@ interface ServiceEntityMutableInterface extends ServiceBaseInterface {
|
||||
* @param CollectionIdentifier $target Target collection identifier
|
||||
* @param EntityIdentifier ...$identifiers Source entities to move
|
||||
*
|
||||
* @return array<string|int,bool> List of moved entity identifiers
|
||||
* @return array<string, array{
|
||||
* disposition: 'moved'|'error',
|
||||
* destination: ?CollectionIdentifier,
|
||||
* mutation: EntityIdentifier
|
||||
* }> Results keyed by source entity identifier
|
||||
*/
|
||||
public function entityMove(CollectionIdentifier $target, EntityIdentifier ...$identifiers): array;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user