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

Breadcrumb

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

function BasePackage::getNames

@inheritDoc

Overrides PackageInterface::getNames

File

vendor/composer/composer/src/Composer/Package/BasePackage.php, line 103

Class

BasePackage
Base class for packages providing name storage and default match implementation

Namespace

Composer\Package

Code

public function getNames($provides = true) : array {
    $names = [
        $this->getName() => true,
    ];
    if ($provides) {
        foreach ($this->getProvides() as $link) {
            $names[$link->getTarget()] = true;
        }
    }
    foreach ($this->getReplaces() as $link) {
        $names[$link->getTarget()] = true;
    }
    return array_keys($names);
}

API Navigation

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