Example #1
0
 /**
  * Validates that every top level destination property is mapped to source property.
  * If not, a ConfigurationException is thrown detailing any missing mappings.
  *
  * @throws ValidationException if any TypeMaps contain unmapped properties
  */
 public function validate()
 {
     $errors = array();
     foreach ($this->config->getAllTypeMaps() as $typeMap) {
         try {
             $typeMap->validate();
         } catch (\Exception $e) {
             $errors[] = $e->getMessage();
         }
     }
     if (!empty($errors)) {
         throw new ValidationException(implode("\n\n", $errors));
     }
 }