diff --git a/17-Framework-Instance.md b/17-Framework-Instance.md new file mode 100644 index 0000000..c314c81 --- /dev/null +++ b/17-Framework-Instance.md @@ -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. \ No newline at end of file