PHP Class WoohooLabs\Yin\JsonApi\Response\RelationshipResponder

Inheritance: extends AbstractResponder
ファイルを表示 Open project: woohoolabs/yin

Protected Properties

Property Type Description
$relationshipName string

Public Methods

Method Description
__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.

Method Details

__construct() public method

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() public method

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
return Psr\Http\Message\ResponseInterface

okWithMeta() public method

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
return Psr\Http\Message\ResponseInterface

Property Details

$relationshipName protected_oe property

protected string $relationshipName
return string