Download the PHP package apacheborys/re-try-php without Composer
On this page you can find all versions of the php package apacheborys/re-try-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download apacheborys/re-try-php
More information about apacheborys/re-try-php
Files in apacheborys/re-try-php
Package re-try-php
Short Description Library to operate retries in your php application
License MIT
Informations about the package re-try-php
ReTry mechanism for any php application
That library still in development phase. Please don't use it until first release
With this library you will be able to introduce re-try approach in simple way:
- Create configuration
-
When your application start, please add next 2 rows in the begining:
- Start by another process code like that:
Config example:
The notice about handlerExceptionDeclarator
, transport
and executor
:
As second argument for constructor of ApacheBorys\Retry\ExceptionHandler
and ApacheBorys\Retry\MessageHandler
you can send ContainerInterface. In this case, you can define arguments for handlerExceptionDeclarator
, transport
and executor
as instances from runtime. It will be fetched from this injected Container.
For example:
Leading @
indicates - you are trying to inject some instance from your container.
Also, if you don't want to use Container to inject some instances from runtime. But you still need to create some instances to ensure proper execution for handlerExceptionDeclarator
, transport
and executor
, you can use next construction:
In this case, handler/declarator will try to instantiate described class with arguments. In these arguments you can use same tricks with leading @
; and class
, arguments
constructions.
Leading @
works with class
too.