2017 © Pedro Peláez
 

yii2-extension yii2-tactician

Yii2 component for Tactician command bus library

image

cherif/yii2-tactician

Yii2 component for Tactician command bus library

  • Monday, September 14, 2015
  • by cherif_b
  • Repository
  • 3 Watchers
  • 16 Stars
  • 141 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 38 % Grown

The README.md

Yii2 Tactician

Tactician command bus library wrapper for Yii2, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist cherif/yii2-tactician "*"

or add, (*4)

"cherif/yii2-tactician": "*"

to the require section of your composer.json file., (*5)

Usage

In the configuration file the component must be in the application bootstrap configuration:, (*6)

...
'components'=>[
...
                'commandBus'=> [
                    'class'=>'cherif\tactician\Tactician',
                    'inflector' => 'League\Tactician\Handler\MethodNameInflector\HandleClassNameInflector',
                    'extractor' => 'League\Tactician\Handler\CommandNameExtractor\ClassNameExtractor',
                    'commandHandlerMap'=> [
                        'cherif\tactician\tests\fixtures\commands\CompleteTaskCommand' => 'cherif\tactician\tests\fixtures\handlers\CompleteTaskCommandHandler',
                    ]
                ]
            ]

Somewhere in your app (maybe controller):, (*7)

    Yii:$app->commandBus->handle(new CompleteTaskCommand)

You can add additional middlewares before handling a command like this:, (*8)

$middleware = new MiddlewareClass();
$command = new MyCommand();

Yii::$app->commandBus->registerMiddleware($middleware);

Yii::$app->commandBus->handle($command);

For more information about configuration please visit Tactician library homepage., (*9)

The Versions

14/09 2015

dev-master

9999999-dev

Yii2 component for Tactician command bus library

  Sources   Download

BSD-3-Clause

The Requires

 

by Cherif BOUCHELAGHEM

extension command yii2 tactician cqs

14/09 2015

0.3

0.3.0.0

Yii2 component for Tactician command bus library

  Sources   Download

BSD-3-Clause

The Requires

 

by Cherif BOUCHELAGHEM

extension command yii2 tactician cqs

14/09 2015

dev-remove_bootstraping

dev-remove_bootstraping

Yii2 component for Tactician command bus library

  Sources   Download

BSD-3-Clause

The Requires

 

by Cherif BOUCHELAGHEM

extension command yii2 tactician cqs

14/09 2015

0.2

0.2.0.0

Yii2 component for Tactician command bus library

  Sources   Download

BSD-3-Clause

The Requires

 

by Cherif BOUCHELAGHEM

extension command yii2 tactician cqs

13/09 2015

0.1

0.1.0.0

Yii2 component for Tactician command bus library

  Sources   Download

BSD-3-Clause

The Requires

 

by Cherif BOUCHELAGHEM

extension command yii2 tactician cqs