AlterGetDocumentPropertyTrait uses trait:short
Table of Contents
Methods
- alterGetDocument() : mixed
- Gets a document with a Documents model.
- assertExistInModel() : void
- Assert the existence of a specific property value in a Document model.
- getDocumentsModel() : DocumentsModel|null
- Returns a Documents Model instance directly or with the DI container.
Methods
alterGetDocument()
Gets a document with a Documents model.
public
alterGetDocument(mixed $value[, array<string|int, mixed> $definition = [] ][, bool &$modified = false ]) : mixed
Parameters
- $value : mixed
- $definition : array<string|int, mixed> = []
- $modified : bool = false
Tags
assertExistInModel()
Assert the existence of a specific property value in a Document model.
public
assertExistInModel(object|string|int|null $document, ExistModel $model[, string $name = Char::EMPTY ][, string|null $key = 'id' ]) : void
Parameters
- $document : object|string|int|null
-
The document to validate.
- $model : ExistModel
-
The OpenEdge model reference.
- $name : string = Char::EMPTY
-
The optional name of the resource to validate (use it in the error message).
- $key : string|null = 'id'
Tags
getDocumentsModel()
Returns a Documents Model instance directly or with the DI container.
public
getDocumentsModel(DocumentsModel|string|null $documents) : DocumentsModel|null
Parameters
- $documents : DocumentsModel|string|null