DeleteFeeds
in package
Use case for deleting feeds and their articles.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- Constructor.
- execute() : array{feeds: int, articles: int}
- Execute the use case.
- executeSingle() : bool
- Delete a single feed.
Properties
$articleRepository
private
ArticleRepositoryInterface
$articleRepository
$feedRepository
private
FeedRepositoryInterface
$feedRepository
Methods
__construct()
Constructor.
public
__construct(FeedRepositoryInterface $feedRepository, ArticleRepositoryInterface $articleRepository) : mixed
Parameters
- $feedRepository : FeedRepositoryInterface
-
Feed repository
- $articleRepository : ArticleRepositoryInterface
-
Article repository
execute()
Execute the use case.
public
execute(array<string|int, int> $feedIds) : array{feeds: int, articles: int}
Parameters
- $feedIds : array<string|int, int>
-
Feed IDs to delete
Return values
array{feeds: int, articles: int} —Counts of deleted items
executeSingle()
Delete a single feed.
public
executeSingle(int $feedId) : bool
Parameters
- $feedId : int
-
Feed ID
Return values
bool —True if deleted, false if not found