GetArticles
in package
Use case for getting articles with status information.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- Constructor.
- execute() : Article, text_id: int|null, archived_id: int|null, status: string}[], total: int}
- Execute the use case for multiple feeds.
- executeForFeed() : Article, text_id: int|null, archived_id: int|null, status: string}[], total: int}
- Get articles for a single feed.
- getById() : Article|null
- Get a single article by ID.
- getByIds() : array<string|int, Article>
- Get multiple articles by IDs.
Properties
$articleRepository
private
ArticleRepositoryInterface
$articleRepository
Methods
__construct()
Constructor.
public
__construct(ArticleRepositoryInterface $articleRepository) : mixed
Parameters
- $articleRepository : ArticleRepositoryInterface
-
Article repository
execute()
Execute the use case for multiple feeds.
public
execute(array<string|int, int> $feedIds[, int $offset = 0 ][, int $limit = 50 ][, string $orderBy = 'FlDate' ][, string $direction = 'DESC' ][, string $search = '' ]) : Article, text_id: int|null, archived_id: int|null, status: string}[], total: int}
Parameters
- $feedIds : array<string|int, int>
-
Feed IDs
- $offset : int = 0
-
Pagination offset
- $limit : int = 50
-
Page size
- $orderBy : string = 'FlDate'
-
Sort column
- $direction : string = 'DESC'
-
Sort direction
- $search : string = ''
-
Search query
Return values
Article, text_id: int|null, archived_id: int|null, status: string}[], total: int}executeForFeed()
Get articles for a single feed.
public
executeForFeed(int $feedId[, int $offset = 0 ][, int $limit = 50 ][, string $orderBy = 'FlDate' ][, string $direction = 'DESC' ][, string $search = '' ]) : Article, text_id: int|null, archived_id: int|null, status: string}[], total: int}
Parameters
- $feedId : int
-
Feed ID
- $offset : int = 0
-
Pagination offset
- $limit : int = 50
-
Page size
- $orderBy : string = 'FlDate'
-
Sort column
- $direction : string = 'DESC'
-
Sort direction
- $search : string = ''
-
Search query
Return values
Article, text_id: int|null, archived_id: int|null, status: string}[], total: int}getById()
Get a single article by ID.
public
getById(int $articleId) : Article|null
Parameters
- $articleId : int
-
Article ID
Return values
Article|null —Article entity or null
getByIds()
Get multiple articles by IDs.
public
getByIds(array<string|int, int> $articleIds) : array<string|int, Article>
Parameters
- $articleIds : array<string|int, int>
-
Article IDs