Copied!

Defines a conjunctive or disjunctive set of constraints.

Cloneable Instantiable
Methods
public __construct ( array $constraints , $conjunctive = true )
 
  • param Composer\Semver\Constraint\ConstraintInterface [] $constraints A set of constraints
  • param bool $conjunctive Whether the constraints should be treated as conjunctive or disjunctive
  • throws InvalidArgumentException If less than 2 constraints are passed
public __toString () : string
 
public compile ( $otherOperator )
 
public static create ( array $constraints , $conjunctive = true )
 

Tries to optimize the constraints as much as possible, meaning
reducing/collapsing congruent constraints etc.

Does not necessarily return a MultiConstraint instance if
things can be reduced to a simple constraint

public getConstraints ()
public getLowerBound ()
 
public getPrettyString ()
 
public getUpperBound ()
 
public isConjunctive ()
 
  • return bool
public isDisjunctive ()
 
  • return bool
public matches ( Composer\Semver\Constraint\ConstraintInterface $provider )
public setPrettyString ( $prettyString )
 
Properties
protected $conjunctive
 
  • var bool
protected $constraints
 
protected $lowerBound
protected $prettyString
 
  • var string | null
protected $string
 
  • var string | null
protected $upperBound
Methods
private extractBounds ()
 
  • return void
private static optimizeConstraints ( array $constraints , $conjunctive )
 
Methods
public static create ( array $constraints , $conjunctive = true )
 

Tries to optimize the constraints as much as possible, meaning
reducing/collapsing congruent constraints etc.

Does not necessarily return a MultiConstraint instance if
things can be reduced to a simple constraint

private static optimizeConstraints ( array $constraints , $conjunctive )
 
© 2022 Bruce Wells
Search Namespaces \ Classes
Configuration