电缆 / 电缆-cookies
MIT
1.0.0
2017-06-05 09:26 UTC
Requires
- cable/cable-container: ^1.2
- cable/cable-facades: ^1.0
- symfony/http-foundation: ^3.3
This package is not auto-updated.
Last update: 2024-09-15 04:31:20 UTC
README
Cable 框架的 Cookie 库
$container = \Cable\Container\Factory::create(); $container->add('request', \Symfony\Component\HttpFoundation\Request::createFromGlobals()); $container->addProvider(\Cable\Cookie\CookieServiceProvider::class); $container->singleton('response', \Symfony\Component\HttpFoundation\Response::create()); $cookie = $container['cookie']; var_dump($cookie);
会话
$container = \Cable\Container\Factory::create(); $container->addProvider(\Cable\Session\SessionServiceProvider::class); $container->singleton('response', \Symfony\Component\HttpFoundation\Response::create()); $session = $container['session']; $flash = $container['flashbag'];