Rate
in package

Table of Contents

$active  : bool
$dates  : array<string|int, mixed>
Available dates (with base price as value).
$description  : string
$id  : int
$originalId  : int
$roomTypeId  : int
$seasonPrices  : array<string|int, SeasonPrice>
$title  : string
__construct()  : mixed
calcPrice()  : float
getDatePrices()  : array<string|int, mixed>
getDescription()  : string
getId()  : int
getMinBasePrice()  : float
getOriginalId()  : int
getPriceBreakdown()  : array<string|int, mixed>
getRoomTypeId()  : int
getSeasonPrices()  : array<string|int, SeasonPrice>
getSeasons()  : array<string|int, Season>
getTitle()  : string
isActive()  : bool
isAvailableForDates()  : bool
isExistsFrom()  : bool

Properties

$active

private bool $active = false

$dates

Available dates (with base price as value).

private array<string|int, mixed> $dates = array()

$description

private string $description

$id

private int $id

$originalId

private int $originalId

$roomTypeId

private int $roomTypeId

$seasonPrices

private array<string|int, SeasonPrice> $seasonPrices

$title

private string $title

Methods

__construct()

public __construct(array<string|int, mixed> $atts) : mixed
Parameters
$atts : array<string|int, mixed>

Array of atts

Return values
mixed

calcPrice()

public calcPrice(DateTime $checkInDate, DateTime $checkOutDate) : float
Parameters
$checkInDate : DateTime
$checkOutDate : DateTime
Tags
since
3.5.0

removed optional parameter $occupancyParams.

Return values
float

getDatePrices()

public getDatePrices() : array<string|int, mixed>
Tags
since
3.5.0

removed optional parameter $occupancyParams.

Return values
array<string|int, mixed>

getDescription()

public getDescription() : string
Return values
string

Description

getId()

public getId() : int
Return values
int

Id of rate

getMinBasePrice()

public getMinBasePrice([DateTime $fromDate = null ][, DateTime $toDate = null ]) : float
Parameters
$fromDate : DateTime = null
$toDate : DateTime = null
Return values
float

getOriginalId()

public getOriginalId() : int
Return values
int

getPriceBreakdown()

public getPriceBreakdown(string $checkInDate, string $checkOutDate) : array<string|int, mixed>
Parameters
$checkInDate : string

date in format 'Y-m-d'

$checkOutDate : string

date in format 'Y-m-d'

Tags
since
3.5.0

removed optional parameter $occupancyParams.

Return values
array<string|int, mixed>

Array where keys are dates and values are prices

getRoomTypeId()

public getRoomTypeId() : int
Return values
int

getSeasonPrices()

public getSeasonPrices() : array<string|int, SeasonPrice>
Return values
array<string|int, SeasonPrice>

Array of season prices.

getSeasons()

public getSeasons() : array<string|int, Season>
Return values
array<string|int, Season>

getTitle()

public getTitle() : string
Return values
string

Title

isActive()

public isActive() : bool
Return values
bool

isAvailableForDates()

public isAvailableForDates(DateTime $dateFrom, DateTime $dateTo[, mixed $includeLastDate = false ]) : bool
Parameters
$dateFrom : DateTime
$dateTo : DateTime
$includeLastDate : mixed = false
Return values
bool

isExistsFrom()

public isExistsFrom(DateTime $fromDate) : bool
Parameters
$fromDate : DateTime
Return values
bool

Search results