forked from brayancruces/twilio
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
462 additions
and
93 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
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,75 @@ | ||
<?php | ||
|
||
namespace NotificationChannels\Twilio; | ||
|
||
class TwilioConfig | ||
{ | ||
/** | ||
* @var array | ||
*/ | ||
private $config; | ||
|
||
/** | ||
* TwilioConfig constructor. | ||
* | ||
* @param array $config | ||
*/ | ||
public function __construct(array $config) | ||
{ | ||
$this->config = $config; | ||
} | ||
|
||
/** | ||
* Get the account sid. | ||
* | ||
* @return string | ||
*/ | ||
public function getAccountSid() | ||
{ | ||
return $this->config['account_sid']; | ||
} | ||
|
||
/** | ||
* Get the auth token. | ||
* | ||
* @return string | ||
*/ | ||
public function getAuthToken() | ||
{ | ||
return $this->config['auth_token']; | ||
} | ||
|
||
/** | ||
* Get the default from address. | ||
* | ||
* @return string | ||
*/ | ||
public function getFrom() | ||
{ | ||
return $this->config['from']; | ||
} | ||
|
||
/** | ||
* Get the alphanumeric sender. | ||
* | ||
* @return string | ||
*/ | ||
public function getAlphanumericSender() | ||
{ | ||
if (isset($this->config['alphanumeric_sender'])) { | ||
return $this->config['alphanumeric_sender']; | ||
} | ||
} | ||
|
||
/** | ||
* Get the service sid. | ||
* | ||
* @return string | ||
*/ | ||
public function getServiceSid() | ||
{ | ||
if (isset($this->config['sms_service_sid'])) { | ||
return $this->config['sms_service_sid']; | ||
} | ||
} | ||
} |
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
Oops, something went wrong.