Piwik\API\Request::getRequestParametersGET PHP 메소드

getRequestParametersGET() 공개 정적인 메소드

Returns the original request parameters in the current query string as an array mapping query parameter names with values. The result of this function will not be affected by any modifications to $_GET and will not include parameters in $_POST.
public static getRequestParametersGET ( ) : array
리턴 array
    public static function getRequestParametersGET()
    {
        if (empty($_SERVER['QUERY_STRING'])) {
            return array();
        }
        $GET = UrlHelper::getArrayFromQueryString($_SERVER['QUERY_STRING']);
        return $GET;
    }

Usage Example

예제 #1
0
 /**
  * Returns the segment query parameter from the original request, without modifications.
  *
  * @return array|bool
  */
 public static function getRawSegmentFromRequest()
 {
     // we need the URL encoded segment parameter, we fetch it from _SERVER['QUERY_STRING'] instead of default URL decoded _GET
     $segmentRaw = false;
     $segment = Common::getRequestVar('segment', '', 'string');
     if (!empty($segment)) {
         $request = Request::getRequestParametersGET();
         if (!empty($request['segment'])) {
             $segmentRaw = $request['segment'];
         }
     }
     return $segmentRaw;
 }