Initial implementation of SMS class and CoolSMS driver

This commit is contained in:
Kijin Sung 2016-11-03 21:27:26 +09:00
parent 7e94c631d6
commit 21f6e5f25c
4 changed files with 638 additions and 0 deletions

View file

@ -0,0 +1,57 @@
<?php
namespace Rhymix\Framework\Drivers;
/**
* The SMS driver interface.
*/
interface SMSInterface
{
/**
* Create a new instance of the current SMS driver, using the given settings.
*
* @param array $config
* @return void
*/
public static function getInstance(array $config);
/**
* Get the human-readable name of this SMS driver.
*
* @return string
*/
public static function getName();
/**
* Get the list of configuration fields required by this SMS driver.
*
* @return array
*/
public static function getRequiredConfig();
/**
* Get the list of API types supported by this SMS driver.
*
* @return array
*/
public static function getAPITypes();
/**
* Check if the current SMS driver is supported on this server.
*
* This method returns true on success and false on failure.
*
* @return bool
*/
public static function isSupported();
/**
* Send a message.
*
* This method returns true on success and false on failure.
*
* @param object $message
* @return bool
*/
public function send(\Rhymix\Framework\SMS $message);
}