Notificore.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. require_once 'Notificore/SmsApiClient.php';
  3. require_once 'Notificore/HLRApiClient.php';
  4. require_once 'Notificore/ViberApiClient.php';
  5. class Notificore {
  6. private $apiKey;
  7. private $sender;
  8. private $tariff;
  9. private $viberSender;
  10. private $apiSource;
  11. public function __construct($apiKey, $sender = null, $viberSender = null, $tariff = null, $apiSource = null) {
  12. $this->apiKey = $apiKey;
  13. $this->sender = $sender;
  14. $this->tariff = $tariff;
  15. $this->viberSender = $viberSender;
  16. $this->apiSource = $apiSource;
  17. }
  18. /**
  19. * @return SmsApiClient
  20. */
  21. public function getSmsClient() {
  22. return new SmsApiClient($this->apiKey, $this->sender, $this->tariff, $this->apiSource);
  23. }
  24. /**
  25. * @return HLRApiClient
  26. */
  27. public function getHLRClient() {
  28. return new HLRApiClient($this->apiKey, $this->tariff, $this->apiSource);
  29. }
  30. /**
  31. * @return ViberApiClient
  32. */
  33. public function getViberClient() {
  34. return new ViberApiClient($this->apiKey, $this->viberSender, $this->apiSource);
  35. }
  36. }