Documentation

MongoLite
in package

Table of Contents

$client  : Client
__construct()  : mixed
aggregate()  : mixed
count()  : int
dropCollection()  : mixed
find()  : ResultSet
findOne()  : array<string|int, mixed>|null
findOneById()  : array<string|int, mixed>|null
getCollection()  : Collection
getFindTermFilter()  : mixed
insert()  : mixed
lstCollections()  : array<string|int, mixed>
remove()  : mixed
removeField()  : bool
renameCollection()  : bool
renameField()  : bool
save()  : mixed
update()  : mixed

Properties

Methods

__construct()

public __construct(string $server[, array<string|int, mixed> $options = [] ]) : mixed
Parameters
$server : string
$options : array<string|int, mixed> = []
Return values
mixed

aggregate()

public aggregate(string $collection, array<string|int, mixed> $pipeline) : mixed
Parameters
$collection : string
$pipeline : array<string|int, mixed>
Return values
mixed

count()

public count(string $collection[, mixed $filter = null ]) : int
Parameters
$collection : string
$filter : mixed = null
Return values
int

dropCollection()

public dropCollection(string $name[, string|null $db = null ]) : mixed
Parameters
$name : string
$db : string|null = null
Return values
mixed

find()

public find(string $collection[, array<string|int, mixed> $options = [] ]) : ResultSet
Parameters
$collection : string
$options : array<string|int, mixed> = []
Return values
ResultSet

findOne()

public findOne(string $collection[, array<string|int, mixed>|null $filter = null ][, array<string|int, mixed>|null $projection = null ]) : array<string|int, mixed>|null
Parameters
$collection : string
$filter : array<string|int, mixed>|null = null
$projection : array<string|int, mixed>|null = null
Return values
array<string|int, mixed>|null

findOneById()

public findOneById(string $collection, string $id) : array<string|int, mixed>|null
Parameters
$collection : string
$id : string
Return values
array<string|int, mixed>|null

getCollection()

public getCollection(string $name[, string|null $db = null ]) : Collection
Parameters
$name : string
$db : string|null = null
Return values
Collection

getFindTermFilter()

public getFindTermFilter(mixed $term) : mixed
Parameters
$term : mixed
Return values
mixed

insert()

public insert(string $collection, array<string|int, mixed> &$doc) : mixed
Parameters
$collection : string
$doc : array<string|int, mixed>
Return values
mixed

lstCollections()

public lstCollections() : array<string|int, mixed>
Return values
array<string|int, mixed>

remove()

public remove(string $collection[, array<string|int, mixed> $filter = [] ]) : mixed
Parameters
$collection : string
$filter : array<string|int, mixed> = []
Return values
mixed

removeField()

public removeField(string $collection, string $field[, array<string|int, mixed> $filter = [] ]) : bool
Parameters
$collection : string
$field : string
$filter : array<string|int, mixed> = []
Return values
bool

renameCollection()

public renameCollection(string $name, string $newname[, string|null $db = null ]) : bool
Parameters
$name : string
$newname : string
$db : string|null = null
Return values
bool

renameField()

public renameField(string $collection, string $field, string $newfield[, array<string|int, mixed> $filter = [] ]) : bool
Parameters
$collection : string
$field : string
$newfield : string
$filter : array<string|int, mixed> = []
Return values
bool

save()

public save(string $collection, array<string|int, mixed> &$data[, bool $create = false ]) : mixed
Parameters
$collection : string
$data : array<string|int, mixed>
$create : bool = false
Return values
mixed

update()

public update(string $collection, mixed $criteria, array<string|int, mixed> $data) : mixed
Parameters
$collection : string
$criteria : mixed
$data : array<string|int, mixed>
Return values
mixed

Search results