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.
Afficher le fichier
Open project: roomify/bat
Class Usage Examples
Méthodes publiques
Свойство |
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. |
|
Méthodes publiques
Méthode |
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 méthode
DateConstraint constructor.
applyConstraint()
public méthode
public applyConstraint ( Roomify\Bat\Calendar\CalendarResponse &$calendar_response ) |
$calendar_response |
Roomify\Bat\Calendar\CalendarResponse |
|
toString()
public méthode
Generates a text describing an availability_constraint.
Property Details
$end_date public_oe property
The constraint end date - if on or after requested end date constraint will apply.
$start_date public_oe property
The constraint start date - if on or after requested start date constraint will apply.