forked from moxiworks-platform/moxiworks-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConfig.php
52 lines (43 loc) · 1.45 KB
/
Config.php
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
42
43
44
45
46
47
48
49
50
51
52
<?php
namespace MoxiworksPlatform;
class Config
{
private static $url = "https://api.moxiworks.com";
private static $debug = false;
/**
* The Moxi Works Platform base URL. default is 'https://api.moxiworks.com'
*
* Modification of this attribute should not be needed unless you are debugging or developing for Moxi Works Platform PHP SDK
*
* @param [String] the base url to use when connecting to The Moxi Works Platform
*/
public static function setUrl($u) {
static::$url = trim($u);
}
/**
* The Moxi Works Platform base URL. default is 'https://api.moxiworks.com'
*
* @return String the base url to use when connecting to The Moxi Works Platform
*/
public static function getUrl() {
return static::$url;
}
/**
* Debug Moxi Works Platform Requests. default is 'true'
*
* Modification of this attribute should not be needed unless you are debugging or developing for Moxi Works Platform PHP SDK
*
* @param [Boolean] whether to print debug information for requests to Moxi Works Platform
*/
public static function setDebug($d) {
static::$debug = (is_bool($d) && $d == true);
}
/**
* Debug Moxi Works Platform Requests. default is 'true'
*
* @return Boolean whether to print debug information for requests to Moxi Works Platform
*/
public static function getDebug() {
return static::$debug;
}
}