-
Notifications
You must be signed in to change notification settings - Fork 0
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
39 changed files
with
1,500 additions
and
49 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 was deleted.
Oops, something went wrong.
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,43 @@ | ||
<?php | ||
/** | ||
* Created by PhpStorm. | ||
* User: itcyb | ||
* Date: 10/30/2017 | ||
* Time: 10:29 AM | ||
*/ | ||
|
||
class AT | ||
{ | ||
public static function user() | ||
{ | ||
try { | ||
##code here | ||
return self::gateway()->getUserData(); | ||
} catch (AfricasTalkingGatewayException $e) { | ||
##handle exceptions here | ||
return $e->getMessage(); | ||
} | ||
} | ||
|
||
public static function gateway() | ||
{ | ||
return self::boot(); | ||
} | ||
|
||
private static function boot() | ||
{ | ||
$username = self::config()['username']; | ||
$api_key = self::config()['api_key']; | ||
return new AfricasTalkingGateway($username, $api_key); | ||
} | ||
|
||
private static function config() | ||
{ | ||
return Config::getConfig("AT"); | ||
} | ||
|
||
public static function voiceNumber() | ||
{ | ||
return self::config()['VoiceNumber']; | ||
} | ||
} |
Oops, something went wrong.