You are here

public function FilesystemValidator::validateOpensslExtensionExist in Simple OAuth (OAuth2) & OpenID Connect 5.x

Same name and namespace in other branches
  1. 8.4 src/Service/Filesystem/FilesystemValidator.php \Drupal\simple_oauth\Service\Filesystem\FilesystemValidator::validateOpensslExtensionExist()
  2. 8.3 src/Service/Filesystem/FilesystemValidator.php \Drupal\simple_oauth\Service\Filesystem\FilesystemValidator::validateOpensslExtensionExist()

Validate {

Parameters

string $ext_name: extension name.

Throws

\Drupal\simple_oauth\Service\Exception\ExtensionNotLoadedException

File

src/Service/Filesystem/FilesystemValidator.php, line 35

Class

FilesystemValidator
@internal

Namespace

Drupal\simple_oauth\Service\Filesystem

Code

public function validateOpensslExtensionExist($ext_name) {
  if (!$this->fileSystemChecker
    ->isExtensionEnabled($ext_name)) {
    throw new ExtensionNotLoadedException(strtr('Extension "@ext" is not enabled.', [
      '@ext' => $ext_name,
    ]));
  }
}