PHP Classes
elePHPant
Icontem

File: tests/-app-/config/mongo.php

Recommend this page to a friend!
  Classes of Wolfy-J  >  spiral  >  tests/-app-/config/mongo.php  >  Download  
File: tests/-app-/config/mongo.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: spiral
Modular Web application development framework
Author: By
Last change:
Date: 1 year ago
Size: 1,041 bytes
 

Contents

Class file image Download
<?php
/**
 * Mongo databases. Attention, configs might include runtime code which depended on environment
 * values only.
 *
 * Attention, this config is pre-placed in application, install spiral/odm in order to use Mongo
 * databases and ODM models.
 *
 * @see MongoConfig
 */

return [
   
/*
    * Here you can specify name/alias for database to be treated as default in your application.
    * Such database will be returned from ODM->database(null) call and also can be
    * available using $this->db shared binding.
    */
   
'default' => 'default',

   
/*
     * Set of database aliases.
     */
   
'aliases' => [
       
'database' => 'default',
       
'db' => 'default',
       
'mongo' => 'default'
   
],

   
/*
     * Mongo database configured with connection options.
     */
   
'databases' => [
       
'default' => [
           
'server' => 'mongodb://localhost:27017',
           
'database' => 'spiral-empty',
           
'options' => ['connect' => true]
        ],
       
/*{{databases}}*/
   
]
];