Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

villfa/TryAgain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TryAgain

Build Status

TryAgain is a very light PHP library which permits to call a function again when the result is not satisfying.

The main advantage is that it permits to avoid code duplication by creating reusable validators.

Server Requirements

  • PHP version 7.0 or newer

Installation

TryAgain may be installed using Composer. You can read more about Composer and its main repository at http://packagist.org. To install TryAgain using Composer, first install Composer for your project using the instructions on the Packagist home page. You can then define your development dependency on TryAgain using the suggested parameters below.

{
    "require": {
        "villfa/TryAgain": ">=1.0.0"
    }
}

To install, you then may call:

$ composer.phar install

Tests

To run the test suite, you need composer and PHPUnit.

$ cd path/to/TryAgain
$ composer.phar install --dev
$ ./vendor/bin/phpunit

Example

Here a minimalist example:

<?php

require 'vendor/autoload.php';

$handler = new \TryAgain\Handler;
$handler->execute('printf', 'Hello world');

More detailed examples are available in the examples directory.

About

The TryAgain library permits to call a function again if the result is wrong.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages