FileAccess Orion

ExtMongoDbResourceManager
in package

Resource manager for the ext-mongodb adapter.

If you are using ext-mongo, use the MongoDbResourceManager instead.

Table of Contents

$resources  : array<string|int, array<string|int, mixed>>
Registered resources
getCollection()  : string
getConnectionOptions()  : array<string|int, mixed>
getDatabase()  : string
getDriverOptions()  : array<string|int, mixed>
getResource()  : Collection
Instantiate and return the Collection resource
getServer()  : null|string
hasResource()  : bool
Check if a resource exists
setCollection()  : void
setConnectionOptions()  : void
setDatabase()  : void
setDriverOptions()  : void
setResource()  : self
Set a resource
setServer()  : void

Properties

Methods

getConnectionOptions()

public getConnectionOptions(string $id) : array<string|int, mixed>
Parameters
$id : string
Tags
throws
RuntimeException

if no matching resource discovered

Return values
array<string|int, mixed>

getDriverOptions()

public getDriverOptions(string $id) : array<string|int, mixed>
Parameters
$id : string
Tags
throws
RuntimeException

if no matching resource discovered

Return values
array<string|int, mixed>

hasResource()

Check if a resource exists

public hasResource(string $id) : bool
Parameters
$id : string
Return values
bool

setCollection()

public setCollection(string $id, string $collection) : void
Parameters
$id : string
$collection : string
Return values
void

setConnectionOptions()

public setConnectionOptions(string $id, array<string|int, mixed> $connectionOptions) : void
Parameters
$id : string
$connectionOptions : array<string|int, mixed>
Return values
void

setDatabase()

public setDatabase(string $id, string $database) : void
Parameters
$id : string
$database : string
Return values
void

setDriverOptions()

public setDriverOptions(string $id, array<string|int, mixed> $driverOptions) : void
Parameters
$id : string
$driverOptions : array<string|int, mixed>
Return values
void

setResource()

Set a resource

public setResource(string $id, array<string|int, mixed>|Collection $resource) : self
Parameters
$id : string
$resource : array<string|int, mixed>|Collection
Tags
throws
RuntimeException
Return values
self

Provides a fluent interface

setServer()

public setServer(string $id, string $server) : void
Parameters
$id : string
$server : string
Return values
void

Search results