Download the PHP package antonyan/ddd-mappers-infrastructure without Composer

On this page you can find all versions of the php package antonyan/ddd-mappers-infrastructure. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ddd-mappers-infrastructure

ddd-mappers-infrastructure

Infrastructure layer for DDD project based on Data Mapper as Data source pattern Data Mapper

General

In case if you use this layer with DDD project all functionality will be plugged automatically. An entry point is an Application class. Which uses Symfony HttpKernel as an engine.

Main flow

  1. An application gets a controller (Service of the presentation layer) and method from a request.
  2. Dispatch event for request preprocessing: filtering, validation etc.
  3. Call controller.

    Dependency management

    The architecture of the current application implies that main business logic will place in services. Each module and context will have representative service. Service extends BaseService which get a container (Dependency Injection) and config from "config" folder at the level above. On top of that container for each Service is automatically merged with infrastructure container.

    Infrastructure container

    Infrastructure container includes db connection, MySqlClient, RequestFactory, HttpClient.

DB interaction

Connection

If you're using MySQL as DB you should specify DDD_RBD_NAME, DDD_RBD_USER, DDD_RBD_PASSWORD, DDD_RBD_HOST, DDD_RBD_DRIVER (pdo_mysql) as env variables or just in .env file of the DDD project

DbMapper

For Rapid application development (RAD) we were created such abstraction as DbMapper. If you need CRUD implementation only it'll be supported out of the box. All that you need is to specify table and fields mapping in Module config. For create and update you should specify identifiers names. Config example:

Http interaction

HttpMapper

If the resource that you need you should get from another service (by HTTP(s)) you can use HTTP mapper which interface is similar to DbMapper. Config example:

Logging

For logging purpose we're using Monolog, but of course, we encapsulated it to rid of dependencies. We support logging to the file and to the CloudWatch. To use logging you should create Service (example):

On top of that, you should specify env variable with log destination LOGGING_TYPE = file or LOGGING_TYPE = cloudWatch

Customize your services


All versions of ddd-mappers-infrastructure with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
symfony/http-foundation Version ^4.1
symfony/routing Version ^4.1
symfony/http-kernel Version ^4.1
symfony/event-dispatcher Version ^4.1
symfony/dependency-injection Version ^4.1
doctrine/migrations Version ^1.8
doctrine/annotations Version ^1.6
symfony/validator Version ^4.1
vlucas/phpdotenv Version ^2.5
doctrine/dbal Version ^2.8
guzzlehttp/guzzle Version ^6.3
aws/aws-sdk-php Version ^3.24
aws/aws-php-sns-message-validator Version ^1.1
monolog/monolog Version ^1.21
maxbanton/cwh Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package antonyan/ddd-mappers-infrastructure contains the following files

Loading the files please wait ....