public function check(ResultCollection $results)
{
$result = $results->createResult();
$bytecopdeCacheExtensions = $this->_commandConfig['php']['bytecode-cache-extensions'];
$bytecodeCacheExtensionLoaded = false;
$bytecodeCacheExtension = null;
foreach ($bytecopdeCacheExtensions as $ext) {
if (extension_loaded($ext)) {
$bytecodeCacheExtension = $ext;
$bytecodeCacheExtensionLoaded = true;
break;
}
}
$result->setStatus($bytecodeCacheExtensionLoaded ? Result::STATUS_OK : Result::STATUS_WARNING);
if ($result->isValid()) {
$result->setMessage("<info>Bytecode Cache <comment>{$bytecodeCacheExtension}</comment> found.</info>");
} else {
$result->setMessage("<error>No Bytecode-Cache found!</error> <comment>It's recommended to install anyone of " . implode(', ', $bytecopdeCacheExtensions) . ".</comment>");
}
}