Esempio n. 1
0
 protected function setUp()
 {
     define('SERVER_SCRIPT', 'unittest');
     \Slim\Environment::mock();
     \Application\Bootstrap::init();
     \Library\SFacebook::init();
 }
Esempio n. 2
0
 protected function fbRedirect()
 {
     if ($url = SFacebook::getRedirectUrl()) {
         App::$inst->render('redirect.php', array('redirectUrl' => $url, 'openGraphTags' => H::ogTags()));
     } else {
         $this->renderLayout('layout');
     }
 }
Esempio n. 3
0
 /**
  * @internal param \Slim\Slim $app
  * @return \Slim\Slim
  */
 public static function init()
 {
     static::defineVariables();
     App::$inst = static::initSlim();
     static::defineProtocol();
     static::initConfig();
     static::initHttpAuth();
     static::initLogger();
     static::initCache();
     static::initDoctrine();
     static::initAppVars();
     static::initRouting();
     //FIXME: uncomnt this line and fix in doctrine-cli
     if (!defined('SERVER_SCRIPT')) {
         SFacebook::init();
     }
     return App::$inst;
 }