- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathModule.php
More file actions
Latest commit
39 lines (33 loc) · 1.06 KB
/
Copy pathModule.php
File metadata and controls
39 lines (33 loc) · 1.06 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
<?php
namespaceSkpd\Bootstrap;
useZend\Config\Config;
useZend\ModuleManager\Feature\AutoloaderProviderInterface;
useZend\ModuleManager\Feature\ConfigProviderInterface;
class Module implements AutoloaderProviderInterface, ConfigProviderInterface
{
publicfunctiongetConfig()
{
$config = newConfig(array());
if (is_dir(__DIR__ . '/config')) {
$iterator = new \RegexIterator(new \DirectoryIterator(__DIR__ . '/config'), '#\.config\.php$#i');
foreach ($iteratoras$file) {
/** @var $file \DirectoryIterator */
if ($file->isReadable()) {
$subConf = newConfig(include$file->getRealPath());
$config->merge($subConf);
}
}
}
return$config;
}
publicfunctiongetAutoloaderConfig()
{
returnarray(
'Zend\Loader\StandardAutoloader' => array(
'namespaces' => array(
__NAMESPACE__ => __DIR__ . '/src',
),
),
);
}
}