/** * @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); }
public static function setup() { parent::setup(); self::$config = new GitHubConfig(); self::$integrator = Integrator::authenticate(new NoAuth()); self::$integrator->setHost('https://api.github.com'); }