PHP Class WoohooLabs\Yin\JsonApi\Response\AbstractResponder

Mostra file Open project: woohoolabs/yin Class Usage Examples

Protected Properties

Property Type Description
$exceptionFactory WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
$response Psr\Http\Message\ResponseInterface
$serializer WoohooLabs\Yin\JsonApi\Serializer\SerializerInterface

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 )

Protected Methods

Method Description
getDocumentMetaResponse ( AbstractSuccessfulDocument $document, mixed $domainObject, integer $statusCode, array $additionalMeta = [] ) : Psr\Http\Message\ResponseInterface
getDocumentRelationshipMetaResponse ( string $relationshipName, AbstractSuccessfulDocument $document, mixed $domainObject, integer $statusCode, array $additionalMeta = [] ) : Psr\Http\Message\ResponseInterface
getDocumentRelationshipResponse ( string $relationshipName, AbstractSuccessfulDocument $document, mixed $domainObject, integer $statusCode, array $additionalMeta = [] ) : Psr\Http\Message\ResponseInterface
getDocumentResourceResponse ( AbstractSuccessfulDocument $document, mixed $domainObject, integer $statusCode, array $additionalMeta = [] ) : Psr\Http\Message\ResponseInterface
getErrorResponse ( Psr\Http\Message\ResponseInterface $response, AbstractErrorDocument $document, array $errors, integer $statusCode, array $additionalMeta = [] ) : Psr\Http\Message\ResponseInterface

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 )
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
$response Psr\Http\Message\ResponseInterface
$exceptionFactory WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface
$serializer WoohooLabs\Yin\JsonApi\Serializer\SerializerInterface

getDocumentMetaResponse() protected method

protected getDocumentMetaResponse ( AbstractSuccessfulDocument $document, mixed $domainObject, integer $statusCode, array $additionalMeta = [] ) : Psr\Http\Message\ResponseInterface
$document WoohooLabs\Yin\JsonApi\Document\AbstractSuccessfulDocument
$domainObject mixed
$statusCode integer
$additionalMeta array
return Psr\Http\Message\ResponseInterface

getDocumentRelationshipMetaResponse() protected method

protected getDocumentRelationshipMetaResponse ( string $relationshipName, AbstractSuccessfulDocument $document, mixed $domainObject, integer $statusCode, array $additionalMeta = [] ) : Psr\Http\Message\ResponseInterface
$relationshipName string
$document WoohooLabs\Yin\JsonApi\Document\AbstractSuccessfulDocument
$domainObject mixed
$statusCode integer
$additionalMeta array
return Psr\Http\Message\ResponseInterface

getDocumentRelationshipResponse() protected method

protected getDocumentRelationshipResponse ( string $relationshipName, AbstractSuccessfulDocument $document, mixed $domainObject, integer $statusCode, array $additionalMeta = [] ) : Psr\Http\Message\ResponseInterface
$relationshipName string
$document WoohooLabs\Yin\JsonApi\Document\AbstractSuccessfulDocument
$domainObject mixed
$statusCode integer
$additionalMeta array
return Psr\Http\Message\ResponseInterface

getDocumentResourceResponse() protected method

protected getDocumentResourceResponse ( AbstractSuccessfulDocument $document, mixed $domainObject, integer $statusCode, array $additionalMeta = [] ) : Psr\Http\Message\ResponseInterface
$document WoohooLabs\Yin\JsonApi\Document\AbstractSuccessfulDocument
$domainObject mixed
$statusCode integer
$additionalMeta array
return Psr\Http\Message\ResponseInterface

getErrorResponse() protected method

protected getErrorResponse ( Psr\Http\Message\ResponseInterface $response, AbstractErrorDocument $document, array $errors, integer $statusCode, array $additionalMeta = [] ) : Psr\Http\Message\ResponseInterface
$response Psr\Http\Message\ResponseInterface
$document WoohooLabs\Yin\JsonApi\Document\AbstractErrorDocument
$errors array
$statusCode integer
$additionalMeta array
return Psr\Http\Message\ResponseInterface $response

Property Details

$exceptionFactory protected_oe property

protected ExceptionFactoryInterface,WoohooLabs\Yin\JsonApi\Exception $exceptionFactory
return WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface

$request protected_oe property

protected RequestInterface,WoohooLabs\Yin\JsonApi\Request $request
return WoohooLabs\Yin\JsonApi\Request\RequestInterface

$response protected_oe property

protected ResponseInterface,Psr\Http\Message $response
return Psr\Http\Message\ResponseInterface

$serializer protected_oe property

protected SerializerInterface,WoohooLabs\Yin\JsonApi\Serializer $serializer
return WoohooLabs\Yin\JsonApi\Serializer\SerializerInterface