Свойство | Тип | Описание | |
---|---|---|---|
$cacheComponent | Mongolid cache component object. | ||
$connectionPool | Mongolid connection pool being object. | ||
$container | Illuminate\Contracts\Container | Container being used by Mongolid. |
Свойство | Тип | Описание | |
---|---|---|---|
$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. |
Метод | Описание | |
---|---|---|
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. |
Метод | Описание | |
---|---|---|
init ( ) : void | Initializes the Mongolid manager. |
public addConnection ( |
||
$connection | Connection instance to be used in database interactions. | |
Результат | boolean | Success |
public getConnection ( ) : MongoDB\Client | ||
Результат | MongoDB\Client |
public registerSchema ( |
||
$schema | Schema being registered. | |
Результат | void |
public setEventTrigger ( Mongolid\Event\EventTriggerInterface $eventTrigger ) : void | ||
$eventTrigger | Mongolid\Event\EventTriggerInterface | External event trigger. |
Результат | void |
public CacheComponent,Mongolid\Util $cacheComponent | ||
Результат |
public Pool,Mongolid\Connection $connectionPool | ||
Результат |
public Container,Illuminate\Contracts $container | ||
Результат | Illuminate\Contracts\Container |
protected array $schemas | ||
Результат | array |