DeleteArticles
in package
Use case for deleting articles.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- Constructor.
- execute() : int
- Delete articles by IDs.
- executeByFeed() : int
- Delete all articles for a single feed.
- executeByFeeds() : int
- Delete all articles for specified feeds.
Properties
$articleRepository
private
ArticleRepositoryInterface
$articleRepository
$feedRepository
private
FeedRepositoryInterface
$feedRepository
Methods
__construct()
Constructor.
public
__construct(ArticleRepositoryInterface $articleRepository, FeedRepositoryInterface $feedRepository) : mixed
Parameters
- $articleRepository : ArticleRepositoryInterface
-
Article repository
- $feedRepository : FeedRepositoryInterface
-
Feed repository
execute()
Delete articles by IDs.
public
execute(array<string|int, int> $articleIds) : int
Parameters
- $articleIds : array<string|int, int>
-
Article IDs to delete
Return values
int —Number of deleted articles
executeByFeed()
Delete all articles for a single feed.
public
executeByFeed(int $feedId) : int
Parameters
- $feedId : int
-
Feed ID
Return values
int —Number of deleted articles
executeByFeeds()
Delete all articles for specified feeds.
public
executeByFeeds(array<string|int, int> $feedIds) : int
Parameters
- $feedIds : array<string|int, int>
-
Feed IDs
Return values
int —Number of deleted articles