<?php

class Welcome extends AbstractController {
  
  private $data = [];
  
  public function
  __construct () {
    $this->data["page_title"] = "Welcome to my Super site!";
  }
  
  public function
  get_methods () {
    return [
      "hello" => "hello",
      "hello_again" => "hello"
    ];
  }
  
  public function
  hello ($args) {
    $this->load_view_raw ("header.php", $this->data);
    if (count ($args) < 1) {
      echo "Too few arguments to the hello () method.";
      $this->load_view_raw ("footer.php");
      return;
    }
    
    echo "Hello " . $args[0];
    $this->load_view_raw ("footer.php");
  }

  public function
  default_method ($args) {
    $this->load_view_raw ("header.php", $this->data);
    $this->load_view ("WelcomeView");
    $this->load_view_raw ("footer.php");
  }
}
