{"id":16314889,"url":"https://github.com/frostealth/php-data-storage","last_synced_at":"2025-09-15T20:18:10.258Z","repository":{"id":20199435,"uuid":"23470791","full_name":"frostealth/php-data-storage","owner":"frostealth","description":"Simple PHP Data Storage","archived":false,"fork":false,"pushed_at":"2015-11-13T11:41:27.000Z","size":152,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-20T09:34:42.146Z","etag":null,"topics":["collections","php-data-storage"],"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/frostealth.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}},"created_at":"2014-08-29T16:46:58.000Z","updated_at":"2023-06-03T21:03:54.000Z","dependencies_parsed_at":"2022-08-05T07:15:31.938Z","dependency_job_id":null,"html_url":"https://github.com/frostealth/php-data-storage","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/frostealth/php-data-storage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frostealth%2Fphp-data-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frostealth%2Fphp-data-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frostealth%2Fphp-data-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frostealth%2Fphp-data-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frostealth","download_url":"https://codeload.github.com/frostealth/php-data-storage/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frostealth%2Fphp-data-storage/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275313840,"owners_count":25442779,"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","status":"online","status_checked_at":"2025-09-15T02:00:09.272Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["collections","php-data-storage"],"created_at":"2024-10-10T21:55:32.571Z","updated_at":"2025-09-15T20:18:10.222Z","avatar_url":"https://github.com/frostealth.png","language":"PHP","readme":"# PHP Data Storage\n\nSimple PHP Data Storage.\n\n## Installation\n\nRun the [Composer](http://getcomposer.org/download/) command to install the latest stable version:\n\n```\ncomposer require frostealth/php-data-storage @stable\n```\n\n## Usage\n\n```php\n$storage = new frostealth\\storage\\Data(); // or new frostealth\\storage\\Data($array);\n$storage-\u003eset('login', 'example@example.com');\n\n// ...\n\nif ($storage-\u003ehas('login')) {\n    $login = $storage-\u003eget('login');\n    $storage-\u003eremove('login');\n}\n// or with default value\nif ($storage-\u003eget('login', false)) {\n    $login = $storage-\u003eget('login');\n    $storage-\u003eremove('login');\n}\n\n// ...\n\n$storage-\u003eclear(); // clear all values\n```\n\nWorking with arrays using \"dot\" notation\n\n```php\n$storage = new frostealth\\storage\\ArrayData();\n$storage-\u003eset('params', ['method' =\u003e 'post', 'url' =\u003e 'http://example.com/']);\n\n$url = $storage-\u003eget('params.url'); // 'http://example.com/'\n$storage-\u003eset('params.method', 'get');\n$method = $storage-\u003eget('params.method'); // 'get'\n$params = $storage-\u003eget('params'); // ['method' =\u003e 'get', 'url' =\u003e 'http://example.com/']\n\n$storage-\u003eset('options.my_option', 'value');\n$options = $storage-\u003eget('options'); // ['my_option' =\u003e 'value']\n\n```\n\n## Dependency Injection\n\n```php\nuse frostealth\\storage\\DataInterface;\n\nclass MyClass\n{\n    /**\n     * @var DataInterface\n     */\n    protected $data;\n\n    /**\n     * @param DataInterface $data\n     */\n    public function __construct(DataInterface $data)\n    {\n        $this-\u003edata = $data;\n    }\n}\n```\n\n## License\n\nThe MIT License (MIT).\nSee [LICENSE.md](https://github.com/frostealth/php-data-storage/blob/master/LICENSE.md) for more information.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrostealth%2Fphp-data-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrostealth%2Fphp-data-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrostealth%2Fphp-data-storage/lists"}