PHP 클래스 Phly\Http\ServerRequest
Extends the Request definition to add methods for accessing incoming data,
specifically server parameters, cookies, matched path parameters, query
string arguments, body parameters, and upload file information.
"Attributes" are discovered via decomposing the request (and usually
specifically the URI path), and typically will be injected by the application.
Requests are considered immutable; all methods that might change state are
implemented such that they retain the internal state of the current
message and return a new instance that contains the changed state.
파일 보기
프로젝트 열기: phly/http
1 사용 예제들
공개 메소드들
비공개 메소드들
메소드 상세
public __construct ( array $serverParams = [], array $uploadedFiles = [], null | string $uri = null, null | string $method = null, string | resource | Psr\Http\Message\StreamInterface $body = 'php://input', array $headers = [] ) |
$serverParams |
array |
Server parameters, typically from $_SERVER |
$uploadedFiles |
array |
Upload file information, a tree of UploadedFiles |
$uri |
null | string |
URI for the request, if any. |
$method |
null | string |
HTTP method for the request, if any. |
$body |
string | resource | Psr\Http\Message\StreamInterface |
Message body, if any. |
$headers |
array |
Headers for the message, if any. |
This overrides the parent functionality to ensure the method is never
empty; if no method is present, it returns 'GET'.
getUploadedFiles()
공개 메소드
withCookieParams()
공개 메소드
Unlike the regular Request implementation, the server-side
normalizes the method to uppercase to ensure consistency
and make checking the method simpler.
This methods returns a new instance.
withUploadedFiles()
공개 메소드
withoutAttribute()
공개 메소드