mirror of
https://github.com/jez500/pricebuddy.git
synced 2026-11-24 19:58:13 +01:00
39 lines
820 B
PHP
Executable File
39 lines
820 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
use App\Notifications\Channels\AppriseChannel;
|
|
use App\Notifications\Channels\GotifyChannel;
|
|
use NotificationChannels\Pushover\PushoverChannel;
|
|
|
|
enum NotificationMethods: string
|
|
{
|
|
case Mail = 'mail';
|
|
|
|
case Database = 'database';
|
|
|
|
case Pushover = 'pushover';
|
|
|
|
case Gotify = 'gotify';
|
|
|
|
case Apprise = 'apprise';
|
|
|
|
public function getChannel(): string
|
|
{
|
|
return match ($this) {
|
|
self::Pushover => PushoverChannel::class,
|
|
self::Gotify => GotifyChannel::class,
|
|
self::Apprise => AppriseChannel::class,
|
|
default => $this->value,
|
|
};
|
|
}
|
|
|
|
public function requiresUserSettings(): bool
|
|
{
|
|
return match ($this) {
|
|
self::Database => false,
|
|
default => true,
|
|
};
|
|
}
|
|
}
|