MedicalCenterEntity
extends BaseEntity
in package
This class represents an entity for a medical center, extending the BaseEntity class.
The template parameter
Tags
Table of Contents
- $active : int|null
- $createdAt : string|null
- $id : mixed
- $latitude : float|null
- $longitude : float|null
- $name : string|null
- $zoneName : string|null
- bind() : void
- Bind data to the entity properties.
- fields() : array<string|int, mixed>
- Get the names of the entity properties as an array.
- getActive() : int
- Check if the medical center is active.
- getCreatedAt() : string
- Get the date and time when the medical center was created.
- getId() : I
- Get the ID of the entity.
- getLatitude() : float
- Get the latitude of the medical center's location.
- getLongitude() : float
- Get the longitude of the medical center's location.
- getName() : string
- Get the name of the medical center.
- getZoneName() : string
- Get the ID of the time zone associated with the medical center.
- setActive() : void
- Set the active status of the medical center.
- setCreatedAt() : void
- Set the date and time when the medical center was created.
- setId() : void
- Set the ID of the entity.
- setLatitude() : void
- Set the latitude of the medical center's location.
- setLongitude() : void
- Set the longitude of the medical center's location.
- setName() : void
- Set the name of the medical center.
- setZoneName() : void
- Set the ID of the time zone associated with the medical center.
- values() : array<string|int, mixed>
- Get the values of the entity properties as an array.
- valuesAsMap() : array<string|int, mixed>
- Get the values of the entity properties as a map.
Properties
$active
private
int|null
$active
= null
Flag indicating whether the medical center is active or not.
$createdAt
private
string|null
$createdAt
= null
The date and time when the medical center was created.
$id
private
mixed
$id
The ID of the entity. The type of the ID is determined by the template parameter.
$latitude
private
float|null
$latitude
= null
The latitude of the medical center's location.
$longitude
private
float|null
$longitude
= null
The longitude of the medical center's location.
$name
private
string|null
$name
= null
The name of the medical center.
$zoneName
private
string|null
$zoneName
= null
The ID of the time zone associated with the medical center.
Methods
bind()
Bind data to the entity properties.
public
bind(array<string|int, mixed> $data) : void
This method takes an associative array of data and binds the values to the entity's properties. It matches the keys of the data array with the properties defined in the entity's database model class, and if there is a match, it sets the property value using the corresponding setter method.
Parameters
- $data : array<string|int, mixed>
-
An associative array containing the data to bind to the entity properties.
Return values
void —fields()
Get the names of the entity properties as an array.
public
fields() : array<string|int, mixed>
Return values
array<string|int, mixed> —An array containing the names of the entity properties.
getActive()
Check if the medical center is active.
public
getActive() : int
Return values
int —1 if the medical center is active, 0 otherwise.
getCreatedAt()
Get the date and time when the medical center was created.
public
getCreatedAt() : string
Return values
string —The date and time when the medical center was created.
getId()
Get the ID of the entity.
public
getId() : I
Return values
I —The ID of the entity.
getLatitude()
Get the latitude of the medical center's location.
public
getLatitude() : float
Return values
float —The latitude of the medical center's location.
getLongitude()
Get the longitude of the medical center's location.
public
getLongitude() : float
Return values
float —The longitude of the medical center's location.
getName()
Get the name of the medical center.
public
getName() : string
Return values
string —The name of the medical center.
getZoneName()
Get the ID of the time zone associated with the medical center.
public
getZoneName() : string
Return values
string —The ID of the time zone associated with the medical center.
setActive()
Set the active status of the medical center.
public
setActive(int $active) : void
Parameters
- $active : int
-
The active status to set for the medical center. 1 if the medical center is active, 0 otherwise.
Return values
void —setCreatedAt()
Set the date and time when the medical center was created.
public
setCreatedAt(string $createdAt) : void
Parameters
- $createdAt : string
-
The date and time when the medical center was created to set.
Return values
void —setId()
Set the ID of the entity.
public
setId(I $id) : void
Parameters
- $id : I
-
The ID to set for the entity.
Return values
void —setLatitude()
Set the latitude of the medical center's location.
public
setLatitude(float $latitude) : void
Parameters
- $latitude : float
-
The latitude of the medical center's location to set.
Return values
void —setLongitude()
Set the longitude of the medical center's location.
public
setLongitude(float $longitude) : void
Parameters
- $longitude : float
-
The longitude of the medical center's location to set.
Return values
void —setName()
Set the name of the medical center.
public
setName(string $name) : void
Parameters
- $name : string
-
The name of the medical center to set.
Return values
void —setZoneName()
Set the ID of the time zone associated with the medical center.
public
setZoneName(string $zoneName) : void
Parameters
- $zoneName : string
-
The ID of the time zone to set for the medical center.
Return values
void —values()
Get the values of the entity properties as an array.
public
values() : array<string|int, mixed>
This method retrieves the values of all properties defined in the entity's database model class and returns them as an array. The array represents the values that can be used in database operations.
Return values
array<string|int, mixed> —An array containing the values of the entity properties.
valuesAsMap()
Get the values of the entity properties as a map.
public
valuesAsMap() : array<string|int, mixed>
This method retrieves the values of all properties defined in the entity's database model class and returns them as an associative array, where the keys represent the property names and the values are the corresponding property values.
Return values
array<string|int, mixed> —An associative array containing the values of the entity properties.