Eccube\Application::checkDatabaseConnection PHP Метод

checkDatabaseConnection() защищенный Метод

データベースの接続を確認 成功 : trueを返却 失敗 : \Doctrine\DBAL\DBALExceptionエラーが発生( 接続に失敗した場合 )、エラー画面を表示しdie() 備考 : app['debug']がtrueの際は処理を行わない
protected checkDatabaseConnection ( ) : boolean
Результат boolean true
    protected function checkDatabaseConnection()
    {
        if ($this['debug']) {
            return;
        }
        try {
            $this['db']->connect();
        } catch (\Doctrine\DBAL\DBALException $e) {
            $this['monolog']->error($e->getMessage());
            $this['twig.path'] = array(__DIR__ . '/Resource/template/exception');
            $html = $this['twig']->render('error.twig', array('error_title' => 'データーベース接続エラー', 'error_message' => 'データーベースを確認してください'));
            $response = new Response();
            $response->setContent($html);
            $response->setStatusCode('500');
            $response->headers->set('Content-Type', 'text/html');
            $response->send();
            die;
        }
        return true;
    }