test.php
<?php
require_once 'testModel.class.php';
require_once 'testView.class.php';
require_once 'testController.class.php';
$testContoller = new testController();
$testContoller->show();
?>
testModel.class.php
<?php
class testModel{
function get(){
return "hello World!!!";
}
}
?>
testView.class.php
<?php
class testView{
function display($data){
echo $data;
}
}
?>
testController.class.php
<?php
class testController{
function show(){
$testModel = new testModel();
$data = $testModel -> get();
$testView = new testView();
$testView -> display($data);
}
}
?>