Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ...
- /** @var ZendExpressiveSessionLazySession $session */
- $session = $request->getAttribute(SessionMiddleware::SESSION_ATTRIBUTE);
- ...
- class AuthServiceFactory
- {
- public function __invoke(ContainerInterface $container): HttpAuthService
- {
- // get instance $userRepository
- // get instance $session
- return new HttpAuthService(
- $userRepository,
- $session
- );
- }
- }
- public function __invoke(ContainerInterface $container): HttpAuthService
- {
- dd($container->get(PsrHttpMessageServerRequestInterface::class));
- }
Add Comment
Please, Sign In to add comment