function PharInvocationCollection::collect

Parameters

PharInvocation $invocation:

null|int $flags:

Return value

bool

Overrides Collectable::collect

File

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

Class

PharInvocationCollection

Namespace

TYPO3\PharStreamWrapper\Resolver

Code

public function collect(PharInvocation $invocation, $flags = null) {
    if ($flags === null) {
        $flags = static::UNIQUE_INVOCATION | static::DUPLICATE_ALIAS_WARNING;
    }
    if ($invocation->getBaseName() === '' || $invocation->getAlias() === '' || !$this->assertUniqueBaseName($invocation, $flags) || !$this->assertUniqueInvocation($invocation, $flags)) {
        return false;
    }
    if ($flags & static::DUPLICATE_ALIAS_WARNING) {
        $this->triggerDuplicateAliasWarning($invocation);
    }
    $this->invocations[] = $invocation;
    return true;
}

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