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

Breadcrumb

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

function MultiConflictRule::__toString

Formats a rule as a string of the format (Literal1|Literal2|...)

Overrides Rule::__toString

File

vendor/composer/composer/src/Composer/DependencyResolver/MultiConflictRule.php, line 97

Class

MultiConflictRule
@author Nils Adermann <naderman@naderman.de>

Namespace

Composer\DependencyResolver

Code

public function __toString() : string {
    // TODO multi conflict?
    $result = $this->isDisabled() ? 'disabled(multi(' : '(multi(';
    foreach ($this->literals as $i => $literal) {
        if ($i !== 0) {
            $result .= '|';
        }
        $result .= $literal;
    }
    $result .= '))';
    return $result;
}

API Navigation

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