Initial commit
This commit is contained in:
commit
08a8a71c55
631 changed files with 139902 additions and 0 deletions
28
public/kirby/src/Cms/Response.php
Normal file
28
public/kirby/src/Cms/Response.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace Kirby\Cms;
|
||||
|
||||
/**
|
||||
* Custom response object with an optimized
|
||||
* redirect method to build correct Urls
|
||||
*
|
||||
* @package Kirby Cms
|
||||
* @author Bastian Allgeier <bastian@getkirby.com>
|
||||
* @link https://getkirby.com
|
||||
* @copyright Bastian Allgeier
|
||||
* @license https://getkirby.com/license
|
||||
*/
|
||||
class Response extends \Kirby\Http\Response
|
||||
{
|
||||
/**
|
||||
* Adjusted redirect creation which
|
||||
* parses locations with the Url::to method
|
||||
* first.
|
||||
*/
|
||||
public static function redirect(
|
||||
string $location = '/',
|
||||
int $code = 302
|
||||
): static {
|
||||
return parent::redirect(Url::to($location), $code);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue