PHP Class Roomify\Bat\Constraint\MinMaxDaysConstraint

Inheritance: extends Roomify\Bat\Constraint\Constraint
Show file Open project: roomify/bat Class Usage Examples

Protected Properties

Property Type Description
$checkin_day integer
$max_days integer
$min_days integer

Public Methods

Method Description
__construct ( $units, $min_days, $max_days, $start_date = NULL, $end_date = NULL, $checkin_day = NULL )
applyConstraint ( Roomify\Bat\Calendar\CalendarResponse &$calendar_response )
getCheckinDay ( ) : integer
getMaxDays ( ) : integer
getMinDays ( ) : integer
setCheckinDay ( $checkin_day )
setMaxDays ( $max_days )
setMinDays ( $min_days )
toString ( ) : string Generates a text describing an availability_constraint.

Private Methods

Method Description
getWeekDay ( $day ) : string

Method Details

__construct() public method

public __construct ( $units, $min_days, $max_days, $start_date = NULL, $end_date = NULL, $checkin_day = NULL )
$min_days
$max_days
$start_date
$end_date
$checkin_day

applyConstraint() public method

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

getCheckinDay() public method

public getCheckinDay ( ) : integer
return integer

getMaxDays() public method

public getMaxDays ( ) : integer
return integer

getMinDays() public method

public getMinDays ( ) : integer
return integer

setCheckinDay() public method

public setCheckinDay ( $checkin_day )
$checkin_day

setMaxDays() public method

public setMaxDays ( $max_days )
$max_days

setMinDays() public method

public setMinDays ( $min_days )
$min_days

toString() public method

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

Property Details

$checkin_day protected property

protected int $checkin_day
return integer

$max_days protected property

protected int $max_days
return integer

$min_days protected property

protected int $min_days
return integer