function PharExtensionInterceptor::assert

Determines whether the base file name has a ".phar" suffix.

Parameters

string $path:

string $command:

Return value

bool

Throws

Exception

Overrides Assertable::assert

File

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

Class

PharExtensionInterceptor

Namespace

TYPO3\PharStreamWrapper\Interceptor

Code

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.