2017 © Pedro Peláez
 

library lib-allure

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

image

jwread/lib-allure

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  • Monday, October 9, 2017
  • by jwread
  • Repository
  • 2 Watchers
  • 0 Stars
  • 416 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 34 Versions
  • 3 % Grown

The README.md

libAllure

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight., (*1)

packagist.org Package for compose | API Documentation, (*2)

Maturity Badge Release Pipeline, (*3)

Compatibiility

Up to PHP 5.5.x Up tp PHP 7.3 PHP 8
libAllure 1.x supported not supported not supported
libAllure 2.x not supported supported not supported
libAllure 8.x not supported not supported supported

Adding with composer

You can add libAllure to your project quickly, if you're using composer., (*4)

composer require jwread/lib-allure

Then to use it, like in test.php;, (*5)


Adding with a standard PHP include

Copy the contents of /src/main/php/ to somewhere on your include path, like /usr/share/php/ on most Linux distributions. So that you have /usr/share/php/libAllure/ErrorHander.php, /usr/share/php/libAllure/Database.php, etc., (*6)

API Examples & Quick Reference

Full API Documentation: http://jamesread.github.io/libAllure/, (*7)

Database

Wrapper around PDO., (*8)

use \libAllure\Database;

$database = new Database('mysql:dbname=testdb;host=127.0.0.1', 'username', 'password');

$sql = 'SELECT p.id, p.title FROM products p';
$results = $database->prepare($sql)->execute();

var_dump($results->fetchAll());

ErrorHandler

Custom error handler that complains at the slightest thing, makes debugging nice and easy., (*9)

use \libAllure\ErrorHandler;

$handler = new ErrorHandler();
$handler->beGreedy();

throw new Exception('This is a test');

Form

Custom form handling code., (*10)

use \libAllure\ElementInput;
use \libAllure\Template;

$tpl = new Template('myTemplates'); // requires form.tpl and formElements.tpl in your templates folder

class MyForm extends \libAllure\Form {
    public function __construct() {
        $this->addElement(new ElementInput('forename', 'Forename', 'My Default Name');
        $this->addDefaultButtons():
    }

    public function process() {
        // do something
    }
}

$f = new MyForm();

if ($f->validate()) {
    $f->process();
}

$tpl->displayForm($f);

Template

Just a nice wrapper around Smarty2/3, that adds in a few compatibility functions to easily switch between the versions., (*11)

use \libAllure\Template;

$tpl = new Template('myTemplates');
$tpl->display('myTemplate.tpl');

The Versions

09/10 2017

dev-master

9999999-dev

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

09/10 2017

1.2.1

1.2.1.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

08/10 2017

1.2

1.2.0.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

08/10 2017

1.1.6

1.1.6.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

04/10 2017

1.1.5

1.1.5.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

10/09 2017

1.1.4

1.1.4.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

27/07 2017

1.1.3

1.1.3.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

27/07 2017

1.1.2

1.1.2.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

27/07 2017

1.1.1

1.1.1.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

28/06 2017

1.1

1.1.0.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

28/06 2017

1.0.23

1.0.23.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

28/06 2017

1.0.22

1.0.22.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

17/06 2017

1.0.21

1.0.21.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

30/01 2017

1.0.20

1.0.20.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

08/01 2017

1.0.19

1.0.19.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

01/11 2016

1.0.18

1.0.18.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

30/09 2016

1.0.17

1.0.17.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

30/09 2016

1.0.16

1.0.16.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

21/09 2016

1.0.15

1.0.15.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

10/05 2016

1.0.14

1.0.14.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

22/04 2016

1.0.13

1.0.13.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

22/04 2016

1.0.12

1.0.12.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

19/04 2016

1.0.11

1.0.11.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

06/04 2016

1.0.10

1.0.10.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

24/03 2016

1.0.9

1.0.9.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

10/03 2016

1.0.8

1.0.8.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

10/03 2016

1.0.7

1.0.7.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

03/03 2016

1.0.5

1.0.5.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

03/03 2016

1.0.6

1.0.6.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

20/02 2016

1.0.4

1.0.4.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

17/02 2016

1.0.3

1.0.3.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

30/10 2015

1.0.2

1.0.2.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

30/10 2015

1.0.1

1.0.1.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread

30/10 2015

1.0.0

1.0.0.0

A set of utilities, helpers and shims. It aims to be pretty modular and lightweight.

  Sources   Download

GPL-2.0

The Development Requires

by jamesread