PHP Class Neomerx\JsonApi\Document\Document

Inheritance: implements Neomerx\JsonApi\Contracts\Document\DocumentInterface, implements Psr\Log\LoggerAwareInterface, use trait Psr\Log\LoggerAwareTrait
显示文件 Open project: neomerx/json-api Class Usage Examples

Public Methods

Method Description
__construct ( ) Constructor.
addEmptyRelationshipToData ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $parent, Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface $relationship )
addEmptyRelationshipToIncluded ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $parent, Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface $relationship )
addError ( Neomerx\JsonApi\Contracts\Document\ErrorInterface $error )
addErrors ( $errors )
addJsonApiVersion ( $version, $meta = null )
addNullRelationshipToData ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $parent, Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface $relationship )
addNullRelationshipToIncluded ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $parent, Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface $relationship )
addRelationshipToData ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $parent, Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface $relationship, Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $resource )
addRelationshipToIncluded ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $parent, Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface $relationship, Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $resource )
addToData ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $resource )
addToIncluded ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $resource )
getDocument ( )
getUrlPrefix ( ) : null | string Get URL prefix.
setDocumentLinks ( $links )
setEmptyData ( )
setMetaToDocument ( $meta )
setNullData ( )
setResourceCompleted ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $resource )
setUrlPrefix ( $prefix )
unsetData ( )

Method Details

__construct() public method

Constructor.
public __construct ( )

addEmptyRelationshipToData() public method

public addEmptyRelationshipToData ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $parent, Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface $relationship )
$parent Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface
$relationship Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface

addEmptyRelationshipToIncluded() public method

public addEmptyRelationshipToIncluded ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $parent, Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface $relationship )
$parent Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface
$relationship Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface

addError() public method

public addError ( Neomerx\JsonApi\Contracts\Document\ErrorInterface $error )
$error Neomerx\JsonApi\Contracts\Document\ErrorInterface

addErrors() public method

public addErrors ( $errors )

addJsonApiVersion() public method

public addJsonApiVersion ( $version, $meta = null )

addNullRelationshipToData() public method

public addNullRelationshipToData ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $parent, Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface $relationship )
$parent Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface
$relationship Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface

addNullRelationshipToIncluded() public method

public addNullRelationshipToIncluded ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $parent, Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface $relationship )
$parent Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface
$relationship Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface

addRelationshipToData() public method

public addRelationshipToData ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $parent, Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface $relationship, Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $resource )
$parent Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface
$relationship Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface
$resource Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface

addRelationshipToIncluded() public method

public addRelationshipToIncluded ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $parent, Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface $relationship, Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $resource )
$parent Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface
$relationship Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface
$resource Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface

addToData() public method

public addToData ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $resource )
$resource Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface

addToIncluded() public method

public addToIncluded ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $resource )
$resource Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface

getDocument() public method

public getDocument ( )

getUrlPrefix() public method

Get URL prefix.
public getUrlPrefix ( ) : null | string
return null | string

setEmptyData() public method

public setEmptyData ( )

setMetaToDocument() public method

public setMetaToDocument ( $meta )

setNullData() public method

public setNullData ( )

setResourceCompleted() public method

public setResourceCompleted ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $resource )
$resource Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface

setUrlPrefix() public method

public setUrlPrefix ( $prefix )

unsetData() public method

public unsetData ( )