Reservation
extends Model
in package
Table of Contents
- $actualEnd : JsonDateTime|null
- $actualStart : JsonDateTime|null
- $created : JsonDateTime
- $description : string
- $id : int
- $plannedEnd : JsonDateTime
- $plannedStart : JsonDateTime
- $room : Room
- $roomId : int
- $title : string
- $updated : JsonDateTime
- $user : User
- $userId : int
- __construct() : mixed
- __set() : mixed
- end() : void
- Ends the reservation
- hasEnded() : bool
- checks if reservation has ended
- hasStarted() : bool
- checks if reservation has started
- jsonSerialize() : array<string|int, mixed>
- Specify data which should be serialized to JSON
- notStarted() : bool
- Checks if reservation has not stared yet
- start() : void
- Starts the reservation
- update() : void
- Updates model properties with form data
- validate() : void
- Domain object save validation callback.
Properties
$actualEnd
public
JsonDateTime|null
$actualEnd
$actualStart
public
JsonDateTime|null
$actualStart
$created
public
JsonDateTime
$created
$description
public
string
$description
$id
public
int
$id
$plannedEnd
public
JsonDateTime
$plannedEnd
$plannedStart
public
JsonDateTime
$plannedStart
$room
public
Room
$room
$roomId
public
int
$roomId
$title
public
string
$title
$updated
public
JsonDateTime
$updated
$user
public
User
$user
$userId
public
int
$userId
Methods
__construct()
public
__construct(int $id, string $title, string $description, Room $room, User $user, JsonDateTime $plannedStart, JsonDateTime $plannedEnd, JsonDateTime|null $actualStart, JsonDateTime|null $actualEnd, JsonDateTime $created, JsonDateTime $updated) : mixed
Parameters
- $id : int
- $title : string
- $description : string
- $room : Room
- $user : User
- $plannedStart : JsonDateTime
- $plannedEnd : JsonDateTime
- $actualStart : JsonDateTime|null
- $actualEnd : JsonDateTime|null
- $created : JsonDateTime
- $updated : JsonDateTime
Return values
mixed —__set()
public
__set(string $name, mixed $value) : mixed
Parameters
- $name : string
- $value : mixed
Tags
Return values
mixed —end()
Ends the reservation
public
end() : void
Tags
Return values
void —hasEnded()
checks if reservation has ended
public
hasEnded() : bool
Return values
bool —hasStarted()
checks if reservation has started
public
hasStarted() : bool
Return values
bool —jsonSerialize()
Specify data which should be serialized to JSON
public
jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed> —notStarted()
Checks if reservation has not stared yet
public
notStarted() : bool
Return values
bool —start()
Starts the reservation
public
start() : void
Tags
Return values
void —update()
Updates model properties with form data
public
update(stdClass $form) : void
Parameters
- $form : stdClass
Return values
void —validate()
Domain object save validation callback.
public
validate() : void
Any rules checks on each update, can be implemented here.