SliderRepositoryReader
in package
implements
SliderRepositoryReaderInterface
Class SliderRepositoryReader
Tags
Interfaces, Classes and Traits
- SliderRepositoryReaderInterface
- Interface SliderRepositoryReaderInterface
Table of Contents
- $db : CI_DB_query_builder
- Query builder.
- $table : string
- Table name
- __construct() : mixed
- SliderRepositoryReader constructor.
- getAll() : SliderCollection
- Returns a SliderCollection with all existing Slider objects.
- getById() : SliderInterface
- Returns a Slider instance by the given slider ID.
- getStartPageSlider() : SliderInterface|null
- Get the Slider for the start page.
- _setDbValues() : mixed
- Assign the Slider values via the setter.
Properties
$db
Query builder.
protected
CI_DB_query_builder
$db
$table
Table name
protected
string
$table
= 'sliders'
Methods
__construct()
SliderRepositoryReader constructor.
public
__construct(CI_DB_query_builder $db) : mixed
Parameters
- $db : CI_DB_query_builder
-
Query builder.
Return values
mixed —getAll()
Returns a SliderCollection with all existing Slider objects.
public
getAll() : SliderCollection
Return values
SliderCollection —getById()
Returns a Slider instance by the given slider ID.
public
getById(IdType $sliderId) : SliderInterface
Parameters
- $sliderId : IdType
Tags
Return values
SliderInterface —getStartPageSlider()
Get the Slider for the start page.
public
getStartPageSlider() : SliderInterface|null
Return values
SliderInterface|null —Returns the start page slider instance or null if no record was found.
_setDbValues()
Assign the Slider values via the setter.
protected
_setDbValues(Slider $slider, array<string|int, mixed> $row) : mixed
Parameters
- $slider : Slider
- $row : array<string|int, mixed>