public function execute($handlers, $path, $method, $data = '', $headers = array())
{
$config = $this->apiContext->getConfig();
$httpConfig = new PPHttpConfig(null, $method);
$httpConfig->setHeaders($headers + array('Content-Type' => 'application/json'));
foreach ($handlers as $handler) {
if (!is_object($handler)) {
$shandler = "\\" . $handler;
$handler = new $shandler($this->apiContext);
}
$handler->handle($httpConfig, $data, array('path' => $path, 'apiContext' => $this->apiContext));
}
$connection = new PPHttpConnection($httpConfig, $config);
$response = $connection->execute($data);
$this->logger->fine($response);
return $response;
}