/+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:41:50 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20160316164150-zbrppdt5e743pzu5
* a few more functions...

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
class Welcome extends AbstractController {
4
4
 
5
 
  public function get_methods () {
 
5
  public function
 
6
  get_methods () {
6
7
    return [
7
8
      "hello" => "hello",
8
9
      "hello_again" => "hello"
9
10
    ];
10
11
  }
11
12
 
12
 
  public function hello ($args) {
 
13
  public function
 
14
  hello ($args) {
13
15
    if (count ($args) < 1) {
14
16
      echo "Too few arguments to the hello () method.";
15
17
      return;
18
20
    echo "Hello " . $args[0];
19
21
  }
20
22
 
21
 
  public function default_method ($args) {
 
23
  public function
 
24
  default_method ($args) {
22
25
    ob_start ();
23
26
    $this->load_view ("WelcomeView", NULL);
24
27
    ob_end_flush ();