Webiny\Component\Mongo\Mongo::__construct PHP Method

__construct() public method

public __construct ( $uri, array $uriOptions = [], array $driverOptions = [], $collectionPrefix = '' )
$uriOptions array
$driverOptions array
    public function __construct($uri, array $uriOptions = [], array $driverOptions = [], $collectionPrefix = '')
    {
        $driverOptions = $this->arr($this->defaultDriverOptions)->mergeSmart($driverOptions)->val();
        $mongoBridge = $this->getConfig()->get('Driver', '\\Webiny\\Component\\Mongo\\Bridge\\MongoDb');
        $this->bridge = new $mongoBridge();
        $this->bridge->connect($uri, $uriOptions, $driverOptions);
        $this->collectionPrefix = $collectionPrefix;
    }