AbstractRulesList
in package
implements
RuleVerifyInterface
Tags
Interfaces, Classes and Traits
Table of Contents
- $rules : array<string|int, AbstractRule>
- __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
- combineRules() : AbstractRule|null
Properties
$rules
protected
array<string|int, AbstractRule>
$rules
= array()
Tags
Methods
__construct()
public
__construct(array<string|int, AbstractRule> $rules) : mixed
Parameters
- $rules : array<string|int, AbstractRule>
Tags
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 —combineRules()
protected
abstract combineRules(array<string|int, AbstractRule> $rules) : AbstractRule|null
Parameters
- $rules : array<string|int, AbstractRule>