|
| generateUID () |
|
| removeDir ($sPath, $blDeleteSuccess, $iMode=0, $aSkipFiles=[], $aSkipFolders=[]) |
|
| getDefaultPathParams () |
|
| updateConfigFile ($parameters) |
|
| updateHtaccessFile ($aParams, $sSubFolder="") |
|
| canHtaccessFileBeUpdated () |
|
| getEnvVar ($sVarName) |
|
| getRequestVar ($sVarName, $sRequestType=null) |
|
| setCookie ($sName, $sValue, $iExpireDate, $sPath) |
|
| getFileContents ($sFile) |
|
| preparePath ($sPath) |
|
| extractRewriteBase ($sUrl) |
|
| isValidEmail ($sEmail) |
|
| executeExternalRegenerateViewsCommand () |
|
| executeExternalDatabaseMigrationCommand (ConsoleOutput $output=null, Facts $facts=null) |
|
| executeExternalDemodataAssetsInstallCommand () |
|
| checkDbExists ($database) |
|
| getSqlDirectory ($edition=null) |
|
| getSetupDirectory () |
|
| isDemodataPrepared () |
|
| getActiveEditionDemodataPackageSqlFilePath () |
|
| getActiveEditionDemodataPackagePath () |
|
| getLicenseContent ($languageId) |
|
|
| $_sEmailTpl = "/^([-!#\$%&'*+.\/0-9=?A-Z^_`a-z{|}~\177])+@([-!#\$%&'*+\/0-9=?A-Z^_`a-z{|}~\177]+\\.)+[a-zA-Z]{2,6}\$/i" |
|
◆ _extractPath()
OxidEsales\EshopCommunity\Setup\Utilities::_extractPath |
( |
|
$aPath | ) |
|
|
protected |
Extracts install path
- Parameters
-
array | $aPath | path info array |
- Returns
- string
◆ canHtaccessFileBeUpdated()
OxidEsales\EshopCommunity\Setup\Utilities::canHtaccessFileBeUpdated |
( |
| ) |
|
Returns true if htaccess file can be updated by setup process.
Functionality is tested via: Acceptance/Frontend/ShopSetUpTest.php::testInstallShopCantContinueDueToHtaccessProblem
- Returns
- bool
◆ checkDbExists()
OxidEsales\EshopCommunity\Setup\Utilities::checkDbExists |
( |
|
$database | ) |
|
Check if database is up and running
- Parameters
-
- Returns
- bool
◆ createDemoDataInstaller()
OxidEsales\EshopCommunity\Setup\Utilities::createDemoDataInstaller |
( |
| ) |
|
|
protected |
- Returns
- \OxidEsales\DemoDataInstaller\DemoDataInstaller
◆ createMigrations()
OxidEsales\EshopCommunity\Setup\Utilities::createMigrations |
( |
Facts |
$facts = null | ) |
|
|
protected |
- Parameters
-
Facts | $facts | The facts object to use for the creation of the migrations. |
- Returns
- Migrations
◆ executeExternalDatabaseMigrationCommand()
OxidEsales\EshopCommunity\Setup\Utilities::executeExternalDatabaseMigrationCommand |
( |
ConsoleOutput |
$output = null , |
|
|
Facts |
$facts = null |
|
) |
| |
Calls external database migration command.
- Parameters
-
ConsoleOutput | $output | Add a possibility to provide a custom output handler. |
Facts | null | $facts | A possible facts mock |
◆ executeExternalDemodataAssetsInstallCommand()
OxidEsales\EshopCommunity\Setup\Utilities::executeExternalDemodataAssetsInstallCommand |
( |
| ) |
|
Calls external demodata assets install command.
- Returns
- int Error code of the install command.
◆ executeExternalRegenerateViewsCommand()
OxidEsales\EshopCommunity\Setup\Utilities::executeExternalRegenerateViewsCommand |
( |
| ) |
|
Calls external database views regeneration command.
- Returns
- bool Was the call a success?
◆ extractRewriteBase()
OxidEsales\EshopCommunity\Setup\Utilities::extractRewriteBase |
( |
|
$sUrl | ) |
|
Extracts rewrite base path from url
- Parameters
-
string | $sUrl | user defined shop install url |
- Returns
- string
◆ generateUID()
OxidEsales\EshopCommunity\Setup\Utilities::generateUID |
( |
| ) |
|
Generates unique id
- Returns
- string
◆ getActiveEditionDemodataPackagePath()
OxidEsales\EshopCommunity\Setup\Utilities::getActiveEditionDemodataPackagePath |
( |
| ) |
|
Return full path to demodata package based on current eShop edition.
- Returns
- string
◆ getActiveEditionDemodataPackageSqlFilePath()
OxidEsales\EshopCommunity\Setup\Utilities::getActiveEditionDemodataPackageSqlFilePath |
( |
| ) |
|
Return full path to demodata.sql
file of demodata package based on current eShop edition.
- Returns
- string
◆ getDefaultPathParams()
OxidEsales\EshopCommunity\Setup\Utilities::getDefaultPathParams |
( |
| ) |
|
Returns path parameters for standard setup (non APS)
- Returns
- array
◆ getEditionPathProvider()
OxidEsales\EshopCommunity\Setup\Utilities::getEditionPathProvider |
( |
|
$edition = null | ) |
|
|
private |
- Parameters
-
- Returns
- EditionPathProvider
◆ getEnvVar()
OxidEsales\EshopCommunity\Setup\Utilities::getEnvVar |
( |
|
$sVarName | ) |
|
Returns the value of an environment variable
- Parameters
-
string | $sVarName | variable name |
- Returns
- mixed
◆ getFileContents()
OxidEsales\EshopCommunity\Setup\Utilities::getFileContents |
( |
|
$sFile | ) |
|
Returns file contents if file is readable
- Parameters
-
- Returns
- string | mixed
◆ getLicenseContent()
OxidEsales\EshopCommunity\Setup\Utilities::getLicenseContent |
( |
|
$languageId | ) |
|
Returns the contents of license agreement in requested language.
- Parameters
-
- Returns
- string
◆ getRequestVar()
OxidEsales\EshopCommunity\Setup\Utilities::getRequestVar |
( |
|
$sVarName, |
|
|
|
$sRequestType = null |
|
) |
| |
Returns variable from request
- Parameters
-
string | $sVarName | variable name |
string | $sRequestType | request type - "post", "get", "cookie" [optional] |
- Returns
- mixed
◆ getSetupDirectory()
OxidEsales\EshopCommunity\Setup\Utilities::getSetupDirectory |
( |
| ) |
|
Get setup directory
- Returns
- string
◆ getSqlDirectory()
OxidEsales\EshopCommunity\Setup\Utilities::getSqlDirectory |
( |
|
$edition = null | ) |
|
Get specific edition sql directory
- Parameters
-
- Returns
- string
◆ getVendorDirectory()
OxidEsales\EshopCommunity\Setup\Utilities::getVendorDirectory |
( |
| ) |
|
|
private |
Return path to composer vendor directory.
- Returns
- string
◆ handleMissingConfigFileException()
OxidEsales\EshopCommunity\Setup\Utilities::handleMissingConfigFileException |
( |
|
$pathToConfigFile | ) |
|
|
private |
Throws an exception in case config file is missing.
This is necessary to suppress PHP warnings during Setup. With the help of exception this problem is caught and displayed properly.
- Parameters
-
string | $pathToConfigFile | File path to eShop configuration file. |
- Exceptions
-
◆ isDemodataPrepared()
OxidEsales\EshopCommunity\Setup\Utilities::isDemodataPrepared |
( |
| ) |
|
Check if demodata package is installed.
- Returns
- bool
◆ isValidEmail()
OxidEsales\EshopCommunity\Setup\Utilities::isValidEmail |
( |
|
$sEmail | ) |
|
Email validation function. Returns true if email is OK otherwise - false; Syntax validation is performed only.
- Parameters
-
- Returns
- bool
◆ preparePath()
OxidEsales\EshopCommunity\Setup\Utilities::preparePath |
( |
|
$sPath | ) |
|
Prepares given path parameter to ce compatible with unix format
- Parameters
-
string | $sPath | path to prepare |
- Returns
- string
◆ removeDir()
OxidEsales\EshopCommunity\Setup\Utilities::removeDir |
( |
|
$sPath, |
|
|
|
$blDeleteSuccess, |
|
|
|
$iMode = 0 , |
|
|
|
$aSkipFiles = [] , |
|
|
|
$aSkipFolders = [] |
|
) |
| |
Recursively removes given path files and folders
- Parameters
-
string | $sPath | path to remove |
bool | $blDeleteSuccess | removal state marker |
int | $iMode | remove mode: 0 files and folders, 1 - files only |
array | $aSkipFiles | files which should not be deleted (default null) |
array | $aSkipFolders | folders which should not be deleted (default null) |
- Returns
- bool
◆ setCookie()
OxidEsales\EshopCommunity\Setup\Utilities::setCookie |
( |
|
$sName, |
|
|
|
$sValue, |
|
|
|
$iExpireDate, |
|
|
|
$sPath |
|
) |
| |
Sets cookie
- Parameters
-
string | $sName | name of the cookie |
string | $sValue | value of the cookie |
int | $iExpireDate | time the cookie expires |
string | $sPath | path on the server in which the cookie will be available on. |
◆ stripAnsiControlCodes()
static OxidEsales\EshopCommunity\Setup\Utilities::stripAnsiControlCodes |
( |
|
$outputWithAnsiControlCodes | ) |
|
|
static |
Removes any ANSI control codes from command output.
- Parameters
-
string | $outputWithAnsiControlCodes | |
- Returns
- string
◆ updateConfigFile()
OxidEsales\EshopCommunity\Setup\Utilities::updateConfigFile |
( |
|
$parameters | ) |
|
Updates config.inc.php file contents.
- Parameters
-
array | $parameters | Configuration parameters as submitted by the user |
- Exceptions
-
Exception | File can't be found, opened for reading or written. |
◆ updateHtaccessFile()
OxidEsales\EshopCommunity\Setup\Utilities::updateHtaccessFile |
( |
|
$aParams, |
|
|
|
$sSubFolder = "" |
|
) |
| |
Updates default htaccess file with user defined params
- Parameters
-
array | $aParams | various setup parameters |
string | $sSubFolder | in case you need to update non default, but e.g. admin file, you must add its folder |
- Exceptions
-
Exception | when .htaccess file is not accessible/readable. |
◆ $_sEmailTpl
OxidEsales\EshopCommunity\Setup\Utilities::$_sEmailTpl = "/^([-!#\$%&'*+.\/0-9=?A-Z^_`a-z{|}~\177])+@([-!#\$%&'*+\/0-9=?A-Z^_`a-z{|}~\177]+\\.)+[a-zA-Z]{2,6}\$/i" |
|
protected |
◆ CONFIG_FILE_NAME
const OxidEsales\EshopCommunity\Setup\Utilities::CONFIG_FILE_NAME = 'config.inc.php' |
◆ DEMODATA_PACKAGE_NAME
const OxidEsales\EshopCommunity\Setup\Utilities::DEMODATA_PACKAGE_NAME = 'oxideshop-demodata-%s' |
◆ DEMODATA_PACKAGE_SOURCE_DIRECTORY
const OxidEsales\EshopCommunity\Setup\Utilities::DEMODATA_PACKAGE_SOURCE_DIRECTORY = 'src' |
◆ DEMODATA_SQL_FILENAME
const OxidEsales\EshopCommunity\Setup\Utilities::DEMODATA_SQL_FILENAME = 'demodata.sql' |
◆ ERROR_COULD_NOT_FIND_FILE
const OxidEsales\EshopCommunity\Setup\Utilities::ERROR_COULD_NOT_FIND_FILE = 1 |
◆ ERROR_COULD_NOT_READ_FILE
const OxidEsales\EshopCommunity\Setup\Utilities::ERROR_COULD_NOT_READ_FILE = 2 |
◆ ERROR_COULD_NOT_WRITE_TO_FILE
const OxidEsales\EshopCommunity\Setup\Utilities::ERROR_COULD_NOT_WRITE_TO_FILE = 3 |
◆ LICENSE_TEXT_FILENAME
const OxidEsales\EshopCommunity\Setup\Utilities::LICENSE_TEXT_FILENAME = "lizenz.txt" |
The documentation for this class was generated from the following file: