-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
LazyControllerAbstractFactory doesn't look in FormManager #17
Comments
The form element manager is registered with the class name Exampleclass ExampleController extends Laminas\Mvc\Controller\AbstractActionController
{
public function __construct(
FilterPluginManager $filterPluginManager,
FormElementManager $formElementManager,
HydratorPluginManager $hydratorPluginManager,
InputFilterPluginManager $inputFilterPluginManager,
ValidatorPluginManager $validatorPluginManager
) {
$this->filterPluginManager = $filterPluginManager;
$this->formElementManager = $formElementManager;
$this->hydratorPluginManager = $hydratorPluginManager;
$this->inputFilterPluginManager = $inputFilterPluginManager;
$this->validatorPluginManager = $validatorPluginManager;
}
} 'controllers' => [
'factories' => [
ExampleController::class => Laminas\Mvc\Controller\LazyControllerAbstractFactory::class,
],
], Reflection Factory of laminas-servicemanagerIf the following features are not needed in a controller constructor:
…then the laminas-servicemanager's reflection factory can be used: 'controllers' => [
'factories' => [
ExampleController::class => Laminas\ServiceManager\AbstractFactory\ReflectionBasedAbstractFactory::class,
],
], ConclusionAll aliases can be removed from the lazy controller factory: laminas-mvc/src/Controller/LazyControllerAbstractFactory.php Lines 86 to 97 in 150e0b4
|
The extremely convenient LazyControllerAbstractFactory only checks ServiceManager when making objects for the controller's constructor.
This means that I have to move any forms without a factory from the 'form_elements' config array to 'service_manager'... and odd delineation.
Originally posted by @bitwombat at zendframework/zend-mvc#255
The text was updated successfully, but these errors were encountered: