function PharExtensionInterceptor::baseFileContainsPharExtension
Same name in this branch
- 7.x misc/typo3/drupal-security/PharExtensionInterceptor.php \Drupal\Core\Security\PharExtensionInterceptor::baseFileContainsPharExtension()
Same name in other branches
- 9 core/lib/Drupal/Core/Security/PharExtensionInterceptor.php \Drupal\Core\Security\PharExtensionInterceptor::baseFileContainsPharExtension()
- 8.9.x core/lib/Drupal/Core/Security/PharExtensionInterceptor.php \Drupal\Core\Security\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
Namespace
TYPO3\PharStreamWrapper\InterceptorCode
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.