{"id":21467403,"url":"https://github.com/elusivecodes/fyreconfig","last_synced_at":"2025-07-15T05:31:26.827Z","repository":{"id":62508420,"uuid":"476989193","full_name":"elusivecodes/FyreConfig","owner":"elusivecodes","description":"FyreConfig is a free, open-source configuration library for PHP.","archived":false,"fork":false,"pushed_at":"2024-11-15T10:10:36.000Z","size":95,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-15T11:20:49.186Z","etag":null,"topics":["configuration","php"],"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/elusivecodes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-02T08:07:32.000Z","updated_at":"2024-11-15T10:10:17.000Z","dependencies_parsed_at":"2024-11-15T11:20:00.814Z","dependency_job_id":"7aafbf9e-bbe4-4f62-894c-8f61a2cdcaf1","html_url":"https://github.com/elusivecodes/FyreConfig","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elusivecodes%2FFyreConfig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elusivecodes%2FFyreConfig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elusivecodes%2FFyreConfig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elusivecodes%2FFyreConfig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elusivecodes","download_url":"https://codeload.github.com/elusivecodes/FyreConfig/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226017470,"owners_count":17560519,"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":["configuration","php"],"created_at":"2024-11-23T08:17:53.350Z","updated_at":"2024-11-23T08:17:54.194Z","avatar_url":"https://github.com/elusivecodes.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FyreConfig\r\n\r\n**FyreConfig** is a free, open-source configuration library for *PHP*.\r\n\r\n\r\n## Table Of Contents\r\n- [Installation](#installation)\r\n- [Basic Usage](#basic-usage)\r\n- [Methods](#methods)\r\n\r\n\r\n\r\n## Installation\r\n\r\n**Using Composer**\r\n\r\n```\r\ncomposer require fyre/config\r\n```\r\n\r\nIn PHP:\r\n\r\n```php\r\nuse Fyre\\Config\\Config;\r\n```\r\n\r\n\r\n## Basic Usage\r\n\r\n```php\r\n$config = new Config();\r\n```\r\n\r\n**Autoloading**\r\n\r\nIt is recommended to bind the *Config* to the [*Container*](https://github.com/elusivecodes/FyreContainer) as a singleton.\r\n\r\n```php\r\n$container-\u003esingleton(Config::class);\r\n```\r\n\r\n\r\n## Methods\r\n\r\n**Add Path**\r\n\r\nAdd a config path.\r\n\r\n- `$path` is the path to add.\r\n- `$prepend` is a boolean indicating whether to prepend the file path, and will default to *false*.\r\n\r\n```php\r\n$config-\u003eaddPath($path, $prepend);\r\n```\r\n\r\n**Clear**\r\n\r\nClear config data.\r\n\r\n```php\r\n$config-\u003eclear();\r\n```\r\n\r\n**Consume**\r\n\r\nRetrieve and delete a value from the config using \"dot\" notation.\r\n\r\n- `$key` is the key to lookup.\r\n- `$default` is the default value to return, and will default to *null*.\r\n\r\n```php\r\n$value = $config-\u003econsume($key, $default);\r\n```\r\n\r\n**Delete**\r\n\r\nDelete a value from the config using \"dot\" notation.\r\n\r\n- `$key` is the key to remove.\r\n\r\n```php\r\n$config-\u003edelete($key);\r\n```\r\n\r\n**Get**\r\n\r\nRetrieve a value from the config using \"dot\" notation.\r\n\r\n- `$key` is the key to lookup.\r\n- `$default` is the default value to return, and will default to *null*.\r\n\r\n```php\r\n$value = $config-\u003eget($key, $default);\r\n```\r\n\r\n**Get Paths**\r\n\r\nGet the paths.\r\n\r\n```php\r\n$paths = $config-\u003egetPaths();\r\n```\r\n\r\n**Has**\r\n\r\nDetermine if a value exists in the config.\r\n\r\n- `$key` is the key to check for.\r\n\r\n```php\r\n$has = $config-\u003ehas($key);\r\n```\r\n\r\n**Load**\r\n\r\nLoad a file into the config.\r\n\r\n- `$file` is a string representing the config file.\r\n\r\n```php\r\n$config-\u003eload($file);\r\n```\r\n\r\n**Remove Path**\r\n\r\nRemove a path.\r\n\r\n- `$path` is the path to remove.\r\n\r\n```php\r\n$config-\u003eremovePath($path);\r\n```\r\n\r\n**Set**\r\n\r\nSet a config value using \"dot\" notation.\r\n\r\n- `$key` is the key.\r\n- `$value` is the value to set.\r\n- `$overwrite` is a boolean indicating whether previous values will be overwritten, and will default to *true*.\r\n\r\n```php\r\n$config-\u003eset($key, $value, $overwrite);\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felusivecodes%2Ffyreconfig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felusivecodes%2Ffyreconfig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felusivecodes%2Ffyreconfig/lists"}