/+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 Common/AbstractController.php

  • Committer: Gustav Hartvigsson
  • Date: 2016-03-16 17:05:24 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20160316170524-gub61va3x3imkm5y
* __contructor -> __construct

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
2
 
3
3
abstract class AbstractController {
4
 
  protected function
5
 
  __contructor () {
6
 
 
 
4
  public function
 
5
  __construct () {
 
6
  
7
7
  }
8
 
 
 
8
  
9
9
  public function
10
10
  default_method ($args) {
11
11
    echo "<h1>It Works!</h1>";
12
12
    echo "<b> You should add default_method () to your class. </b>";
13
13
  }
14
 
 
 
14
  
15
15
  /**
16
16
   * This should return a list of method names.
17
17
   *
22
22
        "method_two",
23
23
        ...
24
24
      ];
25
 
 
 
25
    
26
26
      return ret_val;
27
27
    }
28
28
   * @endcode
44
44
    $_view = new $view ();
45
45
    $_view->render ($user_data);
46
46
  }
47
 
 
 
47
  
48
48
  /**
49
49
   * Returns a model object
50
50
   */
52
52
  load_model ($model) {
53
53
    require (APP_DIR . "Models " . DS . $model . ".php");
54
54
    $$model = new $model ();
55
 
 
 
55
    
56
56
    return $$model;
57
57
  }
58
58