Skip to content

Instantly share code, notes, and snippets.

@Hounddog
Created August 23, 2012 13:06
Show Gist options
  • Save Hounddog/3436400 to your computer and use it in GitHub Desktop.
Save Hounddog/3436400 to your computer and use it in GitHub Desktop.
Module Errpr
<?php
return array(
'modules' => array(
'DoctrineModule',
'DoctrineORMModule',
'DysBase',
'DysAcl',
'Application',
'Smd',
'Site',
'Locale'
),
'module_listener_options' => array(
'config_glob_paths' => array(
'config/autoload/{,*.}{global,local,*.config}.php',
),
'config_cache_enabled' => false,
'cache_dir' => 'data/cache',
'module_paths' => array(
'/var/www/mshwalbe/V5/src/module',
'/var/www/mshwalbe/V5/src/vendor',
),
),
'service_manager' => array(
'use_defaults' => true,
'factories' => array(
),
),
);
Fatal error: Uncaught exception 'Zend\ModuleManager\Exception\RuntimeException' with message 'Module (DysAcl) could not be initialized.' in /var/www/mshwalbe/V5/src/vendor/zendframework/zendframework/library/Zend/ModuleManager/ModuleManager.php on line 138 Zend\ModuleManager\Exception\RuntimeException: Module (DysAcl) could not be initialized. in /var/www/mshwalbe/V5/src/vendor/zendframework/zendframework/library/Zend/ModuleManager/ModuleManager.php on line 138 Call Stack: 0.0008 644088 1. {main}() /var/www/mshwalbe/V5/public/index.php:0 0.0319 1081720 2. Zend\Mvc\Application::init() /var/www/mshwalbe/V5/public/index.php:14 0.0947 3026456 3. Zend\ModuleManager\ModuleManager->loadModules() /var/www/mshwalbe/V5/src/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php:244 0.0947 3026600 4. Zend\EventManager\EventManager->trigger() /var/www/mshwalbe/V5/src/vendor/zendframework/zendframework/library/Zend/ModuleManager/ModuleManager.php:99 0.0948 3026824 5. Zend\EventManager\EventManager->triggerListeners() /var/www/mshwalbe/V5/src/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:209 0.0965 3058656 6. call_user_func() /var/www/mshwalbe/V5/src/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:469 0.0965 3058712 7. Zend\ModuleManager\ModuleManager->onLoadModules() /var/www/mshwalbe/V5/src/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:0 0.1418 3738808 8. Zend\ModuleManager\ModuleManager->loadModule() /var/www/mshwalbe/V5/src/vendor/zendframework/zendframework/library/Zend/ModuleManager/ModuleManager.php:80
<?php
/**
* V5
* LICENSE
*
* Insert License here
*
* @package Config
*/
namespace DysAcl;
return array(
'controllers' => array(
//Add Controllers here
'aliases' => array(
//...
),
'factories' => array(
//...
),
'invokables' => array(
//..
),
),
'service_manager' => array(
//Add Services Here
'aliases' => array(
//...
),
'factories' => array(
//...
),
'invokables' => array(
//..
),
),
'module_services' => array(
//Add Module related Service e.g Mapper/Dto here
'aliases' => array(
//...
),
'factories' => array(
//...
),
'invokables' => array(
//..
),
),
'doctrine' => array(
'driver' => array(
__NAMESPACE__ . '_driver' => array(
'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
'cache' => 'array',
'paths' =>
array(__DIR__ . '/../src/' . __NAMESPACE__ . '/Entity')
),
'orm_default' => array(
'drivers' => array(
__NAMESPACE__ . '\Entity' => __NAMESPACE__ . '_driver'
)
)
)
),
'smd' => array(
/**
* Place smd information here
* 'serviceName' => array(
* 'controller' => 'path\to\controller',
* 'dto' => 'path\to\dto',
* 'route' => '/url/target/path',
*),
*/
),
);
<?php
/**
* V5
* LICENSE
*
* Insert License here
*
*/
namespace DysAcl;
use Zend\Mvc\ModuleRouteListener;
/**
* Base Module for Acl
* @category Acl
* @package Module
* @copyright Copyright (c) 2012 Doyousoft
* @license $license_information
* @version $Id
*/
class Module
{
/**
* On Module Bootstrap
* @param event $e
*/
public function onBootstrap($e)
{
$eventManager = $e->getApplication()->getEventManager();
$moduleRouteListener = new ModuleRouteListener();
$moduleRouteListener->attach($eventManager);
}
/**
* Get Autoloader Config
* @return array
*/
public function getAutoloaderConfig()
{
return array(
'Zend\Loader\ClassMapAutoloader' => array(
__DIR__ . '/autoload_classmap.php',
),
'Zend\Loader\StandardAutoloader' => array(
'namespaces' => array(
__NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
),
),
);
}
/**
* Get Config
* @return array
*/
public function getConfig()
{
return include __DIR__ . '/config/module.config.php';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment