class Client

Properties

protected $actor
protected $parent
protected $queryParams
protected $body
protected $errorHandling

Methods

__construct(ClientMiddlewarePipe $pipe)

No description

withActor(User $actor)

<p>Set the request actor.</p>

withParentRequest(ServerRequestInterface $parent)

No description

withQueryParams(array $queryParams)

No description

withBody(array $body)

No description

withoutErrorHandling()

No description

withErrorHandling()

No description

ResponseInterface
get(string $path)

No description

ResponseInterface
post(string $path)

No description

ResponseInterface
put(string $path)

No description

ResponseInterface
patch(string $path)

No description

ResponseInterface
delete(string $path)

No description

ResponseInterface
send(string $method, string $path)

<p>Execute the given API action class, pass the input and return its response.</p>

Details

__construct(ClientMiddlewarePipe $pipe)

Parameters

ClientMiddlewarePipe $pipe

Client withActor(User $actor)

<p>Set the request actor.</p>

<p>This is not needed if a parent request is provided. It can, however, override the parent request's actor.</p>

Parameters

User $actor

Return Value

Client

Client withParentRequest(ServerRequestInterface $parent)

Parameters

ServerRequestInterface $parent

Return Value

Client

Client withQueryParams(array $queryParams)

Parameters

array $queryParams

Return Value

Client

Client withBody(array $body)

Parameters

array $body

Return Value

Client

Client withoutErrorHandling()

Return Value

Client

Client withErrorHandling()

Return Value

Client

ResponseInterface get(string $path)

Parameters

string $path

Return Value

ResponseInterface

ResponseInterface post(string $path)

Parameters

string $path

Return Value

ResponseInterface

ResponseInterface put(string $path)

Parameters

string $path

Return Value

ResponseInterface

ResponseInterface patch(string $path)

Parameters

string $path

Return Value

ResponseInterface

ResponseInterface delete(string $path)

Parameters

string $path

Return Value

ResponseInterface

ResponseInterface send(string $method, string $path)

<p>Execute the given API action class, pass the input and return its response.</p>

Parameters

string $method
string $path

Return Value

ResponseInterface