You are here

private function PharInvocationResolver::findInBaseNames in Drupal 7

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;
}