PHPackages                             meuhmeuhconcept/processor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. meuhmeuhconcept/processor

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

meuhmeuhconcept/processor
=========================

Mechanism to process a work from a request

2.4(1y ago)03.4k21MITPHPPHP &gt;5.3.0CI failing

Since Sep 24Pushed 1y ago1 watchersCompare

[ Source](https://github.com/MeuhMeuhConcept/processor)[ Packagist](https://packagist.org/packages/meuhmeuhconcept/processor)[ RSS](/packages/meuhmeuhconcept-processor/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (10)Dependencies (6)Versions (12)Used By (1)

Processor
=========

[](#processor)

Mechanism to process a work from a request

Installation
------------

[](#installation)

You can install Processor with Composer

```
$ composer require meuhmeuhconcept/processor
```

How to use it ?
---------------

[](#how-to-use-it-)

The main interest of this library is the `ChainProcessor`. It contains multiple processors who can procced a particular work from a request and generate a response.

The `ChainProcessor` ask to each processors contains on it if it can proceed the job for a particular request. The first processor who awser that it can do it will be use. The response contains several things like the request itself, the status code, name of processor who do the job and obviously the output of the job.

### Build a **Request**

[](#build-a-request)

Before use the processor you have to build your request. You request can be what ever you want : a simple string, an array, a object... This object will be use to determine if processor can do the job and to do it.

#### Example

[](#example)

```
