I see. The function changed to "getModuleDependencies" from
"getDependencies". It seems reduntant the keywords "Module", but for anyone
trying to put dependencies, here is a sample code:
<?php
namespace Blog;
use Zend\Mvc\ModuleRouteListener;
use Zend\Mvc\MvcEvent;
/**
* The Blog module of the FZ Application
*/
class Module
{
public function onBootstrap(MvcEvent $e)
{
$e->getApplication()->getServiceManager()->get('translator');
$eventManager = $e->getApplication()->getEventManager();
$moduleRouteListener = new ModuleRouteListener();
$moduleRouteListener->attach($eventManager);
}
public function getConfig()
{
return include __DIR__ . '/config/module.config.php';
}
public function getAutoloaderConfig()
{
return array(
'Zend\Loader\StandardAutoloader' => array(
'namespaces' => array(
__NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
),
),
);
}
/**
* Get dependencies
*
* @return array
*/
public function getModuleDependencies() // @TODO: is it working?
{
return array(
'Application',
'ZfcUserDoctrineORM'
);
}
}
Thank you!
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/Zf2-still-supports-getDependencies-tp4659852p4659855.html
Sent from the Zend Framework mailing list archive at Nabble.com.
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]