Method | Description | |
---|---|---|
addEmptyRelationshipToData ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $parent, Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface $relationship ) : void | Add an empty relationship to resource in 'data' section. | |
addEmptyRelationshipToIncluded ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $parent, Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface $relationship ) : void | Add an empty relationship to resource in 'included' section. | |
addError ( Neomerx\JsonApi\Contracts\Document\ErrorInterface $error ) : void | Add information to 'errors' top-level section. | |
addErrors ( Neomerx\JsonApi\Contracts\Document\ErrorInterface[] | |
Add information to 'errors' top-level section. | |
addJsonApiVersion ( string $version, mixed | null $meta = null ) : void | Add JSON API version information. | |
addNullRelationshipToData ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $parent, Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface $relationship ) : void | Add a null relationship to resource in 'data' section. | |
addNullRelationshipToIncluded ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $parent, Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface $relationship ) : void | Add a null relationship to resource in 'included' section. | |
addRelationshipToData ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $parent, Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface $relationship, Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $resource ) : void | Add a relationship to resource in 'data' section. | |
addRelationshipToIncluded ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $parent, Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface $relationship, Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $resource ) : void | Add a relationship to resource in 'included' section. | |
addToData ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $resource ) : void | Add resource to 'data' section. | |
addToIncluded ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $resource ) : void | Add resource to 'included' section. | |
getDocument ( ) : array | Get document as array. | |
setDocumentLinks ( LinkInterface>\array |
Set URLs to top-level 'links' section. | |
setEmptyData ( ) : void | Set empty array to 'data' section. | |
setMetaToDocument ( object | array $meta ) : void | Set arbitrary meta-information about primary data to top-level 'meta' section. | |
setNullData ( ) : void | Set null to 'data' section. | |
setResourceCompleted ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $resource ) : void | Mark resource as completed (no new relations/links/etc will be added to the resource anymore). | |
setUrlPrefix ( string $prefix ) : void | Set a prefix that will be applied to all URLs in the document except marked as href. | |
unsetData ( ) : void | Remove 'data' top-level section. |
public addEmptyRelationshipToData ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $parent, Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface $relationship ) : void | ||
$parent | Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface | |
$relationship | Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface | |
return | void |
public addEmptyRelationshipToIncluded ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $parent, Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface $relationship ) : void | ||
$parent | Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface | |
$relationship | Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface | |
return | void |
public addNullRelationshipToData ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $parent, Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface $relationship ) : void | ||
$parent | Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface | |
$relationship | Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface | |
return | void |
public addNullRelationshipToIncluded ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $parent, Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface $relationship ) : void | ||
$parent | Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface | |
$relationship | Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface | |
return | void |
public addRelationshipToData ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $parent, Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface $relationship, Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $resource ) : void | ||
$parent | Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface | |
$relationship | Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface | |
$resource | Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface | |
return | void |
public addRelationshipToIncluded ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $parent, Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface $relationship, Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $resource ) : void | ||
$parent | Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface | |
$relationship | Neomerx\JsonApi\Contracts\Schema\RelationshipObjectInterface | |
$resource | Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface | |
return | void |
public addToIncluded ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $resource ) : void | ||
$resource | Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface | |
return | void |
public setDocumentLinks ( LinkInterface>\array |
||
$links | LinkInterface>\array |
|
return | void |
public setEmptyData ( ) : void | ||
return | void |
public setResourceCompleted ( Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface $resource ) : void | ||
$resource | Neomerx\JsonApi\Contracts\Schema\ResourceObjectInterface | |
return | void |
public setUrlPrefix ( string $prefix ) : void | ||
$prefix | string | |
return | void |