TYPO3 v15 dev-main snapshot ()

This commit is contained in:
2026-08-10 22:31:09 +02:00
commit af8cc155b5
6818 changed files with 642608 additions and 0 deletions
@@ -0,0 +1,21 @@
<?php
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CMS\Core\Error\Http;
/**
* HTTP Client Error Exception (Error 4xx)
*/
abstract class AbstractClientErrorException extends StatusException {}
@@ -0,0 +1,21 @@
<?php
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CMS\Core\Error\Http;
/**
* HTTP Server Error Exception (Error 5xx)
*/
abstract class AbstractServerErrorException extends StatusException {}
@@ -0,0 +1,53 @@
<?php
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CMS\Core\Error\Http;
use TYPO3\CMS\Core\Utility\HttpUtility;
/**
* Exception for Error 400 - Bad Request
*/
class BadRequestException extends AbstractClientErrorException
{
/**
* @var array HTTP Status Header lines
*/
protected $statusHeaders = [HttpUtility::HTTP_STATUS_400];
/**
* @var string Title of the message
*/
protected $title = 'Bad Request (400)';
/**
* @var string Error Message
*/
protected $message = 'The request cannot be fulfilled due to bad syntax.';
/**
* Constructor for this Status Exception
*
* @param string $message Error Message
* @param int $code Exception Code
*/
public function __construct($message = null, $code = 0)
{
if (!empty($message)) {
$this->message = $message;
}
parent::__construct($this->statusHeaders, $this->message, $this->title, $code);
}
}
+53
View File
@@ -0,0 +1,53 @@
<?php
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CMS\Core\Error\Http;
use TYPO3\CMS\Core\Utility\HttpUtility;
/**
* Exception for Error 403 - Forbidden
*/
class ForbiddenException extends AbstractClientErrorException
{
/**
* @var array HTTP Status Header lines
*/
protected $statusHeaders = [HttpUtility::HTTP_STATUS_403];
/**
* @var string Title of the message
*/
protected $title = 'Forbidden (403)';
/**
* @var string Error Message
*/
protected $message = 'You are not allowed to access this page.';
/**
* Constructor for this Status Exception
*
* @param string $message Error Message
* @param int $code Exception Code
*/
public function __construct($message = null, $code = 0)
{
if (!empty($message)) {
$this->message = $message;
}
parent::__construct($this->statusHeaders, $this->message, $this->title, $code);
}
}
@@ -0,0 +1,53 @@
<?php
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CMS\Core\Error\Http;
use TYPO3\CMS\Core\Utility\HttpUtility;
/**
* Exception for Error 500 - Internal Server Error
*/
class InternalServerErrorException extends AbstractServerErrorException
{
/**
* @var array HTTP Status Header lines
*/
protected $statusHeaders = [HttpUtility::HTTP_STATUS_500];
/**
* @var string Title of the message
*/
protected $title = 'Internal Server Error (500)';
/**
* @var string Error Message
*/
protected $message = 'This page is currently not available due to server errors.';
/**
* Constructor for this Status Exception
*
* @param string $message Error Message
* @param int $code Exception Code
*/
public function __construct($message = null, $code = 0)
{
if (!empty($message)) {
$this->message = $message;
}
parent::__construct($this->statusHeaders, $this->message, $this->title, $code);
}
}
@@ -0,0 +1,23 @@
<?php
declare(strict_types=1);
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CMS\Core\Error\Http;
/**
* Excepts if typolink could not be resolved for link pages.
*/
class LinkedPageNotResolvableException extends PageNotFoundException {}
@@ -0,0 +1,53 @@
<?php
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CMS\Core\Error\Http;
use TYPO3\CMS\Core\Utility\HttpUtility;
/**
* Exception for Error 404 - Page Not Found
*/
class PageNotFoundException extends AbstractClientErrorException
{
/**
* @var array HTTP Status Header lines
*/
protected $statusHeaders = [HttpUtility::HTTP_STATUS_404];
/**
* @var string Title of the message
*/
protected $title = 'Page Not Found (404)';
/**
* @var string Error Message
*/
protected $message = 'The page you tried to access was not found.';
/**
* Constructor for this Status Exception
*
* @param string $message Error Message
* @param int $code Exception Code
*/
public function __construct($message = null, $code = 0)
{
if (!empty($message)) {
$this->message = $message;
}
parent::__construct($this->statusHeaders, $this->message, $this->title, $code);
}
}
@@ -0,0 +1,53 @@
<?php
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CMS\Core\Error\Http;
use TYPO3\CMS\Core\Utility\HttpUtility;
/**
* Exception for Error 503 - Service Unavailable
*/
class ServiceUnavailableException extends AbstractServerErrorException
{
/**
* @var array HTTP Status Header lines
*/
protected $statusHeaders = [HttpUtility::HTTP_STATUS_503];
/**
* @var string Title of the message
*/
protected $title = 'Service Unavailable (503)';
/**
* @var string Error Message
*/
protected $message = 'This page is currently not available.';
/**
* Constructor for this Status Exception
*
* @param string $message Error Message
* @param int $code Exception Code
*/
public function __construct($message = null, $code = 0)
{
if (!empty($message)) {
$this->message = $message;
}
parent::__construct($this->statusHeaders, $this->message, $this->title, $code);
}
}
@@ -0,0 +1,23 @@
<?php
declare(strict_types=1);
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CMS\Core\Error\Http;
/**
* Exception when a shortcut target page could not be resolved
*/
class ShortcutTargetPageNotFoundException extends PageNotFoundException {}
+85
View File
@@ -0,0 +1,85 @@
<?php
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CMS\Core\Error\Http;
use TYPO3\CMS\Core\Error\Exception;
/**
* HTTP Status Exception
*
* @todo: Rename to AbstractStatusException and declare abstract
*/
class StatusException extends Exception
{
/**
* @var array HTTP Status Header lines
*/
protected $statusHeaders;
/**
* @var string Title of the message
*/
protected $title = 'Oops, an error occurred!';
/**
* Constructor for this Status Exception
*
* @param string|array $statusHeaders HTTP Status header line(s)
* @param string $title Title of the error message
* @param string $message Error Message
* @param int $code Exception Code
*/
public function __construct($statusHeaders, $message, $title = '', $code = 0)
{
if (is_array($statusHeaders)) {
$this->statusHeaders = $statusHeaders;
} else {
$this->statusHeaders = [$statusHeaders];
}
$this->title = $title ?: $this->title;
parent::__construct($message, $code);
}
/**
* Setter for the title.
*
* @param string $title
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* Getter for the title.
*
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* Getter for the Status Header.
*
* @return array
*/
public function getStatusHeaders()
{
return $this->statusHeaders;
}
}
@@ -0,0 +1,53 @@
<?php
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CMS\Core\Error\Http;
use TYPO3\CMS\Core\Utility\HttpUtility;
/**
* Exception for Error 401 - Unauthorized
*/
class UnauthorizedException extends AbstractClientErrorException
{
/**
* @var array HTTP Status Header lines
*/
protected $statusHeaders = [HttpUtility::HTTP_STATUS_401];
/**
* @var string Title of the message
*/
protected $title = 'Unauthorized (401)';
/**
* @var string Error Message
*/
protected $message = 'Accessing this page requires authorization.';
/**
* Constructor for this Status Exception
*
* @param string $message Error Message
* @param int $code Exception Code
*/
public function __construct($message = null, $code = 0)
{
if (!empty($message)) {
$this->message = $message;
}
parent::__construct($this->statusHeaders, $this->message, $this->title, $code);
}
}