Neomerx\JsonApi\Contracts\Document\DocumentInterface::addErrors PHP Method

addErrors() public method

If you add errors information no other elements will be in output document.
public addErrors ( Neomerx\JsonApi\Contracts\Document\ErrorInterface[] | ErrorCollection $errors ) : void
$errors Neomerx\JsonApi\Contracts\Document\ErrorInterface[] | Neomerx\JsonApi\Exceptions\ErrorCollection
return void
    public function addErrors($errors);