private function createLogEntry($type, $oldValue, $newValue) { $user = new User(); $username = $user->get_Username(); $logEntry = new LogEntry($this->connection); $logEntry->setBarcode($this->barcode); $logEntry->setPerson($username); $logEntry->setType($type); $logEntry->setOldValue($oldValue); $logEntry->setNewValue($newValue); $logEntry->insert(); }
private function createLogEntry($user, $type, $oldValue, $newValue) { $logEntry = new LogEntry($this->connection); $logEntry->setBarcode($this->barcode); $logEntry->setPerson($user); $logEntry->setType($type); $logEntry->setOldValue($oldValue); $logEntry->setNewValue($newValue); $logEntry->insert(); }