/**
  * This function performs the validation work for complex object models.
  *
  * In addition to checking the current object, all related objects will
  * also be validated.  If all pass then <code>true</code> is returned; otherwise
  * an aggregated array of ValidationFailed objects will be returned.
  *
  * @param array $columns Array of column names to validate.
  * @return mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objects otherwise.
  */
 protected function doValidate($columns = null)
 {
     if (!$this->alreadyInValidation) {
         $this->alreadyInValidation = true;
         $retval = null;
         $failureMap = array();
         // We call the validate method on the following object(s) if they
         // were passed to this object by their corresponding set
         // method.  This object relates to these object(s) by a
         // foreign key reference.
         if ($this->aUserRelatedByCreatedBy !== null) {
             if (!$this->aUserRelatedByCreatedBy->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aUserRelatedByCreatedBy->getValidationFailures());
             }
         }
         if ($this->aUserRelatedByUpdatedBy !== null) {
             if (!$this->aUserRelatedByUpdatedBy->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aUserRelatedByUpdatedBy->getValidationFailures());
             }
         }
         if (($retval = SubscriberPeer::doValidate($this, $columns)) !== true) {
             $failureMap = array_merge($failureMap, $retval);
         }
         if ($this->collSubscriberGroupMemberships !== null) {
             foreach ($this->collSubscriberGroupMemberships as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         $this->alreadyInValidation = false;
     }
     return !empty($failureMap) ? $failureMap : true;
 }
Example #2
0
 /**
  * This function performs the validation work for complex object models.
  *
  * In addition to checking the current object, all related objects will
  * also be validated.  If all pass then <code>true</code> is returned; otherwise
  * an aggreagated array of ValidationFailed objects will be returned.
  *
  * @param      array $columns Array of column names to validate.
  * @return     mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objets otherwise.
  */
 protected function doValidate($columns = null)
 {
     if (!$this->alreadyInValidation) {
         $this->alreadyInValidation = true;
         $retval = null;
         $failureMap = array();
         // We call the validate method on the following object(s) if they
         // were passed to this object by their coresponding set
         // method.  This object relates to these object(s) by a
         // foreign key reference.
         if ($this->aItem !== null) {
             if (!$this->aItem->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aItem->getValidationFailures());
             }
         }
         if ($this->aUser !== null) {
             if (!$this->aUser->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aUser->getValidationFailures());
             }
         }
         if (($retval = ShoppingCartPeer::doValidate($this, $columns)) !== true) {
             $failureMap = array_merge($failureMap, $retval);
         }
         $this->alreadyInValidation = false;
     }
     return !empty($failureMap) ? $failureMap : true;
 }
