Download the PHP package newclass/pactum without Composer
On this page you can find all versions of the php package newclass/pactum. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package pactum
README
What is Pactum?
Pactum is a PHP config manager. Support multi file types.
Installation
The best way to install is to use the composer by command:
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
All versions of pactum with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.5.0
The package newclass/pactum contains the following files
Loading the files please wait ....