WebResponse¶
-
php\webserver\WebResponse Class WebResponse
Properties
Methods
__construct($parent)¶protected
Параметры:
- $parent – php\webserver\WebResponse
setHeader($name, $value)¶
Параметры:
- $name –
string- $value –
string
getHeader($name)¶
Параметры:
- $name –
stringРезультат:
string
getHeaders($name)¶
Параметры:
- $name –
stringРезультат:
string[]
getHeaderNames()¶
Результат: string[]
addHeader($name, $value)¶
Параметры:
- $name –
string- $value –
string
redirect($location, $httpStatus = 301)¶
Параметры:
- $location –
string- $httpStatus –
int
encodeRedirectURL($url)¶
Параметры:
- $url –
string
writeToBody($content)¶
Параметры:
- $content –
string
setContentLength($length)¶
Параметры:
- $length –
int
addCookie($cookie)¶
Параметры:
- $cookie –
array- [name, value, maxAge, path, domain, httpOnly, secure, comment]
getStatus()¶protected
Результат: int
setStatus($status)¶protected
Параметры:
- $status –
int
getContentType()¶protected
Результат: string
setContentType($contentType)¶protected
Параметры:
- $contentType –
string
getCharacterEncoding()¶protected
Результат: string
setCharacterEncoding($characterEncoding)¶protected
Параметры:
- $characterEncoding –
string
getBufferSize()¶protected
Результат: int
setBufferSize($bufferSize)¶protected
Параметры:
- $bufferSize –
int
- static
current¶
Результат: php\webserver\WebResponse