-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the configuration index name #2
Comments
We have ticket #71 to fix the whole documentation for Session Manager (I think we should at least mention default factory we have in the package). Also I'd like to point zendframework/zend-session#61 where we made a change. /cc @froschdesign Originally posted by @michalbundyra at zendframework/zend-session#124 (comment) |
We must document the factory because this is the way the user should go. These manual configuration must be removed from all packages. Originally posted by @froschdesign at zendframework/zend-session#124 (comment) |
'service_manager' => [
'factories' => [
SaveHandlerInterface::class => SaveHandlerDbFactory::class,
SaveHandlerDbFactory::class => InvokableFactory::class,
]
] namespace App\Session\SaveHandler;
use Interop\Container\ContainerInterface;
use Laminas\Db\Adapter\Adapter;
use Laminas\Db\TableGateway\TableGateway;
use Laminas\ServiceManager\Factory\FactoryInterface;
use Laminas\Session\SaveHandler\DbTableGateway;
use Laminas\Session\SaveHandler\DbTableGatewayOptions;
class SaveHandlerDbFactory implements FactoryInterface
{
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
{
return new DbTableGateway(
new TableGateway( 'session', $container->get(Adapter::class)),
new DbTableGatewayOptions()
);
}
} This best way inject? |
Looks like the example code in
bootstrapSession()
expects to read a keysession
and notsession_manager
from the configuration.Provide a narrative description of what you are trying to accomplish:
Originally posted by @ekarakashi at zendframework/zend-session#124
The text was updated successfully, but these errors were encountered: