コード例 #1
0
 /**
  * Returns the ProcessingError objects for the errors and warnings that should be displayed.
  *
  * @since 0.4
  *
  * @return array of array of ProcessingError
  */
 protected function getErrorsToDisplay()
 {
     $errors = array();
     $warnings = array();
     foreach ($this->validator->getErrors() as $error) {
         // Check if the severity of the error is high enough to display it.
         if ($error->shouldShow()) {
             $errors[] = $error;
         } elseif ($error->shouldWarn()) {
             $warnings[] = $error;
         }
     }
     return array('errors' => $errors, 'warnings' => $warnings);
 }