Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ConfigCommand.php

function ConfigCommand::handleMultiValue

Parameters

array{callable, callable} $callbacks Validator and normalizer callbacks:

array<string> $values:

1 call to ConfigCommand::handleMultiValue()
ConfigCommand::execute in vendor/composer/composer/src/Composer/Command/ConfigCommand.php

File

vendor/composer/composer/src/Composer/Command/ConfigCommand.php, line 933

Class

ConfigCommand
@author Joshua Estes <Joshua.Estes@iostudio.com> @author Jordi Boggiano <j.boggiano@seld.be>

Namespace

Composer\Command

Code

protected function handleMultiValue(string $key, array $callbacks, array $values, string $method) : void {
    [
        $validator,
        $normalizer,
    ] = $callbacks;
    if (true !== ($validation = $validator($values))) {
        throw new \RuntimeException(sprintf('%s is an invalid value' . ($validation ? ' (' . $validation . ')' : ''), json_encode($values)));
    }
    call_user_func([
        $this->configSource,
        $method,
    ], $key, $normalizer($values));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal