2021-07-15 14:54:23 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Classes\FTN;
|
|
|
|
|
2024-05-17 12:10:54 +00:00
|
|
|
use App\Models\{Echoarea,Echomail,Netmail};
|
2023-09-12 07:20:09 +00:00
|
|
|
|
2023-06-22 07:36:22 +00:00
|
|
|
/**
|
|
|
|
* Abstract class to hold the common functions for automatic responding to echomail/netmail messages
|
|
|
|
*/
|
2021-07-15 14:54:23 +00:00
|
|
|
abstract class Process
|
|
|
|
{
|
2024-05-19 13:28:45 +00:00
|
|
|
public static function canProcess(Echoarea $eao): bool
|
2023-09-12 07:20:09 +00:00
|
|
|
{
|
2024-05-19 13:28:45 +00:00
|
|
|
return $eao->automsgs;
|
2023-09-12 07:20:09 +00:00
|
|
|
}
|
|
|
|
|
2021-07-15 14:54:23 +00:00
|
|
|
/**
|
|
|
|
* Return TRUE if the process class handled the message.
|
|
|
|
*
|
2024-05-17 12:10:54 +00:00
|
|
|
* @param Echomail|Netmail $mo
|
2021-07-15 14:54:23 +00:00
|
|
|
* @return bool
|
|
|
|
*/
|
2024-05-17 12:10:54 +00:00
|
|
|
abstract public static function handle(Echomail|Netmail $mo): bool;
|
2021-07-15 14:54:23 +00:00
|
|
|
}
|