Initial xentral_oss_20.3.c9ffacf
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user