1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* Jaeger |
4
|
|
|
* |
5
|
|
|
* @copyright Copyright (c) 2015-2016, mithra62 |
6
|
|
|
* @link http://jaeger-app.com |
7
|
|
|
* @version 1.0 |
8
|
|
|
* @filesource ./Platforms/Console.php |
9
|
|
|
*/ |
10
|
|
|
namespace JaegerApp\Platforms; |
11
|
|
|
|
12
|
|
|
use JaegerApp\Platforms\AbstractPlatform; |
13
|
|
|
|
14
|
|
|
/** |
15
|
|
|
* JaegerApp - Console Platform Object |
16
|
|
|
* |
17
|
|
|
* The bridge between mithra62 code and Console specific logic |
18
|
|
|
* |
19
|
|
|
* @package Platforms\Console |
20
|
|
|
* @author Eric Lamb <[email protected]> |
21
|
|
|
*/ |
22
|
|
|
class Console extends AbstractPlatform |
23
|
|
|
{ |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* The set settings data from the configuration file |
27
|
|
|
* |
28
|
|
|
* @var array |
29
|
|
|
*/ |
30
|
|
|
protected $config = array(); |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* Sets the config data from an external source |
34
|
|
|
* |
35
|
|
|
* @param array $data |
36
|
|
|
* @return JaegerApp\Platform\Console |
37
|
|
|
*/ |
38
|
|
|
public function setConfig(array $data) |
39
|
|
|
{ |
40
|
|
|
$this->config = $data; |
41
|
|
|
$this->config['db']['settings_table_name'] = $this->config['db']['prefix'] . 'backup_pro_settings'; |
42
|
|
|
return $this; |
43
|
|
|
} |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* (non-PHPdoc) |
47
|
|
|
* |
48
|
|
|
* @see \JaegerApp\Platforms\AbstractPlatform::getDbCredentials() |
49
|
|
|
*/ |
50
|
|
|
public function getDbCredentials() |
51
|
|
|
{ |
52
|
|
|
return $this->config['db']; |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* (non-PHPdoc) |
57
|
|
|
* |
58
|
|
|
* @see \JaegerApp\Platforms\AbstractPlatform::getEmailConfig() |
59
|
|
|
*/ |
60
|
|
|
public function getEmailConfig() |
61
|
|
|
{ |
62
|
|
|
return $this->config['email']; |
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* (non-PHPdoc) |
67
|
|
|
* |
68
|
|
|
* @see \JaegerApp\Platforms\AbstractPlatform::getCurrentUrl() |
69
|
|
|
*/ |
70
|
|
|
public function getCurrentUrl() |
71
|
|
|
{ |
72
|
|
|
return $this->config['site_url']; |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* (non-PHPdoc) |
77
|
|
|
* |
78
|
|
|
* @see \JaegerApp\Platforms\AbstractPlatform::getSiteName() |
79
|
|
|
*/ |
80
|
|
|
public function getSiteName() |
81
|
|
|
{ |
82
|
|
|
return $this->config['site_name']; |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* (non-PHPdoc) |
87
|
|
|
* |
88
|
|
|
* @see \JaegerApp\Platforms\AbstractPlatform::getTimezone() |
89
|
|
|
*/ |
90
|
|
|
public function getTimezone() |
91
|
|
|
{ |
92
|
|
|
return date_default_timezone_get(); |
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* (non-PHPdoc) |
97
|
|
|
* |
98
|
|
|
* @see \JaegerApp\Platforms\AbstractPlatform::getSiteUrl() |
99
|
|
|
*/ |
100
|
|
|
public function getSiteUrl() |
101
|
|
|
{ |
102
|
|
|
return $this->config['site_url']; |
103
|
|
|
} |
104
|
|
|
|
105
|
|
|
/** |
106
|
|
|
* (non-PHPdoc) |
107
|
|
|
* |
108
|
|
|
* @see \JaegerApp\Platforms\AbstractPlatform::getEncryptionKey() |
109
|
|
|
*/ |
110
|
|
|
public function getEncryptionKey() |
111
|
|
|
{ |
112
|
|
|
return $this->config['encryption_key']; |
113
|
|
|
} |
114
|
|
|
|
115
|
|
|
/** |
116
|
|
|
* (non-PHPdoc) |
117
|
|
|
* |
118
|
|
|
* @see \JaegerApp\Platforms\AbstractPlatform::getConfigOverrides() |
119
|
|
|
*/ |
120
|
|
|
public function getConfigOverrides() |
121
|
|
|
{ |
122
|
|
|
return array(); |
123
|
|
|
} |
124
|
|
|
|
125
|
|
|
/** |
126
|
|
|
* (non-PHPdoc) |
127
|
|
|
* @param string $url |
128
|
|
|
* @see \JaegerApp\Platforms\AbstractPlatform::redirect() |
129
|
|
|
*/ |
130
|
|
|
public function redirect($url) |
131
|
|
|
{} |
132
|
|
|
|
133
|
|
|
/** |
134
|
|
|
* (non-PHPdoc) |
135
|
|
|
* @param string $key |
136
|
|
|
* @param string $default |
137
|
|
|
* @see \JaegerApp\Platforms\AbstractPlatform::getPost() |
138
|
|
|
*/ |
139
|
|
|
public function getPost($key, $default = false) |
140
|
|
|
{} |
141
|
|
|
} |