SmsPluginLibraryInterface.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Class SmsPluginLibraryInterface.
  5. *
  6. * @author Julio Montoya
  7. */
  8. interface SmsPluginLibraryInterface
  9. {
  10. /**
  11. * getMobilePhoneNumberById (retrieves a user mobile phone number by user id).
  12. *
  13. * @param int $userId
  14. *
  15. * @return int User's mobile phone number
  16. */
  17. public function getMobilePhoneNumberById($userId);
  18. /**
  19. * @param array $additionalParameters
  20. *
  21. * @return mixed
  22. */
  23. public function send($additionalParameters);
  24. /**
  25. * @param array $additionalParameters
  26. *
  27. * @return mixed
  28. */
  29. public function getSms($additionalParameters);
  30. /**
  31. * buildSms (builds an SMS from a template and data).
  32. *
  33. * @param object $plugin ClockworksmsPlugin object
  34. * @param object $tpl Template object
  35. * @param string $templateName Template file name
  36. * @param string $messageKey Text key from lang file
  37. * @param array $parameters Data to fill message variables (if any)
  38. *
  39. * @return object Template object with message property updated
  40. */
  41. public function buildSms($plugin, $tpl, $templateName, $messageKey, $parameters = null);
  42. }