public static getInstance ( ) |
public static function getInstance()
{
if (!static::$instance instanceof Lassi) {
static::$instance = new Lassi();
}
return static::$instance;
}
/** * Load framework app routes * @return void */ private static function loadRoutes() { $routes = dirname(__FILE__) . '/routes.php'; if (!file_exists($routes) || !is_readable($routes)) { throw new NotFoundException('Routes not found.'); } // Get Slim instance $app = \Lassi\Lassi::getInstance()->getApp(); require_once $routes; }