Files
librenms-librenms/LibreNMS/Alert/Transport.php
2018-08-17 22:38:00 +01:00

23 lines
551 B
PHP

<?php
namespace LibreNMS\Alert;
use LibreNMS\Interfaces\Alert\Transport as TransportInterface;
abstract class Transport implements TransportInterface
{
protected $config;
/**
* Transport constructor.
* @param null $transport_id
*/
public function __construct($transport_id = null)
{
if (!empty($transport_id)) {
$sql = "SELECT `transport_config` FROM `alert_transports` WHERE `transport_id`=?";
$this->config = json_decode(dbFetchCell($sql, [$transport_id]), true);
}
}
}