Zend Framework
3.0
|
Specialized invokable/abstract factory for use with RoutePluginManager. More...
Public Member Functions | |
canCreate (ContainerInterface $container, $routeName) | |
Can we create a route instance with the given name? (v3) | |
canCreateServiceWithName (ServiceLocatorInterface $container, $normalizedName, $routeName) | |
Can we create a route instance with the given name? (v2) | |
__invoke (ContainerInterface $container, $routeName, array $options=null) | |
Create and return a RouteInterface instance. | |
createServiceWithName (ServiceLocatorInterface $container, $normalizedName, $routeName) | |
Create a route instance with the given name. | |
createService (ServiceLocatorInterface $container, $normalizedName=null, $routeName=null) | |
Create and return RouteInterface instance. | |
setCreationOptions (array $creationOptions) | |
Set options to use when creating a service (v2) | |
Public Member Functions inherited from FactoryInterface | |
createService (ServiceLocatorInterface $serviceLocator) | |
Create service. | |
Protected Attributes | |
$creationOptions = [] | |
Specialized invokable/abstract factory for use with RoutePluginManager.
Can be mapped directly to specific route plugin names, or used as an abstract factory to map FQCN services to invokables.
__invoke | ( | ContainerInterface | $container, |
$routeName, | |||
array | $options = null |
||
) |
Create and return a RouteInterface instance.
If the specified $routeName class does not exist or does not implement RouteInterface, this method will raise an exception.
Otherwise, it uses the class' `factory()` method with the provided $options to produce an instance.
ContainerInterface | $container | |
string | $routeName | |
null | array | $options |
Implements FactoryInterface.
canCreate | ( | ContainerInterface | $container, |
$routeName | |||
) |
Can we create a route instance with the given name? (v3)
Only works for FQCN $routeName values, for classes that implement RouteInterface.
ContainerInterface | $container | |
string | $routeName |
Implements AbstractFactoryInterface.
canCreateServiceWithName | ( | ServiceLocatorInterface | $container, |
$normalizedName, | |||
$routeName | |||
) |
Can we create a route instance with the given name? (v2)
Proxies to canCreate().
ServiceLocatorInterface | $container | |
string | $normalizedName | |
string | $routeName |
Implements AbstractFactoryInterface.
createService | ( | ServiceLocatorInterface | $container, |
$normalizedName = null , |
|||
$routeName = null |
|||
) |
Create and return RouteInterface instance.
For use with zend-servicemanager v2; proxies to __invoke().
ServiceLocatorInterface | $container |
createServiceWithName | ( | ServiceLocatorInterface | $container, |
$normalizedName, | |||
$routeName | |||
) |
Create a route instance with the given name.
(v2)
Proxies to __invoke().
ServiceLocatorInterface | $container | |
string | $normalizedName | |
string | $routeName |
Implements AbstractFactoryInterface.
setCreationOptions | ( | array | $creationOptions | ) |
Set options to use when creating a service (v2)
array | $creationOptions |
|
protected |