Download the PHP package rtens/domin without Composer

On this page you can find all versions of the php package rtens/domin. 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 domin

Domin Build Status Scrutinizer Code Quality

domin ( domain model interface ) is an administration interface for abstract Domain Models using the Command Object pattern.

For an example of how to use use, check out the sample application.

Model

Every ability of a system is represented by an Action which specifies how to execute it and what Parameters it requires. Therefore domin can take care of getting missing parameters from the user using Fields. Actions may return values which are presented using Renderers.

Installation

To use domin in your project, require it with Composer

composer require rtens/domin

If you would like to develop on domin, download it with Composer and execute the specification with scrut

composer create-project -sdev rtens/domin
cd domin
vendor/bin/scrut spec

Quick Start

To run domin as a web application with curir as delivery system, paste the following code into index.php

To run domin with silex, past this code into index.php

And then start a development server to access the application on localhost:8000

$ php -S localhost:8000 index.php

To get the CLI application running, paste this code into cli.php

and run it with

$ php cli.php

Action!

Actions decide what Parameters they need, how to fill() them with default values and, most importantly, how to execute() them. The way domin knows what actions there are is through the ActionRegistry, so all actions need to be added to it.

There are several ways to create actions:

Implementing Action

The most straight-forward although probably not most convenient way is to create an implementation of Action for every ability of the system.

Extending ObjectAction

If you represent abilities with DTOs, you can extend you actions from the ObjectAction to infer Parameters from the properties of these classes using reflection. This sub-class can then be made generic for example by using a Command Bus.

Generating ObjectActions

With a generic way to execute actions, you can use the ObjectActionGenerator to generate and register actions from all classes in a folder automatically.

Using MethodAction

If you don't feel like creating a class for every command, you can use the MethodAction to infer parameters from a method signature.

Generating MethodActions

There is also a MethodActionGenerator to register all methods of an object.

License

domin is released under the MIT License


All versions of domin with dependencies

PHP Build Version
Package Version
Requires watoki/factory Version 1.*
watoki/reflect Version 1.*
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 rtens/domin contains the following files

Loading the files please wait ....