function PharInvocationResolver::findInBaseNames

Parameters

string $path:

Return value

null|string

1 call to PharInvocationResolver::findInBaseNames()
PharInvocationResolver::resolveBaseName in misc/typo3/phar-stream-wrapper/src/Resolver/PharInvocationResolver.php

File

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

Class

PharInvocationResolver

Namespace

TYPO3\PharStreamWrapper\Resolver

Code

private function findInBaseNames($path) {
    // return directly if the resolved base name was submitted
    if (in_array($path, $this->baseNames, true)) {
        return $path;
    }
    $parts = explode('/', Helper::normalizePath($path));
    while (count($parts)) {
        $currentPath = implode('/', $parts);
        if (isset($this->baseNames[$currentPath])) {
            return $currentPath;
        }
        array_pop($parts);
    }
    return null;
}

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