Application
class Application extends Application
The Tsugi variant of a Lumen Application
Returns an augmented Lumen Application
<?php
require_once "../config.php";
$launch = \Tsugi\Core\LTIX::requireData();
$app = new \Tsugi\Lumen\Application($launch);
$app->get('/', 'AppBundle\\Attend::get')->bind('main');
$app->post('/', 'AppBundle\\Attend::post');
$app->run();
Methods
Requires a Tsugi Launch object for initializing.
Override the Exception Handler
Override the log bindings to use the php error log
tsugiReroute - Send the browser to a new location with session
No description
No description
tsugiFlashSuccess - Add a success message to the old and new flash session.
tsugiFlashError - Add an error message to the old and new flash session.
Details
at line 44
__construct($launch, $basePath = __DIR__)
Requires a Tsugi Launch object for initializing.
$launch = \Tsugi\Core\LTIX::requireData(); $app = new \Tsugi\Lumen\Application($launch);
The launch object is added to the $app variable and can be accessed as follows:
$app['tsugi']->user->displayname;
This sets up a PHP bridge session to allow old session and new session code to coexist.
at line 90
protected mixed
resolveExceptionHandler()
Override the Exception Handler
I wrote a stack overflow question and after I wrote it I figured out the answer and wrote this method
https://stackoverflow.com/questions/65777054/how-do-i-add-a-custom-404-page-to-a-lumen-not-laravel-application
at line 102
protected void
registerLogBindings()
Override the log bindings to use the php error log
at line 128
tsugiReroute($route)
tsugiReroute - Send the browser to a new location with session
Usage: $app->get('/', 'AppBundle\Attend::get')->bind('main'); $app->post('/', 'AppBundle\Attend::post');
Then at the end of the POST code, do this:
return $app->tsugiReroute('main');
at line 133
tsugiRedirectHome()
at line 140
tsugiRedirect($route)
at line 145
tsugiFlashSuccess($message)
tsugiFlashSuccess - Add a success message to the old and new flash session.
at line 154
tsugiFlashError($message)
tsugiFlashError - Add an error message to the old and new flash session.