public function __construct($vendor = null) { parent::__construct(); if ($vendor === null) { throw new \Exception('SMS vendor cannot be null'); } $this->vendor = trim(strtolower($vendor)); }
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()); } }