bzr branch
http://gegoxaren.bato24.eu/bzr/%2Bjunk/StupidMVC
|
1
by Gustav Hartvigsson
* initial code |
1 |
<?php
|
2 |
||
|
3
by Gustav Hatvigsson
* Made the router a class |
3 |
class Welcome extends AbstractController { |
|
4.1.1
by Gustav Hartvigsson
* Woopes |
4 |
|
|
3
by Gustav Hatvigsson
* Made the router a class |
5 |
public function get_methods () { |
6 |
return [ |
|
7 |
"hello" => "hello", |
|
8 |
"hello_again" => "hello" |
|
9 |
];
|
|
10 |
}
|
|
|
4.1.1
by Gustav Hartvigsson
* Woopes |
11 |
|
|
4
by Gustav Hatvigsson
* Added FourOhFour.php |
12 |
public function hello ($args) { |
13 |
if (count ($args) < 1) { |
|
|
3
by Gustav Hatvigsson
* Made the router a class |
14 |
echo "Too few arguments to the hello () method."; |
15 |
return; |
|
16 |
}
|
|
|
4.1.1
by Gustav Hartvigsson
* Woopes |
17 |
|
18 |
echo "Hello " . $args[0]; |
|
|
3
by Gustav Hatvigsson
* Made the router a class |
19 |
}
|
|
4.1.1
by Gustav Hartvigsson
* Woopes |
20 |
|
|
4
by Gustav Hatvigsson
* Added FourOhFour.php |
21 |
public function default_method ($args) { |
|
3
by Gustav Hatvigsson
* Made the router a class |
22 |
echo "<h1> Hello from Welcome.php! </h1>"; |
23 |
}
|
|
|
4.1.1
by Gustav Hartvigsson
* Woopes |
24 |
|
|
3
by Gustav Hatvigsson
* Made the router a class |
25 |
/*
|
26 |
public function get_routes () {
|
|
27 |
return NULL;
|
|
28 |
}
|
|
29 |
*/
|
|
|
4.1.1
by Gustav Hartvigsson
* Woopes |
30 |
|
|
1
by Gustav Hartvigsson
* initial code |
31 |
}
|