. // }}} /** * Mailer wrapper * * @package GNUsocial * @category Wrapper * * @author Hugo Sales * @copyright 2020 Free Software Foundation, Inc http://www.fsf.org * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ namespace App\Core; use App\Util\Common; use Symfony\Component\Mailer\MailerInterface; abstract class Mailer { private MailerInterface $mailer; public static function setMailer($m) { $this->mailer = $m; } public static function __callStatic(string $method, array $args) { if (Common::config('site', 'use_email')) { return $this->{$method}(...$args); } } }