forked from parse-community/parse-php-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathParseConfig.php
More file actions
41 lines (35 loc) · 770 Bytes
/
Copy pathParseConfig.php
File metadata and controls
41 lines (35 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
namespace Parse;
/**
* ParseConfig - For accessing Parse Config settings.
*
* @author Fosco Marotto <fjm@fb.com>
*/
class ParseConfig
{
private $currentConfig;
/**
* Creates.
*/
public function __construct()
{
$result = ParseClient::_request('GET', 'config');
$this->setConfig($result['params']);
}
public function get($key)
{
if (isset($this->currentConfig[$key])) {
return $this->currentConfig[$key];
}
}
public function escape($key)
{
if (isset($this->currentConfig[$key])) {
return htmlentities($this->currentConfig[$key]);
}
}
protected function setConfig($config)
{
$this->currentConfig = $config;
}
}