Author: Alexander Pechkarev (alexpechkarev@gmail.com)
Example #1
0
 /**
  * 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();
 }
Example #2
0
 /**
  * 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);
 }
Example #3
0
 protected function clearParameters()
 {
     Parameters::resetParams();
 }