CustomRule
in package
implements
RuleVerifyInterface
Interfaces, Classes and Traits
Table of Contents
- $comment : string
- $dateFrom : DateTime
- $dateTo : DateTime
- $notCheckIn : bool
- $notCheckOut : bool
- $notStayIn : bool
- $roomId : mixed
- $roomTypeId : mixed
- create() : CustomRule
- getBlockedDates() : mixed
- getComment() : mixed
- getEndDate() : mixed
- getPeriodDates() : mixed
- getRestrictions() : mixed
- getRestrictionsByDays() : array<string|int, mixed>
- getRoomId() : mixed
- getRoomTypeId() : mixed
- getStartDate() : mixed
- isBlocked() : bool
- noCheckIn() : bool
- noCheckOut() : bool
- noStayIn() : bool
- verify() : bool
- __construct() : mixed
- compareDates() : mixed
Properties
$comment
protected
string
$comment
= ''
$dateFrom
protected
DateTime
$dateFrom
$dateTo
protected
DateTime
$dateTo
$notCheckIn
protected
bool
$notCheckIn
= false
$notCheckOut
protected
bool
$notCheckOut
= false
$notStayIn
protected
bool
$notStayIn
= false
$roomId
protected
mixed
$roomId
= 0
$roomTypeId
protected
mixed
$roomTypeId
= 0
Methods
create()
public
static create(array<string|int, mixed> $atts) : CustomRule
Parameters
- $atts : array<string|int, mixed>
Return values
CustomRule —getBlockedDates()
public
getBlockedDates() : mixed
Return values
mixed —getComment()
public
getComment() : mixed
Return values
mixed —getEndDate()
public
getEndDate() : mixed
Return values
mixed —getPeriodDates()
public
getPeriodDates() : mixed
Return values
mixed —getRestrictions()
public
getRestrictions() : mixed
Return values
mixed —getRestrictionsByDays()
public
getRestrictionsByDays() : array<string|int, mixed>
Return values
array<string|int, mixed> —["2017-01-01" => ["not_check_in" => true, "not_check_out" => true, "not_stay_in" => true], "2017-01-02" => ...]
getRoomId()
public
getRoomId() : mixed
Return values
mixed —getRoomTypeId()
public
getRoomTypeId() : mixed
Return values
mixed —getStartDate()
public
getStartDate() : mixed
Return values
mixed —isBlocked()
public
isBlocked() : bool
Return values
bool —noCheckIn()
public
noCheckIn([DateTime|null $checkInDate = null ]) : bool
Parameters
- $checkInDate : DateTime|null = null
-
Optional. If not set - don't check the dates.
Return values
bool —noCheckOut()
public
noCheckOut([DateTime|null $checkOutDate = null ]) : bool
Parameters
- $checkOutDate : DateTime|null = null
-
Optional. If not set - don't check the dates.
Return values
bool —noStayIn()
public
noStayIn([DateTime|null $checkInDate = null ][, DateTime|null $checkOutDate = null ]) : bool
Parameters
- $checkInDate : DateTime|null = null
- $checkOutDate : DateTime|null = null
Return values
bool —verify()
public
verify(DateTime $checkInDate, DateTime $checkOutDate, mixed $roomTypeId) : bool
Parameters
- $checkInDate : DateTime
- $checkOutDate : DateTime
- $roomTypeId : mixed
-
Optional.
Return values
bool —__construct()
protected
__construct(array<string|int, mixed> $atts) : mixed
Parameters
- $atts : array<string|int, mixed>
Return values
mixed —compareDates()
protected
compareDates(DateTime $date1, mixed $operator, DateTime $date2) : mixed
Parameters
- $date1 : DateTime
- $operator : mixed
- $date2 : DateTime