# Akamai\Open\EdgeGrid\Client

#### Akamai {OPEN} EdgeGrid Client for PHP

Akamai {OPEN} EdgeGrid Client for PHP. Based on
[Guzzle](http://guzzlephp.org).

## Synopsis

class Client extends Client implements LoggerAwareInterface {

- // constants
- const VERSION = "0.4.5";
- const DEFAULT_REQUEST_TIMEOUT = 300;

- // members
- protected static bool|array|resource $staticVerbose = false;
- protected static bool|resource $staticDebug = false;
- protected Authentication $authentication;
- protected Verbose $verboseHandler;
- protected Debug $debugHandler;
- protected bool|array|resource $verbose = false;
- protected bool|resource $debug = false;
- protected bool $verboseOverride = false;
- protected bool $debugOverride = false;
- protected Closure $logger;

- // methods
- public void __construct()
- public PromiseInterface requestAsync()
- public void sendAsync()
- public $this setAuth()
- public $this setHeadersToSign()
- public $this setMaxBodySize()
- public $this setHost()
- public $this setTimeout()
- public $this setInstanceVerbose()
- public $this setInstanceDebug()
- public $this setLogger()
- public void setSimpleLog()
- public static Client createFromEdgeRcFile()
- public static void setDebug()
- public static void setVerbose()
- protected bool|resource getDebugOption()
- protected bool|resource isDebug()
- protected array|bool|resource isVerbose()
- protected void setAuthentication()
- protected array setAuthenticationHandler()
- protected mixed setBasicOptions()
- protected void setConfigOption()
- protected array setDebugHandler()
- protected void setLogHandler()
- protected array setVerboseHandler()
- protected array setRequestOptions()

}

## Hierarchy

#### Extends

- GuzzleHttp\Client

#### Implements

- Psr\Log\LoggerAwareInterface

## Coverage

Methods | 73.08% | 19 / 26
Lines | 90.96% | 151 / 166

## Constants

Name | Value
--- | ---
VERSION | "0.4.5"
DEFAULT_REQUEST_TIMEOUT | 300

## Members

#### protected

- $authentication — \Akamai\Open\EdgeGrid\Authentication
- $debug — Akamai\Open\EdgeGrid\bool|resource
- $debugHandler — \Akamai\Open\EdgeGrid\Handler\Debug
- $debugOverride — Akamai\Open\EdgeGrid\bool
- $logger — \Closure
- $staticDebug — Akamai\Open\EdgeGrid\bool|resource
- $staticVerbose — Akamai\Open\EdgeGrid\bool|array|resource
- $verbose — Akamai\Open\EdgeGrid\bool|array|resource
- $verboseHandler — \Akamai\Open\EdgeGrid\Handler\Verbose
- $verboseOverride — Akamai\Open\EdgeGrid\bool

## Methods

#### protected

- getDebugOption() — Handle debug option
- isDebug() — Debugging status for the current request
- isVerbose() — Verbose status for the current request
- setAuthentication() — Set the Authentication instance
- setAuthenticationHandler() — Set the Authentication Handler
- setBasicOptions()
- setConfigOption() — Set values on the private \GuzzleHttp\Client->config
- setDebugHandler() — Add the Debug handler to the HandlerStack
- setLogHandler() — Add the Log handler to the HandlerStack
- setRequestOptions()
- setVerboseHandler() — Add the Verbose handler to the HandlerStack

#### public

- __construct() — \GuzzleHttp\Client-compatible constructor
- createFromEdgeRcFile() — Factory method to create a client using credentials from `.edgerc`
- requestAsync() — Make an Asynchronous request
- sendAsync()
- setAuth() — Set Akamai {OPEN} Authentication Credentials
- setDebug() — Print HTTP requests/responses to STDOUT
- setHeadersToSign() — Specify the headers to include when signing the request
- setHost() — Set Request Host
- setInstanceDebug() — Print HTTP requests/responses to output
- setInstanceVerbose() — Print formatted JSON responses to output
- setLogger() — Set a PSR-3 compatible logger (or use monolog by default)
- setMaxBodySize() — Set the max body size
- setSimpleLog() — Add logger using a given filename/format
- setTimeout() — Set the HTTP request timeout
- setVerbose() — Print formatted JSON responses to STDOUT