RoomAvailabilityHelper
in package
Table of Contents
- getActiveRoomsCountForRoomType() : mixed
- getAvailableRoomsCountForRoomType() : mixed
- getRoomTypeAvailabilityData() : mixed
- getRoomTypeAvailabilityStatus() : string
- isBookedDate() : true
- isCheckInNotAllowed() : bool
- isCheckOutNotAllowed() : bool
- __construct() : mixed
Methods
getActiveRoomsCountForRoomType()
public
static getActiveRoomsCountForRoomType(int $roomTypeOriginalId) : mixed
Parameters
- $roomTypeOriginalId : int
Return values
mixed —getAvailableRoomsCountForRoomType()
public
static getAvailableRoomsCountForRoomType(int $roomTypeOriginalId, DateTime $date) : mixed
Parameters
- $roomTypeOriginalId : int
- $date : DateTime
Return values
mixed —getRoomTypeAvailabilityData()
public
static getRoomTypeAvailabilityData(int $roomTypeOriginalId, DateTime $date) : mixed
Parameters
- $roomTypeOriginalId : int
- $date : DateTime
Return values
mixed —getRoomTypeAvailabilityStatus()
public
static getRoomTypeAvailabilityStatus(int $roomTypeOriginalId, DateTime $date) : string
Parameters
- $roomTypeOriginalId : int
- $date : DateTime
Return values
string —status
isBookedDate()
public
static isBookedDate(int $roomTypeOriginalId, DateTime $date[, $considerCheckIn = true ][, $considerCheckOut = false ]) : true
Parameters
- $roomTypeOriginalId : int
- $date : DateTime
- $considerCheckIn : = true
-
- if true then check-in date considered as booked if there is no any available room
- $considerCheckOut : = false
-
- if true then check-out date considered as booked if there is no any available room
Return values
true —if given date is booked (there is no any available room)
isCheckInNotAllowed()
public
static isCheckInNotAllowed(int $roomTypeOriginalId, DateTime $date) : bool
Parameters
- $roomTypeOriginalId : int
- $date : DateTime
Return values
bool —- true if check-in is not allowed in the given date
isCheckOutNotAllowed()
public
static isCheckOutNotAllowed(int $roomTypeOriginalId, DateTime $date) : bool
Parameters
- $roomTypeOriginalId : int
- $date : DateTime
Return values
bool —- true if check-out is not allowed in the given date
__construct()
private
__construct() : mixed