예제 #1
0
 /**
  * Start the calculation "in background"
  * @return \Bootstrap\Response\ButtonRemote
  */
 public function startAjax()
 {
     if (Status::isCalculationInProgress()) {
         return BootstrapUI::buttonRemoteResponse()->text('Already in progress')->disableButton()->refresh();
     }
     Log::info("{$this->getUser('username')} started calculation!");
     return BootstrapUI::buttonRemoteResponse()->disableButton()->text('Calculation has started')->after(function () {
         $calculation = new \Calculation();
         $calculation->calculate();
     });
 }
예제 #2
0
<?php

Log::info("Started calculation");
$x = new Calculation();
$x->calculate();
Log::info("Calculation done");
예제 #3
0
 public function precalculateAction()
 {
     $x = new Calculation();
     $x->calculate();
 }