1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-12 11:44:08 +02:00

[ticket/17135] Add messenger method interface class

PHPBB-17135
This commit is contained in:
rxu
2024-12-08 18:29:58 +07:00
parent e8cf35c583
commit 50e408bdea
2 changed files with 72 additions and 19 deletions

View File

@@ -0,0 +1,59 @@
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
namespace phpbb\messenger\method;
/**
* Messenger method interface class
*/
interface messenger_interface
{
/**
* Get messenger method id
*
* @return int
*/
public function get_id(): int;
/**
* Check if the messenger method is enabled
*
* @return bool
*/
public function is_enabled(): bool;
/**
* Set up subject for the message
*
* @param string $subject Email subject
*
* @return void
*/
public function subject(string $subject = ''): void;
/**
* Send out messages
*
* @return bool
*/
public function send(): bool;
/**
* Add error message to log
*
* @param string $msg Error message text
*
* @return void
*/
public function error(string $msg): void;
}