WebHttpServer
class WebHttpServer extends HttpServer (View source)
The WebServer class.
Constants
CACHE_ENABLE |
|
CACHE_DISABLE |
|
CACHE_CUSTOM_HEADER |
|
Methods
Create a Server instance
Create a Server instance from an existing request object
Server constructor.
listen
Method to set property request
execute
prepareCache
Method to get property MimeType
Method to set property mimeType
Method to get property CharSet
Method to set property charSet
Method to get property ModifiedDate
Method to get property UriData
__get
Method to get property Compressor
Method to get property Cachable
Method to set property cachable
Create Compressor object.
Details
in HttpServer at line line 68
static HttpServer
createFromGlobals(callable $handler = null, array $server = array(), array $query = array(), array $body = array(), array $cookies = array(), array $files = array())
Create a Server instance
Creates a server instance from the callback and the following PHP environmental values:
in HttpServer at line line 90
static HttpServer
create(callable $handler = null, ServerRequestInterface $request, ResponseInterface $response = null, OutputInterface $output = null)
Create a Server instance from an existing request object
Provided a callback, an existing request object, and optionally an existing response object, create and return the Server instance.
If no Response object is provided, one will be created.
at line line 91
__construct(callable $handler = null, ServerRequestInterface $request, ResponseInterface $response = null, OutputInterface $output = null)
Server constructor.
at line line 107
listen(callable $errorHandler = null)
listen
in HttpServer at line line 143
callable
getHandler()
Method to get property Handler
in HttpServer at line line 155
HttpServer
setHandler(callable $handler)
Method to set property handler
in HttpServer at line line 167
ServerRequestInterface
getRequest()
Method to get property Request
in HttpServer at line line 179
HttpServer
setRequest(ServerRequestInterface $request)
Method to set property request
in HttpServer at line line 191
OutputInterface
getOutput()
Method to get property Output
in HttpServer at line line 208
HttpServer
setOutput(Output $output)
Method to set property output
in HttpServer at line line 220
ResponseInterface
getResponse()
Method to get property Response
in HttpServer at line line 232
HttpServer
setResponse(ResponseInterface $response)
Method to set property response
at line line 121
ResponseInterface
execute(callable $nextHandler = null)
execute
at line line 150
ResponseInterface
prepareCache(ResponseInterface $response)
prepareCache
at line line 286
string
getContentType()
Method to get property MimeType
at line line 298
WebHttpServer
setContentType(string $contentType)
Method to set property mimeType
at line line 310
string
getCharSet()
Method to get property CharSet
at line line 322
WebHttpServer
setCharSet(string $charSet)
Method to set property charSet
at line line 346
WebHttpServer
setModifiedDate(DateTime $modifiedDate)
Method to set property modifiedDate
at line line 370
WebHttpServer
setUriData(array|UriData $uriData)
Method to set property uriData
at line line 389
mixed
__get(string $name)
__get
at line line 409
HttpCompressor
getCompressor()
Method to get property Compressor
at line line 421
WebHttpServer
setCompressor(HttpCompressor $compressor)
Method to set property compressor
at line line 433
boolean
getCachable()
Method to get property Cachable
at line line 445
WebHttpServer
cachable(boolean $cachable = self::CACHE_CUSTOM_HEADER)
Method to set property cachable
at line line 459
HttpCompressor
createHttpCompressor(string $acceptEncoding = null)
Create Compressor object.