/+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 18:40:10 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20160316184010-elzcri35x8y4vl43
* changed how AbstractController->load_view_raw () works

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
   * load a view class.
40
40
   */
41
41
  public function
42
 
  load_view ($view, $user_data) {
 
42
  load_view ($view, $user_data = NULL) {
43
43
    require (APP_DIR . "Views" . DS . $view . ".php");
44
44
    $_view = new $view ();
45
45
    $_view->render ($user_data);
46
46
  }
47
47
  
 
48
  public function
 
49
  load_view_raw ($view, $user_data = NULL) {
 
50
    $file_path = APP_DIR . DS . "Views" . DS . $view;
 
51
    include ($file_path);
 
52
  }
 
53
  
48
54
  /**
49
55
   * Returns a model object
50
56
   */