PHP 클래스 Neomerx\JsonApi\Http\Responses

상속: implements Neomerx\JsonApi\Contracts\Http\ResponsesInterface
파일 보기 프로젝트 열기: neomerx/json-api 1 사용 예제들

공개 메소드들

메소드 설명
getCodeResponse ( $statusCode, array $headers = [] )
getContentResponse ( $data, $statusCode = self::HTTP_OK, $links = null, $meta = null, array $headers = [] )
getCreatedResponse ( $resource, $links = null, $meta = null, array $headers = [] )
getErrorResponse ( $errors, $statusCode = self::HTTP_BAD_REQUEST, array $headers = [] )
getIdentifiersResponse ( $data, $statusCode = self::HTTP_OK, $links = null, $meta = null, array $headers = [] )
getMetaResponse ( $meta, $statusCode = self::HTTP_OK, array $headers = [] )

보호된 메소드들

메소드 설명
createJsonApiResponse ( string | null $content, integer $statusCode, array $headers = [] ) : mixed
createResponse ( string | null $content, integer $statusCode, array $headers ) : mixed Create HTTP response.
getEncoder ( ) : Neomerx\JsonApi\Contracts\Encoder\EncoderInterface
getEncodingParameters ( ) : Neomerx\JsonApi\Contracts\Encoder\Parameters\EncodingParametersInterface | null
getMediaType ( ) : Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface
getResourceLocationUrl ( mixed $resource ) : string
getSchemaContainer ( ) : Neomerx\JsonApi\Contracts\Schema\ContainerInterface
getSupportedExtensions ( ) : Neomerx\JsonApi\Contracts\Http\Headers\SupportedExtensionsInterface | null
getUrlPrefix ( ) : string | null

메소드 상세

createJsonApiResponse() 보호된 메소드

protected createJsonApiResponse ( string | null $content, integer $statusCode, array $headers = [] ) : mixed
$content string | null
$statusCode integer
$headers array
리턴 mixed

createResponse() 추상적인 보호된 메소드

Create HTTP response.
abstract protected createResponse ( string | null $content, integer $statusCode, array $headers ) : mixed
$content string | null
$statusCode integer
$headers array
리턴 mixed

getCodeResponse() 공개 메소드

public getCodeResponse ( $statusCode, array $headers = [] )
$headers array

getContentResponse() 공개 메소드

public getContentResponse ( $data, $statusCode = self::HTTP_OK, $links = null, $meta = null, array $headers = [] )
$headers array

getCreatedResponse() 공개 메소드

public getCreatedResponse ( $resource, $links = null, $meta = null, array $headers = [] )
$headers array

getEncoder() 추상적인 보호된 메소드

abstract protected getEncoder ( ) : Neomerx\JsonApi\Contracts\Encoder\EncoderInterface
리턴 Neomerx\JsonApi\Contracts\Encoder\EncoderInterface

getEncodingParameters() 추상적인 보호된 메소드

abstract protected getEncodingParameters ( ) : Neomerx\JsonApi\Contracts\Encoder\Parameters\EncodingParametersInterface | null
리턴 Neomerx\JsonApi\Contracts\Encoder\Parameters\EncodingParametersInterface | null

getErrorResponse() 공개 메소드

public getErrorResponse ( $errors, $statusCode = self::HTTP_BAD_REQUEST, array $headers = [] )
$headers array

getIdentifiersResponse() 공개 메소드

public getIdentifiersResponse ( $data, $statusCode = self::HTTP_OK, $links = null, $meta = null, array $headers = [] )
$headers array

getMediaType() 추상적인 보호된 메소드

abstract protected getMediaType ( ) : Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface
리턴 Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface

getMetaResponse() 공개 메소드

public getMetaResponse ( $meta, $statusCode = self::HTTP_OK, array $headers = [] )
$headers array

getResourceLocationUrl() 보호된 메소드

protected getResourceLocationUrl ( mixed $resource ) : string
$resource mixed
리턴 string

getSchemaContainer() 추상적인 보호된 메소드

abstract protected getSchemaContainer ( ) : Neomerx\JsonApi\Contracts\Schema\ContainerInterface
리턴 Neomerx\JsonApi\Contracts\Schema\ContainerInterface

getSupportedExtensions() 추상적인 보호된 메소드

abstract protected getSupportedExtensions ( ) : Neomerx\JsonApi\Contracts\Http\Headers\SupportedExtensionsInterface | null
리턴 Neomerx\JsonApi\Contracts\Http\Headers\SupportedExtensionsInterface | null

getUrlPrefix() 추상적인 보호된 메소드

abstract protected getUrlPrefix ( ) : string | null
리턴 string | null