GetTagById
in package
Use case for retrieving a tag by ID.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- Constructor.
- execute() : Tag|null
- Execute the get tag by ID use case.
- executeAsArray() : array<string|int, mixed>|null
- Get tag as array (backward compatible).
- exists() : bool
- Check if a tag exists.
Properties
$repository
private
TagRepositoryInterface
$repository
Methods
__construct()
Constructor.
public
__construct(TagRepositoryInterface $repository) : mixed
Parameters
- $repository : TagRepositoryInterface
-
Tag repository
execute()
Execute the get tag by ID use case.
public
execute(int $id) : Tag|null
Parameters
- $id : int
-
Tag ID
Return values
Tag|null —Tag entity or null if not found
executeAsArray()
Get tag as array (backward compatible).
public
executeAsArray(int $id) : array<string|int, mixed>|null
Parameters
- $id : int
-
Tag ID
Return values
array<string|int, mixed>|null —Tag data or null if not found
exists()
Check if a tag exists.
public
exists(int $id) : bool
Parameters
- $id : int
-
Tag ID