mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-12-30 16:40:28 +01:00
36 lines
620 B
PHP
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();
|
|
}
|
|
}
|