2017 © Pedro Peláez
 

library hacore

Read json configs in strict mode

image

usox/hacore

Read json configs in strict mode

  • Tuesday, June 19, 2018
  • by usox
  • Repository
  • 1 Watchers
  • 2 Stars
  • 223 Installations
  • Hack
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 101 % Grown

The README.md

Build Status, (*1)

Hacore - Hack Config Reader

Hacore provides a simple approach to read json formatted config files in hack strict mode., (*2)

Sample config

Hacore treats all config values as strings and will explicitly cast them. To access the values of a single key, just use getLeaf($key_name). To get a complete branch of options, use getBranch($key_name)., (*3)

{
    "foo":"bar",
    "barfoo":666,
    "more":{
        "config":"options"
    }
}
$reader = new \Usox\Hacore\Reader();
$reader->load('path-to-config.json')

$reader->getLeaf('foo'); // returns 'bar'
$reader->getLeaf('barfoo'); // returns '666'
$reader->getBranch('more'); // returns a new Reader instance

The Versions

19/06 2018

dev-master

9999999-dev https://github.com/usox/hacore

Read json configs in strict mode

  Sources   Download

MIT

The Requires

 

The Development Requires

json config hack hhvm hacklang

19/06 2018

v1.1.0

1.1.0.0 https://github.com/usox/hacore

Read json configs in strict mode

  Sources   Download

MIT

The Requires

 

The Development Requires

json config hack hhvm hacklang

20/03 2017

1.0.1

1.0.1.0 https://github.com/usox/hacore

Read json configs in strict mode

  Sources   Download

MIT

The Requires

  • hhvm >=3.13

 

The Development Requires

json config hack hhvm hacklang

20/03 2017

dev-release

dev-release https://github.com/usox/hacore

Read json configs in strict mode

  Sources   Download

MIT

The Requires

  • hhvm >=3.13

 

The Development Requires

json config hack hhvm hacklang

19/03 2017

1.0.0

1.0.0.0 https://github.com/usox/hacore

Read json configs in strict mode

  Sources   Download

MIT

The Requires

  • hhvm >=3.13

 

The Development Requires

json config hack hhvm hacklang