Skip to content

Commit 5dc8625

Browse files
author
Codeliner
committed
ChapterFour: Move CargoRepoFactory to CargoBackend
1 parent 2dbcf2d commit 5dc8625

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ the more knowledge we get about the domain. Each chapter ships with it's own rev
3535
Project Structure
3636
-----------------
3737
There is no problem if you don't know the structure of a ZF2 application. All the important
38-
parts like the domain and the infrastructure implementation can be found in the [namespace](https://github.com/codeliner/php-ddd-cargo-sample/tree/master/module/Application/src/Application) of the application module.
38+
parts like the domain and the infrastructure implementation can be found in the [namespace](https://github.com/codeliner/php-ddd-cargo-sample/tree/master/module/CargoBackend/src/CargoBackend) of the CargoBackend module.
39+
40+
*Note: Project structure has changed in ChapterFour. In ChapterOne - ChapterThree the domain and infrastructure classes were included in the Application module!*
3941

4042
Behavior Driven Design
4143
----------------------
@@ -46,9 +48,11 @@ business expectations.
4648

4749
Unit Tests
4850
----------
49-
Unit Tests are of course also available. You can find them in [module/Application/tests/PHPUnit](https://github.com/codeliner/php-ddd-cargo-sample/tree/master/module/Application/tests/PHPUnit).
51+
Unit Tests are of course also available. You can find them in [module/CargoBackend/tests](https://github.com/codeliner/php-ddd-cargo-sample/tree/master/module/CargoBackend/tests).
5052
Got to the directory and simply run `phpunit`.
5153

54+
*Note: Project structure has changed in ChapterFour. In ChapterOne - ChapterThree the test classes were included in the Application module!*
55+
5256
Support
5357
-------
5458
If you have any problems with the application please let me know and send me an email `kontakt[at]codeliner[dot]ws` or open a [GitHub issue](https://github.com/codeliner/php-ddd-cargo-sample/issues?state=open).

module/Application/config/module.config.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@
8484
'factories' => array(
8585
'main_navigation' => 'Zend\Navigation\Service\DefaultNavigationFactory',
8686
'cargo_form' => 'Application\Form\Service\CargoFormFactory',
87-
'cargo_repository' => 'Application\Service\CargoRepositoryFactory',
88-
'routing_service' => 'Application\Service\RoutingServiceFactory',
8987
),
9088
'abstract_factories' => array(
9189
'Zend\Cache\Service\StorageCacheAbstractServiceFactory',

module/CargoBackend/config/module.config.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
* @license http://framework.zend.com/license/new-bsd New BSD License
88
*/
99
return array(
10+
'service_manager' => array(
11+
'factories' => array(
12+
'cargo_repository' => 'CargoBackend\Infrastructure\Persistence\Service\CargoRepositoryFactory',
13+
),
14+
),
1015
'doctrine' => array(
1116
'configuration' => array(
1217
'orm_default' => array(

module/Application/src/Application/Service/CargoRepositoryFactory.php renamed to module/CargoBackend/src/CargoBackend/Infrastructure/Persistence/Service/CargoRepositoryFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
* Date: 01.03.14 - 18:31
1010
*/
1111

12-
namespace Application\Service;
12+
namespace CargoBackend\Infrastructure\Persistence\Service;
1313

14-
use Application\Domain\Model\Cargo\CargoRepositoryInterface;
14+
use CargoBackend\Model\Cargo\CargoRepositoryInterface;
1515
use Zend\ServiceManager\FactoryInterface;
1616
use Zend\ServiceManager\ServiceLocatorInterface;
1717

0 commit comments

Comments
 (0)