| Fully Qualified Name: | Laminas\Router\RouteInvokableFactory |
| Implements: | AbstractFactoryInterface, FactoryInterface |
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.
| Name | Description | Defined By |
|---|---|---|
| __invoke() | Create and return a RouteInterface instance. | RouteInvokableFactory |
| canCreate() | Can we create a route instance with the given name? (v3) | RouteInvokableFactory |
| canCreateServiceWithName() | Can we create a route instance with the given name? (v2) | RouteInvokableFactory |
| createService() | Create and return RouteInterface instance | RouteInvokableFactory |
| createServiceWithName() | Create a route instance with the given name. (v2) | RouteInvokableFactory |
| setCreationOptions() | Set options to use when creating a service (v2) | RouteInvokableFactory |
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.
| Parameter Name | Type | Description |
|---|---|---|
| $container | \ContainerInterface | |
| $routeName | string | |
| $options | null|array |
Returns: \RouteInterface
Can we create a route instance with the given name? (v3)
Only works for FQCN $routeName values, for classes that implement RouteInterface.
| Parameter Name | Type | Description |
|---|---|---|
| $container | \ContainerInterface | |
| $routeName | string |
Returns: bool
Can we create a route instance with the given name? (v2)
Proxies to canCreate().
| Parameter Name | Type | Description |
|---|---|---|
| $container | \ServiceLocatorInterface | |
| $normalizedName | string | |
| $routeName | string |
Returns: bool
Create and return RouteInterface instance
For use with laminas-servicemanager v2; proxies to __invoke().
| Parameter Name | Type | Description |
|---|---|---|
| $container | \ServiceLocatorInterface | |
| $normalizedName | ||
| $routeName |
Returns: \RouteInterface
Create a route instance with the given name. (v2)
Proxies to __invoke().
| Parameter Name | Type | Description |
|---|---|---|
| $container | \ServiceLocatorInterface | |
| $normalizedName | string | |
| $routeName | string |
Returns: \RouteInterface
Set options to use when creating a service (v2)
| Parameter Name | Type | Description |
|---|---|---|
| $creationOptions | array |
Returns: