/**
  * An example command.
  *
  * The comment of this command method is also used for TYPO3 Flow's help screens. The first line should give a very short
  * summary about what the command does. Then, after an empty line, you should explain in more detail what the command
  * does. You might also give some usage example.
  *
  * It is important to document the parameters with param tags, because that information will also appear in the help
  * screen.
  *
  * @return void
  */
 public function allCommand()
 {
     $errors = $this->defaultMapperValidator->getValidationErrors();
     if (empty($errors)) {
         $this->outputLine('Settings by all providers are valid');
         $this->quit();
     }
     foreach ($errors as $providerName => $providerErrors) {
         $this->outputLine('<b>' . str_repeat('#', self::MAXIMUM_LINE_LENGTH) . '</b>');
         $this->renderPrettyYaml($providerName);
         $this->renderErrors($providerName);
     }
     $this->outputLine('<b>' . str_repeat('#', self::MAXIMUM_LINE_LENGTH) . '</b>');
 }
Example #2
0
 /**
  * Checks settings for mapping Settings.yaml for each CAS-Provider.
  *
  * @todo make it possible to get all messages in command line.
  *
  * @throws Exception\WrongMappingConfigurationException
  *
  * @return mixed TRUE if all setting are valid. Array with providername as key and array with errors.
  */
 public function validateSettings()
 {
     if (FLOW_SAPITYPE === 'CLI') {
         return true;
     }
     if (FLOW_SAPITYPE === 'Web') {
         $validationErrors = $this->settingsValidator->getValidationErrors();
         foreach ($validationErrors as $providerName => $errors) {
             if (!empty($errors)) {
                 throw new WrongMappingConfigurationException(sprintf('Configuration for "%s" provider is not valid. Use "%s validate:provider %s" to get more information', $providerName, $this->getFlowInvocationString(), $providerName), 1373543447);
             }
         }
     }
     return false;
 }