PHP 클래스 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.
상속: extends Roomify\Bat\Constraint\Constraint
파일 보기 프로젝트 열기: roomify/bat 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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.

공개 메소드들

메소드 설명
__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.

메소드 상세

__construct() 공개 메소드

DateConstraint constructor.
public __construct ( array $units, null $start_date = NULL, null $end_date = NULL )
$units array
$start_date null
$end_date null

applyConstraint() 공개 메소드

public applyConstraint ( Roomify\Bat\Calendar\CalendarResponse &$calendar_response )
$calendar_response Roomify\Bat\Calendar\CalendarResponse

toString() 공개 메소드

Generates a text describing an availability_constraint.
public toString ( ) : string
리턴 string The formatted message.

프로퍼티 상세

$end_date 공개적으로 프로퍼티

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

$start_date 공개적으로 프로퍼티

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