PluginProbe
CSS & JavaScript Toolbox / 11.9
CSS & JavaScript Toolbox v11.9
trunk 0.3 0.8 10 10.1 11 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 11.9.1 12 12.0 12.0.1 12.0.3 12.0.4 12.0.5 12.0.6 12.0.7 6.0 6.0.11 All 60 releases
css-javascript-toolbox / includes / installer / upgrade / 0.3 / upgrade.class.php

upgrade.class.php in CSS & JavaScript Toolbox 11.9, at includes/installer/upgrade/0.3/upgrade.class.php

85 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 *
4 */
5
6 // Disallow direct access.
7 defined('ABSPATH') or die("Access denied");
8
9 // Import dependencies!
10 cssJSToolbox::import('includes:installer:upgrade:upgrade.class.php');
11
12 /**
13 *
14 */
15 class CJTV03Upgrade extends CJTUpgradeNonTabledVersions {
16
17 /**
18 *
19 */
20 const BACKUPS_POINTER = 'cjtoolbox_tools_backups';
21
22 /**
23 * put your comment there...
24 *
25 * @var mixed
26 */
27 protected $backups;
28
29 /**
30 * put your comment there...
31 *
32 */
33 public function __construct() {
34 // Import dependencies!
35 cssJSToolbox::import('includes:installer:upgrade:0.3:includes:backup.class.php');
36 // Instantiate Backups iterator!
37 $this->backups = new CJTInstallerBackup(get_option(self::BACKUPS_POINTER));
38 // Initialize hookable!
39 parent::__construct();
40 }
41
42 /**
43 * put your comment there...
44 *
45 */
46 public function backups() {
47 // No custom work is neede for now just upgrade backups!
48 foreach ($this->backups as $backup) {
49 $this->backups->upgrade();
50 }
51 return $this;
52 }
53
54 /**
55 * put your comment there...
56 *
57 */
58 public function finalize() {
59 // Delete backups data!
60 delete_option(self::BACKUPS_POINTER);
61 // Parent finalize!
62 return parent::finalize();
63 }
64
65 /**
66 * put your comment there...
67 *
68 * @param mixed $blocks
69 */
70 protected function getBlocksIterator($blocks) {
71 // Import iterator class file!
72 cssJSToolbox::import('includes:installer:upgrade:0.3:includes:block.class.php');
73 // Instantiate blocks iterator object!
74 return new CJTInstallerBlocks03($blocks);
75 }
76
77 /**
78 * put your comment there...
79 *
80 */
81 public static function getInstance() {
82 return new CJTV03Upgrade();
83 }
84
85 } // End class.