ReservationRulesList extends AbstractRulesList
in package

Tags
since
3.9

renamed from RulesHolder.

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
since
3.9

$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
since
3.9
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
since
1.0
Return values
AbstractRule|null

findAllSeasonsRule()

public findAllSeasonsRule(int $roomTypeId) : AbstractRule|null
Parameters
$roomTypeId : int

Optional.

Tags
since
3.9
Return values
AbstractRule|null

toArray()

public toArray() : array<string|int, mixed>
Tags
since
3.9
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
since
3.9
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

combineMaxStayRules()

protected combineMaxStayRules(array<string|int, MaxDaysRule$rules) : MaxDaysRule
Parameters
$rules : array<string|int, MaxDaysRule>
Return values
MaxDaysRule

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>
Return values
AbstractRule|null

Search results