/+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 Hatvigsson
  • Date: 2016-03-16 16:39:13 UTC
  • mfrom: (4.1.1 StupidMVC)
  • Revision ID: gustav.hartvigsson@gmail.com-20160316163913-9esig2inohayiih3
* merged with parent

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
    ob_start ();
23
23
    $this->load_view ("WelcomeView", NULL);
24
24
    ob_end_flush ();
25
25
  }
26
 
  
 
26
 
27
27
  /*
28
28
  public function get_routes () {
29
29
    return NULL;
30
30
  }
31
31
  */
32
 
  
 
32
 
33
33
}