-
Notifications
You must be signed in to change notification settings - Fork 15
/
Module.php
80 lines (75 loc) · 2.82 KB
/
Module.php
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
<?php
namespace HtImgModule;
use HtImgModule\View\Helper\DisplayImage;
use HtImgModule\View\Helper\Factory\ImgUrlFactory;
use HtImgModule\View\Helper\ImgUrl;
use Zend\ModuleManager\Feature\AutoloaderProviderInterface;
use Zend\ModuleManager\Feature\ConfigProviderInterface;
use Zend\ModuleManager\Feature\ServiceProviderInterface;
use Zend\ModuleManager\Feature\ViewHelperProviderInterface;
use Zend\ServiceManager\Factory\InvokableFactory;
class Module implements
AutoloaderProviderInterface,
ConfigProviderInterface,
ServiceProviderInterface,
ViewHelperProviderInterface
{
/**
* {@inheritDoc}
*/
public function getConfig()
{
return include __DIR__ . '/config/module.config.php';
}
/**
* {@inheritDoc}
*/
public function getAutoloaderConfig()
{
return [
'Zend\Loader\StandardAutoloader' => [
'namespaces' => [
__NAMESPACE__ => __DIR__ . '/src',
],
],
];
}
/**
* {@inheritDoc}
*/
public function getServiceConfig()
{
return [
'factories' => [
'HtImg\ModuleOptions' => 'HtImgModule\Factory\ModuleOptionsFactory',
'HtImg\Imagine' => 'HtImgModule\Factory\ImagineFactory',
'HtImg\RelativePathResolver' => 'HtImgModule\Factory\RelativePathResolverFactory',
'HtImgModule\Service\ImageService' => 'HtImgModule\Factory\ImageServiceFactory',
'HtImgModule\View\Strategy\ImageStrategy' => 'HtImgModule\Factory\ImageStrategyFactory',
'HtImgModule\Imagine\Filter\Loader\FilterLoaderPluginManager' => 'HtImgModule\Factory\FilterLoaderPluginManagerFactory',
'HtImgModule\Imagine\Filter\FilterManager' => 'HtImgModule\Factory\FilterManagerFactory',
'HtImgModule\Imagine\Resolver\ResolverManager' => 'HtImgModule\Factory\ResolverManagerFactory',
'HtImgModule\Service\CacheManager' => 'HtImgModule\Factory\CacheManagerFactory',
'HtImgModule\Imagine\Loader\LoaderPluginManager' => 'HtImgModule\Factory\Imagine\Loader\LoaderPluginManagerFactory',
'HtImgModule\Imagine\Loader\LoaderManager' => 'HtImgModule\Factory\Imagine\Loader\LoaderManagerFactory',
'HtImgModule\Binary\MimeTypeGuesser' => 'HtImgModule\Factory\MimeTypeGuesserFactory',
]
];
}
/**
* {@inheritDoc}
*/
public function getViewHelperConfig()
{
return [
'factories' => [
ImgUrl::class => ImgUrlFactory::class,
DisplayImage::class => InvokableFactory::class,
],
'aliases' => [
'htDisplayImage' => DisplayImage::class,
'htImgUrl' => ImgUrl::class,
]
];
}
}