PHP 클래스 WoohooLabs\Yin\JsonApi\Document\AbstractSuccessfulDocument

상속: extends AbstractDocument
파일 보기 프로젝트 열기: woohoolabs/yin 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$domainObject mixed

공개 메소드들

메소드 설명
getMetaResponse ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface $exceptionFactory, WoohooLabs\Yin\JsonApi\Serializer\SerializerInterface $serializer, mixed $domainObject, integer $responseCode, array $additionalMeta = [] ) : Psr\Http\Message\ResponseInterface Returns a response with a status code of $responseCode, only containing meta information (without the "data" and the "included" sections) about the document, assembled based on the $domainObject. You can also pass additional meta information to the document in the $additionalMeta argument.
getRelationshipResponse ( string $relationshipName, WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface $exceptionFactory, WoohooLabs\Yin\JsonApi\Serializer\SerializerInterface $serializer, mixed $domainObject, integer $responseCode, array $additionalMeta = [] ) : Psr\Http\Message\ResponseInterface Returns a response with a status code of $responseCode, containing the $relationshipName relationship object as the primary data, assembled based on the $domainObject. You can also pass additional meta information to the document in the $additionalMeta argument.
getResponse ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface $exceptionFactory, WoohooLabs\Yin\JsonApi\Serializer\SerializerInterface $serializer, mixed $domainObject, integer $responseCode, array $additionalMeta = [] ) : Psr\Http\Message\ResponseInterface Returns a response with a status code of $responseCode, containing all the provided sections of the document, assembled based on the $domainObject. You can also pass additional meta information for the document in the $additionalMeta argument.

보호된 메소드들

메소드 설명
createData ( ) : WoohooLabs\Yin\JsonApi\Schema\Data\DataInterface
fillData ( Transformation $transformation ) Fills the transformation data based on the "domainObject" property.
getRelationshipContent ( string $relationshipName, Transformation $transformation, array $additionalMeta = [] ) : array Returns a response content whose primary data is a relationship object with $relationshipName name. You can also pass additional meta information for the document in the $additionalMeta argument.
transformContent ( Transformation $transformation, array $additionalMeta = [] ) : array
transformRelationshipContent ( string $relationshipName, Transformation $transformation, array $additionalMeta = [] ) : array

비공개 메소드들

메소드 설명
initializeDocument ( mixed $domainObject )

메소드 상세

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

abstract protected createData ( ) : WoohooLabs\Yin\JsonApi\Schema\Data\DataInterface
리턴 WoohooLabs\Yin\JsonApi\Schema\Data\DataInterface

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

Fills the transformation data based on the "domainObject" property.
abstract protected fillData ( Transformation $transformation )
$transformation WoohooLabs\Yin\JsonApi\Transformer\Transformation

getMetaResponse() 공개 메소드

Returns a response with a status code of $responseCode, only containing meta information (without the "data" and the "included" sections) about the document, assembled based on the $domainObject. You can also pass additional meta information to the document in the $additionalMeta argument.
public getMetaResponse ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface $exceptionFactory, WoohooLabs\Yin\JsonApi\Serializer\SerializerInterface $serializer, mixed $domainObject, integer $responseCode, array $additionalMeta = [] ) : Psr\Http\Message\ResponseInterface
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
$response Psr\Http\Message\ResponseInterface
$exceptionFactory WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface
$serializer WoohooLabs\Yin\JsonApi\Serializer\SerializerInterface
$domainObject mixed
$responseCode integer
$additionalMeta array
리턴 Psr\Http\Message\ResponseInterface

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

Returns a response content whose primary data is a relationship object with $relationshipName name. You can also pass additional meta information for the document in the $additionalMeta argument.
abstract protected getRelationshipContent ( string $relationshipName, Transformation $transformation, array $additionalMeta = [] ) : array
$relationshipName string
$transformation WoohooLabs\Yin\JsonApi\Transformer\Transformation
$additionalMeta array
리턴 array

getRelationshipResponse() 공개 메소드

Returns a response with a status code of $responseCode, containing the $relationshipName relationship object as the primary data, assembled based on the $domainObject. You can also pass additional meta information to the document in the $additionalMeta argument.
public getRelationshipResponse ( string $relationshipName, WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface $exceptionFactory, WoohooLabs\Yin\JsonApi\Serializer\SerializerInterface $serializer, mixed $domainObject, integer $responseCode, array $additionalMeta = [] ) : Psr\Http\Message\ResponseInterface
$relationshipName string
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
$response Psr\Http\Message\ResponseInterface
$exceptionFactory WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface
$serializer WoohooLabs\Yin\JsonApi\Serializer\SerializerInterface
$domainObject mixed
$responseCode integer
$additionalMeta array
리턴 Psr\Http\Message\ResponseInterface

getResponse() 공개 메소드

Returns a response with a status code of $responseCode, containing all the provided sections of the document, assembled based on the $domainObject. You can also pass additional meta information for the document in the $additionalMeta argument.
public getResponse ( WoohooLabs\Yin\JsonApi\Request\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface $exceptionFactory, WoohooLabs\Yin\JsonApi\Serializer\SerializerInterface $serializer, mixed $domainObject, integer $responseCode, array $additionalMeta = [] ) : Psr\Http\Message\ResponseInterface
$request WoohooLabs\Yin\JsonApi\Request\RequestInterface
$response Psr\Http\Message\ResponseInterface
$exceptionFactory WoohooLabs\Yin\JsonApi\Exception\ExceptionFactoryInterface
$serializer WoohooLabs\Yin\JsonApi\Serializer\SerializerInterface
$domainObject mixed
$responseCode integer
$additionalMeta array
리턴 Psr\Http\Message\ResponseInterface

transformContent() 보호된 메소드

protected transformContent ( Transformation $transformation, array $additionalMeta = [] ) : array
$transformation WoohooLabs\Yin\JsonApi\Transformer\Transformation
$additionalMeta array
리턴 array

transformRelationshipContent() 보호된 메소드

protected transformRelationshipContent ( string $relationshipName, Transformation $transformation, array $additionalMeta = [] ) : array
$relationshipName string
$transformation WoohooLabs\Yin\JsonApi\Transformer\Transformation
$additionalMeta array
리턴 array

프로퍼티 상세

$domainObject 보호되어 있는 프로퍼티

protected mixed $domainObject
리턴 mixed