Download the PHP package graymatterlabs/pingtree without Composer

On this page you can find all versions of the php package graymatterlabs/pingtree. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pingtree

Ping Tree Lead Distribution

Latest Version on Packagist Tests Total Downloads

A Ping Tree is a process in which a single lead is offered to multiple buyers in real-time and sold to the highest bidder.

Installation

You can install the package via composer:

Usage

Responses

The ping tree will return the first successful response provided by an offer. Responses must implement the GrayMatterLabs\PingTree\Contracts\Response interface but should be customized beyond that.

Offers

Offer instances are responsible for communicating with and managing state of the offer such as health and eligibility rules.

Events

This package fires events and provides you the ability to register listeners for each. Listeners can be used for performing any custom logic. Listeners are executed synchronously to be sure to handle any potential exceptions.

Listeners can be registered to the Tree class, which handles all events, using the listen method, like so:

Below is a list of all events fired, their descriptions, and the parameters passed to any registered listeners.

Name Description Parameters
selecting An offer is being selected Strategy $strategy, Lead $lead, array $offers
selected An offer has been selected Strategy $strategy, Lead $lead, array $offers, Offer $offer
sending The lead is being sent to the offer Lead $lead, Offer $offer
sent The lead has been send to the offer Lead $lead, Offer $offer, Response $response, int $attempts

Strategies

This package provides a concept of "strategies" to decide which offer to send the lead to. A default set of strategies are provided out-of-the-box. The only requirement to providing your own strategies is that they implement the GrayMatterLabs\PingTree\Contracts\Strategy interface.

Strategy Description
HighestPing Gets the offer with the highest ping() value
RoundRobin A decorator to ensure each offer is attempted across multiple executions for a given lead
Shuffled A decorator to ensure random order before executing the given strategy
Ordered Gets the first offer in the list of provided offers

Testing

Changelog

Please see the Release Notes for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of pingtree with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package graymatterlabs/pingtree contains the following files

Loading the files please wait ....