2017 © Pedro Peláez
 

library chief

A simple command bus

image

matthis/chief

A simple command bus

  • Monday, December 14, 2015
  • by matthisstenius
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,386 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 11 Versions
  • 53 % Grown

The README.md

Chief

Build Status, (*1)

A simple Command bus., (*2)

Installation

Install via composer., (*3)

composer require "matthis/chief:1.2.*", (*4)

Usage

Executing a command is as simple as:, (*5)

<?php 

$commandBus = new matthis\Chief\CommandBus();

$myCommand = new RegisterUserCommand('John Doe', 'john@doe.com');
$commandBus->execute($myCommand);

Chief expects the following naming convention:, (*6)

The commands should end with "Command"., (*7)

Example command:, (*8)

<?php

class RegisterUserCommand
    public function __construct($username, $email)
    {
        $this->username = $username;
        $this->email = $email;
    }
}

For Chief to map the command to a command handler the handler should have the same name as the command and have "Handler" appended to it., (*9)

Example command handler:, (*10)

<?php

class RegisterUserCommandHandler
{
    public function handle($command)
    {
        $command->username; //John Doe
        $command->email; //john@doe.com
    }
}

Tests

vendor/bin/phpspec run, (*11)

The Versions

14/12 2015

dev-master

9999999-dev

A simple command bus

  Sources   Download

MIT

The Requires

 

The Development Requires

14/12 2015

v1.4.0

1.4.0.0

A simple command bus

  Sources   Download

MIT

The Requires

 

The Development Requires

14/12 2015

dev-version-2

dev-version-2

A simple command bus

  Sources   Download

MIT

The Requires

 

The Development Requires

30/07 2015

v1.3.2

1.3.2.0

A simple command bus

  Sources   Download

MIT

The Requires

 

The Development Requires

30/07 2015

1.3.1

1.3.1.0

A simple command bus

  Sources   Download

MIT

The Requires

 

The Development Requires

22/06 2015

dev-laravel-4

dev-laravel-4

A simple command bus

  Sources   Download

MIT

The Requires

 

The Development Requires

17/06 2015

1.3.0

1.3.0.0

A simple command bus

  Sources   Download

MIT

The Requires

 

The Development Requires

17/06 2015

v1.2.1

1.2.1.0

A simple command bus

  Sources   Download

MIT

The Requires

 

The Development Requires

28/03 2015

1.2.0

1.2.0.0

A simple command bus

  Sources   Download

MIT

The Requires

 

The Development Requires

23/03 2015

v1.1.0

1.1.0.0

A simple command bus

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

22/03 2015

v1.0.0

1.0.0.0

A simple command bus

  Sources   Download

MIT

The Requires

 

The Development Requires