<?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;
    }
}
