$request->
getUri()->
getFragment() );
// Set an HSTS header
$response->
setHeader('Strict-Transport-Security', 'max-age=' .
$duration) ->
redirect($uri) ->
setStatusCode(307
) ->
setBody(''
) ->
getCookieStore() ->
clear();
throw new RedirectException($response);
}}if (!
function_exists('function_usable'
)) { /**
* Function usable
*
* Executes a function_exists() check, and if the Suhosin PHP
* extension is loaded - checks whether the function that is
* checked might be disabled in there as well.
*
* This is useful as function_exists() will return FALSE for
* functions disabled via the *disable_functions* php.ini
* setting, but not for *suhosin.executor.func.blacklist* and
* *suhosin.executor.disable_eval*. These settings will just
* terminate script execution if a disabled function is executed.
*
* The above described behavior turned out to be a bug in Suhosin,
* but even though a fix was committed for 0.9.34 on 2012-02-12,
* that version is yet to be released. This function will therefore
* be just temporary, but would probably be kept for a few years.
*
* @see http://www.hardened-php.net/suhosin/
*
* @param string $functionName Function to check for
*
* @return bool TRUE if the function exists and is safe to call,
* FALSE otherwise.
*
* @codeCoverageIgnore This is too exotic
*/