ReservationPolicy
in package
Table of Contents
- $building : Building
- $buildingRepository : IBuildingRepository
- $configuration : Configuration
- $database : IDatabase
- $room : Room
- $roomRepository : IRoomRepository
- $user : User
- $userRepository : IUserRepository
- __construct() : mixed
- __invoke() : void
- noCrossingReservationWasMade() : void
- Check if reservation with similar time slot exists
- reservationHasFutureTime() : void
- reservationTimeSlotLengthIsOk() : void
- reservationWhenBuildingIsOpen() : void
- check if the building is open ig given time slot
- roomBelongsToBuilding() : void
- roomCannotBeBlocked() : void
- check if the room is blocked
Properties
$building
protected
Building
$building
$buildingRepository
protected
IBuildingRepository
$buildingRepository
$configuration
protected
Configuration
$configuration
$database
protected
IDatabase
$database
$room
protected
Room
$room
$roomRepository
protected
IRoomRepository
$roomRepository
$user
protected
User
$user
$userRepository
protected
IUserRepository
$userRepository
Methods
__construct()
public
__construct(IBuildingRepository $buildingRepository, IRoomRepository $roomRepository, IUserRepository $userRepository, IConfigurationRepository $configurationRepository, IDatabase $database) : mixed
Parameters
- $buildingRepository : IBuildingRepository
- $roomRepository : IRoomRepository
- $userRepository : IUserRepository
- $configurationRepository : IConfigurationRepository
- $database : IDatabase
Return values
mixed —__invoke()
public
abstract __invoke(stdClass $form[, Reservation|null $originalReservation = NULL ]) : void
Parameters
- $form : stdClass
- $originalReservation : Reservation|null = NULL
Return values
void —noCrossingReservationWasMade()
Check if reservation with similar time slot exists
protected
noCrossingReservationWasMade([int|null $excludeId = NULL ]) : void
Parameters
- $excludeId : int|null = NULL
Tags
Return values
void —reservationHasFutureTime()
protected
reservationHasFutureTime() : void
Tags
Return values
void —reservationTimeSlotLengthIsOk()
protected
reservationTimeSlotLengthIsOk() : void
Tags
Return values
void —reservationWhenBuildingIsOpen()
check if the building is open ig given time slot
protected
reservationWhenBuildingIsOpen() : void
Tags
Return values
void —roomBelongsToBuilding()
protected
roomBelongsToBuilding() : void
Tags
Return values
void —roomCannotBeBlocked()
check if the room is blocked
protected
roomCannotBeBlocked() : void