function PharExtensionInterceptor::baseFileContainsPharExtension

Parameters

string $path:

Return value

bool

1 call to PharExtensionInterceptor::baseFileContainsPharExtension()
PharExtensionInterceptor::assert in misc/typo3/phar-stream-wrapper/src/Interceptor/PharExtensionInterceptor.php
Determines whether the base file name has a ".phar" suffix.

File

misc/typo3/phar-stream-wrapper/src/Interceptor/PharExtensionInterceptor.php, line 46

Class

PharExtensionInterceptor

Namespace

TYPO3\PharStreamWrapper\Interceptor

Code

private function baseFileContainsPharExtension($path) {
  $invocation = Manager::instance()->resolve($path);
  if ($invocation === null) {
    return false;
  }
  $fileExtension = pathinfo($invocation->getBaseName(), PATHINFO_EXTENSION);
  return strtolower($fileExtension) === 'phar';
}

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