Removed legacy code from transports (#10081)

This commit is contained in:
Neil Lathwood
2019-04-12 18:33:10 +01:00
committed by Tony Murray
parent c76115bf46
commit d31a551464
15 changed files with 0 additions and 179 deletions

View File

@@ -30,24 +30,11 @@ class Api extends Transport
{
public function deliverAlert($obj, $opts)
{
if (empty($this->config)) {
return $this->deliverAlertOld($obj, $opts);
}
$url = $this->config['api-url'];
$method = $this->config['api-method'];
return $this->contactAPI($obj, $url, $method);
}
private function deliverAlertOld($obj, $opts)
{
foreach ($opts as $method => $apis) {
foreach ($apis as $api) {
$this->contactAPI($obj, $api, $method);
}
}
return true;
}
private function contactAPI($obj, $api, $method)
{
$method = strtolower($method);