EraClassification
FinalYes
Which protocol era one inbound HTTP request belongs to.
The outcome of InboundClassifier: an era to route to, or a rejection the entry answers with directly. Never both.
Tags
Table of Contents
Properties
- $claimedVersion : string|null
- $error : Error|null
- $httpStatus : int
- $modern : bool
Methods
- isRejected() : bool
- legacy() : self
- The handshake era: everything that makes no per-request envelope claim.
- modern() : self
- The modern era, claiming $version — which may be one this server does not serve. Routing and support are separate questions, and the dispatcher owns the second one so its answer can name what it does support.
- reject() : self
- __construct() : mixed
Properties
$claimedVersion read-only
public
string|null
$claimedVersion
$error read-only
public
Error|null
$error
$httpStatus read-only
public
int
$httpStatus
$modern read-only
public
bool
$modern
Methods
isRejected()
public
isRejected() : bool
Return values
boollegacy()
The handshake era: everything that makes no per-request envelope claim.
public
static legacy([string|null $claimedVersion = null ]) : self
Parameters
- $claimedVersion : string|null = null
Return values
selfmodern()
The modern era, claiming $version — which may be one this server does not serve. Routing and support are separate questions, and the dispatcher owns the second one so its answer can name what it does support.
public
static modern(string $version) : self
Parameters
- $version : string
Return values
selfreject()
public
static reject(Error $error, int $httpStatus) : self
Parameters
- $error : Error
- $httpStatus : int
Return values
self__construct()
private
__construct(bool $modern, string|null $claimedVersion, Error|null $error, int $httpStatus) : mixed
Parameters
- $modern : bool
- $claimedVersion : string|null
- $error : Error|null
- $httpStatus : int