Ejemplo n.º 1
0
 public function __construct($vendor = null)
 {
     parent::__construct();
     if ($vendor === null) {
         throw new \Exception('SMS vendor cannot be null');
     }
     $this->vendor = trim(strtolower($vendor));
 }
Ejemplo n.º 2
0
 public function __construct()
 {
     parent::__construct();
     $this->name = 'Twilio';
     $AccountSid = TWILIO_ACCOUNT_ID;
     $AuthToken = TWILIO_AUTH_TOKEN;
     try {
         $this->client = new \Services_Twilio($AccountSid, $AuthToken);
     } catch (\Services_Twilio_HttpException $e) {
         throw new \Exception('Failed to create new Twilio service. Err: ' . $e->getCode());
     }
 }