wCMF
3.6
|
Public Member Functions | |
validate () | |
initialize (&$request, &$response) | |
getWorkPackage ($number) | |
getAdditionalWorkPackage ($number, $action) | |
backupFiles () | |
restoreFiles () | |
getBackupDir () | |
![]() | |
initialize (&$request, &$response) | |
addWorkPackage ($name, $size, $oids, $callback, $args=null) | |
getWorkPackage ($number) | |
getNumberOfSteps () | |
getDisplayText ($step) | |
getSummaryText () | |
processPart () | |
![]() | |
initialize (&$request, &$response) | |
hasView () | |
executeKernel () | |
getStepNumber () | |
getNumberOfSteps () | |
getDisplayText ($step) | |
getSummaryText () | |
initializeTask () | |
processPart () | |
![]() | |
Controller (&$delegate) | |
initialize (&$request, &$response) | |
validate () | |
hasView () | |
execute () | |
executeKernel () | |
getErrorMsg () | |
setErrorMsg ($msg) | |
appendErrorMsg ($msg) | |
& | getRequest () |
& | getResponse () |
& | getView () |
& | getDelegate () |
getViewTemplate ($controller, $context, $action) | |
getCacheId () | |
assignViewDefaults (&$view) | |
isLocalizedRequest () | |
Public Attributes | |
$BACKUP_NAME_VARNAME = 'BackupController.backupName' | |
$SOURCE_DIR_VARNAME = 'BackupController.sourceDir' | |
![]() | |
$WORK_PACKAGES_VARNAME = 'BatchController.workPackages' | |
$NUM_STEPS_VARNAME = 'BatchController.numSteps' | |
$_workPackages = array() | |
![]() | |
$STEP_SESSION_VARNAME = 'LongTaskController.curStep' | |
$ONE_CALL_SESSION_VARNAME = 'LongTaskController.oneCall' | |
$_curStep = 1 | |
![]() | |
$_request = null | |
$_response = null | |
$_errorMsg = '' | |
$_view = null | |
$_delegate = null | |
This Controller creates a backup (action 'makebackup') from a directory and restores (action 'restorebackup') a created one to that directory respectively. It creates a directory named after the 'backupName' parameter in the backup directory whose name is determined by the configuration key 'backupDir' (section 'cms'). Then it copies all files found in the directory given in the 'sourceDir' parameter to that directory. Subclasses may add additional work packages by overriding the BackupController::getAdditionalWorkPackage method.
wCMF - wemove Content Management Framework Copyright (C) 2005-2014 wemove digital solutions GmbH
Licensed under the terms of any of the following licenses at your choice:
See the license.txt file distributed with this work for additional information.
Input actions:
Output actions:
[in] | backupName | The name of the backup to create/restore. |
[in] | sourceDir | The name of the directory to backup. |
[out] | @see | BatchController |
Definition at line 48 of file class.BackupController.php.
BackupController::validate | ( | ) |
Definition at line 57 of file class.BackupController.php.
References SessionData\getInstance(), and Controller\setErrorMsg().
BackupController::initialize | ( | & | $request, |
& | $response | ||
) |
Definition at line 76 of file class.BackupController.php.
References SessionData\getInstance().
BackupController::getWorkPackage | ( | $number | ) |
Definition at line 95 of file class.BackupController.php.
References getAdditionalWorkPackage().
BackupController::getAdditionalWorkPackage | ( | $number, | |
$action | |||
) |
Get definitions of additional work packages (
number | The number of the work package (first number is 1, number is incremented on every call) |
action | 'makebackup' or 'restorebackup' |
Definition at line 115 of file class.BackupController.php.
Referenced by getWorkPackage().
BackupController::backupFiles | ( | ) |
Copy all files from sourceDir to the backup location defined by backupDir and backupName.
Definition at line 123 of file class.BackupController.php.
References FileUtil\copyRecDir(), getBackupDir(), and SessionData\getInstance().
BackupController::restoreFiles | ( | ) |
Copy all files from the backup location defined by backupDir and backupName to sourceDir. It empties the source directory first.
Definition at line 134 of file class.BackupController.php.
References FileUtil\copyRecDir(), FileUtil\emptyDir(), Message\get(), getBackupDir(), SessionData\getInstance(), and Controller\setErrorMsg().
BackupController::getBackupDir | ( | ) |
Get the actual backup directory defined by the key 'backupDir' in configuration section 'cms' and the backup name.
Definition at line 157 of file class.BackupController.php.
References InifileParser\getInstance(), SessionData\getInstance(), and WCMFException\throwEx().
Referenced by backupFiles(), MySQLBackupController\backupMySQL(), restoreFiles(), and MySQLBackupController\restoreMySQL().
BackupController::$BACKUP_NAME_VARNAME = 'BackupController.backupName' |
Definition at line 51 of file class.BackupController.php.
BackupController::$SOURCE_DIR_VARNAME = 'BackupController.sourceDir' |
Definition at line 52 of file class.BackupController.php.