Свойство | Type | Description | |
---|---|---|---|
$cacheComponent | Mongolid cache component object. | ||
$connectionPool | Mongolid connection pool being object. | ||
$container | Illuminate\Contracts\Container | Container being used by Mongolid. |
Свойство | 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. |
Méthode | 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. |
Méthode | Description | |
---|---|---|
init ( ) : void | Initializes the Mongolid manager. |
public addConnection ( |
||
$connection | Connection instance to be used in database interactions. | |
Résultat | boolean | Success |
public getConnection ( ) : MongoDB\Client | ||
Résultat | MongoDB\Client |
public registerSchema ( |
||
$schema | Schema being registered. | |
Résultat | void |
public setEventTrigger ( Mongolid\Event\EventTriggerInterface $eventTrigger ) : void | ||
$eventTrigger | Mongolid\Event\EventTriggerInterface | External event trigger. |
Résultat | void |
public CacheComponent,Mongolid\Util $cacheComponent | ||
Résultat |
public Pool,Mongolid\Connection $connectionPool | ||
Résultat |
public Container,Illuminate\Contracts $container | ||
Résultat | Illuminate\Contracts\Container |
protected array $schemas | ||
Résultat | array |