ScheduleService
in package
ScheduleService class for working with ScheduleEntity.
Tags
Table of Contents
- $appointmentDurationService : AppointmentDurationService
- $scheduleRepository : ScheduleRepository
- $scheduleTimeSlotService : ScheduleTimeSlotService
- __construct() : mixed
- ScheduleService constructor.
- delete() : void
- Delete a schedule by id.
- findById() : ScheduleDomain
- Find a schedule by its ID.
- findByMedicalCenterId() : ScheduleDomain
- Find a schedule by its medical center ID.
- save() : ScheduleDomain
- Save a schedule.
- update() : ScheduleDomain
- Update a schedule by its ID.
- getScheduleEntityById() : ScheduleEntity
- Find a schedule by its ID.
- mapScheduleEntityToDomain() : ScheduleDomain
- Map a schedule entity to a schedule domain.
Properties
$appointmentDurationService
private
AppointmentDurationService
$appointmentDurationService
The appointment duration service.
$scheduleRepository
private
ScheduleRepository
$scheduleRepository
The schedule repository.
$scheduleTimeSlotService
private
ScheduleTimeSlotService
$scheduleTimeSlotService
The schedule time slot service.
Methods
__construct()
ScheduleService constructor.
public
__construct(ScheduleRepository $scheduleRepository, ScheduleTimeSlotService $scheduleTimeSlotService, AppointmentDurationService $appointmentDurationService) : mixed
Parameters
- $scheduleRepository : ScheduleRepository
-
The schedule repository.
- $scheduleTimeSlotService : ScheduleTimeSlotService
-
The schedule time slot service.
- $appointmentDurationService : AppointmentDurationService
-
The appointment duration service.
Return values
mixed —delete()
Delete a schedule by id.
public
delete(int $id) : void
Parameters
- $id : int
-
The id of the schedule to delete.
Tags
Return values
void —findById()
Find a schedule by its ID.
public
findById(int $scheduleId) : ScheduleDomain
Parameters
- $scheduleId : int
-
The ID of the schedule to find.
Tags
Return values
ScheduleDomain —findByMedicalCenterId()
Find a schedule by its medical center ID.
public
findByMedicalCenterId(int $medicalCenterId) : ScheduleDomain
Parameters
- $medicalCenterId : int
-
The ID of the medical center to find the schedule.
Tags
Return values
ScheduleDomain —save()
Save a schedule.
public
save(ScheduleDomain $scheduleDomain) : ScheduleDomain
Parameters
- $scheduleDomain : ScheduleDomain
-
The schedule to save.
Tags
Return values
ScheduleDomain —update()
Update a schedule by its ID.
public
update(ScheduleDomain $scheduleDomain) : ScheduleDomain
Parameters
- $scheduleDomain : ScheduleDomain
-
The schedule to update.
Tags
Return values
ScheduleDomain —The updated schedule.
getScheduleEntityById()
Find a schedule by its ID.
private
getScheduleEntityById(int $id) : ScheduleEntity
Parameters
- $id : int
-
The ID of the schedule to find.
Tags
Return values
ScheduleEntity —mapScheduleEntityToDomain()
Map a schedule entity to a schedule domain.
private
mapScheduleEntityToDomain(ScheduleEntity $scheduleEntity) : ScheduleDomain
Parameters
- $scheduleEntity : ScheduleEntity
-
The schedule entity to map.