mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-28 23:03:25 +09:00
Initial implementation of SMS class and CoolSMS driver
This commit is contained in:
parent
7e94c631d6
commit
21f6e5f25c
4 changed files with 638 additions and 0 deletions
88
common/framework/drivers/sms/base.php
Normal file
88
common/framework/drivers/sms/base.php
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
<?php
|
||||
|
||||
namespace Rhymix\Framework\Drivers\SMS;
|
||||
|
||||
/**
|
||||
* The base class for other SMS drivers.
|
||||
*/
|
||||
abstract class Base implements \Rhymix\Framework\Drivers\SMSInterface
|
||||
{
|
||||
/**
|
||||
* The configuration is stored here.
|
||||
*/
|
||||
protected $_config = null;
|
||||
|
||||
/**
|
||||
* Direct invocation of the constructor is not permitted.
|
||||
*/
|
||||
protected function __construct(array $config)
|
||||
{
|
||||
$this->_config = $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new instance of the current mail driver, using the given settings.
|
||||
*
|
||||
* @param array $config
|
||||
* @return void
|
||||
*/
|
||||
public static function getInstance(array $config)
|
||||
{
|
||||
return new static($config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the human-readable name of this mail driver.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getName()
|
||||
{
|
||||
return class_basename(get_called_class());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of configuration fields required by this mail driver.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getRequiredConfig()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of API types supported by this mail driver.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getAPITypes()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the current mail driver is supported on this server.
|
||||
*
|
||||
* This method returns true on success and false on failure.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function isSupported()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue