1
0
This repository has been archived on 2017-06-06. You can view files and clone it, but cannot push or open issues or pull requests.
Files
informaticaD4P-2017/src/Application/Helper/Redirect.php

27 lines
541 B
PHP

<?php
/**
* Informatica Eindproject D4p
* 6in3, Stedelijk Gymnasium Nijmegen
* Docent: Hans de Wolf
*
* ==================
*
* Daniel Boutros,
* Christiaan Goossens,
* Jelmer Hinssen
*/
namespace Inforbank\Application\Helper;
class Redirect
{
public static function create($request, $response, $path)
{
$basePath = $request->getUri()->getBaseUrl();
$response = $response->withStatus(302);
$response = $response->withHeader('Location', $basePath . $path);
return $response;
}
}