[FEATURE] Group HttpExceptions by Error type
[Packages/TYPO3.CMS.git] / t3lib / error / http / class.t3lib_error_http_serviceunavailableexception.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 2011 Steffen Gebert <steffen.gebert@typo3.org>
6 * All rights reserved
7 *
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 *
17 * This script is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * This copyright notice MUST APPEAR in all copies of the script!
23 ***************************************************************/
24
25 /**
26 * Exception for Error 503 - Service Unavailable
27 *
28 * @author Steffen Gebert <steffen.gebert@typo3.org>
29 * @package TYPO3
30 * @subpackage error
31 */
32 class t3lib_error_http_ServiceUnavailableException extends t3lib_error_http_AbstractServerErrorException {
33
34 /**
35 * @var array HTTP Status Header lines
36 */
37 protected $statusHeaders = array(t3lib_utility_Http::HTTP_STATUS_503);
38
39 /**
40 * @var string Title of the message
41 */
42 protected $title = 'Service Unvailable (503)';
43
44 /**
45 * @var string Error Message
46 */
47 protected $message = 'This page is currently not available.';
48
49 /**
50 * Constructor for this Status Exception
51 *
52 * @param string $message Error Message
53 * @param int $code Exception Code
54 */
55 public function __construct($message = NULL, $code = 0) {
56 if (!empty($message)) {
57 $this->message = $message;
58 }
59
60 parent::__construct($this->statusHeaders, $this->message, $this->title, $code);
61 }
62 }
63
64 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/error/t3lib_error_http_serviceunavailableexception.php'])) {
65 include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/error/t3lib_error_http_serviceunavailableexception.php']);
66 }
67
68 ?>