.htaccess
1 year ago
ArrayData.php
1 year ago
DBObject.php
1 year ago
Engine.php
1 year ago
Mysqldump.php
5 months ago
ReflectionObject.php
1 year ago
SleekStore.php
1 year ago
index.html
1 year ago
web.config
1 year ago
Engine.php
25 lines
| 1 | <?php |
| 2 | |
| 3 | namespace JetBackup\Data; |
| 4 | |
| 5 | if (!defined( '__JETBACKUP__')) die('Direct access is not allowed'); |
| 6 | |
| 7 | class Engine extends DBObject { |
| 8 | |
| 9 | const ENGINE = 'engine'; |
| 10 | |
| 11 | const ENGINE_WP = 1; |
| 12 | const ENGINE_JB = 2; |
| 13 | const ENGINE_SGB = 3; |
| 14 | |
| 15 | const ENGINE_NAMES = [ |
| 16 | self::ENGINE_WP => 'Wordpress', |
| 17 | self::ENGINE_JB => 'JetBackup', |
| 18 | self::ENGINE_SGB => 'SGB', |
| 19 | ]; |
| 20 | |
| 21 | public function setEngine(int $value):void { $this->set(self::ENGINE, $value); } |
| 22 | public function getEngine():int { return (int) $this->get(self::ENGINE, self::ENGINE_WP); } |
| 23 | |
| 24 | public function getEngineName():string { return self::ENGINE_NAMES[$this->getEngine()]; } |
| 25 | } |