Oihana PHP System

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
throws
ContainerExceptionInterface
throws
DependencyException
throws
NotFoundException
throws
NotFoundExceptionInterface

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

        
On this page

Search results