/+junk/StupidMVC

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/StupidMVC
6.1.1 by Gustav Hatvigsson
*woorps
1
<?php
2
3
class WelcomeView extends AbstractView {
4
  
5
  public function
6
  render ($user_data) {
13 by Gustav Hatvigsson
* Made the WelcomeView.php use functions for different parts of the
7
    $this->say_hello ();
11 by Gustav Hartvigsson
* changed how AbstractController->load_view_raw () works
8
    ?>
9
      <p>
10
        You could have a try looking at the examle
11
        <a href="<?=( BASE_URL . "Welcome/hello/Alice" )?>"> here </a> and
12
        <a href="<?=( BASE_URL . "Welcome/hello/Bob" )?>"> here </a>
13
      </p>
14
    <?php
13 by Gustav Hatvigsson
* Made the WelcomeView.php use functions for different parts of the
15
    $this->print_usage ();
16
  }
17
  
18
  private function
19
  say_hello () {
20
    echo "<h1> Hello from Welcome.php! </h1>";
21
  }
22
  
23
  private function
24
  print_usage () {
25
    ?>
26
    <h2> Configure </h2>
27
    <p>
28
      To configure StupidMVC open up the file <code> <?=(ROOT_DIR  . "index.php ") ?> </code>
29
      and change the <code> define ("BASE_URL", ...); </code> to the current base url,
30
      i.e. if your application is accessible from the url 
31
      <code> http://example.com/myapp </code> then the it should be defied as
32
      <code> define ("BASE_URL", "http://example.com/myapp"); </code>
33
    </p>
34
    <p>
35
      The application is defined in <code> <?=(APP_DIR)?> </code>.
36
    </p>
37
    <?php
6.1.1 by Gustav Hatvigsson
*woorps
38
  }
39
  
40
}