Fully Qualified Name: | Laminas\Form\ElementFactory |
Implements: | FactoryInterface |
Factory for instantiating form elements
Name | Description | Defined By |
---|---|---|
__construct() | ElementFactory | |
__invoke() | Create an instance of the requested class name. | ElementFactory |
createService() | Create an instance of the named service. | ElementFactory |
setCreationOptions() | {@inheritdoc} | ElementFactory |
Parameter Name | Type | Description |
---|---|---|
$creationOptions | null|array|\Traversable |
Returns:
Create an instance of the requested class name.
Parameter Name | Type | Description |
---|---|---|
$container | \ContainerInterface | |
$requestedName | string | |
$options | null|array |
Returns: object
Create an instance of the named service.
First, it checks if $canonicalName
resolves to a class, and, if so, uses
that value to proxy to __invoke()
.
Next, if $requestedName
is non-empty and resolves to a class, this
method uses that value to proxy to __invoke()
.
Finally, if the above each fail, it raises an exception.
The approach above is performed as version 2 has two distinct behaviors under which factories are invoked:
Parameter Name | Type | Description |
---|---|---|
$serviceLocator | \ServiceLocatorInterface | |
$canonicalName | null|string | |
$requestedName | null|string |
Returns: object
{@inheritdoc}
Parameter Name | Type | Description |
---|---|---|
$creationOptions |
Returns: