50 lines
1.3 KiB
PHP
50 lines
1.3 KiB
PHP
<?php
|
|
/**
|
|
* Zend Framework (http://framework.zend.com/)
|
|
*
|
|
* @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository
|
|
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
|
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
|
*/
|
|
|
|
namespace Article;
|
|
|
|
use Zend\ModuleManager\ModuleManager;
|
|
use Zend\Mvc\ModuleRouteListener;
|
|
use Zend\Mvc\MvcEvent;
|
|
use Sookon\Helpers\LayoutHelpers;
|
|
|
|
class Module
|
|
{
|
|
|
|
public function onBootstrap(MvcEvent $e) {
|
|
|
|
}
|
|
|
|
public function init(ModuleManager $moduleManager)
|
|
{
|
|
$sharedEvents = $moduleManager->getEventManager()->getSharedManager();
|
|
|
|
$sharedEvents->attach(__NAMESPACE__, MvcEvent::EVENT_DISPATCH , function($e) {
|
|
$controller = $e->getTarget();
|
|
$controller->layout('layout/layout');
|
|
}, 100);
|
|
}
|
|
|
|
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__,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|