Example #1
0
 /**
  * @param string $classAlias The proxy name defined set up in Config class
  * @param $arguments TODO: call proxies with arguments
  *
  * @return \APIHub\Contracts\Proxy\ProxyInterface
  * @throws \Exception
  */
 public static function __callStatic($classAlias, $arguments)
 {
     if (self::$started === false) {
         static::setup();
     }
     $proxy = static::$config->getProxy($classAlias);
     return static::$integrator->proxy($proxy);
 }
Example #2
0
 public static function setup()
 {
     parent::setup();
     self::$config = new GitHubConfig();
     self::$integrator = Integrator::authenticate(new NoAuth());
     self::$integrator->setHost('https://api.github.com');
 }