Ejemplo n.º 1
0
/**
 * Include an SBP file if it have'nt been yet, compile it into PHP code and execute it.
 * This one does not throws any exception even if the file does not exist.
 *
 * @param string file, input file path
 *
 * @return mixed|void
 */
function sbp_include_if_exists($file, $once = false)
{
    try {
        return sbp_include($file, $once);
    } catch (Sbp\SbpException $e) {
        return false;
    }
}
Ejemplo n.º 2
0
 /**
  * @expectedException Sbp\SbpException
  */
 public function testExceptionIncludeOnce()
 {
     sbp_include('neither-do-i', true);
 }
Ejemplo n.º 3
0
        return str_replace("\\n", "\n", preg_replace('#^<!DOCTYPE\\shtml>.+<!DOCTYPE\\shtml>#', '<!DOCTYPE html>', str_replace("\n", "\\n", $content)));
    });
}
App::error(function (Exception $exception, $code) {
    Log::error($exception);
});
/*
|--------------------------------------------------------------------------
| Maintenance Mode Handler
|--------------------------------------------------------------------------
|
| The "down" Artisan command gives you the ability to put an application
| into maintenance mode. Here, you will define what is displayed back
| to the user if maintenance mode is in effect for the application.
|
*/
App::down(function () {
    return Response::make("Be right back!", 503);
});
/*
|--------------------------------------------------------------------------
| Require The Filters File
|--------------------------------------------------------------------------
|
| Next we will load the filters file for the application. This gives us
| a nice separate location to store our route and application filter
| definitions instead of putting them all in the main routes file.
|
*/
sbp_include(app_path() . '/filters.php');