Documentation

AbstractHttp
in package
implements HttpInterface

AbstractYes

Abstract HTTP class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
5.2.0

Table of Contents

Interfaces

HttpInterface
HTTP interface

Properties

$request  : AbstractRequest|null
Request
$response  : AbstractResponse|null
Response

Methods

__construct()  : mixed
Instantiate the HTTP object
__toString()  : string
Render the request/response to string
getRequest()  : AbstractRequest
Get the request
getResponse()  : AbstractResponse
Get the response
hasRequest()  : bool
Has request
hasResponse()  : bool
Get the response
isAccepted()  : bool|null
Determine if the response is 202 accepted
isBadGateway()  : bool|null
Determine if the response is a 502 Bad Gateway
isBadRequest()  : bool|null
Determine if the response is a 400 Bad Request
isClientError()  : bool|null
Determine if the response is a client error
isComplete()  : bool
Determine if the response is complete
isConflict()  : bool|null
Determine if the response is a 409 Conflict
isContinue()  : bool|null
Determine if the response is a continue
isCreated()  : bool|null
Determine if the response is 201 created
isError()  : bool|null
Determine if the response is an error
isForbidden()  : bool|null
Determine if the response is a 403 Forbidden
isFound()  : bool|null
Determine if the response is a 302 Found
isInternalServerError()  : bool|null
Determine if the response is a 500 Internal Server Error
isLengthRequired()  : bool|null
Determine if the response is a 411 Length Required
isMethodNotAllowed()  : bool|null
Determine if the response is a 405 Method Not Allowed
isMovedPermanently()  : bool|null
Determine if the response is a 301 Moved Permanently
isNoContent()  : bool|null
Determine if the response is 204 No Content
isNotAcceptable()  : bool|null
Determine if the response is a 406 Not Acceptable
isNotFound()  : bool|null
Determine if the response is a 404 Not Found
isOk()  : bool|null
Determine if the response is 200 OK
isRedirect()  : bool|null
Determine if the response is a redirect
isRequestTimeout()  : bool|null
Determine if the response is a 408 Request Timeout
isServerError()  : bool|null
Determine if the response is a server error
isServiceUnavailable()  : bool|null
Determine if the response is a 503 Service Unavailable
isSuccess()  : bool|null
Determine if the response is a success
isTooManyRequests()  : bool|null
Determine if the response is a 429 Too Many Requests
isUnauthorized()  : bool|null
Determine if the response is a 401 Unauthorized
isUnprocessableEntity()  : bool|null
Determine if the response is a 422 Unprocessable Entity
isUnsupportedMediaType()  : bool|null
Determine if the response is a 415 Unsupported Media Type
render()  : string
Render the request/response to string
send()  : mixed
Send the request/response
setRequest()  : AbstractHttp
Set the request
setResponse()  : AbstractHttp
Set the response

Properties

Methods

__toString()

Render the request/response to string

public abstract __toString() : string
Return values
string

hasRequest()

Has request

public hasRequest() : bool
Return values
bool

hasResponse()

Get the response

public hasResponse() : bool
Return values
bool

isAccepted()

Determine if the response is 202 accepted

public isAccepted() : bool|null
Return values
bool|null

isBadGateway()

Determine if the response is a 502 Bad Gateway

public isBadGateway() : bool|null
Return values
bool|null

isBadRequest()

Determine if the response is a 400 Bad Request

public isBadRequest() : bool|null
Return values
bool|null

isClientError()

Determine if the response is a client error

public isClientError() : bool|null
Return values
bool|null

isComplete()

Determine if the response is complete

public isComplete() : bool
Return values
bool

isConflict()

Determine if the response is a 409 Conflict

public isConflict() : bool|null
Return values
bool|null

isContinue()

Determine if the response is a continue

public isContinue() : bool|null
Return values
bool|null

isCreated()

Determine if the response is 201 created

public isCreated() : bool|null
Return values
bool|null

isError()

Determine if the response is an error

public isError() : bool|null
Return values
bool|null

isForbidden()

Determine if the response is a 403 Forbidden

public isForbidden() : bool|null
Return values
bool|null

isFound()

Determine if the response is a 302 Found

public isFound() : bool|null
Return values
bool|null

isInternalServerError()

Determine if the response is a 500 Internal Server Error

public isInternalServerError() : bool|null
Return values
bool|null

isLengthRequired()

Determine if the response is a 411 Length Required

public isLengthRequired() : bool|null
Return values
bool|null

isMethodNotAllowed()

Determine if the response is a 405 Method Not Allowed

public isMethodNotAllowed() : bool|null
Return values
bool|null

isMovedPermanently()

Determine if the response is a 301 Moved Permanently

public isMovedPermanently() : bool|null
Return values
bool|null

isNoContent()

Determine if the response is 204 No Content

public isNoContent() : bool|null
Return values
bool|null

isNotAcceptable()

Determine if the response is a 406 Not Acceptable

public isNotAcceptable() : bool|null
Return values
bool|null

isNotFound()

Determine if the response is a 404 Not Found

public isNotFound() : bool|null
Return values
bool|null

isOk()

Determine if the response is 200 OK

public isOk() : bool|null
Return values
bool|null

isRedirect()

Determine if the response is a redirect

public isRedirect() : bool|null
Return values
bool|null

isRequestTimeout()

Determine if the response is a 408 Request Timeout

public isRequestTimeout() : bool|null
Return values
bool|null

isServerError()

Determine if the response is a server error

public isServerError() : bool|null
Return values
bool|null

isServiceUnavailable()

Determine if the response is a 503 Service Unavailable

public isServiceUnavailable() : bool|null
Return values
bool|null

isSuccess()

Determine if the response is a success

public isSuccess() : bool|null
Return values
bool|null

isTooManyRequests()

Determine if the response is a 429 Too Many Requests

public isTooManyRequests() : bool|null
Return values
bool|null

isUnauthorized()

Determine if the response is a 401 Unauthorized

public isUnauthorized() : bool|null
Return values
bool|null

isUnprocessableEntity()

Determine if the response is a 422 Unprocessable Entity

public isUnprocessableEntity() : bool|null
Return values
bool|null

isUnsupportedMediaType()

Determine if the response is a 415 Unsupported Media Type

public isUnsupportedMediaType() : bool|null
Return values
bool|null

render()

Render the request/response to string

public abstract render() : string
Return values
string

send()

Send the request/response

public abstract send() : mixed

        
On this page

Search results