Imbo\Database\MongoDB::__construct PHP Method

__construct() public method

Class constructor
public __construct ( array $params = null, MongoClient $client = null, MongoCollection $imageCollection = null, MongoCollection $shortUrlCollection = null )
$params array Parameters for the driver
$client MongoClient MongoClient instance
$imageCollection MongoCollection MongoCollection instance for the images
$shortUrlCollection MongoCollection MongoCollection instance for the short URLs
    public function __construct(array $params = null, MongoClient $client = null, MongoCollection $imageCollection = null, MongoCollection $shortUrlCollection = null)
    {
        if ($params !== null) {
            $this->params = array_replace_recursive($this->params, $params);
        }
        if ($client !== null) {
            $this->mongoClient = $client;
        }
        if ($imageCollection !== null) {
            $this->collections['image'] = $imageCollection;
        }
        if ($shortUrlCollection !== null) {
            $this->collections['shortUrl'] = $shortUrlCollection;
        }
    }