function PharInvocationResolver::findByAlias

Finds confirmed(!) invocations by alias.

Parameters

string $path:

Return value

null|PharInvocation

See also

\TYPO3\PharStreamWrapper\PharStreamWrapper::collectInvocation()

1 call to PharInvocationResolver::findByAlias()
PharInvocationResolver::resolve in misc/typo3/phar-stream-wrapper/src/Resolver/PharInvocationResolver.php
Resolves PharInvocation value object (baseName and optional alias).

File

misc/typo3/phar-stream-wrapper/src/Resolver/PharInvocationResolver.php, line 236

Class

PharInvocationResolver

Namespace

TYPO3\PharStreamWrapper\Resolver

Code

private function findByAlias($path) {
    $possibleAlias = $this->resolvePossibleAlias($path);
    if ($possibleAlias === null) {
        return null;
    }
    return Manager::instance()->getCollection()
        ->findByCallback(function (PharInvocation $candidate) use ($possibleAlias) {
        return $candidate->isConfirmed() && $candidate->getAlias() === $possibleAlias;
    }, true);
}

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