ServiceVariations
in package

Tags
since
1.3.1

Table of Contents

$variations  : array<string|int, ServiceVariation>
__construct()  : mixed
getDuration()  : int
getMaxCapacity()  : int
getMinCapacity()  : int
getPrice()  : float
hasVariationForEmployee()  : bool
toArray()  : array<string|int, mixed>
getValue()  : mixed

Properties

$variations

public array<string|int, ServiceVariation> $variations
Tags
since
1.3.1

Methods

__construct()

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

[Employee ID => ServiceVariation]

Tags
since
1.3.1
Return values
mixed

getDuration()

public getDuration(int $employeeId, int $defaultDuration) : int
Parameters
$employeeId : int
$defaultDuration : int

Optional. 0 by default.

Tags
since
1.3.1
Return values
int

getMaxCapacity()

public getMaxCapacity(int $employeeId[, int $defaultCapacity = 1 ]) : int
Parameters
$employeeId : int
$defaultCapacity : int = 1

Optional. 1 by default.

Tags
since
1.3.1
Return values
int

getMinCapacity()

public getMinCapacity(int $employeeId[, int $defaultCapacity = 1 ]) : int
Parameters
$employeeId : int
$defaultCapacity : int = 1

Optional. 1 by default.

Tags
since
1.3.1
Return values
int

getPrice()

public getPrice(int $employeeId[, float $defaultPrice = 0.0 ]) : float
Parameters
$employeeId : int
$defaultPrice : float = 0.0

Optional. 0 by default.

Tags
since
1.3.1
Return values
float

hasVariationForEmployee()

public hasVariationForEmployee(int $employeeId) : bool
Parameters
$employeeId : int
Tags
since
1.3.1
Return values
bool

toArray()

public toArray([bool $deep = false ]) : array<string|int, mixed>
Parameters
$deep : bool = false

Optional. False by default.

Tags
since
1.3.1
Return values
array<string|int, mixed>

[Employee ID => ServiceVariations[] or array]

getValue()

protected getValue(string $field, int $employeeId, mixed $defaultValue) : mixed
Parameters
$field : string
$employeeId : int
$defaultValue : mixed
Tags
since
1.3.1
Return values
mixed

Search results