CoolCMS API

ReservationManagerFactory
in package

FinalYes

Lazy access to {@see ReservationManager} that breaks a circular DI dependency.

Both sides of the reservation flow need each other: TimeSlotManager needs ReservationManager (slot occupancy, delete and closed-day guards) and ReservationManager needs TimeSlotManager (availability recalculation, slot materialization). Constructor injection in both directions would make the container unbuildable, so TimeSlotManager holds this factory and fetches the manager at call time. The opposite direction stays a normal constructor dependency.

Table of Contents

Properties

$container  : Container
$instance  : ReservationManager|null

Methods

__construct()  : mixed
create()  : ReservationManager
Returns the container singleton; the local cache only saves repeated lookups.

Properties

Methods

On this page

Search results