Interface DatabaseConfigurationHelper
Interface for database helper classes.
Methods summary
public
boolean
|
#
requireDatabaseFunctions( array $databaseConfig )
Ensure that the database function for connectivity is available. If it is, we
assume the PHP module for this database has been setup correctly.
Ensure that the database function for connectivity is available. If it is, we
assume the PHP module for this database has been setup correctly.
Parameters
- $databaseConfig
- array $databaseConfig Associative array of db configuration, e.g. "server",
"username" etc
Returns
boolean boolean
|
public
array
|
#
requireDatabaseServer( array $databaseConfig )
Ensure that the database server exists.
Ensure that the database server exists.
Parameters
- $databaseConfig
- array $databaseConfig Associative array of db configuration, e.g. "server",
"username" etc
Returns
array Result - e.g. array('okay' => true, 'error' => 'details of error')
|
public
array
|
#
requireDatabaseConnection( array $databaseConfig )
Ensure a database connection is possible using credentials provided. The
established connection resource is returned with the results as well.
Ensure a database connection is possible using credentials provided. The
established connection resource is returned with the results as well.
Parameters
- $databaseConfig
- array $databaseConfig Associative array of db configuration, e.g. "server",
"username" etc
Returns
array Result - e.g. array('okay' => true, 'connection' => mysql link, 'error'
=> 'details of error')
|
public
array
|
#
requireDatabaseOrCreatePermissions( array $databaseConfig )
Ensure that the database connection is able to use an existing database, or
be able to create one if it doesn't exist.
Ensure that the database connection is able to use an existing database, or
be able to create one if it doesn't exist.
Parameters
- $databaseConfig
- array $databaseConfig Associative array of db configuration, e.g. "server",
"username" etc
Returns
array Result - e.g. array('okay' => true, 'existsAlready' => 'true')
|
Magic methods summary
[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the
Silverstripe Forums to ask development related questions.
-