{"id":13660213,"url":"https://github.com/unity-framework/Config","last_synced_at":"2025-04-24T19:30:40.641Z","repository":{"id":57075683,"uuid":"99148140","full_name":"unity-framework/Config","owner":"unity-framework","description":"Extensible configuration manager for PHP projects that uses dot notation and supports json, ini, array based and many more common formats","archived":false,"fork":false,"pushed_at":"2018-11-12T16:11:36.000Z","size":222,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-10T14:42:09.846Z","etag":null,"topics":["config","configuration","extensible","php","unity"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unity-framework.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-02T18:20:23.000Z","updated_at":"2022-05-13T04:14:42.000Z","dependencies_parsed_at":"2022-08-24T14:40:32.961Z","dependency_job_id":null,"html_url":"https://github.com/unity-framework/Config","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unity-framework%2FConfig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unity-framework%2FConfig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unity-framework%2FConfig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unity-framework%2FConfig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unity-framework","download_url":"https://codeload.github.com/unity-framework/Config/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250693459,"owners_count":21472266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["config","configuration","extensible","php","unity"],"created_at":"2024-08-02T05:01:18.611Z","updated_at":"2025-04-24T19:30:40.288Z","avatar_url":"https://github.com/unity-framework.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"# Unity/Config\n\nAn extensible configuration manager for PHP projects.\n\n**Get started managing your configurations.**\n\n- [Documentation](https://github.com/unity-framework/Config/blob/master/docs/documentation.md)\n- [Examples](https://github.com/unity-framework/Config/blob/master/docs/examples.md)\n\n## Features\n\n- Array access\n- Dot notation access\n- Configurations cache\n- Auto driver detection\n- Runtime modification\n\n## Supported drivers\n\n- [INI](#ini)\n- [PHP](#php)\n- [XML](#xml)\n- [YAML](#yaml)\n- [jSON](#json)\n\n## Installation\n\n    composer require unity/config\n\n## Usage\n\nYou have the follow configuration file: **configs/db.php** in your project folder containing the bellow configurations:\n\n```php\n\u003c?php\n\nreturn [\n    'user' =\u003e 'root',\n    'psw'  =\u003e 'toor',\n    'db'   =\u003e 'example',\n    'host' =\u003e 'localhost'\n];\n```\n\nand you want to manage these configurations, thats what you need to do:\n\n```php\n\u003c?php\n\nrequire \"vendor/autoload.php\";\n\n$config = (new ConfigManager())\n            -\u003esetSource('configs')\n            -\u003ebuild();\n```\n\nNow, to access a configuration you can use the `$config-\u003eget()`, e.g.:\n\n```php\necho $config-\u003eget('db.user');\n```\n\nOr in a more simple way, using array access:\n\n```php\necho $config['db']['user'];\n```\n\nBoth methods will have the same output:\n\n```php\nroot\n```\n\nAsk your self, is it easy???\n\n## Contributing\n\nWe will be really thankful if you make a fork, make your changes and send a pull request!\n\n## Credits\n\n- [Eleandro Duzentos](https://github.com/e200/) and [contributors](#).\n\n## License\n\nThe Unity/Config is licensed under the MIT license. See [license](https://github.com/unity-framework/Config/blob/master/license.md) file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funity-framework%2FConfig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funity-framework%2FConfig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funity-framework%2FConfig/lists"}