protected function executeInner(IWebRequest $request, IWebResponse $response, Feeding $feeding) { $feeding->setPee($request->post('pee', $feeding->getPee())); $feeding->setPoo($request->post('poo', $feeding->getPoo())); }
protected function insert(Feeding $feeding) { DebugLog::log('1'); $feeding->setId($this->uuidHelper->get()); DebugLog::log('2'); DebugLog::log('3'); $this->dbFactory->getConnection()->update("insert into feedings set\n\t\t\t\t `id`=:id\n\t\t\t\t, `date_time`=:date_time\n\t\t\t\t, `status`=:status\n\t\t\t\t, `breast_left`=:breast_left\n\t\t\t\t, `breast_right`=:breast_right\n\t\t\t\t, `milking`=:milking\n\t\t\t\t, `pee`=:pee\n\t\t\t\t, `poo`=:poo\n\t\t\t\t, `bottle`=:bottle\n\t\t\t", array('id' => $feeding->getId(), 'date_time' => $feeding->getDateTime()->format('Y-m-d H:i:s'), 'status' => $feeding->getStatus(), 'breast_left' => $feeding->getBreastLeft(), 'breast_right' => $feeding->getBreastRight(), 'milking' => $feeding->getMilking(), 'pee' => $feeding->getPee(), 'poo' => $feeding->getPoo(), 'bottle' => $feeding->hasBottle() ? $feeding->getBottle()->encode() : null)); DebugLog::log('4'); }