mirror of https://github.com/flightphp/core
parent
3393c2d631
commit
c2bf241a1a
@ -0,0 +1,15 @@
|
|||||||
|
Instead of running Flight as a global static class, you can optionally run it as an object instance.
|
||||||
|
|
||||||
|
require 'flight/autoload.php';
|
||||||
|
|
||||||
|
use flight\Engine;
|
||||||
|
|
||||||
|
$app = new Engine();
|
||||||
|
|
||||||
|
$app->route('/', function(){
|
||||||
|
echo 'hello world!';
|
||||||
|
});
|
||||||
|
|
||||||
|
$app->start();
|
||||||
|
|
||||||
|
All of the existing static methods are available as regular class methods.
|
Loading…
Reference in new issue