DatabaseAdapterRegistry
class DatabaseAdapterRegistry implements Flushable (View source)
This class keeps track of the available database adapters and provides a meaning of registering community built adapters in to the installer process.
Properties
Methods
Detects all _configure_database.php files and invokes them Called by ConfigureFromEnv.php.
Including _configure_database.php is a legacy method of configuring a database It's still used by https://github.com/silverstripe/silverstripe-sqlite3
This function is triggered early in the request if the "flush" query parameter has been set. Each class that implements Flushable implements this function which looks after it's own specific flushing functionality.
Build configuration helper for a given class
Details
static
register(array $config)
Add new adapter to the registry
static
unregister(string $class)
Unregisters a database connector by classname
static
autodiscover()
Detects all _register_database.php files and invokes them.
Searches through vendor/\/ folders only, does not support "legacy" folder location in webroot
static
autoconfigure(array $config = null)
Detects all _configure_database.php files and invokes them Called by ConfigureFromEnv.php.
Searches through vendor/ folder only, does not support "legacy" folder location in webroot
static protected array
getConfigureDatabasePaths()
Including _configure_database.php is a legacy method of configuring a database It's still used by https://github.com/silverstripe/silverstripe-sqlite3
static CacheInterface
getCache()
No description
static
flush()
This function is triggered early in the request if the "flush" query parameter has been set. Each class that implements Flushable implements this function which looks after it's own specific flushing functionality.
static array
get_adapters()
Return all registered adapters
static array
get_adapter(string $class)
Returns registry data for a class
static array
get_default_fields()
Retrieves default field configuration
static DatabaseConfigurationHelper|null
getDatabaseConfigurationHelper(string $databaseClass)
Build configuration helper for a given class