OpenXE/classes/Components/Http/Bootstrap.php
2021-05-21 08:49:41 +02:00

36 lines
620 B
PHP

<?php
namespace Xentral\Components\Http;
use Xentral\Components\Http\Session\SessionHandler;
final class Bootstrap
{
/**
* @return array
*/
public static function registerServices()
{
return [
'Request' => 'onInitRequest',
'Session' => 'onInitSession',
];
}
/**
* @return Request
*/
public static function onInitRequest()
{
return Request::createFromGlobals();
}
/**
* @return Session\Session
*/
public static function onInitSession()
{
return SessionHandler::createSession();
}
}