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

Breadcrumb

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

function ArrayRepository::count

Returns the number of packages in this repository

Return value

0|positive-int Number of packages

2 calls to ArrayRepository::count()
ArrayRepository::getRepoName in vendor/composer/composer/src/Composer/Repository/ArrayRepository.php
Returns a name representing this repository to the user
InstalledArrayRepository::isFresh in vendor/composer/composer/src/Composer/Repository/InstalledArrayRepository.php
@inheritDoc

File

vendor/composer/composer/src/Composer/Repository/ArrayRepository.php, line 323

Class

ArrayRepository
A repository implementation that simply stores packages in an array

Namespace

Composer\Repository

Code

public function count() : int {
    if (null === $this->packages) {
        $this->initialize();
    }
    return count($this->packages);
}

API Navigation

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