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 |
|
|
7
by Gustav Hartvigsson
* a few more functions... |
5 |
public function |
6 |
get_methods () { |
|
|
3
by Gustav Hatvigsson
* Made the router a class |
7 |
return [ |
8 |
"hello" => "hello", |
|
9 |
"hello_again" => "hello" |
|
10 |
];
|
|
11 |
}
|
|
|
4.1.1
by Gustav Hartvigsson
* Woopes |
12 |
|
|
7
by Gustav Hartvigsson
* a few more functions... |
13 |
public function |
14 |
hello ($args) { |
|
|
4
by Gustav Hatvigsson
* Added FourOhFour.php |
15 |
if (count ($args) < 1) { |
|
3
by Gustav Hatvigsson
* Made the router a class |
16 |
echo "Too few arguments to the hello () method."; |
17 |
return; |
|
18 |
}
|
|
|
4.1.1
by Gustav Hartvigsson
* Woopes |
19 |
|
20 |
echo "Hello " . $args[0]; |
|
|
3
by Gustav Hatvigsson
* Made the router a class |
21 |
}
|
|
4.1.1
by Gustav Hartvigsson
* Woopes |
22 |
|
|
7
by Gustav Hartvigsson
* a few more functions... |
23 |
public function |
24 |
default_method ($args) { |
|
|
5
by Gustav Hatvigsson
* changed a few small things |
25 |
ob_start (); |
26 |
$this->load_view ("WelcomeView", NULL); |
|
27 |
ob_end_flush (); |
|
|
3
by Gustav Hatvigsson
* Made the router a class |
28 |
}
|
|
4.1.1
by Gustav Hartvigsson
* Woopes |
29 |
|
|
3
by Gustav Hatvigsson
* Made the router a class |
30 |
/*
|
31 |
public function get_routes () {
|
|
32 |
return NULL;
|
|
33 |
}
|
|
34 |
*/
|
|
|
4.1.1
by Gustav Hartvigsson
* Woopes |
35 |
|
|
1
by Gustav Hartvigsson
* initial code |
36 |
}
|