- PHP 기본 Request 모듈에서 쓰이는 함수를 정리한다.
Request::request()->all()
Request::get()->toArray()
Request::post()->toArray()
Request::file()->toArray()
Request::isAjax()
Request::getDirectoryUri()
Request::getFileUri()
Request::isSecure()
Request::getDomainUrl()
Request::getRequestUri()
Request::getRemoteAddress()
Request::getQueryString()
Request::getReferer()
Framework\Http\Request
모듈에서 쓰이는 변수, 메소드들을 살펴본다.
모듈 import
use Framework\Http\Request as FRequest;
모듈 상수
- Static 변수이므로 FResponse::HTTP_CONTINUE형식으로 사용한다
{
"METHOD_HEAD": "HEAD",
"METHOD_GET": "GET",
"METHOD_POST": "POST",
"METHOD_PUT": "PUT",
"METHOD_PATCH": "PATCH",
"METHOD_DELETE": "DELETE",
"METHOD_PURGE": "PURGE",
"METHOD_OPTIONS": "OPTIONS",
"METHOD_TRACE": "TRACE",
"METHOD_CONNECT": "CONNECT",
"MYAPP_USER_AGNET": "GDWebViewApp"
}
getProperties
[
{
"name": "trustedMethods",
"class": "Framework\\Http\\Request"
},
{
"name": "_headers",
"class": "Framework\\Http\\Request"
},
{
"name": "_get",
"class": "Framework\\Http\\Request"
},
{
"name": "_post",
"class": "Framework\\Http\\Request"
},
{
"name": "_files",
"class": "Framework\\Http\\Request"
},
{
"name": "_server",
"class": "Framework\\Http\\Request"
},
{
"name": "_request",
"class": "Framework\\Http\\Request"
},
{
"name": "_parameters",
"class": "Framework\\Http\\Request"
},
{
"name": "_format",
"class": "Framework\\Http\\Request"
},
{
"name": "_method",
"class": "Framework\\Http\\Request"
},
{
"name": "_mobileDetect",
"class": "Framework\\Http\\Request"
},
{
"name": "_remoteAddress",
"class": "Framework\\Http\\Request"
},
{
"name": "formats",
"class": "Framework\\Http\\Request"
},
{
"name": "httpMethodParameterOverride",
"class": "Framework\\Http\\Request"
}
]
getMethods
[
{
"name": "__construct",
"class": "Framework\\Http\\Request"
},
{
"name": "_initialize",
"class": "Framework\\Http\\Request"
},
{
"name": "get",
"class": "Framework\\Http\\Request"
},
{
"name": "post",
"class": "Framework\\Http\\Request"
},
{
"name": "files",
"class": "Framework\\Http\\Request"
},
{
"name": "server",
"class": "Framework\\Http\\Request"
},
{
"name": "request",
"class": "Framework\\Http\\Request"
},
{
"name": "getHeaders",
"class": "Framework\\Http\\Request"
},
{
"name": "initializeFormats",
"class": "Framework\\Http\\Request"
},
{
"name": "getMimeType",
"class": "Framework\\Http\\Request"
},
{
"name": "getFormat",
"class": "Framework\\Http\\Request"
},
{
"name": "setFormat",
"class": "Framework\\Http\\Request"
},
{
"name": "getRequestFormat",
"class": "Framework\\Http\\Request"
},
{
"name": "setRequestFormat",
"class": "Framework\\Http\\Request"
},
{
"name": "getHost",
"class": "Framework\\Http\\Request"
},
{
"name": "getHostNoPort",
"class": "Framework\\Http\\Request"
},
{
"name": "getDefaultHost",
"class": "Framework\\Http\\Request"
},
{
"name": "getSubdomain",
"class": "Framework\\Http\\Request"
},
{
"name": "getSubdomainDirectory",
"class": "Framework\\Http\\Request"
},
{
"name": "getDomainUrl",
"class": "Framework\\Http\\Request"
},
{
"name": "getServerName",
"class": "Framework\\Http\\Request"
},
{
"name": "getServerPort",
"class": "Framework\\Http\\Request"
},
{
"name": "getUserAgent",
"class": "Framework\\Http\\Request"
},
{
"name": "getServerProtocol",
"class": "Framework\\Http\\Request"
},
{
"name": "getReferer",
"class": "Framework\\Http\\Request"
},
{
"name": "getParserReferer",
"class": "Framework\\Http\\Request"
},
{
"name": "getFileUri",
"class": "Framework\\Http\\Request"
},
{
"name": "getDirectoryUri",
"class": "Framework\\Http\\Request"
},
{
"name": "getFullDirectoryUri",
"class": "Framework\\Http\\Request"
},
{
"name": "getFullFileUri",
"class": "Framework\\Http\\Request"
},
{
"name": "getInfoUri",
"class": "Framework\\Http\\Request"
},
{
"name": "getReturnUrl",
"class": "Framework\\Http\\Request"
},
{
"name": "getServerAddress",
"class": "Framework\\Http\\Request"
},
{
"name": "getRemoteAddress",
"class": "Framework\\Http\\Request"
},
{
"name": "getMethod",
"class": "Framework\\Http\\Request"
},
{
"name": "getRealMethod",
"class": "Framework\\Http\\Request"
},
{
"name": "getPhpSelf",
"class": "Framework\\Http\\Request"
},
{
"name": "getRequestUri",
"class": "Framework\\Http\\Request"
},
{
"name": "getScriptName",
"class": "Framework\\Http\\Request"
},
{
"name": "getQueryString",
"class": "Framework\\Http\\Request"
},
{
"name": "normalizeQueryString",
"class": "Framework\\Http\\Request"
},
{
"name": "getScriptFileName",
"class": "Framework\\Http\\Request"
},
{
"name": "isSecure",
"class": "Framework\\Http\\Request"
},
{
"name": "getScheme",
"class": "Framework\\Http\\Request"
},
{
"name": "isMethod",
"class": "Framework\\Http\\Request"
},
{
"name": "isMethodSafe",
"class": "Framework\\Http\\Request"
},
{
"name": "isAjax",
"class": "Framework\\Http\\Request"
},
{
"name": "getMacAddress",
"class": "Framework\\Http\\Request"
},
{
"name": "isCli",
"class": "Framework\\Http\\Request"
},
{
"name": "isWindowServer",
"class": "Framework\\Http\\Request"
},
{
"name": "isMobile",
"class": "Framework\\Http\\Request"
},
{
"name": "isMobileDevice",
"class": "Framework\\Http\\Request"
},
{
"name": "isMyapp",
"class": "Framework\\Http\\Request"
},
{
"name": "isModernBrowser",
"class": "Framework\\Http\\Request"
},
{
"name": "isIe",
"class": "Framework\\Http\\Request"
},
{
"name": "isRefresh",
"class": "Framework\\Http\\Request"
},
{
"name": "getMallNameByUri",
"class": "Framework\\Http\\Request"
},
{
"name": "getMallNameByReferer",
"class": "Framework\\Http\\Request"
},
{
"name": "hasGlobalMallSubDomain",
"class": "Framework\\Http\\Request"
},
{
"name": "getDirectoryByDepth",
"class": "Framework\\Http\\Request"
}
]