DoDomuDojade Documentation

PDOWordRepository
in package
implements WordRepositoryInterface

Read onlyYes
Tags
inheritDoc

Table of Contents

Interfaces

WordRepositoryInterface
Describes behavior of the word repository

Properties

$DATE_FORMAT  : string
$dbHelper  : DatabaseService
$TABLE_NAME  : string

Methods

__construct()  : mixed
add()  : bool
Persists a new word entity.
fetchLatestWord()  : Word|null
Fetches the latest word for today.
mapRow()  : Word
Maps database row to Word entity.

Properties

Methods

add()

Persists a new word entity.

public add(Word $word) : bool
Parameters
$word : Word

The word entity to add

Tags
inheritDoc
Return values
bool

True if insertion was successful, false otherwise

fetchLatestWord()

Fetches the latest word for today.

public fetchLatestWord() : Word|null
Tags
inheritDoc
Return values
Word|null

The latest word for today or null if none exists

mapRow()

Maps database row to Word entity.

private mapRow(array<string|int, mixed> $row) : Word
Parameters
$row : array<string|int, mixed>
Tags
throws
Exception
Return values
Word

        
On this page

Search results