%NAME% 0 %DESCRIPTION% %LONGITUDE% %LATITUDE% 0 0 0 500 %STYLE% relativeToGround %LONGITUDE%,%LATITUDE% '; private $name; private $description; private $longitude; private $latitude; private $style; /* * Function: __construct (constructor) * Parameters: - * Function: Creating a new KMLFile */ function __construct() { } function setName($newName) { $this->name = $newName; } function setDescription($newDescription) { $this->description = (string) $newDescription; } function setLongitude($newLongitude) { $this->longitude = (double) $newLongitude; } function setLatitude($newLatitude) { $this->latitude = (double) $newLatitude; } function setStyle($newStyle) { $this->style = (string) $newStyle; } function toString() { $toString = $this->template; $toString = str_replace('%NAME%', $this->name, $toString); $toString = str_replace('%DESCRIPTION%', $this->description, $toString); $toString = str_replace('%LONGITUDE%', $this->longitude, $toString); $toString = str_replace('%LATITUDE%', $this->latitude, $toString); $toString = str_replace('%STYLE%', $this->style, $toString); return $toString; } } ?>