public getLastResponse ( ) : array | ||
Результат | array | Assoc array with keys 'headers' and 'body' |
public function getLastResponse()
{
return $this->last_response;
}
/** * Handles responses from the MailChimp API. * * @param MailChimp $mailChimp * @return Array */ public function handleMailChimpResponse($mailChimp) { $response = $mailChimp->getLastResponse(); if (!$mailChimp->success()) { $message = $response && array_key_exists($response['errors']) ? $response['errors'][0]['message'] : 'Error connecting to MailChimp API'; user_error($message, E_USER_ERROR); } return Convert::json2array($response['body']); }