Download the PHP package andydune/conditional-execution without Composer

On this page you can find all versions of the php package andydune/conditional-execution. 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 conditional-execution

ConditionalExecution

Build Status Packagist Version Total Downloads

It allows for conditional execution of code fragments more beautiful and testable. Line code with no indentation prevents appearance of errors and improves readability.

Requirements

Installation

Installation using composer:

Or if composer was not installed globally:

Or edit your composer.json:

And execute command:

See a problem

Here condition for execution. I meet something like this it in many CMS ofter:

It's difficult to read, search error or edit.

This is better way library offers:

Methods

add($condition)

It adds condition to a queue. Condition is not check immediately. It can be callable.

bindAnd()

Change bind of conditions to AND logic. AND is used as default.

bindOr()

Change bind of conditions to OR logic.

check()

It executes check of all collected conditions.

doIt()

It checks of all collected conditions and execute appropriate function and triggers.

Benefit

Simple add or delete conditions

You don't need to count brackets. Add, remove conditions is simple.

Closure as condition and params

You can use closure as condition. Function can receive params witch was inserted with doIt or check methods.

Check classes for checks of any complexity

There is mechanic for check of any complexity. It is describes as instance of AndyDune\ConditionalExecution\Check\CheckAbstract.

You may create your own custom class and use it.

ArrayValueWithKeyNotEmpty

It checks array value with key is not empty.

ArrayHasNotEmptyValueOrKeyNotExist

Given array key must not exist or keep value == true

Execute functions in list for get first result

With params:


All versions of conditional-execution with dependencies

PHP Build Version
Package Version
Requires php Version ^5.6 || ^7
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 andydune/conditional-execution contains the following files

Loading the files please wait ....