Example #3
0
 /**
  * This function performs the validation work for complex object models.
  *
  * In addition to checking the current object, all related objects will
  * also be validated.  If all pass then <code>true</code> is returned; otherwise
  * an aggreagated array of ValidationFailed objects will be returned.
  *
  * @param      array $columns Array of column names to validate.
  * @return     mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objets otherwise.
  */
 protected function doValidate($columns = null)
 {
     if (!$this->alreadyInValidation) {
         $this->alreadyInValidation = true;
         $retval = null;
         $failureMap = array();
         // We call the validate method on the following object(s) if they
         // were passed to this object by their coresponding set
         // method.  This object relates to these object(s) by a
         // foreign key reference.
         if ($this->aProject !== null) {
             if (!$this->aProject->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aProject->getValidationFailures());
             }
         }
         if ($this->aStatus !== null) {
             if (!$this->aStatus->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aStatus->getValidationFailures());
             }
         }
         if ($this->aPriority !== null) {
             if (!$this->aPriority->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aPriority->getValidationFailures());
             }
         }
         if ($this->aUser !== null) {
             if (!$this->aUser->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aUser->getValidationFailures());
             }
         }
         if (($retval = TaskPeer::doValidate($this, $columns)) !== true) {
             $failureMap = array_merge($failureMap, $retval);
         }
         if ($this->collOverrideTasksRelatedByTaskId !== null) {
             foreach ($this->collOverrideTasksRelatedByTaskId as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collOverrideTasksRelatedByOverrideTaskId !== null) {
             foreach ($this->collOverrideTasksRelatedByOverrideTaskId as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         $this->alreadyInValidation = false;
     }
     return !empty($failureMap) ? $failureMap : true;
 }
Example #4
0
 /**
  * This function performs the validation work for complex object models.
  *
  * In addition to checking the current object, all related objects will
  * also be validated.  If all pass then <code>true</code> is returned; otherwise
  * an aggreagated array of ValidationFailed objects will be returned.
  *
  * @param array $columns Array of column names to validate.
  * @return mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objets otherwise.
  */
 protected function doValidate($columns = null)
 {
     if (!$this->alreadyInValidation) {
         $this->alreadyInValidation = true;
         $retval = null;
         $failureMap = array();
         // We call the validate method on the following object(s) if they
         // were passed to this object by their coresponding set
         // method.  This object relates to these object(s) by a
         // foreign key reference.
         if ($this->aUser !== null) {
             if (!$this->aUser->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aUser->getValidationFailures());
             }
         }
         if ($this->aOrganization !== null) {
             if (!$this->aOrganization->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aOrganization->getValidationFailures());
             }
         }
         if ($this->aChartRelatedByForkedFrom !== null) {
             if (!$this->aChartRelatedByForkedFrom->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aChartRelatedByForkedFrom->getValidationFailures());
             }
         }
         if (($retval = ChartPeer::doValidate($this, $columns)) !== true) {
             $failureMap = array_merge($failureMap, $retval);
         }
         if ($this->collChartsRelatedById !== null) {
             foreach ($this->collChartsRelatedById as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collJobs !== null) {
             foreach ($this->collJobs as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         $this->alreadyInValidation = false;
     }
     return !empty($failureMap) ? $failureMap : true;
 }
Example #5
0
 /**
  * This function performs the validation work for complex object models.
  *
  * In addition to checking the current object, all related objects will
  * also be validated.  If all pass then <code>true</code> is returned; otherwise
  * an aggregated array of ValidationFailed objects will be returned.
  *
  * @param array $columns Array of column names to validate.
  * @return mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objects otherwise.
  */
 protected function doValidate($columns = null)
 {
     if (!$this->alreadyInValidation) {
         $this->alreadyInValidation = true;
         $retval = null;
         $failureMap = array();
         // We call the validate method on the following object(s) if they
         // were passed to this object by their corresponding set
         // method.  This object relates to these object(s) by a
         // foreign key reference.
         if ($this->aPageRelatedByCanonicalId !== null) {
             if (!$this->aPageRelatedByCanonicalId->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aPageRelatedByCanonicalId->getValidationFailures());
             }
         }
         if ($this->aUserRelatedByCreatedBy !== null) {
             if (!$this->aUserRelatedByCreatedBy->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aUserRelatedByCreatedBy->getValidationFailures());
             }
         }
         if ($this->aUserRelatedByUpdatedBy !== null) {
             if (!$this->aUserRelatedByUpdatedBy->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aUserRelatedByUpdatedBy->getValidationFailures());
             }
         }
         if (($retval = PagePeer::doValidate($this, $columns)) !== true) {
             $failureMap = array_merge($failureMap, $retval);
         }
         if ($this->collPagesRelatedById !== null) {
             foreach ($this->collPagesRelatedById as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collPagePropertys !== null) {
             foreach ($this->collPagePropertys as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collPageStrings !== null) {
             foreach ($this->collPageStrings as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collContentObjects !== null) {
             foreach ($this->collContentObjects as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collRights !== null) {
             foreach ($this->collRights as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         $this->alreadyInValidation = false;
     }
     return !empty($failureMap) ? $failureMap : true;
 }
 /**
  * This function performs the validation work for complex object models.
  *
  * In addition to checking the current object, all related objects will
  * also be validated.  If all pass then <code>true</code> is returned; otherwise
  * an aggreagated array of ValidationFailed objects will be returned.
  *
  * @param      array $columns Array of column names to validate.
  * @return     mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objets otherwise.
  */
 protected function doValidate($columns = null)
 {
     if (!$this->alreadyInValidation) {
         $this->alreadyInValidation = true;
         $retval = null;
         $failureMap = array();
         // We call the validate method on the following object(s) if they
         // were passed to this object by their coresponding set
         // method.  This object relates to these object(s) by a
         // foreign key reference.
         if ($this->aUser !== null) {
             if (!$this->aUser->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aUser->getValidationFailures());
             }
         }
         if ($this->aSchemaPropertyElement !== null) {
             if (!$this->aSchemaPropertyElement->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aSchemaPropertyElement->getValidationFailures());
             }
         }
         if ($this->aSchemaPropertyRelatedBySchemaPropertyId !== null) {
             if (!$this->aSchemaPropertyRelatedBySchemaPropertyId->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aSchemaPropertyRelatedBySchemaPropertyId->getValidationFailures());
             }
         }
         if ($this->aSchema !== null) {
             if (!$this->aSchema->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aSchema->getValidationFailures());
             }
         }
         if ($this->aProfileProperty !== null) {
             if (!$this->aProfileProperty->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aProfileProperty->getValidationFailures());
             }
         }
         if ($this->aSchemaPropertyRelatedByRelatedSchemaPropertyId !== null) {
             if (!$this->aSchemaPropertyRelatedByRelatedSchemaPropertyId->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aSchemaPropertyRelatedByRelatedSchemaPropertyId->getValidationFailures());
             }
         }
         if ($this->aStatus !== null) {
             if (!$this->aStatus->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aStatus->getValidationFailures());
             }
         }
         if ($this->aFileImportHistory !== null) {
             if (!$this->aFileImportHistory->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aFileImportHistory->getValidationFailures());
             }
         }
         if (($retval = SchemaPropertyElementHistoryPeer::doValidate($this, $columns)) !== true) {
             $failureMap = array_merge($failureMap, $retval);
         }
         $this->alreadyInValidation = false;
     }
     return !empty($failureMap) ? $failureMap : true;
 }
 /**
  * This function performs the validation work for complex object models.
  *
  * In addition to checking the current object, all related objects will
  * also be validated.  If all pass then <code>true</code> is returned; otherwise
  * an aggreagated array of ValidationFailed objects will be returned.
  *
  * @param      array $columns Array of column names to validate.
  * @return     mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objets otherwise.
  */
 protected function doValidate($columns = null)
 {
     if (!$this->alreadyInValidation) {
         $this->alreadyInValidation = true;
         $retval = null;
         $failureMap = array();
         // We call the validate method on the following object(s) if they
         // were passed to this object by their coresponding set
         // method.  This object relates to these object(s) by a
         // foreign key reference.
         if ($this->aUserRelatedByCreatedUserId !== null) {
             if (!$this->aUserRelatedByCreatedUserId->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aUserRelatedByCreatedUserId->getValidationFailures());
             }
         }
         if ($this->aUserRelatedByUpdatedUserId !== null) {
             if (!$this->aUserRelatedByUpdatedUserId->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aUserRelatedByUpdatedUserId->getValidationFailures());
             }
         }
         if ($this->aConceptRelatedByConceptId !== null) {
             if (!$this->aConceptRelatedByConceptId->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aConceptRelatedByConceptId->getValidationFailures());
             }
         }
         if ($this->aProfilePropertyRelatedBySkosPropertyId !== null) {
             if (!$this->aProfilePropertyRelatedBySkosPropertyId->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aProfilePropertyRelatedBySkosPropertyId->getValidationFailures());
             }
         }
         if ($this->aVocabulary !== null) {
             if (!$this->aVocabulary->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aVocabulary->getValidationFailures());
             }
         }
         if ($this->aConceptRelatedByRelatedConceptId !== null) {
             if (!$this->aConceptRelatedByRelatedConceptId->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aConceptRelatedByRelatedConceptId->getValidationFailures());
             }
         }
         if ($this->aStatus !== null) {
             if (!$this->aStatus->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aStatus->getValidationFailures());
             }
         }
         if ($this->aProfilePropertyRelatedByProfilePropertyId !== null) {
             if (!$this->aProfilePropertyRelatedByProfilePropertyId->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aProfilePropertyRelatedByProfilePropertyId->getValidationFailures());
             }
         }
         if (($retval = ConceptPropertyPeer::doValidate($this, $columns)) !== true) {
             $failureMap = array_merge($failureMap, $retval);
         }
         if ($this->collConcepts !== null) {
             foreach ($this->collConcepts as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collConceptPropertyHistorys !== null) {
             foreach ($this->collConceptPropertyHistorys as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collDiscusss !== null) {
             foreach ($this->collDiscusss as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         $this->alreadyInValidation = false;
     }
     return !empty($failureMap) ? $failureMap : true;
 }
Example #8
0
 /**
  * This function performs the validation work for complex object models.
  *
  * In addition to checking the current object, all related objects will
  * also be validated.  If all pass then <code>true</code> is returned; otherwise
  * an aggregated array of ValidationFailed objects will be returned.
  *
  * @param array $columns Array of column names to validate.
  * @return mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objects otherwise.
  */
 protected function doValidate($columns = null)
 {
     if (!$this->alreadyInValidation) {
         $this->alreadyInValidation = true;
         $retval = null;
         $failureMap = array();
         // We call the validate method on the following object(s) if they
         // were passed to this object by their corresponding set
         // method.  This object relates to these object(s) by a
         // foreign key reference.
         if ($this->aLanguage !== null) {
             if (!$this->aLanguage->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aLanguage->getValidationFailures());
             }
         }
         if ($this->aUserRelatedByOwnerId !== null) {
             if (!$this->aUserRelatedByOwnerId->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aUserRelatedByOwnerId->getValidationFailures());
             }
         }
         if ($this->aLinkCategory !== null) {
             if (!$this->aLinkCategory->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aLinkCategory->getValidationFailures());
             }
         }
         if ($this->aUserRelatedByCreatedBy !== null) {
             if (!$this->aUserRelatedByCreatedBy->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aUserRelatedByCreatedBy->getValidationFailures());
             }
         }
         if ($this->aUserRelatedByUpdatedBy !== null) {
             if (!$this->aUserRelatedByUpdatedBy->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aUserRelatedByUpdatedBy->getValidationFailures());
             }
         }
         if (($retval = LinkPeer::doValidate($this, $columns)) !== true) {
             $failureMap = array_merge($failureMap, $retval);
         }
         $this->alreadyInValidation = false;
     }
     return !empty($failureMap) ? $failureMap : true;
 }
    }
    if (isset($_POST['lname'])) {
        $lname = htmlspecialchars($_POST['lname']);
    }
    if (isset($_POST['email'])) {
        $email = htmlspecialchars($_POST['email']);
    }
    //Create user object
    $user = new User();
    $user->setRcsId($rcsid);
    $user->setFirstName($fname);
    $user->setLastName($lname);
    $user->setEmail($email);
    if (!$user->validate()) {
        $failure_messages = array();
        foreach ($user->getValidationFailures() as $failure) {
            $message = '<p><strong>Error in ' . $failure->getPropertyPath() . ' field!</strong> ' . $failure->getMessage() . '</p>';
            array_push($failure_messages, $message);
            // clear out the bad data
            $_POST[$failure->getPropertyPath()] = '';
        }
        unset($message);
    } else {
        $user->save();
        $uid = $user->getUserId();
        beginSession($uid);
        redirect();
    }
}
?>
Example #10
0
 /**
  * This function performs the validation work for complex object models.
  *
  * In addition to checking the current object, all related objects will
  * also be validated.  If all pass then <code>true</code> is returned; otherwise
  * an aggreagated array of ValidationFailed objects will be returned.
  *
  * @param      array $columns Array of column names to validate.
  * @return     mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objets otherwise.
  */
 protected function doValidate($columns = null)
 {
     if (!$this->alreadyInValidation) {
         $this->alreadyInValidation = true;
         $retval = null;
         $failureMap = array();
         // We call the validate method on the following object(s) if they
         // were passed to this object by their coresponding set
         // method.  This object relates to these object(s) by a
         // foreign key reference.
         if ($this->aRoomprofile !== null) {
             if (!$this->aRoomprofile->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aRoomprofile->getValidationFailures());
             }
         }
         if ($this->aActivity !== null) {
             if (!$this->aActivity->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aActivity->getValidationFailures());
             }
         }
         if ($this->aReservationreason !== null) {
             if (!$this->aReservationreason->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aReservationreason->getValidationFailures());
             }
         }
         if ($this->aUsergroup !== null) {
             if (!$this->aUsergroup->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aUsergroup->getValidationFailures());
             }
         }
         if ($this->aCard !== null) {
             if (!$this->aCard->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aCard->getValidationFailures());
             }
         }
         if ($this->aUser !== null) {
             if (!$this->aUser->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aUser->getValidationFailures());
             }
         }
         if ($this->aReservationRelatedByReservationparentId !== null) {
             if (!$this->aReservationRelatedByReservationparentId->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aReservationRelatedByReservationparentId->getValidationFailures());
             }
         }
         if (($retval = ReservationPeer::doValidate($this, $columns)) !== true) {
             $failureMap = array_merge($failureMap, $retval);
         }
         if ($this->collReservationsRelatedByReservationparentId !== null) {
             foreach ($this->collReservationsRelatedByReservationparentId as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collReservationOtherMemberss !== null) {
             foreach ($this->collReservationOtherMemberss as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         $this->alreadyInValidation = false;
     }
     return !empty($failureMap) ? $failureMap : true;
 }
 /**
  * This function performs the validation work for complex object models.
  *
  * In addition to checking the current object, all related objects will
  * also be validated.  If all pass then <code>true</code> is returned; otherwise
  * an aggreagated array of ValidationFailed objects will be returned.
  *
  * @param      array $columns Array of column names to validate.
  * @return     mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objets otherwise.
  */
 protected function doValidate($columns = null)
 {
     if (!$this->alreadyInValidation) {
         $this->alreadyInValidation = true;
         $retval = null;
         $failureMap = array();
         // We call the validate method on the following object(s) if they
         // were passed to this object by their coresponding set
         // method.  This object relates to these object(s) by a
         // foreign key reference.
         if ($this->aUser !== null) {
             if (!$this->aUser->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aUser->getValidationFailures());
             }
         }
         if ($this->aVocabulary !== null) {
             if (!$this->aVocabulary->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aVocabulary->getValidationFailures());
             }
         }
         if ($this->aSchema !== null) {
             if (!$this->aSchema->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aSchema->getValidationFailures());
             }
         }
         if ($this->aBatch !== null) {
             if (!$this->aBatch->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aBatch->getValidationFailures());
             }
         }
         if (($retval = FileImportHistoryPeer::doValidate($this, $columns)) !== true) {
             $failureMap = array_merge($failureMap, $retval);
         }
         if ($this->collConceptPropertyHistorys !== null) {
             foreach ($this->collConceptPropertyHistorys as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collSchemaPropertyElementHistorys !== null) {
             foreach ($this->collSchemaPropertyElementHistorys as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         $this->alreadyInValidation = false;
     }
     return !empty($failureMap) ? $failureMap : true;
 }
 /**
  * This function performs the validation work for complex object models.
  *
  * In addition to checking the current object, all related objects will
  * also be validated.  If all pass then <code>true</code> is returned; otherwise
  * an aggreagated array of ValidationFailed objects will be returned.
  *
  * @param      array $columns Array of column names to validate.
  * @return     mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objets otherwise.
  */
 protected function doValidate($columns = null)
 {
     if (!$this->alreadyInValidation) {
         $this->alreadyInValidation = true;
         $retval = null;
         $failureMap = array();
         // We call the validate method on the following object(s) if they
         // were passed to this object by their coresponding set
         // method.  This object relates to these object(s) by a
         // foreign key reference.
         if ($this->aAgent !== null) {
             if (!$this->aAgent->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aAgent->getValidationFailures());
             }
         }
         if ($this->aUserRelatedByCreatedUserId !== null) {
             if (!$this->aUserRelatedByCreatedUserId->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aUserRelatedByCreatedUserId->getValidationFailures());
             }
         }
         if ($this->aUserRelatedByUpdatedUserId !== null) {
             if (!$this->aUserRelatedByUpdatedUserId->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aUserRelatedByUpdatedUserId->getValidationFailures());
             }
         }
         if ($this->aStatus !== null) {
             if (!$this->aStatus->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aStatus->getValidationFailures());
             }
         }
         if ($this->aProfile !== null) {
             if (!$this->aProfile->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aProfile->getValidationFailures());
             }
         }
         if (($retval = SchemaPeer::doValidate($this, $columns)) !== true) {
             $failureMap = array_merge($failureMap, $retval);
         }
         if ($this->collDiscusss !== null) {
             foreach ($this->collDiscusss as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collFileImportHistorys !== null) {
             foreach ($this->collFileImportHistorys as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collRdfNamespaces !== null) {
             foreach ($this->collRdfNamespaces as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collSchemaPropertys !== null) {
             foreach ($this->collSchemaPropertys as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collSchemaPropertyElementHistorys !== null) {
             foreach ($this->collSchemaPropertyElementHistorys as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collSchemaHasUsers !== null) {
             foreach ($this->collSchemaHasUsers as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collSchemaHasVersions !== null) {
             foreach ($this->collSchemaHasVersions as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         $this->alreadyInValidation = false;
     }
     return !empty($failureMap) ? $failureMap : true;
 }
Example #13
0
 /**
  * This function performs the validation work for complex object models.
  *
  * In addition to checking the current object, all related objects will
  * also be validated.  If all pass then <code>true</code> is returned; otherwise
  * an aggreagated array of ValidationFailed objects will be returned.
  *
  * @param      array $columns Array of column names to validate.
  * @return     mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objets otherwise.
  */
 protected function doValidate($columns = null)
 {
     if (!$this->alreadyInValidation) {
         $this->alreadyInValidation = true;
         $retval = null;
         $failureMap = array();
         // We call the validate method on the following object(s) if they
         // were passed to this object by their coresponding set
         // method.  This object relates to these object(s) by a
         // foreign key reference.
         if ($this->aUserRelatedByStudentId !== null) {
             if (!$this->aUserRelatedByStudentId->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aUserRelatedByStudentId->getValidationFailures());
             }
         }
         if ($this->aUserRelatedByTutorId !== null) {
             if (!$this->aUserRelatedByTutorId->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aUserRelatedByTutorId->getValidationFailures());
             }
         }
         if (($retval = StudentQuestionPeer::doValidate($this, $columns)) !== true) {
             $failureMap = array_merge($failureMap, $retval);
         }
         if ($this->collWhiteboardSessions !== null) {
             foreach ($this->collWhiteboardSessions as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         $this->alreadyInValidation = false;
     }
     return !empty($failureMap) ? $failureMap : true;
 }
 /**
  * This function performs the validation work for complex object models.
  *
  * In addition to checking the current object, all related objects will
  * also be validated.  If all pass then <code>true</code> is returned; otherwise
  * an aggreagated array of ValidationFailed objects will be returned.
  *
  * @param      array $columns Array of column names to validate.
  * @return     mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objets otherwise.
  */
 protected function doValidate($columns = null)
 {
     if (!$this->alreadyInValidation) {
         $this->alreadyInValidation = true;
         $retval = null;
         $failureMap = array();
         // We call the validate method on the following object(s) if they
         // were passed to this object by their coresponding set
         // method.  This object relates to these object(s) by a
         // foreign key reference.
         if ($this->aAgent !== null) {
             if (!$this->aAgent->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aAgent->getValidationFailures());
             }
         }
         if ($this->aUserRelatedByCreatedBy !== null) {
             if (!$this->aUserRelatedByCreatedBy->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aUserRelatedByCreatedBy->getValidationFailures());
             }
         }
         if ($this->aUserRelatedByUpdatedBy !== null) {
             if (!$this->aUserRelatedByUpdatedBy->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aUserRelatedByUpdatedBy->getValidationFailures());
             }
         }
         if ($this->aUserRelatedByDeletedBy !== null) {
             if (!$this->aUserRelatedByDeletedBy->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aUserRelatedByDeletedBy->getValidationFailures());
             }
         }
         if ($this->aUserRelatedByChildUpdatedBy !== null) {
             if (!$this->aUserRelatedByChildUpdatedBy->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aUserRelatedByChildUpdatedBy->getValidationFailures());
             }
         }
         if ($this->aStatus !== null) {
             if (!$this->aStatus->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aStatus->getValidationFailures());
             }
         }
         if (($retval = ProfilePeer::doValidate($this, $columns)) !== true) {
             $failureMap = array_merge($failureMap, $retval);
         }
         if ($this->collProfilePropertys !== null) {
             foreach ($this->collProfilePropertys as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collSchemas !== null) {
             foreach ($this->collSchemas as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collVocabularys !== null) {
             foreach ($this->collVocabularys as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         $this->alreadyInValidation = false;
     }
     return !empty($failureMap) ? $failureMap : true;
 }
 /**
  * This function performs the validation work for complex object models.
  *
  * In addition to checking the current object, all related objects will
  * also be validated.  If all pass then <code>true</code> is returned; otherwise
  * an aggreagated array of ValidationFailed objects will be returned.
  *
  * @param      array $columns Array of column names to validate.
  * @return     mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objets otherwise.
  */
 protected function doValidate($columns = null)
 {
     if (!$this->alreadyInValidation) {
         $this->alreadyInValidation = true;
         $retval = null;
         $failureMap = array();
         // We call the validate method on the following object(s) if they
         // were passed to this object by their coresponding set
         // method.  This object relates to these object(s) by a
         // foreign key reference.
         if ($this->aUserRelatedByCreatedUserId !== null) {
             if (!$this->aUserRelatedByCreatedUserId->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aUserRelatedByCreatedUserId->getValidationFailures());
             }
         }
         if ($this->aUserRelatedByDeletedUserId !== null) {
             if (!$this->aUserRelatedByDeletedUserId->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aUserRelatedByDeletedUserId->getValidationFailures());
             }
         }
         if ($this->aSchema !== null) {
             if (!$this->aSchema->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aSchema->getValidationFailures());
             }
         }
         if ($this->aSchemaProperty !== null) {
             if (!$this->aSchemaProperty->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aSchemaProperty->getValidationFailures());
             }
         }
         if ($this->aSchemaPropertyElement !== null) {
             if (!$this->aSchemaPropertyElement->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aSchemaPropertyElement->getValidationFailures());
             }
         }
         if ($this->aVocabulary !== null) {
             if (!$this->aVocabulary->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aVocabulary->getValidationFailures());
             }
         }
         if ($this->aConcept !== null) {
             if (!$this->aConcept->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aConcept->getValidationFailures());
             }
         }
         if ($this->aConceptProperty !== null) {
             if (!$this->aConceptProperty->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aConceptProperty->getValidationFailures());
             }
         }
         if ($this->aDiscussRelatedByRootId !== null) {
             if (!$this->aDiscussRelatedByRootId->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aDiscussRelatedByRootId->getValidationFailures());
             }
         }
         if ($this->aDiscussRelatedByParentId !== null) {
             if (!$this->aDiscussRelatedByParentId->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aDiscussRelatedByParentId->getValidationFailures());
             }
         }
         if (($retval = DiscussPeer::doValidate($this, $columns)) !== true) {
             $failureMap = array_merge($failureMap, $retval);
         }
         $this->alreadyInValidation = false;
     }
     return !empty($failureMap) ? $failureMap : true;
 }