Skip to content

Commit 2a64d58

Browse files
committed
Add Hello controller for fatfree-3.5
1 parent 9d3bfa8 commit 2a64d58

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
class Hello
4+
{
5+
public function index()
6+
{
7+
echo 'Hello World!';
8+
}
9+
}

fatfree-3.5/index.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22

33
require 'vendor/autoload.php';
44

5-
$app = \Base::instance();
5+
$f3 = \Base::instance();
6+
$f3->set('AUTOLOAD','app/controllers/');
67

7-
$app->route('GET /index.php/hello/index', function() {
8-
echo 'Hello World!';
9-
});
8+
$f3->route('GET /index.php/hello/index', 'Hello->index');
109

11-
$app->run();
10+
$f3->run();
1211

1312
require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php';

0 commit comments

Comments
 (0)