public function newReportAdd() { $typeReportSendStatus = new TypeReportSendStatus(); $typeReportSendStatus->newReportAdd(); $object = ExchangeODSS::getInstance(); $this->_logger->log(__METHOD__ . ' ' . print_r($object, 1)); }
protected function clientStep04() { $sendData = $this->msStatus(); $sendData['not_searched_reports'] = array(); if ($this->messageData['ms_status_processed'] == 1 && $this->messageData['ms_status'] == "slave") { $scheduleTypeReportSendLog = new ScheduleTypeReportSendLog(); $notSentReports = $scheduleTypeReportSendLog->findByUIDsWithDestinations($this->messageData['not_sent_reports']); if (!is_null($notSentReports['uids'])) { foreach ($notSentReports['uids'] as $key => $uidItem) { foreach ($this->messageData['not_sent_reports'] as $key2 => $uidItem2) { if ($notSentReports['uids'][$key]['report_uid'] == $this->messageData['not_sent_reports'][$key2]['report_uid']) { //if was found unsent reports with is_synchronized = 2 // get it to next circle with is_synchronized = 0 foreach ($notSentReports['result'] as $sendLogItem) { if ($sendLogItem->report_processed->ex_schedule_processed_id == $key) { $sendLogItem->report_processed->is_synchronized = 0; $sendLogItem->report_processed->save(); //we have new reports ^) $typeReportSendStatus = new TypeReportSendStatus(); $typeReportSendStatus->newReportAdd(); } } unset($this->messageData['not_sent_reports'][$key2]); } } } } if (is_array($this->messageData['not_sent_reports'])) { $sendData['not_searched_reports'] = array_values($this->messageData['not_sent_reports']); } else { $sendData['not_searched_reports'] = array(); } } $this->createClientMessage('04', 0, $sendData); }