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