| Recommend this page to a friend! | 
| Classes of Cyril Ogana | PHP DBAL Wrapper | ??? | Download | 
| 
 | |||||||||||||||||||||
|  Download DBDescriptionLight Wrapper around Docrines DBAL to handle management of configuration settings for various database types InstallingInstall application via Composerrequire "cymapgt/db": "1.*" UsageThe DB package is built for building database connection settings for various database types supported by Doctrine DBAL Overview
 Getters and SettersSetting The Database TypeReplace mysql with either of the following: oracle, mssql, sqlite, sybase, drizzle, postgres Getting The Database Type of a ConnectionGet Database ParametersReturn an array of the database parameters stored in the web server / operating system environment. The array is an associative array whose indices vary depending on the database type. Database configuration array keys match the Doctrine DBAL database connection settings listed on the documentation for DBAL (http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html). An example for MySQL is the array would contain user, password, host, port, dbname, driver, unix_socket and charset indices. Quality Check on the Configuration SettingsValidating Configuration SettingsAccepts an array of the DB parameters. It then does two checks. It ensures that the driver which DBAL will use for the database is actually loaded. It then checks that any of the default settings any of the various databases DBAL can load are present in the array. If any of the two checks fails a cymapgt\Exception\DBException will be thrown. Accepts an array of the DB parameters. Some of the DB connection settings are optional e.g. the charset in mysql. This method discards empty configurations prior to the DB connection being instantiated. Making DB connection and returning a DBAL instanceConnecting from Environment SettingsConnecting with an Array of config settingsClosing Database ConnectionsTestingDB Tests are provided with the package. SQLITE db is used in the testsuite. Contribute
 LicenseBSD 3 CLAUSE |