Я понимаю, что в файле module.config.php есть ключ "фабрики", конец которого может быть следующим:
`'controllers' => [
'factories' => [
IndexController::class => IndexControllerFactory::class
],
], `
Так как и когда создаетсяIndexControllerFactory? Также относительно следующего фрагмента, как и когда вызывается метод __invoke:
class IndexControllerFactory extends MultibyteControllerFactory implements FactoryInterface
{
public function __invoke(ContainerInterface $container,
$requestedName, array $options = null)
{
$entityManager = $container->get('doctrine.entitymanager.orm_default');
return new IndexController($entityManager);
}
}