-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed UTF-8 force settings (wrong way) added Uninstall routine for the SyncData tables
- Loading branch information
Showing
7 changed files
with
104 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.0.32 | ||
2.0.33 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
<?php | ||
|
||
/** | ||
* SyncData | ||
* | ||
* @author Team phpManufaktur <[email protected]> | ||
* @link https://addons.phpmanufaktur.de/SyncData | ||
* @copyright 2013 Ralf Hertsch <[email protected]> | ||
* @license MIT License (MIT) http://www.opensource.org/licenses/MIT | ||
*/ | ||
|
||
namespace phpManufaktur\SyncData\Data\Setup; | ||
|
||
use phpManufaktur\SyncData\Control\Application; | ||
use phpManufaktur\SyncData\Data\BackupMaster; | ||
use phpManufaktur\SyncData\Data\BackupTables; | ||
use phpManufaktur\SyncData\Data\SynchronizeTables; | ||
use phpManufaktur\SyncData\Data\BackupFiles; | ||
use phpManufaktur\SyncData\Data\SynchronizeMaster; | ||
use phpManufaktur\SyncData\Data\SynchronizeFiles; | ||
use phpManufaktur\SyncData\Data\SynchronizeArchives; | ||
use phpManufaktur\SyncData\Data\SynchronizeClient; | ||
|
||
/** | ||
* Setup routines for SyncData | ||
* | ||
* @author [email protected] | ||
* | ||
*/ | ||
class Uninstall | ||
{ | ||
|
||
protected $app = null; | ||
|
||
/** | ||
* Constructor | ||
* | ||
* @param Application $app | ||
*/ | ||
public function __construct(Application $app) | ||
{ | ||
$this->app = $app; | ||
} | ||
|
||
/** | ||
* Action handler for the uninstall routines | ||
* | ||
* @throws Exception | ||
* @return string | ||
*/ | ||
public function exec() | ||
{ | ||
// delete the tables | ||
try { | ||
// Backup Master table | ||
$BackupMaster = new BackupMaster($this->app); | ||
$BackupMaster->dropTable(); | ||
|
||
// Backup Tables | ||
$BackupTables = new BackupTables($this->app); | ||
$BackupTables->dropTable(); | ||
|
||
// Synchronize Tables | ||
$SynchronizeTables = new SynchronizeTables($this->app); | ||
$SynchronizeTables->dropTable(); | ||
|
||
// Backup files | ||
$BackupFiles = new BackupFiles($this->app); | ||
$BackupFiles->dropTable(); | ||
|
||
// Synchronize Master | ||
$SynchronizeMaster = new SynchronizeMaster($this->app); | ||
$SynchronizeMaster->dropTable(); | ||
|
||
// Synchronize Files | ||
$SynchronizeFiles = new SynchronizeFiles($this->app); | ||
$SynchronizeFiles->dropTable(); | ||
|
||
// Synchronize Archives | ||
$SynchronizeArchives = new SynchronizeArchives($this->app); | ||
$SynchronizeArchives->dropTable(); | ||
|
||
// Synchronize Client | ||
$SynchronizeClient = new SynchronizeClient($this->app); | ||
$SynchronizeClient->dropTable(); | ||
|
||
$this->app['monolog']->addInfo('All tables removed', | ||
array('method' => __METHOD__, 'line' => __LINE__)); | ||
return 'All tables removed'; | ||
} catch (\Exception $e) { | ||
throw new \Exception($e); | ||
} | ||
} | ||
} |