namespace app;
require_once __DIR__."/config.php";
+require_once __DIR__."/uri_template.php";
+require_once __DIR__."/session.php";
use http\Url;
$config->$basic->auth->toArray(),
0);
}
+ $logger = new Logger($config, $config->github->log);
+
// FIXME: configure through app.ini
+ try {
+ $cache = new Github\Storage\Redis("gh-cache");
+ } catch (\Exception $ex) {
+ /* Memcached won't throw an exception */
+ $cache = new Github\Storage\Memcache("gh-cache");
+ }
return new Github\API(
$config->github
- ,new Github\Logger($config)
+ ,$logger
,new Github\Storage\Session("gh-tokens")
- #,new Github\Storage\Memcache("gh-cache")
- ,new Github\Storage\Redis("gh-cache")
+ ,$cache
);
});