public function doMultiplyAction()
 {
     $model = new CalculatorModel($_POST['op1'], $_POST['op2']);
     $model->multiply();
     $result = $model->getResult();
     require 'application/views/result.phtml';
 }
Beispiel #2
0
 public function doDivisionAction()
 {
     $model = new CalculatorModel($_POST["op1"], $_POST["op2"]);
     $model->division();
     $result = $model->getResult();
     require "application/views/result.phtml";
 }
 public function doDivideAction()
 {
     $this->model->setOp1($_POST['op1']);
     $this->model->setOp2($_POST['op2']);
     $this->model->divide();
     $result = $this->model->getResult();
     require 'application/views/result.phtml';
 }