Download the PHP package jclaveau/php-deferred-callchain without Composer

On this page you can find all versions of the php package jclaveau/php-deferred-callchain. 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 php-deferred-callchain

PHP Deferred Callchain

This class simply provides a way to define fluent chain of methods, functions, array access calls before having the target (object or native value) you wan't to apply it to. Once the expected targets are available, simply call the chain on them as if it was a function.

Latest Stable Version License Total Downloads contributions welcome

Quality

Build Status codecov Scrutinizer Code Quality

Overview

Installation

php-deferred-callchain is installable via Composer

composer require jclaveau/php-deferred-callchain

Testing

Tests are located here and runnable by calling

./phpunit

Usage

Functionnal and chained construction

DeferredCallChain can be instanciated classically

Statically

Or functionnaly

Fluent call chain

Working with arrays

Working with native types and functions

The features above make calls to objects methods easy and async but when their result is not an object, the fluent syntax has to stop, and the async behavior also.

Based on Daniel S Deboer work https://github.com/danielsdeboer/pipe, support of chained function calls has been added.

Some functions do not use the subject of the fluent syntax as first argument. In this case, giving '$$' as the parameter you want to be replaced by the subject.

Specifying on which class, interface, type or instance, the chain is callable

You can force the target of your call chain to:

Calls provoking exceptions

As a call can be made far before it's effectivelly applied, exceptions need more debug information for a smooth workflow. To achieve that, a line is added to every exception message thrown during a DeferredCallChain execution, pointing to the buggy call and where it is coded.

For example, an exception having as message will print

Static calls

Static calls can be useful, especially for singletons. For some technical reasons explained here, the only way to support it is to call them as normal methods (e.g. with -> ) and look for it as a static method once we know it doesn't exist as a regular one.


All versions of php-deferred-callchain with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
symfony/polyfill-php72 Version ^1.12
jclaveau/php-fluent-trait Version ^1.1
jclaveau/php-visibility-violator Version ^1.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 jclaveau/php-deferred-callchain contains the following files

Loading the files please wait ....