2017 © Pedro Peláez
 

library pactum

The Php config manager.

image

newclass/pactum

The Php config manager.

  • Monday, December 12, 2016
  • by newclass-pl
  • Repository
  • 1 Watchers
  • 0 Stars
  • 32 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

README

license PHP 5.5+, (*1)

What is Pactum?

Pactum is a PHP config manager. Support multi file types., (*2)

Installation

The best way to install is to use the composer by command:, (*3)

composer require newclass/pactum
composer install

Use example

use Pactum\ConfigBuilder;
use Pactum\ConfigBuilderObject;
use Pactum\Reader\JSONReader;

$config=new ConfigBuilder();

//set config structure
$config->addBoolean("booleanTrue")
    ->addNumber("number1")
    ->addString("text")
    ->addString("other","default")
    ->addArray("d_array",new ConfigBuilderObject())
    ->getValue()->addString("test");

//add json reader
$xmlReader=new JSONReader('{"booleanTrue":true,"number1":1,"text":"value text","d_array":[{"test":"wdwd"}]}','s');
$config->addReader($xmlReader);
//parse data and generate container
$container=$config->parse();

//get value from config data
$valueBoolean=$container->getValue('booleanTrue');
$valueArray=$container->getArray("d_array");

//or get object with getters
$obj=$container->getConfig();
$obj->getNumber1(); //return 1

The Versions

12/12 2016

dev-develop

dev-develop

The Php config manager.

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

by Michal Tomczak

11/12 2016

dev-master

9999999-dev

The Php config manager.

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

by Michal Tomczak

11/12 2016

v1.4.0

1.4.0.0

The Php config manager.

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

by Michal Tomczak

07/12 2016

v1.3.0

1.3.0.0

The Php config manager.

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

by Michal Tomczak

06/12 2016

v1.2.2

1.2.2.0

The Php config manager.

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

by Michal Tomczak

02/12 2016

v1.2.1

1.2.1.0

The Php config manager.

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

by Michal Tomczak

02/12 2016

v1.2.0

1.2.0.0

The Php config manager.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Michal Tomczak

02/12 2016

v1.1.0

1.1.0.0

The Php config manager.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Michal Tomczak

01/12 2016

v1.0.0

1.0.0.0

The Php config manager.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Michal Tomczak