/** * @param array $data * @param bool $exists * @return \Dive\Record */ private function addRecordToCollection(array $data = array(), $exists = false) { $table = $this->userColl->getTable(); $user = $table->createRecord($data, $exists); $this->userColl->add($user); return $user; }