/** * @return array */ protected function defineData() { return array('uuid' => $this->consumer->getUUID()->getValue(), 'username' => $this->consumer->getUsername()->getValue()); }
/** * @param Consumer $consumer */ public function persist(Consumer $consumer) { $stmt = $this->connection->prepareStatement('INSERT INTO consumer (uuid, username, password) VALUES (?, ?, ?)'); $stmt->execute(array($consumer->getUUID()->getValue(), $consumer->getUsername()->getValue(), $consumer->getPassword()->getValue())); }