clrghouz/app/Classes/FTN/Process.php

26 lines
524 B
PHP
Raw Normal View History

<?php
namespace App\Classes\FTN;
use App\Models\Echoarea;
/**
* Abstract class to hold the common functions for automatic responding to echomail/netmail messages
*/
abstract class Process
{
public static function canProcess(string $echoarea): bool
{
$eao = Echoarea::where('name',$echoarea)->single();
return $eao && $eao->automsgs;
}
/**
* Return TRUE if the process class handled the message.
*
* @param Message $msg
* @return bool
*/
abstract public static function handle(Message $msg): bool;
}