Property | Type | Description | |
---|---|---|---|
$cacheComponent | Mongolid cache component object. | ||
$connectionPool | Mongolid connection pool being object. | ||
$container | Illuminate\Contracts\Container | Container being used by Mongolid. |
Property | Type | Description | |
---|---|---|---|
$schemas | array | Stores the schemas that have been registered for later use. This may be useful when using Mongolid DataMapper pattern. | |
$singleton | Singleton instance of the manager. |
Method | Description | |
---|---|---|
addConnection ( |
Main entry point to openning a connection and start using Mongolid in pure PHP. After adding a connection into the Manager you are ready to persist and query your models. | |
getConnection ( ) : MongoDB\Client | Get the raw MongoDB connection. | |
getMapper ( string $entityClass ) : |
Retrieves a DataMapper for the given $entityClass. This can only be done if the Schema for that entity has been previously registered with registerSchema() method. | |
registerSchema ( |
Allow document Schemas to be registered for later use. | |
setEventTrigger ( Mongolid\Event\EventTriggerInterface $eventTrigger ) : void | Sets the event trigger for Mongolid events. |
Method | Description | |
---|---|---|
init ( ) : void | Initializes the Mongolid manager. |
public addConnection ( |
||
$connection | Connection instance to be used in database interactions. | |
return | boolean | Success |
public getConnection ( ) : MongoDB\Client | ||
return | MongoDB\Client |
public registerSchema ( |
||
$schema | Schema being registered. | |
return | void |
public setEventTrigger ( Mongolid\Event\EventTriggerInterface $eventTrigger ) : void | ||
$eventTrigger | Mongolid\Event\EventTriggerInterface | External event trigger. |
return | void |
public CacheComponent,Mongolid\Util $cacheComponent | ||
return |
public Pool,Mongolid\Connection $connectionPool | ||
return |
public Container,Illuminate\Contracts $container | ||
return | Illuminate\Contracts\Container |
protected array $schemas | ||
return | array |