/+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
  
12
  public function hello ($val) {
13
    if (count ($val) < 1) {
14
      echo "Too few arguments to the hello () method.";
15
      return;
16
    }
17
    
18
    echo "Hello " . $val[0];
19
  }
20
  
21
  public function default_method () {
22
    echo "<h1> Hello from Welcome.php! </h1>";
23
  }
24
  
25
  /*
26
  public function get_routes () {
27
    return NULL;
28
  }
29
  */
1 by Gustav Hartvigsson
* initial code
30
  
31
}