コード例 #1
0
ファイル: borwsty.php プロジェクト: ThanhThan1992/mvc-demo
 public function command($option)
 {
     $student = new studentController();
     switch ($option) {
         case "insert":
             $student->getViewInsertStudent();
             include_once 'Views/insertStudent.php';
             break;
         case "edit":
             $getStudent = $student->viewStudentById($this->id);
             include_once 'Views/editStudent.php';
             break;
         case "delete":
             $student->viewStudent();
             include_once 'Views/editStudent.php';
             break;
         default:
             $student->viewStudent();
             include_once 'Views/studentView.php';
             break;
     }
 }
コード例 #2
0
ファイル: index.php プロジェクト: ThanhThan1992/mvc-demo
<?php

include_once "config.php";
include_once "Controller/studentController.php";
connectToDatabase();
$studentcontroller = new studentController();
$studentcontroller->inVoke();