class Discussion

Properties

protected Client $api
protected UrlGenerator $url
protected Factory $view

Methods

__construct(Client $api, UrlGenerator $url, Factory $view)

No description

__invoke(Document $document, ServerRequestInterface $request)

No description

getApiDocument(ServerRequestInterface $request, string $id, array $params)

Get the result of an API request to show a discussion.

getPostsApiDocument(ServerRequestInterface $request, array $params)

Get the result of an API request to list one page of a discussion's posts.

Details

__construct(Client $api, UrlGenerator $url, Factory $view)

Parameters

Client $api
UrlGenerator $url
Factory $view

__invoke(Document $document, ServerRequestInterface $request)

Parameters

Document $document
ServerRequestInterface $request

protected getApiDocument(ServerRequestInterface $request, string $id, array $params)

Get the result of an API request to show a discussion.

Parameters

ServerRequestInterface $request
string $id
array $params

Exceptions

RouteNotFoundException

protected getPostsApiDocument(ServerRequestInterface $request, array $params)

Get the result of an API request to list one page of a discussion's posts.

The primary data of this response is exactly the posts being asked for, so unlike the discussion endpoint's `included`, extensions cannot add posts of their own to it.

Parameters

ServerRequestInterface $request
array $params