Room
extends Model
in package
Table of Contents
- $blocked : bool
- $building : Building|null
- $buildingId : int
- $created : JsonDateTime
- $floor : int
- $id : int
- $image : Image
- $imageId : int
- $name : string
- $occupied : bool
- $rfid : string|null
- $roomType : string
- $seatsCount : int
- $updated : JsonDateTime
- __construct() : mixed
- __set() : mixed
- jsonSerialize() : array<string|int, mixed>
- Specify data which should be serialized to JSON
- occupy() : void
- Mark room as occupied - is under pending reservation
- release() : void
- Marks room as free
- update() : void
- Updates model properties with form data
- valiadateRfidKey() : void
- Validates if provided rfid key is correct
- validate() : void
- Domain object save validation callback.
- validateCallback() : void
- {@inheritDoc}
Properties
$blocked
public
bool
$blocked
$building
public
Building|null
$building
$buildingId
public
int
$buildingId
$created
public
JsonDateTime
$created
$floor
public
int
$floor
$id
public
int
$id
$image
public
Image
$image
$imageId
public
int
$imageId
$name
public
string
$name
$occupied
public
bool
$occupied
$rfid
public
string|null
$rfid
$roomType
public
string
$roomType
$seatsCount
public
int
$seatsCount
$updated
public
JsonDateTime
$updated
Methods
__construct()
public
__construct(int $id, string $name, Image $image, Building|null $building, string|null $rfid, string $roomType, int $seatsCount, int $floor, bool $blocked, bool $occupied, JsonDateTime $created, JsonDateTime $updated, int $imageId, int $buildingId) : mixed
Parameters
- $id : int
- $name : string
- $image : Image
- $building : Building|null
- $rfid : string|null
- $roomType : string
- $seatsCount : int
- $floor : int
- $blocked : bool
- $occupied : bool
- $created : JsonDateTime
- $updated : JsonDateTime
- $imageId : int
- $buildingId : int
Return values
mixed —__set()
public
__set(string $name, mixed $value) : mixed
Parameters
- $name : string
- $value : mixed
Tags
Return values
mixed —jsonSerialize()
Specify data which should be serialized to JSON
public
jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed> —occupy()
Mark room as occupied - is under pending reservation
public
occupy() : void
Tags
Return values
void —release()
Marks room as free
public
release() : void
Tags
Return values
void —update()
Updates model properties with form data
public
update(stdClass $form) : void
Parameters
- $form : stdClass
Return values
void —valiadateRfidKey()
Validates if provided rfid key is correct
public
valiadateRfidKey(string $key) : void
Parameters
- $key : string
Tags
Return values
void —validate()
Domain object save validation callback.
public
validate() : void
Any rules checks on each update, can be implemented here.
Return values
void —validateCallback()
{@inheritDoc}
protected
validateCallback() : void