-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nigel Greenway
committed
Feb 26, 2015
1 parent
78c4806
commit 6d9b113
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# demander | ||
|
||
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md) | ||
[![Build Status](https://img.shields.io/travis/nigelgreenway/demander/master.svg?style=flat-square)](https://travis-ci.org/nigelgreenway/demander) | ||
|
||
This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what | ||
PSRs you support to avoid any confusion with users and contributors. | ||
|
||
## Install | ||
|
||
Via Composer | ||
|
||
``` bash | ||
$ composer require league/demander | ||
``` | ||
|
||
## Usage | ||
|
||
Below is a very basic example on how to use the package. More docs will be released when version 1.0 is released in the next week or two. | ||
|
||
``` php | ||
|
||
$mapping = [ | ||
'GetActiveEmployeesQuery' => 'GetActiveEmployeesQueryHandler', | ||
]; | ||
|
||
$mediator = new NigelGreenway\Demander($mapping); | ||
|
||
$activeEmployees = $mediator->request(new GetEmployeesByStatusQuery('active')); | ||
|
||
foreach($activeEmployees as $activeEmployee) { | ||
echo $activeEmployee->fullName; | ||
} | ||
|
||
|
||
``` | ||
|
||
## Testing | ||
|
||
``` bash | ||
$ phpunit | ||
``` | ||
|
||
## Contributing | ||
|
||
Please see [CONTRIBUTING](CONTRIBUTING.md) for details. | ||
|
||
## Security | ||
|
||
If you discover any security related issues, please email [email protected] instead of using the issue tracker. | ||
|
||
## Credits | ||
|
||
- [Nigel Greenway](https://github.com/NigelGreenway) | ||
|
||
## License | ||
|
||
The MIT License (MIT). Please see [License File](LICENSE.md) for more information. |