lots of improvements
This commit is contained in:
@@ -9,8 +9,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace KTXF\Mail\Service;
|
||||
|
||||
use KTXF\Mail\Collection\ICollectionBase;
|
||||
use KTXF\Mail\Collection\ICollectionMutable;
|
||||
use KTXF\Mail\Collection\CollectionBaseInterface;
|
||||
use KTXF\Mail\Collection\CollectionMutableInterface;
|
||||
|
||||
/**
|
||||
* Mail Service Collection Mutable Interface
|
||||
@@ -32,9 +32,9 @@ interface ServiceCollectionMutableInterface extends ServiceBaseInterface {
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @return ICollectionMutable Fresh collection object
|
||||
* @return CollectionMutableInterface Fresh collection object
|
||||
*/
|
||||
public function collectionFresh(): ICollectionMutable;
|
||||
public function collectionFresh(): CollectionMutableInterface;
|
||||
|
||||
/**
|
||||
* Creates a new collection
|
||||
@@ -42,12 +42,12 @@ interface ServiceCollectionMutableInterface extends ServiceBaseInterface {
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @param string|int|null $location Parent collection ID (null for root)
|
||||
* @param ICollectionMutable $collection Collection to create
|
||||
* @param CollectionMutableInterface $collection Collection to create
|
||||
* @param array $options Protocol-specific options
|
||||
*
|
||||
* @return ICollectionBase Created collection with assigned ID
|
||||
* @return CollectionBaseInterface Created collection with assigned ID
|
||||
*/
|
||||
public function collectionCreate(string|int|null $location, ICollectionMutable $collection, array $options = []): ICollectionBase;
|
||||
public function collectionCreate(string|int|null $location, CollectionMutableInterface $collection, array $options = []): CollectionBaseInterface;
|
||||
|
||||
/**
|
||||
* Modifies an existing collection
|
||||
@@ -55,11 +55,11 @@ interface ServiceCollectionMutableInterface extends ServiceBaseInterface {
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @param string|int $identifier Collection ID
|
||||
* @param ICollectionMutable $collection Updated collection data
|
||||
* @param CollectionMutableInterface $collection Updated collection data
|
||||
*
|
||||
* @return ICollectionBase Modified collection
|
||||
* @return CollectionBaseInterface Modified collection
|
||||
*/
|
||||
public function collectionModify(string|int $identifier, ICollectionMutable $collection): ICollectionBase;
|
||||
public function collectionModify(string|int $identifier, CollectionMutableInterface $collection): CollectionBaseInterface;
|
||||
|
||||
/**
|
||||
* Destroys a collection
|
||||
@@ -67,11 +67,12 @@ interface ServiceCollectionMutableInterface extends ServiceBaseInterface {
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @param string|int $identifier Collection ID
|
||||
* @param bool $recursive Destroy child collections too
|
||||
* @param bool $force Force destruction even if not empty
|
||||
* @param bool $recursive Recursively destroy contents
|
||||
*
|
||||
* @return bool True if destroyed
|
||||
*/
|
||||
public function collectionDestroy(string|int $identifier, bool $recursive = false): bool;
|
||||
public function collectionDestroy(string|int $identifier, bool $force = false, bool $recursive = false): bool;
|
||||
|
||||
/**
|
||||
* Moves a collection to a new parent
|
||||
@@ -81,8 +82,8 @@ interface ServiceCollectionMutableInterface extends ServiceBaseInterface {
|
||||
* @param string|int $identifier Collection ID
|
||||
* @param string|int|null $targetLocation New parent ID (null for root)
|
||||
*
|
||||
* @return ICollectionBase Moved collection
|
||||
* @return CollectionBaseInterface Moved collection
|
||||
*/
|
||||
public function collectionMove(string|int $identifier, string|int|null $targetLocation): ICollectionBase;
|
||||
public function collectionMove(string|int $identifier, string|int|null $targetLocation): CollectionBaseInterface;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user