Documentation

RequestBuilder
in package

RequestBuilder applies global state or other resources to a ServerRequest

Builder uses a fluent interface returning itself. To return the produced request, run ->build()

Table of Contents

Properties

$request  : ServerRequestInterface
$requestFactory  : ServerRequestFactoryInterface
$streamFactory  : StreamFactoryInterface
$uriFactory  : UriFactoryInterface

Methods

__construct()  : mixed
build()  : ServerRequestInterface
withGlobalVariables()  : self
Create a new server request populated with global state
withHeaders()  : self
Add headers from list

Properties

$requestFactory

private ServerRequestFactoryInterface $requestFactory

Methods

__construct()

public __construct(ServerRequestFactoryInterface $requestFactory, StreamFactoryInterface $streamFactory, UriFactoryInterface $uriFactory) : mixed
Parameters
$requestFactory : ServerRequestFactoryInterface
$streamFactory : StreamFactoryInterface
$uriFactory : UriFactoryInterface

build()

public build() : ServerRequestInterface
Return values
ServerRequestInterface

withGlobalVariables()

Create a new server request populated with global state

public withGlobalVariables() : self
Return values
self

withHeaders()

Add headers from list

public withHeaders(array<string|int, mixed> $headers) : self
Parameters
$headers : array<string|int, mixed>
Return values
self

        
On this page

Search results