PHP Class Roomify\Bat\Constraint\DateConstraint
An applicable scenario is to allow units to declare (independently of
their actual event state) whether they should be deemed as matching a search
based on the dates of the search. For example, a hotel room can declare that it
should be unavailable if the check-in time is not at least 2 days away from the
today.
Show file
Open project: roomify/bat
Class Usage Examples
Public Properties
Property |
Type |
Description |
|
$end_date |
|
The constraint end date - if on or after requested end date constraint will apply. |
|
$start_date |
|
The constraint start date - if on or after requested start date constraint will apply. |
|
Public Methods
Method |
Description |
|
__construct ( array $units, null $start_date = NULL, null $end_date = NULL ) |
DateConstraint constructor. |
|
applyConstraint ( Roomify\Bat\Calendar\CalendarResponse &$calendar_response ) |
|
|
toString ( ) : string |
Generates a text describing an availability_constraint. |
|
Method Details
__construct()
public method
DateConstraint constructor.
applyConstraint()
public method
public applyConstraint ( Roomify\Bat\Calendar\CalendarResponse &$calendar_response ) |
$calendar_response |
Roomify\Bat\Calendar\CalendarResponse |
|
Generates a text describing an availability_constraint.
Property Details
$end_date public property
The constraint end date - if on or after requested end date constraint will apply.
$start_date public property
The constraint start date - if on or after requested start date constraint will apply.