项目作者: andrzejkupczyk

项目描述 :
Domain-Driven Design components implementation
高级语言: PHP
项目地址: git://github.com/andrzejkupczyk/ddd-building-blocks.git
创建时间: 2017-06-22T15:32:29Z
项目社区:https://github.com/andrzejkupczyk/ddd-building-blocks

开源协议:MIT License

下载


Domain-Driven Design components

PHP requirement
GitHub license
GitHub tag (latest SemVer)

This repository helps me experiment with the DDD approach.

All implementations are inspired by books, ValueObject library created by Nicolò Pignatelli,
SeedStack Java development stack, ValueObjects toolkit
and some other, more direct sources, but mainly by my experiences and needs.

Should I use this library?

Although this package can be introduced as a Generic Subdomain to relieve the Core Domain of a project from unnecessary
clutter, it has been developed as an example which probably do not reflect 100% your domain. Therefore, you should
rather write your own DDD components using interfaces provided by the DDD Generics
package to force members of your team or yourself on thinking in terms of immutable objects and their interaction.

Installation

Using Composer:

  1. composer require andrzejkupczyk/ddd-building-blocks

Example usages

  1. <?php
  2. namespace Brunswick\Billiards\Table;
  3. use WebGarden\Model\ValueObject\Number\Natural;
  4. final class Size extends Natural
  5. {
  6. protected static function validate($feet)
  7. {
  8. return parent::validate($feet)->between(7, 9);
  9. }
  10. }