/** * Report status to the log and callback * * From an operation, the Phase should only ever be Phase::SUB_OPERATION() or Phase::ERROR(). * * @param Phase $phase * @param int $step * @param int $total * @param string $message */ protected function status(Phase $phase, $step = 0, $total = 0, $message = '') { $this->logger->debug('[' . $phase->value() . '] ' . $message); if ($this->callback) { $closure = $this->callback; $closure($phase, $step, $total, $message); } }
/** * Report status to the log and callback * * @param Phase $phase * @param int $step * @param int $total * @param string $message */ protected function status(Phase $phase, $step, $total, $message) { $this->logger->info('[' . $phase->value() . '] ' . $message); if ($this->status_callback) { $closure = $this->status_callback; $closure($phase, $step, $total, $message); } }