PHP Класс WoohooLabs\Yin\JsonApi\Response\RelationshipResponder

Наследование: extends AbstractResponder
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$relationshipName string

Открытые методы

Метод Описание
__construct ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface $exceptionFactory, WoohooLabs\Yin\JsonApi\Serializer\SerializerInterface $serializer, string $relationshipName )
ok ( AbstractSuccessfulDocument $document, mixed $domainObject, array $additionalMeta = [] ) : Psr\Http\Message\ResponseInterface Returns a "200 Ok" response, containing a document in the body with the relationship. You can also pass additional meta information for the document in the $additionalMeta argument.
okWithMeta ( AbstractSuccessfulDocument $document, mixed $domainObject, array $additionalMeta = [] ) : Psr\Http\Message\ResponseInterface Returns a "200 Ok" response, containing a document with the relationship meta data in the body. You can also pass additional meta information for the document in the $additionalMeta argument.

Описание методов

__construct() публичный Метод

public __construct ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface $exceptionFactory, WoohooLabs\Yin\JsonApi\Serializer\SerializerInterface $serializer, string $relationshipName )
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
$response Psr\Http\Message\ResponseInterface
$exceptionFactory WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface
$serializer WoohooLabs\Yin\JsonApi\Serializer\SerializerInterface
$relationshipName string

ok() публичный Метод

Returns a "200 Ok" response, containing a document in the body with the relationship. You can also pass additional meta information for the document in the $additionalMeta argument.
public ok ( AbstractSuccessfulDocument $document, mixed $domainObject, array $additionalMeta = [] ) : Psr\Http\Message\ResponseInterface
$document WoohooLabs\Yin\JsonApi\Document\AbstractSuccessfulDocument
$domainObject mixed
$additionalMeta array
Результат Psr\Http\Message\ResponseInterface

okWithMeta() публичный Метод

Returns a "200 Ok" response, containing a document with the relationship meta data in the body. You can also pass additional meta information for the document in the $additionalMeta argument.
public okWithMeta ( AbstractSuccessfulDocument $document, mixed $domainObject, array $additionalMeta = [] ) : Psr\Http\Message\ResponseInterface
$document WoohooLabs\Yin\JsonApi\Document\AbstractSuccessfulDocument
$domainObject mixed
$additionalMeta array
Результат Psr\Http\Message\ResponseInterface

Описание свойств

$relationshipName защищенное свойство

protected string $relationshipName
Результат string