ScheduleTimeSlotEntity
extends BaseEntity
in package
This class represents an entity for schedule time slots, extending the BaseEntity class.
The template parameter
Tags
Table of Contents
- $active : int|null
- $createdAt : string|null
- $day : int|null
- $endTime : string|null
- $id : mixed
- $scheduleId : int|null
- $startTime : string|null
- bind() : void
- Bind data to the entity properties.
- fields() : array<string|int, mixed>
- Get the names of the entity properties as an array.
- getActive() : int|null
- Get the value indicating if the time slot is active or not.
- getCreatedAt() : string|null
- Get the creation date of the time slot.
- getDay() : int|null
- Get the day of the week for the time slot.
- getEndTime() : string|null
- Get the end time of the time slot.
- getId() : I
- Get the ID of the entity.
- getScheduleId() : int|null
- Get the ID of the associated schedule.
- getStartTime() : string|null
- Get the start time of the time slot.
- setActive() : void
- Set the value indicating if the time slot is active or not.
- setCreatedAt() : void
- Set the creation date of the time slot.
- setDay() : void
- Set the day of the week for the time slot.
- setEndTime() : void
- Set the end time of the time slot.
- setId() : void
- Set the ID of the entity.
- setScheduleId() : void
- Set the ID of the associated schedule.
- setStartTime() : void
- Set the start time of the time slot.
- values() : array<string|int, mixed>
- Get the values of the entity properties as an array.
- valuesAsMap() : array<string|int, mixed>
- Get the values of the entity properties as a map.
Properties
$active
private
int|null
$active
= null
Indicates if the time slot is active or not.
$createdAt
private
string|null
$createdAt
= null
The creation date of the time slot.
$day
private
int|null
$day
= null
The day of the week for the time slot.
$endTime
private
string|null
$endTime
= null
The end time of the time slot.
$id
private
mixed
$id
The ID of the entity. The type of the ID is determined by the template parameter.
$scheduleId
private
int|null
$scheduleId
= null
The ID of the associated schedule.
$startTime
private
string|null
$startTime
= null
The start time of the time slot.
Methods
bind()
Bind data to the entity properties.
public
bind(array<string|int, mixed> $data) : void
This method takes an associative array of data and binds the values to the entity's properties. It matches the keys of the data array with the properties defined in the entity's database model class, and if there is a match, it sets the property value using the corresponding setter method.
Parameters
- $data : array<string|int, mixed>
-
An associative array containing the data to bind to the entity properties.
Return values
void —fields()
Get the names of the entity properties as an array.
public
fields() : array<string|int, mixed>
Return values
array<string|int, mixed> —An array containing the names of the entity properties.
getActive()
Get the value indicating if the time slot is active or not.
public
getActive() : int|null
Return values
int|null —The value indicating if the time slot is active or not.
getCreatedAt()
Get the creation date of the time slot.
public
getCreatedAt() : string|null
Return values
string|null —The creation date of the time slot.
getDay()
Get the day of the week for the time slot.
public
getDay() : int|null
Return values
int|null —The day of the week for the time slot.
getEndTime()
Get the end time of the time slot.
public
getEndTime() : string|null
Return values
string|null —The end time of the time slot.
getId()
Get the ID of the entity.
public
getId() : I
Return values
I —The ID of the entity.
getScheduleId()
Get the ID of the associated schedule.
public
getScheduleId() : int|null
Return values
int|null —The ID of the associated schedule.
getStartTime()
Get the start time of the time slot.
public
getStartTime() : string|null
Return values
string|null —The start time of the time slot.
setActive()
Set the value indicating if the time slot is active or not.
public
setActive(int|null $active) : void
Parameters
- $active : int|null
-
The value indicating if the time slot is active or not.
Return values
void —setCreatedAt()
Set the creation date of the time slot.
public
setCreatedAt(string|null $createdAt) : void
Parameters
- $createdAt : string|null
-
The creation date of the time slot.
Return values
void —setDay()
Set the day of the week for the time slot.
public
setDay(int|null $day) : void
Parameters
- $day : int|null
-
The day of the week for the time slot.
Return values
void —setEndTime()
Set the end time of the time slot.
public
setEndTime(string|null $endTime) : void
Parameters
- $endTime : string|null
-
The end time of the time slot.
Return values
void —setId()
Set the ID of the entity.
public
setId(I $id) : void
Parameters
- $id : I
-
The ID to set for the entity.
Return values
void —setScheduleId()
Set the ID of the associated schedule.
public
setScheduleId(int|null $scheduleId) : void
Parameters
- $scheduleId : int|null
-
The ID of the associated schedule.
Return values
void —setStartTime()
Set the start time of the time slot.
public
setStartTime(string|null $startTime) : void
Parameters
- $startTime : string|null
-
The start time of the time slot.
Return values
void —values()
Get the values of the entity properties as an array.
public
values() : array<string|int, mixed>
This method retrieves the values of all properties defined in the entity's database model class and returns them as an array. The array represents the values that can be used in database operations.
Return values
array<string|int, mixed> —An array containing the values of the entity properties.
valuesAsMap()
Get the values of the entity properties as a map.
public
valuesAsMap() : array<string|int, mixed>
This method retrieves the values of all properties defined in the entity's database model class and returns them as an associative array, where the keys represent the property names and the values are the corresponding property values.
Return values
array<string|int, mixed> —An associative array containing the values of the entity properties.