mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
23 lines
551 B
PHP
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);
|
|
}
|
|
}
|
|
}
|