{"id":15296438,"url":"https://github.com/commandstring/env","last_synced_at":"2025-10-07T08:31:08.587Z","repository":{"id":64967188,"uuid":"580118832","full_name":"CommandString/Env","owner":"CommandString","description":"A singleton class used for storing environment variables","archived":true,"fork":false,"pushed_at":"2023-02-15T15:56:34.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-17T13:09:13.073Z","etag":null,"topics":["env","environment","environment-variables","php","php8"],"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/CommandString.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-12-19T19:09:29.000Z","updated_at":"2024-08-27T04:32:16.000Z","dependencies_parsed_at":"2024-09-30T18:10:31.664Z","dependency_job_id":null,"html_url":"https://github.com/CommandString/Env","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.2857142857142857,"last_synced_commit":"6151d79a53e6a9fd620c8fbdfeeb8fd98be12165"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommandString%2FEnv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommandString%2FEnv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommandString%2FEnv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommandString%2FEnv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CommandString","download_url":"https://codeload.github.com/CommandString/Env/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235607123,"owners_count":19017298,"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":["env","environment","environment-variables","php","php8"],"created_at":"2024-09-30T18:10:29.992Z","updated_at":"2025-10-07T08:31:03.252Z","avatar_url":"https://github.com/CommandString.png","language":"PHP","readme":"# commandstring/env #\nA singleton class used for storing environment variables\n\n# Requirements\n\n* PHP 8.1\n* Composer\n\n# Creating with JSON file\n\n## /env.json\n```json\n{\n    \"mysql\": {\n        \"username\": \"root\",\n        \"password\": \"password\",\n        \"host\": \"127.0.0.1\",\n        \"port\": 3306\n    }\n}\n```\n\n## /index.php\n```php\nEnv::createWithJsonFile(__DIR__.\"/env.json\");\n```\n\n# Creating with an array\n\n```php\nEnv::createFromArray([\"hello\" =\u003e \"world\"]);\n```\n### Note that nested arrays will be converted into an stdClass\n\n# Getting / Setting variables\n\n```php\nEnv::get(\"property\");\nEnv::get()-\u003eproperty;\n\nEnv::get()-\u003eproperty = \"value\";\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommandstring%2Fenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommandstring%2Fenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommandstring%2Fenv/lists"}