Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cesargb committed Jul 7, 2022
1 parent eec746a commit 0eb9e23
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,30 @@ composer require descom/pipeline

## Usage

From plugin:

### Create Stages

Samples:

- [DoubleStage](tests/Support/DoubleStage.php)
- [AddStage](tests/Support/AddStage.php)

### Create Pipeline

```php
use Descom\Pipeline\PipeLine;

class SamplePipeline extends PipeLine
{}
```

### Configure plugin to add Stages

```php
SamplePipeline::getInstance()->pipe(new DoubleStage())->pipe(new AddStage());
```

From code:
### Process pipeline to transform data in core

```php
$payload = SamplePipeline::getInstance()->process($payload);
Expand Down

0 comments on commit 0eb9e23

Please sign in to comment.