Documentation

TypeShift
in package
implements IteratorAggregate

Data structure to handle Division

Table of Contents

Interfaces

IteratorAggregate

Constants

DEFAULT_COLOR  = '#000000'
DEFAULT_END_TIME  = '23:59:59'
DEFAULT_START_TIME  = '00:00:00'

Properties

$color  : string
$description  : string
$endNextDay  : bool
$endTime  : string
$endTimeOverlap  : int
$endTimeWithoutOverlap  : string
$groupDescription  : string
$groupID  : int
$label  : string
$startTime  : string
$startTimeOverlap  : int
$startTimeWithoutOverlap  : string
$zucchettiID  : int

Methods

__construct()  : mixed
color()  : string
Get (bg)color
description()  : string
Get description
endNextDay()  : bool
Get End next day
endTime()  : string
Get EndTime
endTimeOverlap()  : string
Get EndTime overlap
endTimeWithoutOverlap()  : string
Get EndTime without overlap time
getIterator()  : array<string|int, mixed>
Iterate over type shifts info
groupDescription()  : string
Get group description
groupID()  : int
Get id group
label()  : string
Get label
startTime()  : string
Get StartTime
startTimeOverlap()  : string
Get StartTime overlap
startTimeWithoutOverlap()  : string
Get StartTime without overlap time
zucchettiID()  : int
Get zucchettiID
colorIsValid()  : bool
Check if HEX color is valid
findEndTimeOverlap()  : void
Find end time overlap and divide from endTime (setting $endTimeWithoutOverlap and $endTimeOverlap)
findStartTimeOverlap()  : void
Find start time overlap and divide from startTime (setting $startTimeWithoutOverlap and $startTimeOverlap)
isOnCall()  : bool
Check if is an 'On-call' shift
setEndTimeOverLapForOE()  : void
Set endTime overlap for OE
setEndTimeOverLapForOV()  : void
Set endTime overlap for OV
setEndTimeOverLapForRoma()  : void
Set endTime overlap for Roma
setStartTimeOverLapForRoma()  : void
Set startTime overlap for Roma
timeIsValid()  : bool
Check if time is valid

Constants

DEFAULT_COLOR

private mixed DEFAULT_COLOR = '#000000'

DEFAULT_END_TIME

private mixed DEFAULT_END_TIME = '23:59:59'

DEFAULT_START_TIME

private mixed DEFAULT_START_TIME = '00:00:00'

Properties

$endTimeWithoutOverlap

private string $endTimeWithoutOverlap

$groupDescription

private string $groupDescription

$startTimeOverlap

private int $startTimeOverlap

$startTimeWithoutOverlap

private string $startTimeWithoutOverlap

Methods

__construct()

public __construct(int $zucchettiID, string $description, string $label, string $color, string $startTime, string $endTime, bool $endNextDay, int $groupID, string $groupDescription) : mixed
Parameters
$zucchettiID : int
$description : string
$label : string
$color : string
$startTime : string
$endTime : string
$endNextDay : bool
$groupID : int
$groupDescription : string

color()

Get (bg)color

public color() : string
Return values
string

color assigned on zucchetti

description()

Get description

public description() : string
Return values
string

description

endNextDay()

Get End next day

public endNextDay() : bool
Return values
bool

TRUE if the shift end the following day, false otherwise

endTime()

Get EndTime

public endTime() : string
Return values
string

end time of shift exactly as store in zucchetti

endTimeOverlap()

Get EndTime overlap

public endTimeOverlap() : string
Return values
string

end time overlap (in minutes)

endTimeWithoutOverlap()

Get EndTime without overlap time

public endTimeWithoutOverlap() : string
Return values
string

end time without overlap time

getIterator()

Iterate over type shifts info

public getIterator() : array<string|int, mixed>
Return values
array<string|int, mixed>

array of all type shifts info

groupDescription()

Get group description

public groupDescription() : string
Return values
string

group description

groupID()

Get id group

public groupID() : int
Return values
int

group id

label()

Get label

public label() : string
Return values
string

label

startTime()

Get StartTime

public startTime() : string
Return values
string

start time exactly as store in zucchetti

startTimeOverlap()

Get StartTime overlap

public startTimeOverlap() : string
Return values
string

start time overlap (in minutes)

startTimeWithoutOverlap()

Get StartTime without overlap time

public startTimeWithoutOverlap() : string
Return values
string

start time without overlap time

zucchettiID()

Get zucchettiID

public zucchettiID() : int
Return values
int

ZucchettiID

colorIsValid()

Check if HEX color is valid

private colorIsValid(string $color) : bool
Parameters
$color : string

color to check in #000000 format

Return values
bool

TRUE if is valid, FALSE otherwise

findEndTimeOverlap()

Find end time overlap and divide from endTime (setting $endTimeWithoutOverlap and $endTimeOverlap)

private findEndTimeOverlap() : void

findStartTimeOverlap()

Find start time overlap and divide from startTime (setting $startTimeWithoutOverlap and $startTimeOverlap)

private findStartTimeOverlap() : void

isOnCall()

Check if is an 'On-call' shift

private isOnCall(string $description) : bool
Parameters
$description : string

Type shift group description

Return values
bool

TRUE if is valid, FALSE otherwise

setEndTimeOverLapForOE()

Set endTime overlap for OE

private setEndTimeOverLapForOE(string $description) : void
Parameters
$description : string

setEndTimeOverLapForOV()

Set endTime overlap for OV

private setEndTimeOverLapForOV(string $description) : void
Parameters
$description : string

setEndTimeOverLapForRoma()

Set endTime overlap for Roma

private setEndTimeOverLapForRoma(string $description) : void
Parameters
$description : string

setStartTimeOverLapForRoma()

Set startTime overlap for Roma

private setStartTimeOverLapForRoma(string $description) : void
Parameters
$description : string

timeIsValid()

Check if time is valid

private timeIsValid(string $time) : bool
Parameters
$time : string

time in HH:mm:ss format

Return values
bool

TRUE if is valid, FALSE otherwise


        
On this page

Search results