From bb8f77b034bec3844b4ff4d1ce5cfe798b6ccb67 Mon Sep 17 00:00:00 2001 From: Date: Sun, 13 Feb 2011 11:05:44 -0800 Subject: [PATCH] Added accessor methods --- XML/KML/Place.php | 74 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 67 insertions(+), 7 deletions(-) diff --git a/XML/KML/Place.php b/XML/KML/Place.php index 3fc378e..55a4e43 100644 --- a/XML/KML/Place.php +++ b/XML/KML/Place.php @@ -59,7 +59,7 @@ private function cdataEscape($data) * * @param string $id Id of the placemark * - * @return void + * @return XML_KML_Place this object */ public function setId($id) { @@ -67,12 +67,22 @@ public function setId($id) return $this; } + /** + * Returns the ID + * + * @return integer the id of this place + */ + public function getId() + { + return $this->id; + } + /** * Sets the name escaping tags with CDATA * * @param string $name Name of the placemark * - * @return void + * @return XML_KML_Place this object */ public function setName($name) { @@ -80,12 +90,22 @@ public function setName($name) return $this; } + /** + * Return the name of this place + * + * @return string the name + */ + public function getName() + { + return $this->name; + } + /** * Sets the description escaping tags with CDATA * * @param string $desc Description of the placemark * - * @return $this + * @return XML_KML_Place this object */ public function setDesc($desc) { @@ -93,13 +113,23 @@ public function setDesc($desc) return $this; } + /** + * Returns the description of this place + * + * @return string the description + */ + public function getDesc() + { + return $this->desc; + } + /** * Sets the style stripping any html and adding * a hash sign if not present for the style * * @param string $style Style of the placemark * - * @return $this + * @return XML_KML_Place this object */ public function setStyle($style) { @@ -116,13 +146,23 @@ public function setStyle($style) return $this; } + /** + * Returns the style of this place + * + * @return string the style + */ + public function getStyle() + { + return $this->style; + } + /** * Sets the coordinates, checking that they are floats * * @param float $lat Latitude coordinate * @param float $lng Longitude coordinate * - * @return $this + * @return XML_KML_Place this objectz * @throws XML_KML_Exception */ public function setCoords($lat, $lng) @@ -142,12 +182,22 @@ public function setCoords($lat, $lng) throw new XML_KML_Exception("Invalid set of coordinates."); } + /** + * Return the coordinates of this place + * + * @return string the coordinates + */ + public function getCoords() + { + return $this->coords; + } + /** * Sets the folder name or empty argument sets the folder to root * * @param string $folder Folder which the placemark goes in * - * @return $this + * @return XML_KML_Place this object */ public function setFolder($folder = false) { @@ -157,6 +207,16 @@ public function setFolder($folder = false) $this->folder = $folder; } return $this; - } + } + + /** + * Return the folder which this place resides + * + * @return string the folder + */ + public function getFolder() + { + return $this->folder; + } } ?> \ No newline at end of file