You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// define some services$container['session_storage'] = staticfunction (Container$container): SessionStorage {
returnnewSessionStorage('SESSION_ID');
};
$container['session'] = staticfunction (Container$container): Session {
returnnewSession($container['session_storage']);
};
// get the session object$session = $container['session'];
// the above call is roughly equivalent to the following code:// $storage = new SessionStorage('SESSION_ID');// $session = new Session($storage);
Chubbyphp
// define some services$container->factory('session_storage', staticfunction (): SessionStorage {
returnnewSessionStorage('SESSION_ID');
});
$container->factory('session', staticfunction (ContainerInterface$container): Session {
returnnewSession($container->get('session_storage'));
});
// get the session object$session = $container->get('session');
// the above call is roughly equivalent to the following code:// $storage = new SessionStorage('SESSION_ID');// $session = new Session($storage);