function PharExtensionInterceptor::assert
Same name in this branch
- 7.x misc/typo3/drupal-security/PharExtensionInterceptor.php \Drupal\Core\Security\PharExtensionInterceptor::assert()
Same name in other branches
- 9 core/lib/Drupal/Core/Security/PharExtensionInterceptor.php \Drupal\Core\Security\PharExtensionInterceptor::assert()
- 8.9.x core/lib/Drupal/Core/Security/PharExtensionInterceptor.php \Drupal\Core\Security\PharExtensionInterceptor::assert()
Determines whether the base file name has a ".phar" suffix.
Parameters
string $path:
string $command:
Return value
bool
Throws
Overrides Assertable::assert
File
-
misc/
typo3/ phar-stream-wrapper/ src/ Interceptor/ PharExtensionInterceptor.php, line 28
Class
Namespace
TYPO3\PharStreamWrapper\InterceptorCode
public function assert($path, $command) {
if ($this->baseFileContainsPharExtension($path)) {
return true;
}
throw new Exception(sprintf('Unexpected file extension in "%s"', $path), 1535198703);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.