Fully Qualified Name: | Laminas\Session\Service\ContainerAbstractServiceFactory |
Implements: | AbstractFactoryInterface |
Session container abstract service factory.
Allows creating Container instances, using the ManagerInterface if present. Containers are named in a "session_containers" array in the Config service:
return array(
'session_containers' => array(
'SessionContainer\sample',
'my_sample_session_container',
'MySessionContainer',
),
);
$container = $services->get('MySessionContainer');
Name | Description | Defined By |
---|---|---|
__invoke() | Create and return a named container (v3 usage). | ContainerAbstractServiceFactory |
canCreate() | Can we create an instance of the given service? (v3 usage). | ContainerAbstractServiceFactory |
canCreateServiceWithName() | Can we create an instance of the given service? (v2 usage) | ContainerAbstractServiceFactory |
createServiceWithName() | Create and return a named container (v2 usage). | ContainerAbstractServiceFactory |
Create and return a named container (v3 usage).
Parameter Name | Type | Description |
---|---|---|
$container | \ContainerInterface | |
$requestedName | string | |
$options |
Returns: \Container
Can we create an instance of the given service? (v3 usage).
Parameter Name | Type | Description |
---|---|---|
$container | \ContainerInterface | |
$requestedName | string |
Returns: bool
Can we create an instance of the given service? (v2 usage)
Parameter Name | Type | Description |
---|---|---|
$container | \ServiceLocatorInterface | |
$name | string | |
$requestedName | string |
Returns: bool
Create and return a named container (v2 usage).
Parameter Name | Type | Description |
---|---|---|
$container | \ContainerInterface | |
$requestedName | string | |
$name |
Returns: \Container