-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModule.php
More file actions
executable file
·85 lines (78 loc) · 2.49 KB
/
Module.php
File metadata and controls
executable file
·85 lines (78 loc) · 2.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
/**
* ZucchiUser (http://zucchi.co.uk/)
*
* @link http://github.com/zucchi/ZucchiUser for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zucchi Limited (http://zucchi.co.uk)
* @license http://zucchi.co.uk/legals/bsd-license New BSD License
*/
namespace ZucchiUser;
use Zend\Mvc\MvcEvent;
use Zend\ModuleManager\ModuleManager;
use Zend\ModuleManager\Feature\AutoloaderProviderInterface;
use Zend\ModuleManager\Feature\ConfigProviderInterface;
use Zend\ModuleManager\Feature\ServiceProviderInterface;
use Zend\ModuleManager\Feature\BootstrapListenerInterface;
use Zend\ModuleManager\Feature\ConsoleUsageProviderInterface;
use Zend\ModuleManager\Feature\ConsoleBannerProviderInterface;
use Zend\Console\Adapter\AdapterInterface as Console;
use Zend\EventManager\EventInterface;
use ZucchiUser\Event\UserListener;
use Zucchi\Debug\Debug;
/**
* Module to provide a standarised user
* @author Matt Cockayne <matt@zucchi.co.uk>
* @package ZucchiUser
* @subpackage Module
*/
class Module implements
AutoloaderProviderInterface,
ConfigProviderInterface,
ConsoleUsageProviderInterface,
ConsoleBannerProviderInterface
{
public function onBootstrap(MvcEvent $e)
{
$em = $e->getApplication()->getEventManager();
$sm = $e->getApplication()->getServiceManager();
$listener = $sm->get('zucchiuser.listener');
$listener->attach($em);
}
/**
* (non-PHPdoc)
* @see \Zend\ModuleManager\Feature\AutoloaderProviderInterface::getAutoloaderConfig()
*/
public function getAutoloaderConfig()
{
return array(
'Zend\Loader\ClassMapAutoloader' => array(
__DIR__ . '/autoload_classmap.php',
),
'Zend\Loader\StandardAutoloader' => array(
'namespaces' => array(
__NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
),
),
);
}
/**
* (non-PHPdoc)
* @see \Zend\ModuleManager\Feature\ConfigProviderInterface::getConfig()
*/
public function getConfig($env = null)
{
return include __DIR__ . '/config/module.config.php';
}
public function getConsoleUsage(Console $console)
{
return include __DIR__ . '/config/console.usage.php';
}
/**
* This method is defined in ConsoleBannerProviderInterface
*/
public function getConsoleBanner(Console $console){
return
"ZucchiUser Version 0.0.1\n"
;
}
}