Oihana PHP System

ModelTrait uses trait:short

Tags
author

Marc Alcaraz (ekameleon)

since
1.0.0

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

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
throws
Error404

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
throws
DependencyException
throws
NotFoundException
throws
ContainerExceptionInterface
throws
NotFoundExceptionInterface
Return values
DocumentsModel|null

initializeModel()

Initialize the openEdge model.

protected initializeModel([array<string|int, mixed> $init = [] ]) : void
Parameters
$init : array<string|int, mixed> = []
Tags
throws
DependencyException
throws
NotFoundException
throws
ContainerExceptionInterface
throws
NotFoundExceptionInterface

        
On this page

Search results