/** * @param Batch $batch */ private function outputBatch(Batch $batch) { echo PHP_EOL . "*********************************************" . PHP_EOL; echo sprintf("Recipe: '%s'", $batch->getRecipe()->getName()) . PHP_EOL; echo sprintf(" Procedure: '%s'", $batch->getRecipe()->getProcedure()->getName()) . PHP_EOL; echo " UnitProcedures: " . PHP_EOL; /** * * @var UnitProcedure $up */ foreach ($batch->getRecipe()->getProcedure()->getUnitProcedures() as $up) { echo sprintf(" UP: '%s'", $up->getName()) . PHP_EOL; echo sprintf(" Unit: '%s'", $up->getUnit()->getName()) . PHP_EOL; echo " Operations: " . PHP_EOL; /** * * @var Operation $op */ foreach ($up->getOperations() as $op) { echo sprintf(" OP: '%s'", $op->getName()) . PHP_EOL; /** * * @var Phase $phase */ foreach ($op->getPhases() as $phase) { echo sprintf(" Phase: '%s'", $phase->getName()) . PHP_EOL; echo sprintf(" type: '%s'", $phase->getType()) . PHP_EOL; echo sprintf(" value: '%s'", $phase->getValue()) . PHP_EOL; echo sprintf(" duration: '%s'", $phase->getDuration()) . PHP_EOL; } } } echo "*********************************************" . PHP_EOL . PHP_EOL; }
/** * Gets the duration in seconds * * @return integer duration */ public function getDurationSeconds() { return $this->batch->getDuration($this->name, 'start') / 1000; }