-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs #39637, gh-111, add sms provider for flydove to save config
- Loading branch information
Showing
4 changed files
with
158 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
|
||
class CRM_SMS_Provider_Flydove extends CRM_SMS_Provider { | ||
|
||
/** | ||
* We only need one instance of this object. So we use the singleton | ||
* pattern and cache the instance in this variable | ||
* | ||
* @var object | ||
* @static | ||
*/ | ||
static private $_singleton = NULL; | ||
|
||
public $_bulkMode = FALSE; | ||
|
||
public $_bulkLimit = 500; | ||
|
||
public static function &singleton($providerParams = array(), $force = FALSE) { | ||
$providerId = CRM_Utils_Array::value('provider_id', $providerParams); | ||
$providerId = CRM_Utils_Type::validate($providerId, 'Integer'); | ||
if (empty($providerId)) { | ||
CRM_Core_Error::fatal('Provider not known or not provided.'); | ||
} | ||
if (!isset(self::$_singleton)) { | ||
self::$_singleton = new CRM_SMS_Provider_Flydove($providerId); | ||
} | ||
return self::$_singleton; | ||
} | ||
|
||
function __construct($providerId) { | ||
} | ||
|
||
/** | ||
* Main function to send SMS | ||
* | ||
* The result should be mapping to activity status name for better update activity | ||
* | ||
* @param array $messages [ | ||
* 'phone' => string, | ||
* 'body' => string, | ||
* 'guid' => string, | ||
* 'activityId' => int, | ||
* ] | ||
* @return array response of self::doRequest | ||
*/ | ||
public function send(&$messages){ | ||
$response = array(); | ||
return $response; | ||
} | ||
|
||
public function activityUpdate() { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters