Documentation

Mongo
in package

Table of Contents

$client  : Client
$db  : Database
$options  : array<string|int, mixed>
__construct()  : mixed
aggregate()  : mixed
count()  : mixed
dropCollection()  : array<string|int, mixed>|object
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()  : mixed
renameCollection()  : bool
renameField()  : mixed
save()  : mixed
update()  : mixed
_fixForMongo()  : mixed
getObjectID()  : mixed

Properties

$options

protected array<string|int, mixed> $options

Methods

__construct()

public __construct(string $server[, array<string|int, mixed> $options = [] ][, array<string|int, mixed> $driverOptions = [] ]) : mixed
Parameters
$server : string
$options : array<string|int, mixed> = []
$driverOptions : 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[, array<string|int, mixed>|null $filter = null ][, array<string|int, mixed> $options = [] ]) : mixed
Parameters
$collection : string
$filter : array<string|int, mixed>|null = null
$options : array<string|int, mixed> = []
Return values
mixed

dropCollection()

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

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, mixed $id) : array<string|int, mixed>|null
Parameters
$collection : string
$id : mixed
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 = [] ]) : mixed
Parameters
$collection : string
$field : string
$filter : array<string|int, mixed> = []
Return values
mixed

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 = [] ]) : mixed
Parameters
$collection : string
$field : string
$newfield : string
$filter : array<string|int, mixed> = []
Return values
mixed

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

_fixForMongo()

protected _fixForMongo(mixed &$data[, bool $infinite = false ], int $_level) : mixed
Parameters
$data : mixed
$infinite : bool = false
$_level : int
Return values
mixed

getObjectID()

protected getObjectID(mixed $v) : mixed
Parameters
$v : mixed
Return values
mixed

Search results