-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathModule.php
More file actions
51 lines (47 loc) · 1.16 KB
/
Module.php
File metadata and controls
51 lines (47 loc) · 1.16 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
<?php
/**
*
* @author Steve Rhoades
* @see http://www.stephenrhoades.com
*/
class Application_Service_Module
{
/**
* Instance of Application_Resource_Modules
*
* @var Application_Resource_Modules
*/
protected static $_moduleLoader;
/**
* Application_Resource_Modules will add itself to this
* class for further module lazy loading
*
* @see Application_Resource_Module::init()
* @param Application_Resource_Modules $loader
*/
public static function setModuleLoader($loader)
{
self::$_moduleLoader = $loader;
}
/**
* Returns an instance of Application_Resource_Modules
*
* @return Application_Resource_Modules
*/
public static function getModuleLoader()
{
return self::$_moduleLoader;
}
/**
* This method will return the module name that is currently in the
* request object.
*
* @return String Module name of the current request
*/
public static function getModuleNameFromRequest()
{
$front = Zend_Controller_Front::getInstance();
$module = $front->getRequest()->getModuleName();
return $module;
}
}