Download the PHP package xervice/processor without Composer
On this page you can find all versions of the php package xervice/processor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package processor
Processor
Installation
Configuration
You must create a new process configuration plugin implementing \Xervice\Processor\Business\Dependency\ProcessConfigurationPluginInterface. That class you have to register in the ProcessorDependencyProvider to add your process.
A process is a data livecycle with the following steps:
- Read input
- Validate data
- Hydrate data
- Translate data
- Process data
- Write data
All login for the given steps can be configured in the process configuration plugin.
Read input
You can define an InputHandler in your process configuration to read the data.
Validate data
For validating you can add one or more ValidatorPlugins to your process configuration to validate your data. The config syntax is based on the xervice/validator module.
Hydrating
After your data is validated you can hydrate the information by adding HydratePlugins to your process configuration. Syntax of the configuration is based on the xervice/array-handler module.
Giving only the fieldname in the config will remove this entry from the data.
Translating
After hydrating the information you can translate them into your needed structure. For that you can add translate plugins to your process configuration. Syntax is also based on the xervice/array-handler module. Here you can define TranslationFunction. You can add new TranslationFunctions to the ProcessorDependencyProvider.
Processing
Processing the data is the jump into your module business logic. For that you've a hook method in your process configuration. The return value is data payload you want to write.
Write data
At the end the data will be given to your OutputHandler to persist them. You can define the OutputHandler in your process configuration.
Using
You can run a process by using the console command:
Also you can use the ProcessorFacade to trigger a process:
All versions of processor with dependencies
xervice/core Version ^4.0.0
xervice/data-provider Version ^2.0.0
xervice/validator Version ^2.1.0
xervice/array-handler Version ^2.1.0