Timber\URLHelper::get_current_url PHP Метод

get_current_url() публичный статический Метод

public static get_current_url ( ) : string
Результат string
    public static function get_current_url()
    {
        $pageURL = self::get_scheme() . "://";
        if (isset($_SERVER["SERVER_PORT"]) && $_SERVER["SERVER_PORT"] && $_SERVER["SERVER_PORT"] != "80") {
            $pageURL .= self::get_host() . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
        } else {
            $pageURL .= self::get_host() . $_SERVER["REQUEST_URI"];
        }
        return $pageURL;
    }

Usage Example

Пример #1
0
 /**
  *
  */
 function get_current_url()
 {
     Helper::warn('TimberHelper::get_current_url() is deprecated and will be removed in future versions, use Timber\\URLHelper::get_current_url()');
     return URLHelper::get_current_url();
 }