You are here

private function PharInvocationCollection::assertUniqueBaseName in Drupal 7

Asserts that base-name is unique. This disallows having multiple invocations for same base-name but having different alias names.

Parameters

PharInvocation $invocation:

int $flags:

Return value

bool

1 call to PharInvocationCollection::assertUniqueBaseName()
PharInvocationCollection::collect in misc/typo3/phar-stream-wrapper/src/Resolver/PharInvocationCollection.php

File

misc/typo3/phar-stream-wrapper/src/Resolver/PharInvocationCollection.php, line 84

Class

PharInvocationCollection

Namespace

TYPO3\PharStreamWrapper\Resolver

Code

private function assertUniqueBaseName(PharInvocation $invocation, $flags) {
  if (!($flags & static::UNIQUE_BASE_NAME)) {
    return true;
  }
  return $this
    ->findByCallback(function (PharInvocation $candidate) use ($invocation) {
    return $candidate
      ->getBaseName() === $invocation
      ->getBaseName();
  }) === null;
}