mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-12-27 07:00:29 +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();
|
||
|
}
|
||
|
}
|