/+junk/StupidMVC

To get this branch, use:
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
  
5
  public function get_methods () {
6
    return [
7
      "hello" => "hello",
8
      "hello_again" => "hello"
9
    ];
10
  }
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
    }
17
    
18
    echo "Hello " . $val[0];
19
  }
20
  
4 by Gustav Hatvigsson
* Added FourOhFour.php
21
  public function default_method ($args) {
5 by Gustav Hatvigsson
* changed a few small things
22
    ob_start ();
23
    $this->load_view ("WelcomeView", NULL);
24
    ob_end_flush ();
3 by Gustav Hatvigsson
* Made the router a class
25
  }
26
  
27
  /*
28
  public function get_routes () {
29
    return NULL;
30
  }
31
  */
1 by Gustav Hartvigsson
* initial code
32
  
33
}