ModelTrait uses trait:short
Tags
Table of Contents
Properties
- $model : DocumentsModel|null
- The model reference.
Methods
- 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.
- initializeModel() : void
- Initialize the openEdge model.
Properties
$model
The model reference.
public
DocumentsModel|null
$model
= null
Methods
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
Tags
Return values
DocumentsModel|nullinitializeModel()
Initialize the openEdge model.
protected
initializeModel([array<string|int, mixed> $init = [] ]) : void
Parameters
- $init : array<string|int, mixed> = []