ref . ']'; } public function getExists () { if (!$this->infoFetched) $this->fetchInfo(); return $this->exists; } public function getMunicipality () { if (!$this->infoFetched) $this->fetchInfo(); return $this->municipality; } public function getName () { if (!$this->infoFetched) $this->fetchInfo(); return $this->name; } public function getFullName () { if (!$this->infoFetched) $this->fetchInfo(); return $this->fullName; } public function getLocation () { if (!$this->infoFetched) $this->fetchInfo(); return $this->location; } protected function fetchInfo () { $apireq = new ApiCoreRequest('haltes/titel/' . $this->ref); $response = $apireq->exec(); $this->exists = !is_null($response); $this->municipality = $response['omschrijvingGemeente']; $this->name = static::sanitizeName($response['omschrijvingKort']); $this->fullName = static::sanitizeName($response['omschrijvingLang']); $this->location = array(floatval($response['coordinaat']['lt']), floatval($response['coordinaat']['ln'])); } public function getImminentVehicles ($numberOfLines) { $apireq = new ApiCoreRequest('haltes/doorkomstenditmoment/' . $this->ref . '/' . $numberOfLines); return $apireq->exec(); } } ?>