DoDomuDojade Documentation

PDOModuleRepository
in package
implements ModuleRepositoryInterface

Read onlyYes
Tags
inheritDoc

Table of Contents

Interfaces

ModuleRepositoryInterface
Describes behavior of the module repository

Constants

DEFAULT_END_TIME  = '23:59:59'
DEFAULT_START_TIME  = '00:00:00'

Properties

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

Methods

__construct()  : mixed
findAll()  : array<string|int, Module>
Retrieves all modules from storage.
findById()  : Module|null
Finds a module by its ID.
findByName()  : Module|null
Finds a module by its name.
update()  : bool
Updates an existing module entity.
mapRow()  : Module
Maps array from database to entity

Constants

Properties

Methods

findAll()

Retrieves all modules from storage.

public findAll() : array<string|int, Module>
Tags
inheritDoc
Return values
array<string|int, Module>

Array of all module entities

findById()

Finds a module by its ID.

public findById(int $id) : Module|null
Parameters
$id : int

The module ID

Tags
inheritDoc
Return values
Module|null

The module entity or null if not found

findByName()

Finds a module by its name.

public findByName(ModuleName $moduleName) : Module|null
Parameters
$moduleName : ModuleName

The module name value object

Tags
inheritDoc
Return values
Module|null

The module entity or null if not found

update()

Updates an existing module entity.

public update(Module $module) : bool
Parameters
$module : Module

The module entity with updated data

Tags
inheritDoc
Return values
bool

True if update was successful, false otherwise


        
On this page

Search results