本文整理汇总了PHP中Zend\ModuleManager\ModuleManagerInterface::loadModule方法的典型用法代码示例。如果您正苦于以下问题:PHP ModuleManagerInterface::loadModule方法的具体用法?PHP ModuleManagerInterface::loadModule怎么用?PHP ModuleManagerInterface::loadModule使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend\ModuleManager\ModuleManagerInterface
的用法示例。
在下文中一共展示了ModuleManagerInterface::loadModule方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
/**
* @param ModuleManagerInterface $moduleManager
*/
public function init(ModuleManagerInterface $moduleManager)
{
$moduleManager->loadModule('DoctrineModule');
$moduleManager->loadModule('DoctrineORMModule');
$moduleManager->loadModule('CmsDoctrine');
$em = $moduleManager->getEventManager();
$em->attach(ModuleEvent::EVENT_LOAD_MODULES_POST, [$this, 'onPostLoadModules']);
}
示例2: init
/**
* {@inheritDoc}
*/
public function init(ModuleManagerInterface $moduleManager)
{
if (class_exists('ZendDeveloperTools\\Module')) {
$moduleManager->loadModule('ZendDeveloperTools');
}
$moduleManager->loadModule('OcraCachedViewResolver');
$moduleManager->loadModule('StrokerCache');
$moduleManager->loadModule('CmsJquery');
$sm = $moduleManager->getEvent()->getParam('ServiceManager');
$serviceListener = $sm->get('ServiceListener');
$serviceListener->addServiceManager('MapperManager', 'mappers', MapperPluginProviderInterface::class, 'getMapperConfig');
$serviceListener->addServiceManager('DomainServiceManager', 'domain_services', DomainServicePluginProviderInterface::class, 'getDomainServiceConfig');
$serviceListener->addServiceManager('SessionContainerManager', 'session_containers', ContainerPluginProviderInterface::class, 'getSessionContainerConfig');
}
示例3: init
/**
* @param ModuleManagerInterface $moduleManager
*/
public function init(ModuleManagerInterface $moduleManager)
{
$moduleManager->loadModule('AssetManager');
$sm = $moduleManager->getEvent()->getParam('ServiceManager');
$serviceListener = $sm->get('ServiceListener');
$serviceListener->addServiceManager('JQueryPluginManager', 'jquery_plugins', JQueryPluginProviderInterface::class, 'getJQueryPluginConfig');
}
示例4: init
/**
* Ensure the UI module is loaded
*
* @param ModuleManagerInterface $modules
*/
public function init(ModuleManagerInterface $modules)
{
$loaded = $modules->getLoadedModules();
if (isset($loaded['ZF\\Apigility\\Admin\\Ui'])) {
return;
}
$modules->loadModule('ZF\\Apigility\\Admin\\Ui');
}
示例5: init
/**
* Initialize module.
*
* If the admin UI module is not loaded yet, load it.
*
* Disable the opcache as well.
*
* @param ModuleManagerInterface $modules
*/
public function init(ModuleManagerInterface $modules)
{
$loaded = $modules->getLoadedModules(false);
if (!isset($loaded['ZF\\Apigility\\Admin\\Ui'])) {
$modules->loadModule('ZF\\Apigility\\Admin\\Ui');
}
$this->disableOpCache();
}
示例6: init
/**
* @param ModuleManagerInterface $moduleManager
*/
public function init(ModuleManagerInterface $moduleManager)
{
$moduleManager->loadModule('CmsCommon');
$moduleManager->loadModule('DoctrineModule');
spl_autoload_register(function ($class) {
if (strpos($class, 'Doctrine\\ORM\\Mapping') === 0 || strpos($class, 'Doctrine\\ODM\\Mapping') === 0) {
$namespaces = ['Doctrine\\ORM\\Mapping', 'Doctrine\\ODM\\Mapping'];
$alias = str_replace($namespaces, 'CmsDoctrine\\Mapping\\Annotation', $class);
if (class_exists($alias)) {
return class_alias($alias, $class);
}
$alias = str_replace($namespaces, 'Gedmo\\Mapping\\Annotation', $class);
if (class_exists($alias)) {
return class_alias($alias, $class);
}
}
});
}
示例7: init
/**
* @internal
*/
public function init(\Zend\ModuleManager\ModuleManagerInterface $manager)
{
$manager->loadModule('Database');
$manager->loadModule('Library');
$manager->loadModule('Protocol');
}
示例8: init
/**
* {@inheritDoc}
*/
public function init(ModuleManagerInterface $moduleManager)
{
$moduleManager->loadModule('CmsMoney');
}
示例9: init
/**
* @param ModuleManagerInterface $moduleManager
*/
public function init(ModuleManagerInterface $moduleManager)
{
$moduleManager->loadModule('CmsMap');
$moduleManager->loadModule('CmsImageMap');
}
示例10: init
/**
* @inheritdoc
*/
public function init(ModuleManagerInterface $manager)
{
$manager->loadModule('Zf2Extensions');
}
示例11: init
/**
* @param ModuleManagerInterface $moduleManager
*/
public function init(ModuleManagerInterface $moduleManager)
{
$moduleManager->loadModule('CmsCommon');
$moduleManager->loadModule('CmsAuthentication');
$moduleManager->loadModule('CmsMailer');
}
示例12: init
/**
* {@inheritdoc}
*/
public function init(ModuleManagerInterface $manager)
{
$manager->loadModule('AssetManager');
}