src/Composer/DependencyResolver/Pool.php
public function whatProvides($name, LinkConstraintInterface $constraint = null, $mustMatchName = false)
    {
        $key = ((int) $mustMatchName).$constraint;
        if (isset($this->providerCache[$name][$key])) {
            return $this->providerCache[$name][$key];
        }

        return $this->providerCache[$name][$key] = $this->computeWhatProvides($name, $constraint, $mustMatchName);
    }
public function whatProvides($name, LinkConstraintInterface $constraint = null, $mustMatchName = false)
    {
        $key = ((int) $mustMatchName).$constraint;
        if (isset($this->providerCache[$name][$key])) {
            return $this->providerCache[$name][$key];
        }

        return $this->providerCache[$name][$key] = $this->computeWhatProvides($name, $constraint, $mustMatchName);
    }
public function whatProvides ( $ name , LinkConstraintInterface $ constraint = null , $ mustMatchName = false ) { $ key = ( ( int ) $ mustMatchName ) . $ constraint ; if ( isset ( $ this -> providerCache [ $ name ] [ $ key ] ) ) { return $ this -> providerCache [ $ name ] [ $ key ] ; } return $ this -> providerCache [ $ name ] [ $ key ] = $ this -> computeWhatProvides ( $ name , $ constraint , $ mustMatchName ) ; }
Searches all packages providing the given package name and match the constraint

@param  string                  $name          The package name to be searched for
@param  LinkConstraintInterface $constraint    A constraint that all returned
packages must match or null to return all
@param  bool                    $mustMatchName Whether the name of returned packages
must match the given name
@return PackageInterface[]      A set of packages
Searches all packages providing the given package name and match the constraint