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

Breadcrumb

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

class MatchAllConstraint

Defines the absence of a constraint.

This constraint matches everything.

Hierarchy

  • class \Composer\Semver\Constraint\MatchAllConstraint implements \Composer\Semver\Constraint\ConstraintInterface

Expanded class hierarchy of MatchAllConstraint

9 files declare their use of MatchAllConstraint
ComposerRepository.php in vendor/composer/composer/src/Composer/Repository/ComposerRepository.php
FundCommand.php in vendor/composer/composer/src/Composer/Command/FundCommand.php
IgnoreListPlatformRequirementFilter.php in vendor/composer/composer/src/Composer/Filter/PlatformRequirementFilter/IgnoreListPlatformRequirementFilter.php
InstalledRepository.php in vendor/composer/composer/src/Composer/Repository/InstalledRepository.php
Intervals.php in vendor/composer/semver/src/Intervals.php

... See full list

File

vendor/composer/semver/src/Constraint/MatchAllConstraint.php, line 19

Namespace

Composer\Semver\Constraint
View source
class MatchAllConstraint implements ConstraintInterface {
    
    /** @var string|null */
    protected $prettyString;
    
    /**
     * @param ConstraintInterface $provider
     *
     * @return bool
     */
    public function matches(ConstraintInterface $provider) {
        return true;
    }
    
    /**
     * {@inheritDoc}
     */
    public function compile($otherOperator) {
        return 'true';
    }
    
    /**
     * {@inheritDoc}
     */
    public function setPrettyString($prettyString) {
        $this->prettyString = $prettyString;
    }
    
    /**
     * {@inheritDoc}
     */
    public function getPrettyString() {
        if ($this->prettyString) {
            return $this->prettyString;
        }
        return (string) $this;
    }
    
    /**
     * {@inheritDoc}
     */
    public function __toString() {
        return '*';
    }
    
    /**
     * {@inheritDoc}
     */
    public function getUpperBound() {
        return Bound::positiveInfinity();
    }
    
    /**
     * {@inheritDoc}
     */
    public function getLowerBound() {
        return Bound::zero();
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
MatchAllConstraint::$prettyString protected property @var string|null
MatchAllConstraint::compile public function Provides a compiled version of the constraint for the given operator
The compiled version must be a PHP expression.
Executor of compile version must provide 2 variables:
Overrides ConstraintInterface::compile
MatchAllConstraint::getLowerBound public function Overrides ConstraintInterface::getLowerBound
MatchAllConstraint::getPrettyString public function Overrides ConstraintInterface::getPrettyString
MatchAllConstraint::getUpperBound public function Overrides ConstraintInterface::getUpperBound
MatchAllConstraint::matches public function Overrides ConstraintInterface::matches
MatchAllConstraint::setPrettyString public function Overrides ConstraintInterface::setPrettyString
MatchAllConstraint::__toString public function Overrides ConstraintInterface::__toString

API Navigation

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