ConnectionFactory¶
-
class
OC\DB\
ConnectionFactory
¶ - Takes care of creating and configuring Doctrine connections.
Source: lib/private/DB/ConnectionFactory.php#42
Constants¶
-
DEFAULT_DBNAME = owncloud
Source: lib/private/DB/ConnectionFactory.php#44 Type: string default database name
-
DEFAULT_DBTABLEPREFIX = oc_
Source: lib/private/DB/ConnectionFactory.php#47 Type: string default database table prefix
Properties¶
-
protected static property
OC\DB\ConnectionFactory::$
defaultConnectionParams
¶ Source: lib/private/DB/ConnectionFactory.php#55 Type: array Array mapping DBMS type to default connection parameters passed to \Doctrine\DBAL\DriverManager::getConnection().
Methods¶
-
public
OC\DB\ConnectionFactory::
__construct
($systemConfig)¶ - ConnectionFactory constructor.
Source: Parameters: - $systemConfig (
OC\SystemConfig
)
- $systemConfig (
-
public
OC\DB\ConnectionFactory::
getDefaultConnectionParams
($type)¶ Source: Parameters: - $type (string) DBMS type
Throws: \InvalidArgumentException
If $type is invalidReturns: array Default connection parameters.
-
public
OC\DB\ConnectionFactory::
getConnection
($type, $additionalConnectionParams)¶ Source: Parameters: - $type (string) DBMS type
- $additionalConnectionParams (array) Additional connection parameters
Returns:
-
public
OC\DB\ConnectionFactory::
normalizeType
($type)¶ Source: Parameters: - $type (string) DBMS type
Returns: string Normalized DBMS type
-
public
OC\DB\ConnectionFactory::
isValidType
($type)¶ - Checks whether the specified DBMS type is valid.
Source: Parameters: - $type (string)
Returns: bool
-
public
OC\DB\ConnectionFactory::
createConnectionParams
()¶ - Create the connection parameters for the config
Source: lib/private/DB/ConnectionFactory.php#191 Returns: array
-
protected
OC\DB\ConnectionFactory::
splitHostFromPortAndSocket
($host)¶ Source: Parameters: - $host (string)
Returns: array