aboutsummaryrefslogtreecommitdiff
path: root/src/Handlers/Index.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Handlers/Index.php')
-rw-r--r--src/Handlers/Index.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/Handlers/Index.php b/src/Handlers/Index.php
new file mode 100644
index 0000000..8d0896b
--- /dev/null
+++ b/src/Handlers/Index.php
@@ -0,0 +1,20 @@
+<?php
+
+namespace Micropoly\Handlers;
+
+use Micropoly\Env;
+use Micropoly\Handler;
+use Micropoly\Models\Tag;
+
+class Index implements Handler
+{
+
+ public function handle(Env $env, array $variables)
+ {
+ echo $env->twig()->render("/index.twig", [
+ "title" => "hello",
+ "msg" => "Johoo <script>alert(1)</script>",
+ "tagcloud" => Tag::calcTagCloud(Tag::getTagCounts($env->db())),
+ ]);
+ }
+}