Setup database manager class
◆ addConfigValueIfShopInfoShouldBeSent()
OxidEsales\EshopCommunity\Setup\Database::addConfigValueIfShopInfoShouldBeSent |
( |
|
$utilities, |
|
|
|
$baseShopId, |
|
|
|
$parameters, |
|
|
|
$configKey, |
|
|
|
$session |
|
) |
| |
|
protected |
Adds config value if shop info should be set.
- Parameters
-
Utilities | $utilities | Setup utilities |
string | $baseShopId | Shop id |
array | $parameters | Parameters |
Conf | $configKey | Config key loader |
Session | $session | Setup session manager |
◆ connectDb()
OxidEsales\EshopCommunity\Setup\Database::connectDb |
( |
|
$sDbName | ) |
|
Connect to database.
- Parameters
-
- Exceptions
-
◆ createDb()
OxidEsales\EshopCommunity\Setup\Database::createDb |
( |
|
$sDbName | ) |
|
Creates database
- Parameters
-
string | $sDbName | database name |
- Exceptions
-
Exception | exception is thrown if database creation failed |
◆ execSql()
OxidEsales\EshopCommunity\Setup\Database::execSql |
( |
|
$sQ | ) |
|
Executes sql query. Returns query execution resource object
- Parameters
-
string | $sQ | query to execute |
- Exceptions
-
Exception | exception is thrown if error occured during sql execution |
- Returns
- PDOStatement|int
◆ getConnection()
OxidEsales\EshopCommunity\Setup\Database::getConnection |
( |
| ) |
|
Returns connection resource object
- Returns
- PDO
◆ getDatabaseVersion()
OxidEsales\EshopCommunity\Setup\Database::getDatabaseVersion |
( |
| ) |
|
Returns database version
- Returns
- string
◆ openDatabase()
OxidEsales\EshopCommunity\Setup\Database::openDatabase |
( |
|
$aParams | ) |
|
Opens database connection and returns connection resource object
- Parameters
-
array | $aParams | database connection parameters array |
- Exceptions
-
Exception | exception is thrown if connection failed or was unable to select database |
- Returns
- object
◆ parseQuery()
OxidEsales\EshopCommunity\Setup\Database::parseQuery |
( |
|
$sSQL | ) |
|
Parses query string into sql sentences
- Parameters
-
string | $sSQL | query string (usually reqd from *.sql file) |
- Returns
- array
◆ queryFile()
OxidEsales\EshopCommunity\Setup\Database::queryFile |
( |
|
$sFilename | ) |
|
Executes queries stored in passed file
- Parameters
-
string | $sFilename | file name where queries are stored |
◆ saveShopSettings()
OxidEsales\EshopCommunity\Setup\Database::saveShopSettings |
( |
|
$aParams | ) |
|
Saves shop settings.
- Parameters
-
array | $aParams | parameters to save to db |
◆ testCreateView()
OxidEsales\EshopCommunity\Setup\Database::testCreateView |
( |
| ) |
|
Testing if no error occurs while creating views
- Exceptions
-
Exception | exception is thrown if error occured during view creation |
◆ writeAdminLoginData()
OxidEsales\EshopCommunity\Setup\Database::writeAdminLoginData |
( |
|
$sLoginName, |
|
|
|
$sPassword |
|
) |
| |
Updates default admin user login name and password
- Parameters
-
string | $sLoginName | admin user login name |
string | $sPassword | admin user login password |
◆ $_oConn
OxidEsales\EshopCommunity\Setup\Database::$_oConn = null |
|
protected |
◆ ERROR_COULD_NOT_CREATE_DB
const OxidEsales\EshopCommunity\Setup\Database::ERROR_COULD_NOT_CREATE_DB = 2 |
◆ ERROR_DB_CONNECT
const OxidEsales\EshopCommunity\Setup\Database::ERROR_DB_CONNECT = 1 |
◆ ERROR_MYSQL_VERSION_DOES_NOT_FIT_RECOMMENDATIONS
const OxidEsales\EshopCommunity\Setup\Database::ERROR_MYSQL_VERSION_DOES_NOT_FIT_RECOMMENDATIONS = 4 |
◆ ERROR_MYSQL_VERSION_DOES_NOT_FIT_REQUIREMENTS
const OxidEsales\EshopCommunity\Setup\Database::ERROR_MYSQL_VERSION_DOES_NOT_FIT_REQUIREMENTS = 3 |
◆ ERROR_OPENING_SQL_FILE
const OxidEsales\EshopCommunity\Setup\Database::ERROR_OPENING_SQL_FILE = 1 |
The documentation for this class was generated from the following file: