コード例 #1
0
ファイル: index.php プロジェクト: taqfu/sandbox
<?php

include "controller.php";
include "view.php";
include "model.php";
//The model is where all of the logic of the program resides.
$model = new model();
//The View is where everything that is displayed to the user.
$view = new view();
//The Controller is all user input.
$control = new controller();
$model->process_input($control->input($_REQUEST));
$view->change_view($model->appropriate_view());
コード例 #2
0
ファイル: index.php プロジェクト: taqfu/tictactoe-mvc
<?php

include "Controller.php";
include "View.php";
include "Model.php";
$model = new model();
$view = new view();
$control = new controller();
$control->user_input($_POST);
$model->process_input($control->get_user_input());
$view->set_state($model->get_state());
$view->display($control->get_view());