mirror of
https://github.com/danog/docker-php-extension-installer.git
synced 2024-12-12 09:29:56 +01:00
17 lines
540 B
PHP
Executable File
17 lines
540 B
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
|
|
require_once __DIR__ . '/_bootstrap.php';
|
|
|
|
$requiredHandlers = array_map('strtolower', [
|
|
'db4',
|
|
]);
|
|
$supportedHandlers = array_map('strtolower', dba_handlers(false));
|
|
$missingHandlers = array_diff($requiredHandlers, $supportedHandlers);
|
|
if ($missingHandlers !== []) {
|
|
sort($missingHandlers);
|
|
fwrite(STDERR, "DBA does NOT support these handlers:\n- " . implode("\n- ", $missingHandlers) . "\n");
|
|
exit(1);
|
|
}
|
|
echo "DBA supports at least these handlers:\n- ", implode("\n- ", $requiredHandlers), "\n";
|