DoDomuDojade Documentation

PDOQuoteRepository
in package
implements QuoteRepositoryInterface

Read onlyYes
Tags
inheritDoc

Table of Contents

Interfaces

QuoteRepositoryInterface
Describes behavior of quote repository

Properties

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

Methods

__construct()  : mixed
add()  : int
Persists a new quote entity.
fetchLatestQuote()  : Quote|null
Fetches the latest quote for today.
mapRow()  : Quote
Maps database row to Quote entity.

Properties

Methods

add()

Persists a new quote entity.

public add(Quote $quote) : int
Parameters
$quote : Quote

The quote entity to add

Tags
inheritDoc
Return values
int

id

fetchLatestQuote()

Fetches the latest quote for today.

public fetchLatestQuote() : Quote|null
Tags
inheritDoc
Return values
Quote|null

The latest quote for today or null if none exists

mapRow()

Maps database row to Quote entity.

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

        
On this page

Search results