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.
Inheritance: extends Roomify\Bat\Constraint\Constraint
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.
public __construct ( array $units, null $start_date = NULL, null $end_date = NULL )
$units array
$start_date null
$end_date null

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.
public toString ( ) : string
Résultat string The formatted message.

Property Details

$end_date public_oe property

The constraint end date - if on or after requested end date constraint will apply.
public $end_date

$start_date public_oe property

The constraint start date - if on or after requested start date constraint will apply.
public $start_date