<?php 

class modProjectController {
  private $model;
    
  public function __construct(modProject $model) {
    $this->model = $model;
  }
    
  // Receive user input and update the model 
  public function commit($request) {

    if (isset($request['pw_id'])    && isset($request['parcel_id']) && 
        isset($request['date'])     && isset($request['start_time']) &&
        isset($request['end_time']) && isset($request['break_duration'])) {

      $this->model->set($request['pw_id'], $request['parcel_id'],$request['date'],
	$request['start_time'],	$request['end_time'], $request['break_duration']);
    }
  }
}

?>