protected function connect($configs = null): void
    {
        if ($configs !== null) {
            $this->configs = array_replace($this->configs, $configs);
        }

        $dsn = "{$this->configs['type']}:dbname={$this->configs['name']};host="
            . $this->configs['host'];
        try {
            $this->connection = new PDO(
                $dsn,
                $this->configs['user'],
                $this->configs['pass']
            );
            $this->connection->setAttribute(
                PDO::ATTR_ERRMODE,
                $this->configs['error_mode']
            );
        } catch (PDOException $e) {
            throw new CoreException(
                __CLASS__.'::__construct()->PDO::__construct() : ' . $e->getMessage()
            );
        }
    }