PHPackages                             oro/chain-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. oro/chain-processor

Abandoned → [oro/platform](/?search=oro%2Fplatform)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

oro/chain-processor
===================

ORO ChainProcessor Component

29PHP

Since May 8Pushed 8y ago41 watchersCompare

[ Source](https://github.com/oroinc/OroChainProcessorComponent)[ Packagist](https://packagist.org/packages/oro/chain-processor)[ RSS](/packages/oro-chain-processor/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Oro ChainProcessor Component
============================

[](#oro-chainprocessor-component)

Table of Contents
-----------------

[](#table-of-contents)

- [Overview](#overview)
- [Getting Started](#getting-started)
- [Context](#context)
- [Actions](#actions)
- [Types of Processors](#types-of-processors)
- [Processors Priority](#processors-priority)
- [Applicable Checkers](#applicable-checkers)
- [Key Classes](#key-classes)

Overview
--------

[](#overview)

The Oro ChainProcessor component implements enhanced [Chain of Responsibility](http://www.oodesign.com/chain-of-responsibility-pattern.html) design pattern and allows efficiently process requests without hard-wiring handler relationships and precedence, or request-to-handler mappings.

The following enhancements of the original design pattern are added to make a configuration of requests processing more flexible:

- Processors can be grouped in some logical groups.
- The execution order of processors can be configured using `priority` attribute of a processor and a group.
- The execution of processors' groups can be skipped during a request processing.
- It is possible to execute a part of processors' groups instead of all processors registered in a chain.
- A list of processors executed for a concrete request can be filtered based on attributes of each processor.
- It is easy to add new rules are used to check whether a processor should be executed.

[![Data flow diagram](./Resources/doc/data_flow_diagram.png "The data flow diagram of Oro ChainProcessor component")](./Resources/doc/data_flow_diagram.png)

Getting Started
---------------

[](#getting-started)

Lets imagine that you need a different types of textual representations of some group of objects, e.g. entities. One of straightforward solution may be using of `__toString()` magic method or some custom `toString($parameters)` method. In some simple cases this solution may be a good approach. But in case if you want to allow external code to change existing representation of your objects or add new types of representations this solution is not seem as a good choice.

The Oro ChainProcessor component can help to solve this task. It is supposed that your application is built using Symfony Framework, but the Oro ChainProcessor component can be easily adapted to other frameworks.

- Register compiler passes

```
