/+junk/StupidMVC

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/StupidMVC

« back to all changes in this revision

Viewing changes to Application/Controllers/Welcome.php

  • Committer: Gustav Hartvigsson
  • Date: 2016-03-16 16:03:56 UTC
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: gustav.hartvigsson@gmail.com-20160316160356-cbmj2hiv8gj11ek6
* Woopes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
2
 
3
3
class Welcome extends AbstractController {
4
 
  
 
4
 
5
5
  public function get_methods () {
6
6
    return [
7
7
      "hello" => "hello",
8
8
      "hello_again" => "hello"
9
9
    ];
10
10
  }
11
 
  
 
11
 
12
12
  public function hello ($args) {
13
13
    if (count ($args) < 1) {
14
14
      echo "Too few arguments to the hello () method.";
15
15
      return;
16
16
    }
17
 
    
18
 
    echo "Hello " . $val[0];
 
17
 
 
18
    echo "Hello " . $args[0];
19
19
  }
20
 
  
 
20
 
21
21
  public function default_method ($args) {
22
22
    echo "<h1> Hello from Welcome.php! </h1>";
23
23
  }
24
 
  
 
24
 
25
25
  /*
26
26
  public function get_routes () {
27
27
    return NULL;
28
28
  }
29
29
  */
30
 
  
 
30
 
31
31
}