DirectHandler.php
509 Bytes
<?php
namespace App\Service\Handlers;
class DirectHandler extends AdsHandler
{
public function limited()
{
return $this->response['result']['LimitedBy'] ?? false;
}
protected function parse($response)
{
$this->response = $response->json();
}
public function checkError($response)
{
$this->parse($response);
if ($this->response['error'] ?? false) {
throw new \Exception($this->response['error']['error_detail']);
}
}
}