Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
itcyborg committed Oct 31, 2017
1 parent 64e2420 commit 5590bde
Show file tree
Hide file tree
Showing 39 changed files with 1,500 additions and 49 deletions.
15 changes: 14 additions & 1 deletion App/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,25 @@

class App
{
public static function root()
{
return __DIR__ . "/../";
}
public static function boot()
{
}

public static function routes()
{
return $_SERVER['DOCUMENT_ROOT'] . "/App/Routes/routes.php";
return self::root() . "/App/Routes/routes.php";
}

public static function action()
{

}

public static function run()
{
}
}
9 changes: 0 additions & 9 deletions App/Controllers/index.php

This file was deleted.

43 changes: 43 additions & 0 deletions App/Core/AfricasTalking/AT.php
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'];
}
}
Loading

0 comments on commit 5590bde

Please sign in to comment.