mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-05 16:02:34 +00:00
Plugins base (#613)
* wip * wip * cleanup * notification channels * phpstan * services * remove server types * refactoring * refactoring
This commit is contained in:
@ -8,6 +8,11 @@
|
||||
|
||||
class Discord extends AbstractNotificationChannel
|
||||
{
|
||||
public static function id(): string
|
||||
{
|
||||
return 'discord';
|
||||
}
|
||||
|
||||
public function createRules(array $input): array
|
||||
{
|
||||
return [
|
||||
|
@ -10,6 +10,11 @@
|
||||
|
||||
class Email extends AbstractNotificationChannel
|
||||
{
|
||||
public static function id(): string
|
||||
{
|
||||
return 'email';
|
||||
}
|
||||
|
||||
public function createRules(array $input): array
|
||||
{
|
||||
return [
|
||||
|
@ -6,6 +6,8 @@
|
||||
|
||||
interface NotificationChannel
|
||||
{
|
||||
public static function id(): string;
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $input
|
||||
* @return array<string, mixed>
|
||||
|
@ -8,6 +8,11 @@
|
||||
|
||||
class Slack extends AbstractNotificationChannel
|
||||
{
|
||||
public static function id(): string
|
||||
{
|
||||
return 'slack';
|
||||
}
|
||||
|
||||
public function createRules(array $input): array
|
||||
{
|
||||
return [
|
||||
|
@ -11,6 +11,11 @@ class Telegram extends AbstractNotificationChannel
|
||||
{
|
||||
protected string $apiUrl = 'https://api.telegram.org/bot';
|
||||
|
||||
public static function id(): string
|
||||
{
|
||||
return 'telegram';
|
||||
}
|
||||
|
||||
public function createRules(array $input): array
|
||||
{
|
||||
return [
|
||||
|
Reference in New Issue
Block a user