private function registerBase()
{
$this['request'] = function () {
return Request::createFromGlobals();
};
if (!empty($this['config']['cache']) && $this['config']['cache'] instanceof CacheInterface) {
$this['cache'] = $this['config']['cache'];
} else {
$this['cache'] = function () {
return new FilesystemCache(sys_get_temp_dir());
};
}
$this['access_token'] = function () {
return new AccessToken($this['config']['app_id'], $this['config']['secret'], $this['cache']);
};
}