/** * Get Web Service Response * @return type */ public function get() { // use output parameter if required by the service $this->requestUrl .= $this->service['endpoint'] ? $this->endpoint : ''; // set API Key $this->requestUrl .= 'key=' . urlencode($this->key); // build query string $this->requestUrl .= '&' . Parameters::getQueryString($this->service['param']); return $this->service['decodePolyline'] ? $this->decode($this->make()) : $this->make(); }
/** * Get Web Service Response * @return type */ public function get() { $post = false; // use output parameter if required by the service $this->requestUrl .= $this->service['endpoint'] ? $this->endpoint : ''; // set API Key $this->requestUrl .= 'key=' . urlencode($this->key); switch ($this->service['type']) { case 'POST': $post = json_encode($this->service['param']); break; case 'GET': default: $this->requestUrl .= '&' . Parameters::getQueryString($this->service['param']); break; } return $this->make($post); }
protected function clearParameters() { Parameters::resetParams(); }