PHP Classes

File: views/HomeView.php

Recommend this page to a friend!
  Classes of Adrian M   Basic PHP MVC Basic Model   views/HomeView.php   Download  
File: views/HomeView.php
Role: Class source
Content type: text/plain
Description: Class source
Class: Basic PHP MVC Basic Model
Implement MVC applications with a router class
Author: By
Last change:
Date: 9 months ago
Size: 321 bytes
 

Contents

Class file image Download
<?php
class HomeView {
    private
$model;

    public function
__construct($model) {
       
$this->model = $model;
    }

    public function
render() {
       
$data = $this->model->getData();
        echo
"<h1>$data</h1>";
       
// Other HTML content or formatting specific to the view can be added here
 
   
}
}