{"id":18620800,"url":"https://github.com/exts/configured","last_synced_at":"2026-02-10T18:36:09.215Z","repository":{"id":56980740,"uuid":"53973682","full_name":"exts/configured","owner":"exts","description":"PHP Configuration Library","archived":false,"fork":false,"pushed_at":"2025-06-17T16:00:55.000Z","size":58,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-21T17:01:18.810Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/exts.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,"zenodo":null}},"created_at":"2016-03-15T19:47:27.000Z","updated_at":"2025-06-17T16:00:58.000Z","dependencies_parsed_at":"2025-08-21T16:43:50.523Z","dependency_job_id":"2a54e36a-3f0c-4942-ac17-d4ef0b34f47c","html_url":"https://github.com/exts/configured","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/exts/configured","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exts%2Fconfigured","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exts%2Fconfigured/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exts%2Fconfigured/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exts%2Fconfigured/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/exts","download_url":"https://codeload.github.com/exts/configured/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exts%2Fconfigured/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29311359,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T17:48:59.043Z","status":"ssl_error","status_checked_at":"2026-02-10T17:45:37.240Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-07T04:08:01.629Z","updated_at":"2026-02-10T18:36:09.158Z","avatar_url":"https://github.com/exts.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Exts\\Configured\n\nThis is a library created for loading different types of config files into arrays and being able to easily manage\nthe configuration data using either dot notation or directly accessing the array data.\n\n## Installation\n\n`composer require exts/configured:1.*`\n\n## Example\n```php\n    use Exts\\Configured\\ConfigLoader;\n    use Exts\\Configured\\Loader\\YAML;\n    \n    $config = new ConfigLoader(new Yaml(__DIR__ . '/config'));\n    \n    // load data directly from file using dot notation\n    // database = filename 'database.yml'\n    //\n    // yaml data example:\n    // -------------------\n    //  user: 'example'\n    //  pass: 'examplepwd'\n    //  host: '127.0.0.1'\n    //  tble: 'example_table'\n    // -------------------\n    \n    $dbUser = $config-\u003eget('database.user', 'root');\n    $dbPass = $config-\u003eget('database.pass', 'pass');\n    $dbTble = $config-\u003eget('database.tble', 'example');\n    $dbHost = $config-\u003eget('database.host', 'localhost');\n    \n    var_dump($dbUser, $dbPass, $dbTble, $dbHost);\n    \n    // you can also load the data as an array object\n    // this takes a filename directly you can include or exclude the extension 'yml' as an example\n    $db = $config-\u003egetArrayObject('database');\n    \n    // you can access the array data directly like so:\n    $dbUser = $db['user'] ?? 'root';\n    \n    // you can access the data using dot notation lets say our data looked like laravel for example:\n    // ---------------------\n    // default: 'mysql'\n    // connections:\n    //   mysql:\n    //     driver: 'mysql'\n    //     host: 'localhost'\n    //     database: ''\n    //     username: ''\n    //     password: ''\n    //     charset: 'utf8'\n    //     collation: 'utf8_unicode_ci'\n    //     prefix: ''\n    // ---------------------\n    // Then we could do something like:\n    \n    $dbUser = $db-\u003eget('connections.mysql.username', 'root');\n    \n    // We can also edit or add mysql data directly using dot notation like so:\n    $db-\u003eset('connections.mysql.username', 'example_user');\n    var_dump($db['connections']['mysql']['username']);\n    \n    // Which I think is pretty cool_\n    \n```\n\n## Saving an `ConfigArray` object using `ConfigStorage` *(since v1.1)*\n\n```php\n    use Exts\\Configured\\ConfigArray;\n    use Exts\\Configured\\ConfigStorage;\n    use Exts\\Configured\\Storage\\YAML;\n    \n    $saveFile = 'example.yml';\n    $saveDirectory = __DIR__ . '/config/';\n    \n    $exampleArrayObject = new ConfigArray(['example', 'data']);\n    \n    $exampleStorage = new ConfigStorage(new YAML($saveDirectory));\n    $exampleStorage-\u003estore($saveFile, (array) $exampleArrayObject);\n```\n\n## Custom Loaders\n\nCustom loaders are pretty simple, just create a class that implements the `LoaderInterface` and call it a day :), will\nwrite an example w/ tests later if you'd like.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexts%2Fconfigured","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexts%2Fconfigured","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexts%2Fconfigured/lists"}