ReservationRulesList
extends AbstractRulesList
in package
Tags
Table of Contents
- $rules : array<string|int, AbstractRule>
- $type : string
- __construct() : mixed
- findActualCombinedRule() : AbstractRule
- findActualRule() : AbstractRule|null
- Find the rule that suits the date and room type ID.
- findAllSeasonsRule() : AbstractRule|null
- toArray() : array<string|int, mixed>
- verify() : bool
- combineCheckInRules() : CheckInRule
- combineCheckOutRules() : CheckOutRule
- combineMaxAdvanceRules() : MaxAdvanceDaysRule
- combineMaxStayRules() : MaxDaysRule
- combineMinAdvanceRules() : MinAdvanceDaysRule
- combineMinStayRules() : MinDaysRule
- combineRules() : AbstractRule|null
Properties
$rules
protected
array<string|int, AbstractRule>
$rules
= array()
Tags
$type
protected
string
$type
= ''
Methods
__construct()
public
__construct(array<string|int, AbstractRule> $rules[, string $type = '' ]) : mixed
Parameters
- $rules : array<string|int, AbstractRule>
- $type : string = ''
-
Rule type (see constants of the ReservationRules class).
Return values
mixed —findActualCombinedRule()
public
findActualCombinedRule(DateTime $date) : AbstractRule
Parameters
- $date : DateTime
Tags
Return values
AbstractRule —findActualRule()
Find the rule that suits the date and room type ID.
public
findActualRule(DateTime $date, int $roomTypeId) : AbstractRule|null
Parameters
- $date : DateTime
- $roomTypeId : int
-
Optional.
Tags
Return values
AbstractRule|null —findAllSeasonsRule()
public
findAllSeasonsRule(int $roomTypeId) : AbstractRule|null
Parameters
- $roomTypeId : int
-
Optional.
Tags
Return values
AbstractRule|null —toArray()
public
toArray() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —verify()
public
verify(DateTime $checkInDate, DateTime $checkOutDate, int $roomTypeId) : bool
Parameters
- $checkInDate : DateTime
- $checkOutDate : DateTime
- $roomTypeId : int
-
Optional.
Tags
Return values
bool —combineCheckInRules()
protected
combineCheckInRules(array<string|int, CheckInRule> $rules) : CheckInRule
Parameters
- $rules : array<string|int, CheckInRule>
Return values
CheckInRule —combineCheckOutRules()
protected
combineCheckOutRules(array<string|int, CheckOutRule> $rules) : CheckOutRule
Parameters
- $rules : array<string|int, CheckOutRule>
Return values
CheckOutRule —combineMaxAdvanceRules()
protected
combineMaxAdvanceRules(array<string|int, MaxAdvanceDaysRule> $rules) : MaxAdvanceDaysRule
Parameters
- $rules : array<string|int, MaxAdvanceDaysRule>
Tags
Return values
MaxAdvanceDaysRule —combineMaxStayRules()
protected
combineMaxStayRules(array<string|int, MaxDaysRule> $rules) : MaxDaysRule
Parameters
- $rules : array<string|int, MaxDaysRule>
Return values
MaxDaysRule —combineMinAdvanceRules()
protected
combineMinAdvanceRules(array<string|int, MinAdvanceDaysRule> $rules) : MinAdvanceDaysRule
Parameters
- $rules : array<string|int, MinAdvanceDaysRule>
Tags
Return values
MinAdvanceDaysRule —combineMinStayRules()
protected
combineMinStayRules(array<string|int, MinDaysRule> $rules) : MinDaysRule
Parameters
- $rules : array<string|int, MinDaysRule>
Return values
MinDaysRule —combineRules()
protected
combineRules(array<string|int, AbstractRule> $rules) : AbstractRule|null
Parameters
- $rules : array<string|int, AbstractRule>