I have the following in my application module config:
'controllers' => [
'factories' => [
Application\Controller\IndexController::class => Application\Controller\IndexControllerFactory::class
],
],
this works fine. now im my serve module i have pretty much the same:
'controllers' => array(
/**
'invokables' => array(
'Serve\Controller\Index' => 'Serve\Controller\IndexController',
),
*/
'factories' => array(
Controller\IndexController::class => Serve\Controller\IndexControllerFactory::class
)
),
when i load the homepage i access through an api the serve controller. when doing so i get this problem on the homepage:
Serve\Controller\Index (resolves to invalid controller class or alias: Serve\Controller\Index)
like i said im accessing the serve controller through an api so it might be a setup issue when requesting through the system as an api.
Whats interesting is when i do this it works:
'controllers'=>array(
'invokables' => array(
'Serve\Controller\Index' => 'Serve\Controller\IndexController',
)),
not sure whats wrong here
UPDATE:
This seems to work:
'factories' => array(
'Serve\Controller\Index' => IndexControllerFactory::class
)
however id like to use ::class syntax