Author: Jabran Rafique (hello@jabran.me)
Beispiel #1
0
 /**
  * Bootstrap the framework
  *
  * @return void
  */
 public static function bootstrap()
 {
     /* Load configuration from .dev.env | .dist.env | .env */
     Util::setEnvVariables(dirname(__FILE__) . '/..');
     /* Get instances */
     $lassi = static::getInstance();
     $slim = $lassi->getApp();
     /* Add base URL to all views for assets management */
     $slim->hook('slim.before', function () use($slim) {
         $slim->view()->appendData(array('baseUrl' => getenv('base_url')));
     });
     /* Load routes */
     static::loadRoutes();
     /* Run Slim framework */
     $slim->run();
 }
Beispiel #2
0
 public function testGetInstanceReturnsLassiInstance()
 {
     Util::setEnvVariables('.');
     $this->assertInstanceOf('Lassi\\Lassi', Lassi::getInstance());
 }