<?php 

class modControlsController {
  private $model;
    
  public function __construct(modControls $model) {
    $this->model = $model;
  }

  public function controls($request) {
    if (isset ($request['cc_id']))
      $this->model->setControl($request['cc_id'], $request['control'], $request['operation'], $request['usage_notes']);
  }

  public function delcontrol($request) {
    if (isset ($request['cc_id']))
      $this->model->delControl($request['cc_id']);
  }
  
  public function variables ($request) {
    if (isset ($request['cv_id']))
      $this->model->setVariable($request['cv_id'], $request['cc_id'], $request['variable'], $request['setting']);
  } 

  public function delvariable ($request) {
    if (isset ($request['cv_id']))
      $this->model->delVariable($request['cv_id']);
  } 

  }
?>