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
파일: Helper.php 프로젝트: rpkoller/timber
 /**
  *
  */
 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();
 }