function PharInvocationCollection::assertUniqueInvocation

Asserts that combination of base-name and alias is unique. This allows having multiple invocations for same base-name but having different alias names (for whatever reason).

Parameters

PharInvocation $invocation:

int $flags:

Return value

bool

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

File

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

Class

PharInvocationCollection

Namespace

TYPO3\PharStreamWrapper\Resolver

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.