You are here

public function Constraint::isCompatible in Automatic Updates 7

Determines if the provided version is satisfied by this constraint.

Parameters

string $version: The version to check, for example '4.2'.

Return value

bool TRUE if the provided version is satisfied by this constraint, FALSE if not.

File

vendor/drupal/core-version/Constraint.php, line 84

Class

Constraint
A value object representing a Drupal version constraint.

Namespace

Drupal\Component\Version

Code

public function isCompatible($version) {
  foreach ($this->constraintArray as $constraint) {
    if (!version_compare($version, $constraint['version'], $constraint['op'])) {
      return FALSE;
    }
  }
  return TRUE;
}