Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Functions | Variables
health_check.php File Reference

Go to the source code of this file.

Functions

if($cacheConfigs) fatalErrorHandler ()
 

Variables

 try
 
 $objectManagerFactory = \Magento\Framework\App\Bootstrap::createObjectManagerFactory(BP, [])
 
 $objectManager = $objectManagerFactory->create([])
 
 $deploymentConfig = $objectManager->get(\Magento\Framework\App\DeploymentConfig::class)
 
 $logger = $objectManager->get(\Psr\Log\LoggerInterface::class)
 
catch(\Exception $e) foreach($deploymentConfig->get(ConfigOptionsListConstants::CONFIG_PATH_DB_CONNECTIONS) as $connectionData) $cacheConfigs = $deploymentConfig->get(ConfigOptionsListConstants::KEY_CACHE_FRONTEND)
 

Function Documentation

◆ fatalErrorHandler()

if ( $cacheConfigs) fatalErrorHandler ( )

Handle any fatal errors

Returns
void

Definition at line 70 of file health_check.php.

71 {
72  $error = error_get_last();
73  if ($error !== null) {
74  http_response_code(500);
75  }
76 }

Variable Documentation

◆ $cacheConfigs

catch (\Exception $e) foreach ( $deploymentConfig->get(ConfigOptionsListConstants::CONFIG_PATH_DB_CONNECTIONS) as $connectionData) $cacheConfigs = $deploymentConfig->get(ConfigOptionsListConstants::KEY_CACHE_FRONTEND)

Definition at line 43 of file health_check.php.

◆ $deploymentConfig

$deploymentConfig = $objectManager->get(\Magento\Framework\App\DeploymentConfig::class)

Definition at line 18 of file health_check.php.

◆ $logger

$logger = $objectManager->get(\Psr\Log\LoggerInterface::class)

Definition at line 20 of file health_check.php.

◆ $objectManager

$objectManager = $objectManagerFactory->create([])

Definition at line 16 of file health_check.php.

◆ $objectManagerFactory

Definition at line 14 of file health_check.php.

◆ try

try
Initial value:
{
require __DIR__ . '/../app/bootstrap.php'
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition: _bootstrap.php:60

Definition at line 11 of file health_check.php.