Exemple #1
0
 /**
  * Handler for bootstrap errors
  *
  * @param Bootstrap $bootstrap
  * @return bool
  */
 private function handleBootstrapErrors(Bootstrap $bootstrap)
 {
     $bootstrapCode = $bootstrap->getErrorCode();
     if (Bootstrap::ERR_MAINTENANCE == $bootstrapCode) {
         require $this->_filesystem->getPath(Filesystem::PUB_DIR) . '/errors/503.php';
         return true;
     }
     if (Bootstrap::ERR_IS_INSTALLED == $bootstrapCode) {
         $path = $this->getInstallerRedirectPath($bootstrap->getParams());
         $this->_response->setRedirect($path);
         $this->_response->sendHeaders();
         return true;
     }
     return false;
 }
Exemple #2
0
 /**
  * Handler for bootstrap errors
  *
  * @param Bootstrap $bootstrap
  * @param \Exception &$exception
  * @return bool
  */
 private function handleBootstrapErrors(Bootstrap $bootstrap, \Exception &$exception)
 {
     $bootstrapCode = $bootstrap->getErrorCode();
     if (Bootstrap::ERR_MAINTENANCE == $bootstrapCode) {
         require $this->_filesystem->getDirectoryRead(DirectoryList::PUB)->getAbsolutePath('errors/503.php');
         return true;
     }
     if (Bootstrap::ERR_IS_INSTALLED == $bootstrapCode) {
         try {
             $this->redirectToSetup($bootstrap, $exception);
             return true;
         } catch (\Exception $e) {
             $exception = $e;
         }
     }
     return false;
 }