コード例 #1
0
ファイル: BaseStudentCourse.php プロジェクト: taryono/school
 protected function doValidate($columns = null)
 {
     if (!$this->alreadyInValidation) {
         $this->alreadyInValidation = true;
         $retval = null;
         $failureMap = array();
         if ($this->aStudent !== null) {
             if (!$this->aStudent->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aStudent->getValidationFailures());
             }
         }
         if ($this->aSubjectAccal !== null) {
             if (!$this->aSubjectAccal->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aSubjectAccal->getValidationFailures());
             }
         }
         if ($this->aSubjectCurr !== null) {
             if (!$this->aSubjectCurr->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aSubjectCurr->getValidationFailures());
             }
         }
         if ($this->aClassGroup !== null) {
             if (!$this->aClassGroup->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aClassGroup->getValidationFailures());
             }
         }
         if ($this->aAcademicCalendar !== null) {
             if (!$this->aAcademicCalendar->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aAcademicCalendar->getValidationFailures());
             }
         }
         if ($this->aGradeComponent !== null) {
             if (!$this->aGradeComponent->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aGradeComponent->getValidationFailures());
             }
         }
         if ($this->aSchedule !== null) {
             if (!$this->aSchedule->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aSchedule->getValidationFailures());
             }
         }
         if ($this->aScheduleDetail !== null) {
             if (!$this->aScheduleDetail->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->aScheduleDetail->getValidationFailures());
             }
         }
         if (($retval = StudentCoursePeer::doValidate($this, $columns)) !== true) {
             $failureMap = array_merge($failureMap, $retval);
         }
         if ($this->collStudentScores !== null) {
             foreach ($this->collStudentScores as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collVStudentScores !== null) {
             foreach ($this->collVStudentScores as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collStudentRaports !== null) {
             foreach ($this->collStudentRaports as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collVRaports !== null) {
             foreach ($this->collVRaports as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collVFinalRaports !== null) {
             foreach ($this->collVFinalRaports as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collVSubjectAccalLectorStudentDetails !== null) {
             foreach ($this->collVSubjectAccalLectorStudentDetails as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         $this->alreadyInValidation = false;
     }
     return !empty($failureMap) ? $failureMap : true;
 }