PHP Interface WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface

显示文件 Open project: woohoolabs/yin Interface Usage Examples

Public Methods

Method Description
createApplicationErrorException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request ) : Exception
createClientGeneratedIdAlreadyExistsException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, string $currentId ) : Exception
createClientGeneratedIdNotSupportedException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, string $currentId ) : Exception
createClientGeneratedIdRequiredException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request ) : Exception
createDataMemberMissingException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request ) : Exception
createFullReplacementProhibitedException ( string $relationshipName ) : Exception
createInclusionUnrecognizedException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, array $unrecognizedInclusions ) : Exception
createInclusionUnsupportedException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request ) : Exception
createMediaTypeUnacceptableException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, string $mediaTypeName ) : Exception
createMediaTypeUnsupportedException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, string $mediaTypeName ) : Exception
createQueryParamUnrecognizedException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, string $queryParamName ) : Exception
createRelationshipNotExists ( string $relationship ) : Exception
createRelationshipTypeInappropriateException ( string $relationshipName, string $currentRelationshipType, string $expectedRelationshipType ) : Exception
createRemovalProhibitedException ( string $relationshipName ) : Exception
createRequestBodyInvalidJsonApiException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, array $validationErrors, boolean $includeOriginalBody )
createRequestBodyInvalidJsonException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, string $lintMessage, boolean $includeOriginalBody )
createResourceIdInvalidException ( string $id ) : Exception
createResourceIdMissingException ( ) : Exception
createResourceIdentifierIdMissing ( array $resourceIdentifier ) : Exception
createResourceIdentifierTypeMissing ( array $resourceIdentifier ) : Exception
createResourceNotFoundException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request ) : Exception
createResourceTypeMissingException ( ) : Exception
createResourceTypeUnacceptableException ( string $currentType, array $acceptedTypes ) : Exception
createResponseBodyInvalidJsonApiException ( Psr\Http\Message\ResponseInterface $response, array $validationErrors, boolean $includeOriginalBody ) : Exception
createResponseBodyInvalidJsonException ( Psr\Http\Message\ResponseInterface $response, string $lintMessage, boolean $includeOriginalBody ) : Exception
createSortParamUnrecognizedException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, string $paramName ) : Exception
createSortingUnsupportedException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request ) : Exception

Method Details

createApplicationErrorException() public method

public createApplicationErrorException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request ) : Exception
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
return Exception

createClientGeneratedIdAlreadyExistsException() public method

public createClientGeneratedIdAlreadyExistsException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, string $currentId ) : Exception
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
$currentId string
return Exception

createClientGeneratedIdNotSupportedException() public method

public createClientGeneratedIdNotSupportedException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, string $currentId ) : Exception
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
$currentId string
return Exception

createClientGeneratedIdRequiredException() public method

public createClientGeneratedIdRequiredException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request ) : Exception
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
return Exception

createDataMemberMissingException() public method

public createDataMemberMissingException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request ) : Exception
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
return Exception

createFullReplacementProhibitedException() public method

public createFullReplacementProhibitedException ( string $relationshipName ) : Exception
$relationshipName string
return Exception

createInclusionUnrecognizedException() public method

public createInclusionUnrecognizedException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, array $unrecognizedInclusions ) : Exception
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
$unrecognizedInclusions array
return Exception

createInclusionUnsupportedException() public method

public createInclusionUnsupportedException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request ) : Exception
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
return Exception

createMediaTypeUnacceptableException() public method

public createMediaTypeUnacceptableException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, string $mediaTypeName ) : Exception
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
$mediaTypeName string
return Exception

createMediaTypeUnsupportedException() public method

public createMediaTypeUnsupportedException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, string $mediaTypeName ) : Exception
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
$mediaTypeName string
return Exception

createQueryParamUnrecognizedException() public method

public createQueryParamUnrecognizedException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, string $queryParamName ) : Exception
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
$queryParamName string
return Exception

createRelationshipNotExists() public method

public createRelationshipNotExists ( string $relationship ) : Exception
$relationship string
return Exception

createRelationshipTypeInappropriateException() public method

public createRelationshipTypeInappropriateException ( string $relationshipName, string $currentRelationshipType, string $expectedRelationshipType ) : Exception
$relationshipName string
$currentRelationshipType string
$expectedRelationshipType string
return Exception

createRemovalProhibitedException() public method

public createRemovalProhibitedException ( string $relationshipName ) : Exception
$relationshipName string
return Exception

createRequestBodyInvalidJsonApiException() public method

public createRequestBodyInvalidJsonApiException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, array $validationErrors, boolean $includeOriginalBody )
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
$validationErrors array
$includeOriginalBody boolean

createRequestBodyInvalidJsonException() public method

public createRequestBodyInvalidJsonException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, string $lintMessage, boolean $includeOriginalBody )
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
$lintMessage string
$includeOriginalBody boolean

createResourceIdInvalidException() public method

public createResourceIdInvalidException ( string $id ) : Exception
$id string
return Exception

createResourceIdMissingException() public method

public createResourceIdMissingException ( ) : Exception
return Exception

createResourceIdentifierIdMissing() public method

public createResourceIdentifierIdMissing ( array $resourceIdentifier ) : Exception
$resourceIdentifier array
return Exception

createResourceIdentifierTypeMissing() public method

public createResourceIdentifierTypeMissing ( array $resourceIdentifier ) : Exception
$resourceIdentifier array
return Exception

createResourceNotFoundException() public method

public createResourceNotFoundException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request ) : Exception
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
return Exception

createResourceTypeMissingException() public method

public createResourceTypeMissingException ( ) : Exception
return Exception

createResourceTypeUnacceptableException() public method

public createResourceTypeUnacceptableException ( string $currentType, array $acceptedTypes ) : Exception
$currentType string
$acceptedTypes array
return Exception

createResponseBodyInvalidJsonApiException() public method

public createResponseBodyInvalidJsonApiException ( Psr\Http\Message\ResponseInterface $response, array $validationErrors, boolean $includeOriginalBody ) : Exception
$response Psr\Http\Message\ResponseInterface
$validationErrors array
$includeOriginalBody boolean
return Exception

createResponseBodyInvalidJsonException() public method

public createResponseBodyInvalidJsonException ( Psr\Http\Message\ResponseInterface $response, string $lintMessage, boolean $includeOriginalBody ) : Exception
$response Psr\Http\Message\ResponseInterface
$lintMessage string
$includeOriginalBody boolean
return Exception

createSortParamUnrecognizedException() public method

public createSortParamUnrecognizedException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, string $paramName ) : Exception
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
$paramName string
return Exception

createSortingUnsupportedException() public method

public createSortingUnsupportedException ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request ) : Exception
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
return Exception