ModuleRepositoryInterface
in
Describes behavior of the module repository
Table of Contents
Methods
- 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.
Methods
findAll()
Retrieves all modules from storage.
public
findAll() : array<string|int, Module>
Tags
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
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
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
Return values
bool —True if update was successful, false otherwise