| Handler | 221 |Call | 222 |
|---|---|
Authentication |
227 | Client->setAuthentication() or pass in an instance of \Akamai\EdgeGrid\Authentication to Client->__construct(). |
228 |
Verbose |
231 | Client->setInstanceVerbose() or Client::setVerbose() passing in on of true|resource|[resource output, resource error]. The default is [STDOUT, STDERR]. |
232 |
Debug |
235 | Client->setInstanceDebug(), Client::setDebug(), or set the debug config option with true|resource. The default is STDERR. |
236 |
| Handler | 246 |Example | 247 |
|---|---|
| Authentication | 252 |
253 |
254 | // Create the Authentication Handler
255 | $auth = \Akamai\Open\EdgeGrid\Handler\Authentication::createFromEdgeRcFile();
256 | // Or hard code your credentials
257 | $auth = new \Akamai\Open\EdgeGrid\Handler\Authentication;
258 | $auth->setAuth($client_token, $client_secret, $access_token);
259 | // Create the handler stack
260 | $handlerStack = \GuzzleHttp\HandlerStack::create();
261 | // Add the Auth handler to the stack
262 | $handlerStack->push($auth);
263 | // Add the handler to a regular \GuzzleHttp\Client
264 | $guzzle = new \GuzzleHttp\Client([
265 | "handler" => $handlerStack
266 | ]);
267 |
268 | |
269 |
| Verbose | 272 |
273 |
274 | // Create the handler stack
275 | $handlerStack = HandlerStack::create();
276 | // Add the Auth handler to the stack
277 | $handlerStack->push(new \Akamai\Open\EdgeGrid\Handler\Verbose());
278 | // Add the handler to a regular \GuzzleHttp\Client
279 | $guzzle = new \GuzzleHttp\Client([
280 | "handler" => $handlerStack
281 | ]);
282 |
283 | |
284 |
| Debug | 287 |
288 |
289 | // Create the handler stack
290 | $handlerStack = HandlerStack::create();
291 | // Add the Auth handler to the stack
292 | $handlerStack->push(new \Akamai\Open\EdgeGrid\Handler\Debug());
293 | // Add the handler to a regular \GuzzleHttp\Client
294 | $guzzle = new \GuzzleHttp\Client([
295 | "handler" => $handlerStack
296 | ]);
297 |
298 | |
299 |