Initial commit, WIP.

This commit is contained in:
Junade Ali
2017-01-13 23:52:27 +00:00
commit a49c655e77
13 changed files with 2150 additions and 0 deletions

62
src/Adapter/Guzzle.php Normal file
View File

@@ -0,0 +1,62 @@
<?php
/**
* User: junade
* Date: 13/01/2017
* Time: 18:26
*/
namespace Cloudflare\API\Adapter;
use Cloudflare\API\Auth\Auth;
use GuzzleHttp\Client;
class Guzzle implements Adapter
{
private $client;
/**
* @inheritDoc
*/
public function __construct(Auth $auth, String $baseURI = "https://api.cloudflare.com/client/v4/")
{
$this->client = new Client([
'base_uri' => $baseURI
]);
}
/**
* @inheritDoc
*/
public function get(String $uri, array $headers = array())
{
$response = $this->client->get($uri, $headers);
var_dump((string)$response);
}
/**
* @inheritDoc
*/
public function post(String $uri, array $headers = array(), array $body = array())
{
// TODO: Implement post() method.
}
/**
* @inheritDoc
*/
public function put(String $uri, array $headers = array(), array $body = array())
{
// TODO: Implement put() method.
}
/**
* @inheritDoc
*/
public function delete(String $uri, array $headers = array(), array $body = array())
{
// TODO: Implement delete() method.
}
}