Target
in package
FinalYes
The target of an HTTP request.
The target is sometimes referred to as the "resource". This "resource" may have one or more representations.
Tags
Table of Contents
Properties
- $location : string
- $requestProcessor : RequestProcessorInterface
Methods
- __construct() : mixed
- getRepresentation() : RepresentationInterface
- matchesLocation() : bool
- matchesMethod() : bool
- negotiate() : HttpResponseCodeEnum
Properties
$location read-only
public
string
$location
$requestProcessor read-only
public
RequestProcessorInterface
$requestProcessor
Methods
__construct()
public
__construct(string $location, HttpMethodEnum $method, Representations $representations, RequestProcessorInterface $requestProcessor) : mixed
Parameters
- $location : string
- $method : HttpMethodEnum
- $representations : Representations
- $requestProcessor : RequestProcessorInterface
getRepresentation()
public
getRepresentation(mixed $resource) : RepresentationInterface
Parameters
- $resource : mixed
Return values
RepresentationInterfacematchesLocation()
public
matchesLocation(string $testLocation) : bool
Parameters
- $testLocation : string
Return values
boolmatchesMethod()
public
matchesMethod(string $method) : bool
Parameters
- $method : string
Return values
boolnegotiate()
public
negotiate(ServerRequestInterface $request) : HttpResponseCodeEnum
Parameters
- $request : ServerRequestInterface