Documentation

SectionRepositoryImpl
in package
implements SectionRepository

Class SectionRepositoryImpl

Implements the SectionRepository interface using a PDO connection.

Table of Contents

Interfaces

SectionRepository
Interface SectionRepository

Properties

$connection  : PDO
$table  : string

Methods

__construct()  : mixed
Constructor for the SectionRepositoryImpl class.
assemblerSection()  : Section
Assembles a Section entity from a database result.
getSectionById()  : Section|null
Retrieves a section by its ID.

Properties

Methods

__construct()

Constructor for the SectionRepositoryImpl class.

public __construct() : mixed

Initializes the database connection.

assemblerSection()

Assembles a Section entity from a database result.

public assemblerSection(object $section) : Section
Parameters
$section : object

The database result.

Return values
Section

The assembled Section entity.

getSectionById()

Retrieves a section by its ID.

public getSectionById(int $idSection) : Section|null
Parameters
$idSection : int

The ID of the section to retrieve.

Return values
Section|null

Returns the section if found, null otherwise.


        
On this page

Search results