/**
  * Route Config URL
  * @param string $key
  * @return array
  */
 public function getRouteConfig($key)
 {
     $routes = Config::get('routes');
     if (array_key_exists($key, $routes)) {
         return $routes[$key];
     }
     return [];
 }
 /**
  * Build Http Adapter by Application Config
  * @return AdapterInterface
  * @throws \RuntimeException
  */
 public static function buildHttpAdapter()
 {
     $http = Config::get('http');
     $adapterConfig = $http['adapter'];
     $adapter = null;
     if (is_array($adapterConfig)) {
         $adapter = self::adapterArrayFactory($adapterConfig);
     } elseif ($adapterConfig instanceof \Closure) {
         $adapter = $adapterConfig();
     }
     if (!$adapter instanceof AdapterInterface) {
         throw new \RuntimeException('Invalid adapter object');
     }
     return $adapter;
 }
 /**
  * Get Default Credentials
  * @return Credentials
  */
 public function get()
 {
     $data = Config::get('credentials');
     return $this->create($data['token'], $data['email']);
 }