$statusCode =
$response->
getStatusCode();
} catch (TransportExceptionInterface
$e) { throw new TransportException('Could not reach the remote SmsBiuras server.',
$response, 0,
$e);
} if (200 !==
$statusCode) { throw new TransportException('Unable to send the SMS.',
$response);
} $matches =
[];
if (preg_match('/^ERROR: (\d+)$/',
$response->
getContent(),
$matches)) { throw new TransportException('Unable to send the SMS: '.
$this->
getErrorMsg($matches[1
] ?? 999
),
$response);
} $matches =
[];
if (preg_match('/^OK: (\d+)$/',
$response->
getContent(),
$matches)) { $sentMessage =
new SentMessage($message,
(string) $this);
$sentMessage->
setMessageId($matches[1
] ?? 0
);
return $sentMessage;
} throw new TransportException('Unable to send the SMS.',
$response);
}