1 | <?php |
||
10 | class Cloudflare |
||
11 | { |
||
12 | protected $Endpoint = "https://api.cloudflare.com/client/v4/"; |
||
13 | protected $APIKey; |
||
14 | protected $Email; |
||
15 | protected $MakeRequests = true; |
||
16 | protected $Guzzle; |
||
17 | |||
18 | public function setGuzzle($Guzzle) |
||
22 | |||
23 | public function getEndpoint() |
||
27 | |||
28 | public function getAPIKey() |
||
32 | |||
33 | public function getEmail() |
||
37 | |||
38 | public function getMakeRequests() |
||
42 | |||
43 | public function getGuzzle() |
||
44 | { |
||
45 | //If Guzzle has not been setup yet |
||
46 | if($this->Guzzle === null) { |
||
47 | $Guzzle = new Client(); |
||
48 | $this->setGuzzle($Guzzle); |
||
49 | } |
||
50 | |||
51 | return $this->Guzzle; |
||
52 | } |
||
53 | |||
54 | public function diableRequests() |
||
58 | |||
59 | public function enableRequests() |
||
63 | |||
64 | public function __construct($options = null, $Guzzle = null) |
||
78 | |||
79 | private function loadConfig() |
||
98 | } |
||
99 |