<?php
require_once 'models/exam_sessions_model.php';
class exam_sessions_controller {
    private $model;
    public function __construct() {
        $this->model = new exam_sessions_model();
    }

    public function index() {
        return $this->model->getAll();
    }

    public function check($name, $id=null) {
        return $this->model->validate($name, $id);
    }

    public function show($id) {
        return $this->model->get($id);
    }

    public function store($data) {
        return $this->model->insert($data);
    }

    public function update($id, $data) {
        return $this->model->update($id, $data);
    }

    public function destroy($id) {
        return $this->model->delete($id);
    }
}
?>
