@@ -1,15 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* Represents a facility in the EcoBuddy system
|
||||
* Represents a singular facility
|
||||
*
|
||||
* This class serves as a data model for facilities, encapsulating all
|
||||
* the properties and behaviours of a single facility. It follows the
|
||||
* Data Transfer Object (DTO) pattern that I learned about in my
|
||||
* software architecture module.
|
||||
* Data model for facilities, encapsulating all
|
||||
* properties and behaviours of a single facility.
|
||||
*
|
||||
* Each facility has location data, descriptive information, and metadata
|
||||
* about who contributed it. This class provides a clean interface for
|
||||
* accessing this data throughout the application.
|
||||
* Each facility has location data, descriptive info, and metadata.
|
||||
*/
|
||||
class FacilityData {
|
||||
/**
|
||||
@@ -77,10 +73,6 @@ class FacilityData {
|
||||
|
||||
/**
|
||||
* Gets the facility's title
|
||||
*
|
||||
* The title is the primary name or label for the facility that
|
||||
* is displayed to users in the interface.
|
||||
*
|
||||
* @return string The facility title
|
||||
*/
|
||||
public function getTitle() {
|
||||
@@ -89,10 +81,6 @@ class FacilityData {
|
||||
|
||||
/**
|
||||
* Gets the facility's category
|
||||
*
|
||||
* The category helps classify facilities by type, such as
|
||||
* recycling centre, community garden, etc.
|
||||
*
|
||||
* @return string The facility category
|
||||
*/
|
||||
public function getCategory() {
|
||||
@@ -101,10 +89,6 @@ class FacilityData {
|
||||
|
||||
/**
|
||||
* Gets the facility's current status
|
||||
*
|
||||
* The status indicates whether the facility is operational,
|
||||
* under maintenance, closed, etc.
|
||||
*
|
||||
* @return string The facility status
|
||||
*/
|
||||
public function getStatus() {
|
||||
@@ -113,10 +97,6 @@ class FacilityData {
|
||||
|
||||
/**
|
||||
* Gets the facility's description
|
||||
*
|
||||
* The description provides detailed information about the facility,
|
||||
* its purpose, services offered, etc.
|
||||
*
|
||||
* @return string The facility description
|
||||
*/
|
||||
public function getDescription() {
|
||||
@@ -125,9 +105,6 @@ class FacilityData {
|
||||
|
||||
/**
|
||||
* Gets the facility's house/building number
|
||||
*
|
||||
* This is part of the facility's address and helps locate it physically.
|
||||
*
|
||||
* @return string The house/building number
|
||||
*/
|
||||
public function getHouseNumber() {
|
||||
@@ -136,9 +113,6 @@ class FacilityData {
|
||||
|
||||
/**
|
||||
* Gets the facility's street name
|
||||
*
|
||||
* This is part of the facility's address and helps locate it physically.
|
||||
*
|
||||
* @return string The street name
|
||||
*/
|
||||
public function getStreetName() {
|
||||
@@ -147,9 +121,6 @@ class FacilityData {
|
||||
|
||||
/**
|
||||
* Gets the facility's county
|
||||
*
|
||||
* This is part of the facility's address and helps locate it physically.
|
||||
*
|
||||
* @return string The county
|
||||
*/
|
||||
public function getCounty() {
|
||||
@@ -158,9 +129,6 @@ class FacilityData {
|
||||
|
||||
/**
|
||||
* Gets the facility's town or city
|
||||
*
|
||||
* This is part of the facility's address and helps locate it physically.
|
||||
*
|
||||
* @return string The town or city
|
||||
*/
|
||||
public function getTown() {
|
||||
@@ -169,10 +137,6 @@ class FacilityData {
|
||||
|
||||
/**
|
||||
* Gets the facility's postcode
|
||||
*
|
||||
* This is part of the facility's address and helps locate it physically.
|
||||
* It's also useful for searching facilities by location.
|
||||
*
|
||||
* @return string The postcode
|
||||
*/
|
||||
public function getPostcode() {
|
||||
@@ -181,10 +145,6 @@ class FacilityData {
|
||||
|
||||
/**
|
||||
* Gets the facility's longitude coordinate
|
||||
*
|
||||
* This is used for displaying the facility on a map and
|
||||
* for calculating distances between facilities.
|
||||
*
|
||||
* @return float The longitude coordinate
|
||||
*/
|
||||
public function getLng() {
|
||||
@@ -193,10 +153,6 @@ class FacilityData {
|
||||
|
||||
/**
|
||||
* Gets the facility's latitude coordinate
|
||||
*
|
||||
* This is used for displaying the facility on a map and
|
||||
* for calculating distances between facilities.
|
||||
*
|
||||
* @return float The latitude coordinate
|
||||
*/
|
||||
public function getLat() {
|
||||
@@ -205,10 +161,6 @@ class FacilityData {
|
||||
|
||||
/**
|
||||
* Gets the username of the facility's contributor
|
||||
*
|
||||
* This tracks who added the facility to the system,
|
||||
* which is useful for auditing and attribution.
|
||||
*
|
||||
* @return string The contributor's username
|
||||
*/
|
||||
public function getContributor() {
|
||||
|
Reference in New Issue
Block a user