在 ZF3 中,我使用以下表示法从控制器调用表单工厂:
$form = $this->formManager->get(myForm::class);
不是
$form = new myForm();
在工厂中,我使用的是 ZF3 推荐的方法:
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
{
//...
}
我假设该$options
数组旨在将参数传递给函数。如何$options
在控制器中填充数组?