src/ConnectionManager.php
public function parseParams(\stdClass $params): array
	{
		$params->type = strtolower($params->type);
		$dbtype = ($params->type !== 'postgresql') ? $params->type : 'pgsql';
		$dbtype = ucfirst($dbtype);

		// Make sure the class exists
		if ( ! class_exists("\\Query\\Drivers\\{$dbtype}\\Driver"))
		{
			throw new BadDBDriverException('Database driver does not exist, or is not supported');
		}

		// Set additional PDO options
		$options = [];

		if (isset($params->options))
		{
			$options = (array) $params->options;
		}

		// Create the dsn for the database to connect to
		if(strtolower($dbtype) === 'sqlite')
		{
			$dsn = $params->file;
		}
		else
		{
			$dsn = $this->createDsn($dbtype, $params);
		}


		return [$dsn, $dbtype, $params, $options];
	}
public function parseParams(\stdClass $params): array
	{
		$params->type = strtolower($params->type);
		$dbtype = ($params->type !== 'postgresql') ? $params->type : 'pgsql';
		$dbtype = ucfirst($dbtype);

		// Make sure the class exists
		if ( ! class_exists("\\Query\\Drivers\\{$dbtype}\\Driver"))
		{
			throw new BadDBDriverException('Database driver does not exist, or is not supported');
		}

		// Set additional PDO options
		$options = [];

		if (isset($params->options))
		{
			$options = (array) $params->options;
		}

		// Create the dsn for the database to connect to
		if(strtolower($dbtype) === 'sqlite')
		{
			$dsn = $params->file;
		}
		else
		{
			$dsn = $this->createDsn($dbtype, $params);
		}


		return [$dsn, $dbtype, $params, $options];
	}
public function parseParams ( \ stdClass $ params ) : array { $ params -> type = strtolower ( $ params -> type ) ; $ dbtype = ( $ params -> type !== 'postgresql' ) ? $ params -> type : 'pgsql' ; $ dbtype = ucfirst ( $ dbtype ) ; // Make sure the class exists if ( ! class_exists ( "\\Query\\Drivers\\{$dbtype}\\Driver" ) ) { throw new BadDBDriverException ( 'Database driver does not exist, or is not supported' ) ; } // Set additional PDO options $ options = [ ] ; if ( isset ( $ params -> options ) ) { $ options = ( array ) $ params -> options ; } // Create the dsn for the database to connect to if ( strtolower ( $ dbtype ) === 'sqlite' ) { $ dsn = $ params -> file ; } else { $ dsn = $ this -> createDsn ( $ dbtype , $ params ) ; } return [ $ dsn , $ dbtype , $ params , $ options ] ; }
Parses params into a dsn and option array

@param \stdClass $params
@return array
@throws BadDBDriverException
Parses params into a dsn and option array