getAbsoluteUrl() public method

Returns the entire URI including query string and fragment.
public getAbsoluteUrl ( ) : string
return string
示例#1
0
 /**
  * @param Payment $payment
  * @return Payment
  */
 public static function addTrackingParameters(Payment $payment)
 {
     $resURL = $payment->getResURL();
     $url = new Url($resURL);
     $url->setQueryParameter('utm_nooverride', 1);
     $payment->setResURL($url->getAbsoluteUrl());
     return $payment;
 }
示例#2
0
 /**
  * @param string $method
  * @param array $args
  * @throws LastfmException
  * @return \stdClass|string
  */
 public function call($method, array $args)
 {
     $this->callback_url->appendQuery('method=' . $method);
     //Assign method
     foreach ($args as $arg => $value) {
         $this->callback_url->appendQuery($arg . '=' . urlencode($value));
     }
     //dump($this->callback_url->getAbsoluteUrl());
     $content = file_get_contents($this->callback_url->getAbsoluteUrl());
     if ($this->data_format == self::DATA_JSON) {
         $result = json_decode($content);
         if (isset($result->error)) {
             throw new LastfmException($method . ': ' . $result->message, $result->error);
         }
         return $result;
     }
     return $content;
 }
示例#3
0
 public static function addTrackingParameters(Payment $payment)
 {
     $redirectUrls = $payment->getRedirectUrls();
     $url = new Url($redirectUrls->getReturnUrl());
     $url->setQueryParameter('utm_nooverride', 1);
     $redirectUrls->setReturnUrl($url->getAbsoluteUrl());
     $payment->setRedirectUrls($redirectUrls);
     return $payment;
 }