Turns out its the same one liner as in a module config but now in the config/autoload/global.config.php (at least with out errors).
Which makes me wonder about the documentation about the 'Application' instances here: https://zf2.readthedocs.org/en/latest/modules/zend.mvc.services.html?highlight=global.config.php#application-configuration-options . On Mon, Nov 12, 2012 at 3:46 PM, Greg <[email protected]> wrote: > > config/application.config.php > > > return array( > 'service_manager' => array( > //'use_defaults' => true, > 'factories' => array( > //'Application' => 'Zend\Mvc\Service\ApplicationFactory', > 'Application' => 'Application\Mvc\Service\ApplicationFactory', > ), > ), > ); > > > What config options are required to specify which Mvc\ApplicationFactory > to use? > > It looks like the ServiceManagerConfig::configureServiceManager method > will always end up trying to initialize the 'Application' factory config. > Whereas I think it should check to see if one has already been specified > instead of resorting to forcing the defaultServiceConfigurations? > > I also could not see how to specify the allow_override flag, and wonder > why it is not part of the ServiceManagerConfig? I realize that even if I > was able to specify this value, it would not be what I want anyway. Since > in the above example, I would not want the > defaultServiceConfiguration['factories']['Application'] value to override > the existing configuration. > > > A while ago, I did end up going down another route, and made some progress > via the service_listener_options, however once it was set up for the > Application factory config, things went south, because the code or > configuration pertaining to 'Config' => Zend\Mvc\Service\ConfigFactory, > which may of been just because it was the next entry in the > defaultServicesConfig? > > I don't have the config options for what I tried awhile back anymore, but > it was to do with: > > $serviceListener->addServiceManager( > $newServiceManager['service_manager'], > $newServiceManager['config_key'], > $newServiceManager['interface'], > $newServiceManager['method'] > ); > > > So how in the global config/application.config.php file is it possible to > override the 'Application' service? > > Would it be feasible to see the global config/application.config.php file > specify all the default services that the ServiceListenerFactory setups, > and allow users to easily swap them out via the global config file, even as > example test case? > > > -- > Greg > -- Greg
