PHP Trait NilPortugues\Symfony\JsonApiBundle\Serializer\JsonApiResponseTrait

Mostra file Open project: nilportugues/symfony-jsonapi

Protected Methods

Method Description
addHeaders ( Psr\Http\Message\ResponseInterface $response ) : Psr\Http\Message\ResponseInterface
errorResponse ( string $json ) : Response
resourceCreatedResponse ( string $json ) : Response
resourceDeletedResponse ( string $json ) : Response
resourceNotFoundResponse ( string $json ) : Response
resourcePatchErrorResponse ( string $json ) : Response
resourcePostErrorResponse ( string $json ) : Response
resourceProcessingResponse ( string $json ) : Response
resourceUpdatedResponse ( string $json ) : Response
response ( string $json ) : Response
unsupportedActionResponse ( string $json ) : Response

Private Methods

Method Description
createResponse ( $data ) : Response

Method Details

addHeaders() protected method

protected addHeaders ( Psr\Http\Message\ResponseInterface $response ) : Psr\Http\Message\ResponseInterface
$response Psr\Http\Message\ResponseInterface
return Psr\Http\Message\ResponseInterface

errorResponse() protected method

protected errorResponse ( string $json ) : Response
$json string
return Symfony\Component\HttpFoundation\Response

resourceCreatedResponse() protected method

protected resourceCreatedResponse ( string $json ) : Response
$json string
return Symfony\Component\HttpFoundation\Response

resourceDeletedResponse() protected method

protected resourceDeletedResponse ( string $json ) : Response
$json string
return Symfony\Component\HttpFoundation\Response

resourceNotFoundResponse() protected method

protected resourceNotFoundResponse ( string $json ) : Response
$json string
return Symfony\Component\HttpFoundation\Response

resourcePatchErrorResponse() protected method

protected resourcePatchErrorResponse ( string $json ) : Response
$json string
return Symfony\Component\HttpFoundation\Response

resourcePostErrorResponse() protected method

protected resourcePostErrorResponse ( string $json ) : Response
$json string
return Symfony\Component\HttpFoundation\Response

resourceProcessingResponse() protected method

protected resourceProcessingResponse ( string $json ) : Response
$json string
return Symfony\Component\HttpFoundation\Response

resourceUpdatedResponse() protected method

protected resourceUpdatedResponse ( string $json ) : Response
$json string
return Symfony\Component\HttpFoundation\Response

response() protected method

protected response ( string $json ) : Response
$json string
return Symfony\Component\HttpFoundation\Response

unsupportedActionResponse() protected method

protected unsupportedActionResponse ( string $json ) : Response
$json string
return Symfony\Component\HttpFoundation\Response