Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Feb 21, 2025. It is now read-only.
/hacorePublic archive

Read json configs in hack strict mode

License

NotificationsYou must be signed in to change notification settings

usox/hacore

Repository files navigation

Build Status

Hacore - Hack Config Reader

Hacore provides a simple approach to read json formatted config files in hackstrict mode.

Sample config

Hacore treats all config values as strings and will explicitly cast them. Toaccess the values of a single key, just usegetLeaf($key_name). To get acomplete branch of options, usegetBranch($key_name).

{"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

[8]ページ先頭

©2009-2025 Movatter.jp