WordRepositoryInterface
in
Describes behavior of the word repository
Table of Contents
Methods
- add() : bool
- Persists a new word entity.
- fetchLatestWord() : Word|null
- Fetches the latest word for today.
Methods
add()
Persists a new word entity.
public
add(Word $word) : bool
Parameters
- $word : Word
-
The word entity to add
Tags
Return values
bool —True if insertion was successful, false otherwise
fetchLatestWord()
Fetches the latest word for today.
public
fetchLatestWord() : Word|null
Returns the word with the most recent fetched_on date matching today's date.
Tags
Return values
Word|null —The latest word for today or null if none exists