Oihana PHP System

DocumentsModel extends CountModel, DeleteModel, ExistModel, GetModel, InsertModel, ListModel, ReplaceModel, UpdateModel, UpsertModel, TruncateModel

Tags
author

Marc Alcaraz (ekameleon)

since
1.0.0

Table of Contents

Methods

count()  : int
Returns the number of items in the model.
delete()  : null|array<string|int, mixed>|object
Deletes an document or a set of documents in the model.
exist()  : bool
Indicates if the passed-in item exist.
get()  : mixed
Returns an item in the model.
insert()  : mixed
Insert a new item into the model.
list()  : array<string|int, mixed>
Returns a collection of items in the model.
replace()  : mixed
Replace a document into the model.
truncate()  : mixed
Truncate the collection and remove all documents.
update()  : mixed
Update an item into the model.
upsert()  : mixed
Upsert a document into the collection.

Methods

count()

Returns the number of items in the model.

public count([array<string|int, mixed> $init = [] ]) : int
Parameters
$init : array<string|int, mixed> = []
Return values
int

delete()

Deletes an document or a set of documents in the model.

public delete([array<string|int, mixed> $init = [] ]) : null|array<string|int, mixed>|object
Parameters
$init : array<string|int, mixed> = []
Return values
null|array<string|int, mixed>|object

exist()

Indicates if the passed-in item exist.

public exist([array<string|int, mixed> $init = [] ]) : bool
Parameters
$init : array<string|int, mixed> = []

The optional setting definition.

Return values
bool

True of the value exist in the model.

get()

Returns an item in the model.

public get([array<string|int, mixed> $init = [] ]) : mixed
Parameters
$init : array<string|int, mixed> = []

insert()

Insert a new item into the model.

public insert([array<string|int, mixed> $init = [] ]) : mixed
Parameters
$init : array<string|int, mixed> = []

list()

Returns a collection of items in the model.

public list([array<string|int, mixed> $init = [] ]) : array<string|int, mixed>
Parameters
$init : array<string|int, mixed> = []
Return values
array<string|int, mixed>

replace()

Replace a document into the model.

public replace([array<string|int, mixed> $init = [] ]) : mixed
Parameters
$init : array<string|int, mixed> = []

truncate()

Truncate the collection and remove all documents.

public truncate([array<string|int, mixed> $init = [] ]) : mixed
Parameters
$init : array<string|int, mixed> = []

update()

Update an item into the model.

public update([array<string|int, mixed> $init = [] ]) : mixed
Parameters
$init : array<string|int, mixed> = []

upsert()

Upsert a document into the collection.

public upsert([array<string|int, mixed> $init = [] ]) : mixed
Parameters
$init : array<string|int, mixed> = []

        
On this page

Search results