Skip to content

Commit 2677324

Browse files
committed
Module setup, unit tests for single provider
1 parent 73b2480 commit 2677324

12 files changed

+3331
-0
lines changed

Diff for: .gitignore

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
### ZendFramework template
2+
# Composer files
3+
composer.phar
4+
vendor/
5+
6+
# Local configs
7+
config/autoload/*.local.php
8+
9+
# Binary gettext files
10+
*.mo
11+
12+
# Data
13+
data/logs/
14+
data/cache/
15+
data/sessions/
16+
data/tmp/
17+
temp/
18+
19+
# Legacy ZF1
20+
demos/
21+
extras/documentation
22+
23+
# Created by .ignore support plugin (hsz.mobi)
24+
25+
.idea/

Diff for: Module.php

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?php
2+
3+
namespace ZF\Geocoder;
4+
5+
use Zend\ModuleManager\Feature\AutoloaderProviderInterface;
6+
use Zend\ModuleManager\Feature\ConfigProviderInterface;
7+
8+
/**
9+
* Class Module
10+
*
11+
* @package ZF\Geocoder
12+
* @version 1.0
13+
* @author Julien Guittard <[email protected]>
14+
* @license https://opensource.org/licenses/BSD-3-Clause New BSD License
15+
* @link http://github.com/jguittard/geocodermodule for the canonical source repository
16+
*/
17+
class Module implements AutoloaderProviderInterface, ConfigProviderInterface
18+
{
19+
/**
20+
* Return an array for passing to Zend\Loader\AutoloaderFactory.
21+
*
22+
* @return array
23+
*/
24+
public function getAutoloaderConfig()
25+
{
26+
return [
27+
'Zend\Loader\StandardAutoloader' => [
28+
'namespaces' => [
29+
__NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
30+
],
31+
],
32+
];
33+
}
34+
35+
/**
36+
* Returns configuration to merge with application configuration
37+
*
38+
* @return array|\Traversable
39+
*/
40+
public function getConfig()
41+
{
42+
return include __DIR__ . '/config/module.config.php';
43+
}
44+
}

Diff for: composer.json

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"name" : "jguittard/zf-geocoder",
3+
"description" : "Geocoder Service module for Zend Framework 2",
4+
"type" : "library",
5+
"keywords" : ["zf2", "geocoder", "geocoding"],
6+
"homepage" : "http://github.com/jguittard/geocodermodule",
7+
"license" : "BSD-3-Clause",
8+
"authors" : [{
9+
"name" : "Julien Guittard",
10+
"email" : "[email protected]",
11+
"homepage" : "http://julienguittard.com",
12+
"role" : "Developer"
13+
}],
14+
"require" : {
15+
"php" : ">=5.4",
16+
"willdurand/geocoder": "^3.3",
17+
"php-http/httplug": "^0.1.0",
18+
"zendframework/zend-stdlib": "~2.7",
19+
"zendframework/zend-http": "~2.5",
20+
"zendframework/zend-servicemanager": "~2.5",
21+
"zendframework/zend-config": "~2.5",
22+
"zendframework/zend-filter": "~2.5",
23+
"zendframework/zend-serializer": "~2.5",
24+
"zendframework/zend-modulemanager": "~2.5",
25+
"zendframework/zend-i18n": "~2.5"
26+
},
27+
"require-dev" : {
28+
"phpunit/phpunit" : "~4.5.0",
29+
"squizlabs/php_codesniffer" : "~2.3.4",
30+
"zendframework/zend-test" : "~2.5",
31+
"zendframework/zend-log": "~2.5"
32+
},
33+
"autoload" : {
34+
"psr-4": {
35+
"ZF\\Geocoder\\" : "src/"
36+
},
37+
"classmap" : [
38+
"Module.php"
39+
]
40+
},
41+
"autoload-dev" : {
42+
"psr-4": {
43+
"ZFTest\\Geocoder\\" : "test/"
44+
}
45+
}
46+
}

0 commit comments

Comments
 (0)