/**
  * Converts a higher-level group object into a standard
  * object class for writing to the database
  * @param MoodletxtAddressbookGroup $group Full-fat data object
  * @return object Object ready for DB
  * @version 2012092401 
  * @since 2012092401
  */
 private function convertGroupBeanToStandardClass(MoodletxtAddressbookGroup $group)
 {
     $dbObj = new object();
     $dbObj->addressbook = $group->getAddressbookId();
     $dbObj->name = $group->getName();
     $dbObj->description = '';
     // Placeholder for now until groups are expanded on
     if ($group->getId() > 0) {
         $dbObj->id = $group->getId();
     }
     return $dbObj;
 }
 /**
  * Adds a single group to this addressbook
  * @param MoodletxtAddressbookGroup $group Group to add
  * @version 2012080701
  * @since 2012080701
  */
 public function addGroup(MoodletxtAddressbookGroup $group)
 {
     $this->groups[$group->getId()] = $group;
 }