/**
  * Sets contents of passed object to values from current object.
  *
  * If desired, this method can also make copies of all associated (fkey referrers)
  * objects.
  *
  * @param      object $copyObj An object of PcSplitTest (or compatible) type.
  * @param      boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
  * @throws     PropelException
  */
 public function copyInto($copyObj, $deepCopy = false)
 {
     $copyObj->setName($this->name);
     $copyObj->setNumberOfVariants($this->number_of_variants);
     $copyObj->setVariantsDescription($this->variants_description);
     $copyObj->setComment($this->comment);
     $copyObj->setCreatedAt($this->created_at);
     if ($deepCopy) {
         // important: temporarily setNew(false) because this affects the behavior of
         // the getter/setter methods for fkey referrer objects.
         $copyObj->setNew(false);
         foreach ($this->getPcSplitTestResults() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addPcSplitTestResult($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getPcSplitTestUserResults() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addPcSplitTestUserResult($relObj->copy($deepCopy));
             }
         }
     }
     // if ($deepCopy)
     $copyObj->setNew(true);
     $copyObj->setId(NULL);
     // this is a auto-increment column, so set to default value
 }
Example #2
0
 /**
  * Sets contents of passed object to values from current object.
  *
  * If desired, this method can also make copies of all associated (fkey referrers)
  * objects.
  *
  * @param      object $copyObj An object of PcUser (or compatible) type.
  * @param      boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
  * @throws     PropelException
  */
 public function copyInto($copyObj, $deepCopy = false)
 {
     $copyObj->setUsername($this->username);
     $copyObj->setEmail($this->email);
     $copyObj->setEncryptedPassword($this->encrypted_password);
     $copyObj->setSalt($this->salt);
     $copyObj->setDateFormat($this->date_format);
     $copyObj->setTimeFormat($this->time_format);
     $copyObj->setTimezoneId($this->timezone_id);
     $copyObj->setWeekStart($this->week_start);
     $copyObj->setDstActive($this->dst_active);
     $copyObj->setAwaitingActivation($this->awaiting_activation);
     $copyObj->setNewsletter($this->newsletter);
     $copyObj->setForumId($this->forum_id);
     $copyObj->setLastLogin($this->last_login);
     $copyObj->setLanguage($this->language);
     $copyObj->setPreferredLanguage($this->preferred_language);
     $copyObj->setIpAddress($this->ip_address);
     $copyObj->setHasDesktopAppBeenLoaded($this->has_desktop_app_been_loaded);
     $copyObj->setHasRequestedFreeTrial($this->has_requested_free_trial);
     $copyObj->setAvatarRandomSuffix($this->avatar_random_suffix);
     $copyObj->setRemindersActive($this->reminders_active);
     $copyObj->setUnsubscribed($this->unsubscribed);
     $copyObj->setLatestBlogAccess($this->latest_blog_access);
     $copyObj->setLatestBackupRequest($this->latest_backup_request);
     $copyObj->setLatestImportRequest($this->latest_import_request);
     $copyObj->setLatestBreakingNewsClosed($this->latest_breaking_news_closed);
     $copyObj->setLastPromotionalCodeInserted($this->last_promotional_code_inserted);
     $copyObj->setBlocked($this->blocked);
     $copyObj->setSessionEntryPoint($this->session_entry_point);
     $copyObj->setSessionReferral($this->session_referral);
     $copyObj->setCreatedAt($this->created_at);
     if ($deepCopy) {
         // important: temporarily setNew(false) because this affects the behavior of
         // the getter/setter methods for fkey referrer objects.
         $copyObj->setNew(false);
         foreach ($this->getPcRemembermeKeys() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addPcRemembermeKey($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getPcDirtyTasks() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addPcDirtyTask($relObj->copy($deepCopy));
             }
         }
         $relObj = $this->getPcFailedLogins();
         if ($relObj) {
             $copyObj->setPcFailedLogins($relObj->copy($deepCopy));
         }
         $relObj = $this->getPcActivationToken();
         if ($relObj) {
             $copyObj->setPcActivationToken($relObj->copy($deepCopy));
         }
         $relObj = $this->getPcPasswordResetToken();
         if ($relObj) {
             $copyObj->setPcPasswordResetToken($relObj->copy($deepCopy));
         }
         $relObj = $this->getPcPlancakeEmailAddress();
         if ($relObj) {
             $copyObj->setPcPlancakeEmailAddress($relObj->copy($deepCopy));
         }
         foreach ($this->getPcLists() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addPcList($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getPcUsersListss() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addPcUsersLists($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getPcEmailChangeHistorys() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addPcEmailChangeHistory($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getPcUsersContextss() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addPcUsersContexts($relObj->copy($deepCopy));
             }
         }
         $relObj = $this->getPcSupporter();
         if ($relObj) {
             $copyObj->setPcSupporter($relObj->copy($deepCopy));
         }
         foreach ($this->getPcBlogPosts() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addPcBlogPost($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getPcBlogComments() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addPcBlogComment($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getPcApiApps() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addPcApiApp($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getPcApiTokens() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addPcApiToken($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getPcNotes() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addPcNote($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getPcSubscriptions() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addPcSubscription($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getPcGoogleCalendars() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addPcGoogleCalendar($relObj->copy($deepCopy));
             }
         }
         $relObj = $this->getPcUserKey();
         if ($relObj) {
             $copyObj->setPcUserKey($relObj->copy($deepCopy));
         }
         foreach ($this->getPcContacts() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addPcContact($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getPcContactTags() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addPcContactTag($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getPcContactsTagss() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addPcContactsTags($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getPcContactNotes() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addPcContactNote($relObj->copy($deepCopy));
             }
         }
         $relObj = $this->getPcHideableHintsSetting();
         if ($relObj) {
             $copyObj->setPcHideableHintsSetting($relObj->copy($deepCopy));
         }
         foreach ($this->getPcSplitTestUserResults() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addPcSplitTestUserResult($relObj->copy($deepCopy));
             }
         }
     }
     // if ($deepCopy)
     $copyObj->setNew(true);
     $copyObj->setId(NULL);
     // this is a auto-increment column, so set to default value
 }