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

65
src/Adapter/Adapter.php Normal file
View File

@@ -0,0 +1,65 @@
<?php
/**
* User: junade
* Date: 13/01/2017
* Time: 16:06
*/
namespace Cloudflare\API\Adapter;
use Cloudflare\API\Auth\Auth;
/**
* Interface Adapter
* @package Cloudflare\API\Adapter
* Note that the $body fields expect a JSON key value store.
*/
interface Adapter
{
/**
* Adapter constructor.
*
* @param Auth $auth
* @param String $baseURI
*/
public function __construct(Auth $auth, String $baseURI);
/**
* Sends a GET request.
* Per Robustness Principle - not including the ability to send a body with a GET request (though possible in the
* RFCs, it is never useful).
*
* @param String $uri
* @param array $headers
*
* @return mixed
*/
public function get(String $uri, array $headers);
/**
* @param String $uri
* @param array $headers
* @param array $body
*
* @return mixed
*/
public function post(String $uri, array $headers, array $body);
/**
* @param String $uri
* @param array $headers
* @param array $body
*
* @return mixed
*/
public function put(String $uri, array $headers, array $body);
/**
* @param String $uri
* @param array $headers
* @param array $body
*
* @return mixed
*/
public function delete(String $uri, array $headers, array $body);
}